[MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources

Topics and discussion about specific mods
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.13.17+] Creative Mode 0.1.4 - Instant bp error fix

Post by Nexela »

I will still need to restore the GUI for the respawned player.
I am not so sure about this. I think when you die in MP player is still valid just the player.character entity is not. but then again I guess if you are using values from the character entity then you will need to. sooooo disregard :)
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.13.17+] Creative Mode 0.1.4 - Instant bp error fix

Post by Mooncat »

Nexela wrote:I am not so sure about this. I think when you die in MP player is still valid just the player.character entity is not. but then again I guess if you are using values from the character entity then you will need to. sooooo disregard :)
Yes, you are right. Somehow I was thinking about on_player_created and didn't realize on_player_respawned is a different thing. :P
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.13.17+] Creative Mode 0.1.4 - Instant bp error fix

Post by Mooncat »

One good news and one bad news.

Bad news first:
Nexela wrote:3. Instant BP doesn't like placing items which are immediately destroyed and replaced by a mods on_built_event
Unfortunately, even a delay before raising the event doesn't help. I have submitted a bug report for this: [0.14.2] on_built_entity error if others destroy the entity
I have no idea how the devs will fix it. Hope they can find the right way soon. :geek:



Good news: we are going to have better performance for wired Item Source, Item Void and Duplicator in the next version of Creative Mode, because this issue is finally solved! :D
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Mooncat »

During the development of v0.2.0, I encountered some bugs around the config. And when I browsed mods from the Mod Portal, I saw many mods have already been updated for Factorio 0.14. Also, after reviewing the mod spotlight of Test Mode, I realized it will be quite some time before I can release v0.2.0.

So, let's have a quick update for 0.14 first. Fixed the config bugs, and took advantage of the API from Factorio 0.14.3 to improve performance of wired Item Source, Item Void and Duplicator. :)
Added remote.call("creative-mode", "is_enabled") for modders.


For the new entities, because I have already reordered the recipes, and I don't want to bring too many changes from the v0.2.0 branch back to v0.1.5, please bear with me. :P

A small preview of the new GUI, still work in progress:
Creative Mode new menu preview.png
Creative Mode new menu preview.png (404.76 KiB) Viewed 11221 times
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Nexela »

Feature request #212.a

Auto destroy stuff in trash slots when creative_mode and instant_deconstruction is enabled.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by aubergine18 »

Mooncat wrote:A small preview of the new GUI, still work in progress:
Creative Mode new menu preview.png
Regarding GUI, how are the [?] links working? Have you just set tooltip on label or are they buttons with no background? Just wondering as I'm planning to do something similar in my radio mod.
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Mooncat »

Nexela wrote:Feature request #212.a

Auto destroy stuff in trash slots when creative_mode and instant_deconstruction is enabled.
According to my record, this is your #289 request. :ugeek:
But they are good requests, so this one is accepted as well. And thanks for giving me ideas.
I will make it a separate cheat and call it "instant_trash". Also another cheat "instant_request". ;)
aubergine18 wrote:Regarding GUI, how are the [?] links working? Have you just set tooltip on label or are they buttons with no background? Just wondering as I'm planning to do something similar in my radio mod.
They are labels with tooltips. The descriptions for cheats are necessary, especially when not all people know what is cheat mode or god mode. But I think labels don't usually have tooltips, so I add [?] in caption to emphasize "If you don't know what it is, hover it to get 1 or 2 lines of details." :P
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Nexela »

Bug report #3 (It is so low cause your code doesn't have bugs!) :)

Very minor though

Loader Items still have the hidden flag set making them unrequestable because you can't pick em :)
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Mooncat »

Nexela wrote:It is so low cause your code doesn't have bugs
hm... no, we have only a few bug reports just because people haven't played with the related features. Like the config bugs that were fixed in the last version. I haven't used them since v0.1.0. But when I remade them, I was surprised that they don't even work! I think they have already been broken by the optimization in v0.1.1 but no one noticed. :lol:

I think this gonna change in v0.2 because I have made the configs for Item Source/Void/Duplicator to entity GUI, i.e. they are more accessible.

