[MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
-
- Burner Inserter
- Posts: 10
- Joined: Sun Nov 26, 2017 4:03 am
- Contact:
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
I'm having an issue with the CM GUI button (the main button that opens the GUI) not showing up after starting a NG+ with the New Game+ mod. Is there a command to force the menu to show?
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
thegroundbelowme wrote:Is there a command to force the menu to show?
Code: Select all
/c remote.call("creative-mode", "enable")
-
- Burner Inserter
- Posts: 10
- Joined: Sun Nov 26, 2017 4:03 am
- Contact:
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
I had to disable it first, but that did the trick, thanks!
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
you are welcome. glad it worked.thegroundbelowme wrote:I had to disable it first, but that did the trick, thanks!
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
Holy.... I didn't expect 0.16 can be released so soon. I'm still busy, so I can't guaranteer when I can release updates of my mods.
Feel free to takeover it if anyone can't wait.
Edit: I meant create a new mod based on this one, so I can come back at anytime.
Feel free to takeover it if anyone can't wait.
Edit: I meant create a new mod based on this one, so I can come back at anytime.
There should be a reason that I didn't raise on_robot_mined_entity. But I have forgotten. I will implement it if I really can't find the reason.Therax wrote:Creative Mode instant-deconstruction breaks my mod, leaving behind orphan entities.
My mod (viewtopic.php?f=93&t=54343) creates invisible partner inserter entities, which are removed when the on_player_mined_entity or on_robot_mined_entity events are raised. It's necessary for my mod to use these events because any items held by the inserters need to be returned to the player via the buffer parameter of these two events. Other mods that create partner chest entities would have a similar problem.
Creative Mode currently only raises the on_robot_pre_mined event, which is unfortunately insufficient. I think you probably need to either raise on_entity_died (as you discussed yourself at viewtopic.php?f=34&t=34952&start=60#p218915), or raise both on_robot_pre_mined and on_robot_mined_entity, providing a dummy version of buffer as well.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
Mooncat, take your time friend. we love what you do for us all!
has anyone tried a quick and dirty update of the mod? changing the version to 0.16?
has anyone tried a quick and dirty update of the mod? changing the version to 0.16?
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
looking forward to seeing this mod updated to 0.16?
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
I tried to send you a few bucks to your Paypal in the first post since I use your mod and wanted to show my appreciation. Unfortunately, I get an error when sending and I'm pretty sure it's not related to my account.Mooncat wrote:Holy.... I didn't expect 0.16 can be released so soon. I'm still busy, so I can't guaranteer when I can release updates of my mods.
We can’t send your payment right now. If you keep running into this issue, please contact PayPal.
Yes, I tried this, but the fix is not that simple. To start, the function get_circuit_connector_sprites which is used all over entity.lua seems to have been removed in 0.16. I am not familiar enough with the API to know how that same information is to be referenced now, though I do see some potentially useful examples in base\prototypes\entity\demo-entities.lua if anyone else wants to take a look.impetus maximus wrote:has anyone tried a quick and dirty update of the mod? changing the version to 0.16?
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
figured it wouldn't be that simple with all the changes made. thanks for the reply.
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
I made a quick patch to get itMooncat wrote:Holy.... I didn't expect 0.16 can be released so soon. I'm still busy, so I can't guaranteer when I can release updates of my mods.
Feel free to takeover it if anyone can't wait.
Edit: I meant create a new mod based on this one, so I can come back at anytime.
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
0.16 added a really nifty chest type: "infinity-container"
By switching all creative, duplicating and void chests to this type you can save a fair bit of lua performance.
For Creative chests for example all control.lua would have to do is set infinity_filters and remove_unfiltered_items=true in on_built_entity.
By switching all creative, duplicating and void chests to this type you can save a fair bit of lua performance.
For Creative chests for example all control.lua would have to do is set infinity_filters and remove_unfiltered_items=true in on_built_entity.
My Mods: mods.factorio.com
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
as soon as 0.16.6 lands, i'll be giving it a whirl. appreciate it.chrisgbk wrote: I made a quick patch to get itsort-ofrunning in 0.16.Pretty much every GUI is broken and crashes the game currently due to changes made internally, butIt runs and the main functionality is there.
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
hm.... I have checked on the Internet, found some people asking the same issue but no obvious solution. I'm afraid I can't do anything here.Slackie wrote:I tried to send you a few bucks to your Paypal in the first post since I use your mod and wanted to show my appreciation. Unfortunately, I get an error when sending and I'm pretty sure it's not related to my account.Mooncat wrote:Holy.... I didn't expect 0.16 can be released so soon. I'm still busy, so I can't guaranteer when I can release updates of my mods.
But I'm very happy knowing that you want to support me.
Thanks a lot! I have tried fixing the errors in my mod but there are just too many errors and I don't have enough time. Maybe I will base on your work to update my mod when I come back.chrisgbk wrote:I made a quick patch to get itsort-ofrunning in 0.16.Pretty much every GUI is broken and crashes the game currently due to changes made internally, butIt runs and the main functionality is there.
Yes, I found that too! And it is amazingly useful! I'm thinking about migrating all the chests from this mod to the infinity chest!Optera wrote:0.16 added a really nifty chest type: "infinity-container"
By switching all creative, duplicating and void chests to this type you can save a fair bit of lua performance.
For Creative chests for example all control.lua would have to do is set infinity_filters and remove_unfiltered_items=true in on_built_entity.
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
I know there are more pressing issues, like getting this to work on .16, but blueprint data is not copied using the duplicating chest. Is it possible to change this?
Last edited by ichVII on Wed Dec 20, 2017 4:46 pm, edited 1 time in total.
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
Absolutely; there weren't actually a significant number of errors, it's just a tad bit tedious constantly launching the game, fixing the errors that appear, then repeat 40 times. I was also teaching myself all the lua modding as I was going, because I don't have experience with factorio modding (but I do have programming experience) so it made for slow going, as opposed to someone more experienced.Mooncat wrote:
Thanks a lot! I have tried fixing the errors in my mod but there are just too many errors and I don't have enough time. Maybe I will base on your work to update my mod when I come back.
I think the only things broken but disabled instead of patched currently are magic wand smoke (entity smoke is a hard error, needs to be migrated to the new Trivial Smoke), and custom styles (only the ones that inherit from "flow" are broken), seems "flow" now has a direction when instanced, so styles have to inherit from the specialized style and be either "vertical_flow_style" or "horizontal_flow_style" and it was easier to just patch out the styles than fix all of them. But I don't fully understand the GUI system so it's possible this isn't actually the case and there is some other error at play.
The rest of the fixes were dealing with changed property names (ie: column_count instead of colspan) and more strict enforcement of creation order (ie: if a style is parented, the parent style has to exist before the child style gets created) and other such things.
- impetus maximus
- Smart Inserter
- Posts: 1299
- Joined: Sat Aug 20, 2016 10:07 pm
- Contact:
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
chrisgbk, so far so good with 'Creative Mode (Fix for 0.16)' in 0.16.6
haven't tried everything, but the cheats, matter/random item source, void/duplicating chests, and active power supplies are all working.
many thanks for assisting Mooncat.
haven't tried everything, but the cheats, matter/random item source, void/duplicating chests, and active power supplies are all working.
many thanks for assisting Mooncat.
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
Okay, essentially everything should be working now in my branch. Migrated to trivial smoke and fixed styles. It's possible there may be some issues with the replacement for get_circuit_connector_sprites since I guessed how the new way was supposed to work, and in one case just used an existing circuit connector sprite definition from the inserters instead (I was being lazy and wanted to get it running, even if graphically wrong). Not sure which way is correct; might be able to use the existing sprites for everything, or might need to change the ones using vanilla definitions. This comes down to my lack of knowledge of how the sprites are defined/used.
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
Any idea when the update will be ready to download (I can’t find it anywhere) this is the last mod I’m waiting for before I can update to 0.16.
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
Near as I can tell, the iterm-request-proxy dance isn't needed for instant blueprints, just nil out the requests slot after taking your copy. Haven't tested whether this is new for 0.16.
works great for me
Code: Select all
From cf2d6422145d1e6be20deba5bcba07e473007b42 Mon Sep 17 00:00:00 2001
From: quyxkh <quyxkh@gadabout.dyndns.org>
Date: Wed, 24 Jan 2018 16:49:22 -0800
Subject: [PATCH] Remove item-request-proxy dance when reviving ghosts
---
scripts/util.lua | 23 ++---------------------
1 file changed, 2 insertions(+), 21 deletions(-)
diff --git a/scripts/util.lua b/scripts/util.lua
index 1934217..6a208af 100644
--- a/scripts/util.lua
+++ b/scripts/util.lua
@@ -191,6 +191,7 @@ end
function util.revive_entity_ghost_and_raise_event(entity_ghost, reviver_player, is_instant_blueprint)
-- Get the items this ghost will request when it is revived, most likely modules.
local item_requests = entity_ghost.item_requests
+ if item_requests then entity_ghost.item_requests = nil end
-- Revive entity.
local _, revived_entity = entity_ghost.revive()
@@ -198,26 +199,6 @@ function util.revive_entity_ghost_and_raise_event(entity_ghost, reviver_player,
-- Supply the requested items.
if item_requests then
util.fulfill_item_requests(revived_entity, item_requests)
-
- -- Remove item request because we have already supplied it.
- -- We can't just set entity_ghost.item_requests to nil because entity_ghost is already invalid.
- -- We can't set revived_entity.item_requests either because item_requests is only for ghost entity.
- -- So we have to use the ugly way.
- local position = revived_entity.position
- local x = position.x
- local y = position.y
- -- surface.find_entity cannot find entities with zero-sized collision box.
- local item_request_proxies = revived_entity.surface.find_entities_filtered
- {
- area = {{x - 0.1, y - 0.1}, {x + 0.1, y + 0.1}},
- name = "item-request-proxy",
- force = revived_entity.force,
- limit = 1
- }
- if #item_request_proxies > 0 then
- local item_request_proxy = item_request_proxies[1]
- item_request_proxy.destroy()
- end
end
-- Raise event.
@@ -336,4 +317,4 @@ function util.kill_entity_and_raise_event(entity, killer_player)
return true
end
return false
-end
\ No newline at end of file
+end
--
2.16.1.316.g9a651edd8
Re: [MOD 0.15.29+] Creative Mode 0.3.12 - Infinite resources
Creative Mode (Fix for 0.16) no longer works. It looks like the dependancey was set to <= 0.16.18. Which has now been exceeded. Does this just require a change in version number in the info file? Does this mod get updated regularly? Great work so far love it!