Anyway, let's get back to the loaders....
I think we still cannot unhide items in runtime? I don't want to remove their "hidden" flag during data phase, as people may not like to see them in the requesting / filter slots in normal games. I want to fix this issue too, not only for the loaders but also for all creative items, but I don't know a valid solution. :(
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Nexela »

Mooncat wrote:
Nexela wrote: I think we still cannot unhide items in runtime? I don't want to remove their "hidden" flag during data phase, as people may not like to see them in the requesting / filter slots in normal games. I want to fix this issue too, not only for the loaders but also for all creative items, but I don't know a valid solution. :(

No we can't but I have given this a lil bit of thought the mod "is" creative mode so as long as the mod is installed un-hiding them shouldn't be a problem
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Mooncat »

Let's give it a try: viewtopic.php?f=28&t=32653 ;)
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Mooncat »

It has been some time since the last post, and even longer since the last update. I have to admit that the development process is tougher and slower than I thought. But I have finally got something to see.
And I am happy that rk84, the author of Test Mode, has allowed me to combine his amazing mod with Creative Mode. So we are going to have some new cheats as well as the new magic wands. :D

Here are some GIFs about what I have done so far. The new entities are just a piece of cake compared to the menu, so I won't show them explicitly.
The New Menu
Cheat - Keep Last Item
Cheat - Instant Research
You may wonder, is it really that challenging?
Well, if it is just about cheats on and off, it can be done quickly indeed.
But 0.14 is mainly about multiplayer, and when multiplayer is involved, things get nasty:
Player Selector
Anyway, (I think) I have gone through the hardest stage.
While I am sure the official release will not be within this month, I will release a test version soon as I expect there will be some bugs especially related to multiplayer.
The test version will not include all the planned features. More specifically, I haven't implemented the Magic Wands yet. Still you can have a look on the new menu. ;)

Here is the "version-history" for v0.2.0 so far:

Code: Select all

Version 0.2.0:
	- New:
		- New GUI after Creative Mode is enabled. With it, you can:
			- enable or disable cheats whenever you like
			- change build options (not yet finished)
			- print events in console
			- check remote interfaces
			- control the accessibility of different options for non-admin players in multiplayer games (not yet finished)
		- Cheats are separated into Personal Cheats, Team Cheats and Surface Cheats:
			- Personal cheats: each player can have different set of personal cheats enabled.
			- Team cheats: each cheat applies to all players in the selected teams (forces).
			- Surface cheats: each cheat applies to the selected surfaces.
		- New cheats:
			- Personal cheats: keep last item, instant request, instant trash, god mode
			- Team cheats: creative tools' recipes, railgun recipes, instant research, reach distance, mining speed, running speed, chart all, kill all units
			- Surface cheats: peace mode, kill all enemies
		- New options for the start-game popup: Yes with cheats, No permanently
		- New entities: Super Loader, Super Boiler, Super Cooler.
		- Now you can copy-and-paste between duplicating chests. If the first slot of the copied chest is occupied by an item, this item will fill the pasted chest. Otherwise, the pasted chest will be cleared.
		- Loader, Fast Loader, Express Loader, Railgun and Railgun Dart are now included inside the creative chests.
		- Item Source is renamed to Matter Source. When no filter is set, it can provide materials according to the crafting recipe in its target crafting machine, provide science pack to its target laboratory, or any items according to the filters on its targets (e.g. filters on cargo wagon).
		- Item Void is renamed to Matter Void. When no filter is set, it can also nullify fluids in its front.
		- A little bit further optimization for Item Source (now Matter Source), Item Void (now Matter Void) and Duplicator (now Matter Duplicator).
		- Added left click sound for buttons.
	- Fixes:
		- Fixed unsynchronised GUI for creative chest in multiplayer game when two or more players are checking the same chest. 
	- Changes:
		- Factorio version is now required to be equal or higher than 0.14.7 (from 0.14.4)
		- New recipe category icon.
		- Reordered items and recipes.
		- The creative tools' recipes are no longer automatically enabled together with Creative Mode. You need to enable the new team cheat - creative tools' recipes - to enable them.
		- All config for Item Source (now Matter Source), Item Void (now Matter Void), Duplicator (now Matter Duplicator) are removed from config.lua. Instead, you can now configure each individual entities in game just like the creative chests.
		- Removed the popups for enable/disable cheats. Use the new GUI to do that instead.
		- Removed remote.call("creative-mode", "creative_chest_per_cycle"), since the total number of item groups have already been shown in the creative chest GUI.
		- Removed remote.call("creative-mode", "instant_blueprint", true|false), use the new GUI to enable/disable it.
		- Removed remote.call("creative-mode", "instant_deconstruction", true|false), use the new GUI to enable/disable it.
	- Minor Changes:
		- Duplicator is renamed to Matter Duplicator.
Todo:
  • Finish the menu.
  • Magic Wands - there will be 3 magic wands, each for different purposes: Create and Destroy, Heal and Revive, and Property Changer.
Last edited by Mooncat on Mon Sep 26, 2016 1:50 am, edited 1 time in total.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Nexela »

Mooncat wrote:Player Selector
Should have an option to clear inventory and clear/transfer inventory of a player see https://www.reddit.com/r/factorio/comme ... ntory_for/
Mooncat wrote:Magic Wands - there will be 3 magic wands, each for different purposes: Create and Destroy, Heal and Revive, and Property Changer.
Needs a 4th magic wand, mod debugger :) I will shoot you over an example of what I have so far soon. Right now it gets entity/item data, Gui flow charting (this is really handy)
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - Update for Factorio 0.14

Post by Mooncat »

Nexela wrote:
Mooncat wrote:Player Selector
Should have an option to clear inventory and clear/transfer inventory of a player see https://www.reddit.com/r/factorio/comme ... ntory_for/
I think making another mod for that is more appropriate. It is overkill for having Creative Mode if he just wants to check the inventories of other players and get back items from them. And the player selector is a multi-selector, so it doesn't work well in this case.
I won't be free in the near future, because I have many other mod ideas waiting to be implemented (e.g. blueprint editor). So we will need someone else to help. :mrgreen:

Edit: another reason for not implementing such mod soon is that it will rely on GUI heavily, which will very likely require rework when 0.15 is released. So, no, I won't make it in 0.14. :P
Nexela wrote:
Mooncat wrote:Magic Wands - there will be 3 magic wands, each for different purposes: Create and Destroy, Heal and Revive, and Property Changer.
Needs a 4th magic wand, mod debugger :) I will shoot you over an example of what I have so far soon. Right now it gets entity/item data, Gui flow charting (this is really handy)
My idea about the Property Changer included showing the entities statistics by using LuaPlayer::print_entity_statistics (though I haven't used it and don't know what will the result be). But your mod debugger sounds much better. I'm waiting. 8-)
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

The long awaited Creative Mode v0.2.0 is going to be finished soon (tm). But first, I would like you to help me test the pre-finished version.
I have uploaded the WIP version to the bottom of the first post, feel free to download it, test it, play with it, and report any feedback. :D
Details have been written under the file. Enjoy.

I may release another WIP version later, or if nothing goes wrong, I may even release the actual v0.2.0. :lol:
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

Checking it out now!
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

BUG - Team - Cheats have to un-click the team then click new team for it to update.

Request Surface cheats act like team cheats and show each surface!
Request Surface - Teleport to spawn coords on surface

Some of these might be planned under your "build" menu just posting them here for ideas :)
Request - Team cheats - destroy all entities on team
Request - Team cheats
Request - Surfaces - destroy all entities on surface
Request - Surfaces - destroy surface
Request - Force - remove force

Request - interfaces - allow to click to run interface with no arguments.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

Thanks for your help, again! :D
Nexela wrote:BUG - Team - Cheats have to un-click the team then click new team for it to update.
hm... I don't see anything wrong on my side.

Just want to make sure you didn't get it wrong: the right side shows the common status of all the selected teams. If any team has different status on any cheat, such cheat will appear to have no status.
E.g. You have selected team Player and Enemy, both of them have Instant Research enabled, so the Instant Research cheat also appears to be enabled.
Then, someone disabled Instant Research for Enemy, so you don't see the status of Instant Research anymore. Deselecting any of them will make the status appears again.

If you have already known it and there is still problem, please provide more details. :)
Nexela wrote:Request Surface cheats act like team cheats and show each surface!
It is already there, you just need more than one surfaces. For example, build a factory of Factorissimo and you will immediately see the surface selection list.
Same goes to Personal Cheats, you need another player to join the game. ;)
Nexela wrote:Request Surface - Teleport to spawn coords on surface
I like this idea. But it is a little bit hard to do.
I want it to be a Personal Cheats, since it will only affect the individual player, not the whole surface. Also, admins will have the power to teleport other non-admin players. :lol:
But that means I will have to make another list for selecting which surface to teleport to. I think I will wait for the new UI API in 0.15. Hopefully I can use combo box for that.
Nexela wrote:Some of these might be planned under your "build" menu just posting them here for ideas :)
Request - Team cheats - destroy all entities on team
Request - Surfaces - destroy all entities on surface
I am not sure about these. I wonder whether they are necessary.
More importantly, I worry about their performance issue. You can already see that with Surface Cheat - kill all enemies. It can really make the game hangs for minutes when applied on large surface. :?
Nexela wrote:Request - Surfaces - destroy surface
Request - Force - remove force
I think I have to say no for these, at least for now.
Destroying surfaces without creating new ones is not very useful. And such action is very likely to break mods like Factorissimo.
Maybe I will add the option for creating surfaces, and then destroying surfaces. But due to the complicated UI, this will only happen after 0.15 is released. :P

About force, it is more complicated. AFAIK, we can't simply remove a force. We have to merge it with another existing force. It makes sense because we have to settle down players after we have removed their team.
And creating a new force is not easy either. You will have to set its relationship with other existing forces, and then transfer players to it.
This whole thing becomes force management and I think SpaceBook or any force management mod is more suitable for that. :)
Nexela wrote:Request - interfaces - allow to click to run interface with no arguments.
Unfortunately, this is technically impossible. Those method names on the right side are actually Booleans. Don't ask me why, I have no idea.
It means that I don't know anything except their names. It is a little bit useless, but at least you know what methods they provide.
To actually use them, you will need to take a look on their documents first.
I will add info about this on the UI.


I will also add two more Surface Cheats:
- Remove all enemies (not kill them, simply remove them. No loots. Less lag, i guess)
- Don't spawn enemies (new chunks will have no enemies at all)

By the way, have you tried setting the expansion min and max CD (in Cheats > Game Settings) to 0? The aliens are so fun to watch. Remember to turn on god mode. :lol:
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Nexela »

Mooncat wrote:Thanks for your help, again! :D
Nexela wrote:BUG - Team - Cheats have to un-click the team then click new team for it to update.
hm... I don't see anything wrong on my side.

Just want to make sure you didn't get it wrong: the right side shows the common status of all the selected teams. If any team has different status on any cheat, such cheat will appear to have no status.
E.g. You have selected team Player and Enemy, both of them have Instant Research enabled, so the Instant Research cheat also appears to be enabled.
Then, someone disabled Instant Research for Enemy, so you don't see the status of Instant Research anymore. Deselecting any of them will make the status appears again.
If you have already known it and there is still problem, please provide more details. :)
Gotcha!
Nexela wrote:Request Surface cheats act like team cheats and show each surface!
It is already there, you just need more than one surfaces. For example, build a factory of Factorissimo and you will immediately see the surface selection list.
Same goes to Personal Cheats, you need another player to join the game. ;)
I am one step behind yet again :)
Nexela wrote:Request Surface - Teleport to spawn coords on surface
I like this idea. But it is a little bit hard to do.
I want it to be a Personal Cheats, since it will only affect the individual player, not the whole surface. Also, admins will have the power to teleport other non-admin players. :lol:
But that means I will have to make another list for selecting which surface to teleport to. I think I will wait for the new UI API in 0.15. Hopefully I can use combo box for that.
I suppose I can wait till .15 for this :)

Nexela wrote:Some of these might be planned under your "build" menu just posting them here for ideas :)
Request - Team cheats - destroy all entities on team
Request - Surfaces - destroy all entities on surface
I am not sure about these. I wonder whether they are necessary.
More importantly, I worry about their performance issue. You can already see that with Surface Cheat - kill all enemies. It can really make the game hangs for minutes when applied on large surface. :?
These would be like super cheats Maybe having them under Magic Wand stuff might be better. Also an additional one for Destroying all doodads. My main use for Creative Mode is mod development/debugging Hence having quicker access to stuff like this is always better.

Nexela wrote:Request - Surfaces - destroy surface
Request - Force - remove force
I think I have to say no for these, at least for now.
Destroying surfaces without creating new ones is not very useful. And such action is very likely to break mods like Factorissimo.
Maybe I will add the option for creating surfaces, and then destroying surfaces. But due to the complicated UI, this will only happen after 0.15 is released. :P

About force, it is more complicated. AFAIK, we can't simply remove a force. We have to merge it with another existing force. It makes sense because we have to settle down players after we have removed their team.
And creating a new force is not easy either. You will have to set its relationship with other existing forces, and then transfer players to it.
This whole thing becomes force management and I think SpaceBook or any force management mod is more suitable for that. :)
I always forget about that mod :).
Nexela wrote:Request - interfaces - allow to click to run interface with no arguments.
Unfortunately, this is technically impossible. Those method names on the right side are actually Booleans. Don't ask me why, I have no idea.
It means that I don't know anything except their names. It is a little bit useless, but at least you know what methods they provide.
To actually use them, you will need to take a look on their documents first.
I will add info about this on the UI.
Ohh I shall attempt to explain this a little better.

It would (attempt) to call them without any arguments.
so if a mod had a printGlobal interface clicking the button would run remote.call(label.interface.caption, button.interface.caption)
Granted this may cause errors with interfaces that require parameters so possibly a config switch to enable them
This in the future could go one step further. clicking the interface name opens up a gui with 6 textboxes each one representing an argument to pass.

I will also add two more Surface Cheats:
- Remove all enemies (not kill them, simply remove them. No loots. Less lag, i guess)
- Don't spawn enemies (new chunks will have no enemies at all)

By the way, have you tried setting the expansion min and max CD (in Cheats > Game Settings) to 0? The aliens are so fun to watch. Remember to turn on god mode. :lol:
Haven't played around with expansion yet

Also noticed the boiler/cooler Good stuff, actually at a point where I need them for testing.
User avatar
Mooncat
Smart Inserter
Smart Inserter
Posts: 1197
Joined: Wed May 18, 2016 4:55 pm
Contact:

Re: [MOD 0.14.4+] Creative Mode 0.1.5 - WIP Beta Test for 0.2.0

Post by Mooncat »

Nexela wrote:
Mooncat wrote:
Nexela wrote:Request - interfaces - allow to click to run interface with no arguments.
Unfortunately, this is technically impossible. Those method names on the right side are actually Booleans. Don't ask me why, I have no idea.
It means that I don't know anything except their names. It is a little bit useless, but at least you know what methods they provide.
To actually use them, you will need to take a look on their documents first.
I will add info about this on the UI.
Ohh I shall attempt to explain this a little better.

It would (attempt) to call them without any arguments.
so if a mod had a printGlobal interface clicking the button would run remote.call(label.interface.caption, button.interface.caption)
Granted this may cause errors with interfaces that require parameters so possibly a config switch to enable them
This in the future could go one step further. clicking the interface name opens up a gui with 6 textboxes each one representing an argument to pass.
I will try about that. I wonder the error will force quit the game. But yea, I can add a config for that, maybe directly on the UI. ;)


Found a bug last night and fixed for the next test:
- Switching from/to god mode will lose blueprint contents and reset item durabilities.
Post Reply

Return to “Mods”