[MOD 0.16] Upgrade planner
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Crashes when clicking the icon. viewtopic.php?f=92&t=23680&p=150264#p150264
Factorio 0.12.29
UP 1.1.19
Mod iconizer 1.0.0
Factorio 0.12.29
UP 1.1.19
Mod iconizer 1.0.0
My mods: Capsule Ammo | HandyHands - Automatic handcrafting | ChunkyChunks - Configurable Gridlines
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Some other creations: Combinassembly Language GitHub w instructions and link to run it in your browser | 0~drain Laser
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Is it possible to add replacing of stone/concrete tiles?
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Hm it looks like there is a confilct with Mod iconicer, I've never used it, so it is hard to tell what is going on. I'll try to look into it.Qon wrote:Crashes when clicking the icon. viewtopic.php?f=92&t=23680&p=150264#p150264
Factorio 0.12.29
UP 1.1.19
Mod iconizer 1.0.0
Hm it should be, since tiles can be marked for deconstruction and basically the Upgrade Planner is the same as the Deconstruction Planner. I don't know yet why my mod doesn't allow to mark tiles, but it should be easy to fix.Roktaal wrote:Is it possible to add replacing of stone/concrete tiles?
My mods
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Yes, that was a problem with Mod Iconizer v1.0.0 and it is fixed in latest versionkds71 wrote:Hm it looks like there is a confilct with Mod iconicer, I've never used it, so it is hard to tell what is going on. I'll try to look into it.Qon wrote:Crashes when clicking the icon. viewtopic.php?f=92&t=23680&p=150264#p150264
Factorio 0.12.29
UP 1.1.19
Mod iconizer 1.0.0
- Devious Null
- Burner Inserter
- Posts: 8
- Joined: Fri Apr 22, 2016 9:06 pm
- Contact:
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
I found and fixed a bug in this mod, and I thought I should contribute it back for everyone.
In a multiplayer game I was playing, the game reliably crashed when an object was marked for deconstruction while another player was dead. In specific, this was caused by the automated deconstruction orders given by the Treefarm mod (viewtopic.php?f=44&t=19124), but I believe any deconstruction orders would trigger the bug. I fixed it by adding a nil-check.
If you have any questions about this patch, please feel free to ask.
In a multiplayer game I was playing, the game reliably crashed when an object was marked for deconstruction while another player was dead. In specific, this was caused by the automated deconstruction orders given by the Treefarm mod (viewtopic.php?f=44&t=19124), but I believe any deconstruction orders would trigger the bug. I fixed it by adding a nil-check.
Code: Select all
diff -ru source/upgrade-planner_1.1.9/control.lua modified/upgrade-planner_1.1.9/control.lua
--- source/upgrade-planner_1.1.9/control.lua 2016-01-30 00:37:04.357526600 -0600
+++ modified/upgrade-planner_1.1.9/control.lua 2016-04-24 18:59:57.140407600 -0500
@@ -553,7 +553,7 @@
stack = game.players[i].cursor_stack
- if stack.valid_for_read then
+ if stack ~= nil and stack.valid_for_read then
if stack.name == "upgrade-planner" then
if upgrade or deconstruction then
entity.cancel_deconstruction(entity.force)
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Any chance of this mod working with 12.3? Would really love to give this one a go.
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Ah, I didn't know that stacks is nil when player is dead. I'll try to fix it soon.Devious Null wrote:If you have any questions about this patch, please feel free to ask.
I don't understand, why can't you update your Factorio to a newer version? 12.3 was released a long time ago. Or perhaps do you mean v0.12.30? If so, then this mod should work fine.Dirayiou wrote:Any chance of this mod working with 12.3? Would really love to give this one a go.
My mods
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
I'm on 12.5 now and it's still not working. I'm probably just doing something wrong. My other 15ish mods work just fine though.
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Thread title says it all. This mod requires at least Factorio 0.12.16. Update your client to latest version and everything will be fine
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Except maybe some of your aother 15ish mods will stop workingRoktaal wrote:Update your client to latest version and everything will be fine
Koub - Please consider English is not my native language.
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Oh yea then he will have to update the client and all his mods. If some the mods he is using is not updated by the author then he will have to learn lua and update them himselfKoub wrote:Except maybe some of your aother 15ish mods will stop workingRoktaal wrote:Update your client to latest version and everything will be fine
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Hm I should have the previous versions of this mods somewhere, so if you really don't want to update Factorio to the latest version, I can look for it and upload it here - just let me know. However, I would recommend to update Factorio instead.Dirayiou wrote:I'm on 12.5 now and it's still not working. I'm probably just doing something wrong. My other 15ish mods work just fine though.
My mods
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
So what can I do here?Koub wrote:Except maybe some of your aother 15ish mods will stop workingRoktaal wrote:Update your client to latest version and everything will be fine
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
I plan to do a full on update (mods and all) hopefully this weekend. but if you could point me to a version of Upgrade Planner that works on 12.5 in the meantime that would be fantastic.kds71 wrote:Hm I should have the previous versions of this mods somewhere, so if you really don't want to update Factorio to the latest version, I can look for it and upload it here - just let me know. However, I would recommend to update Factorio instead.Dirayiou wrote:I'm on 12.5 now and it's still not working. I'm probably just doing something wrong. My other 15ish mods work just fine though.
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
So I did a bit of tinkering and got the mod to load up. I can make the planner itself and the GUI is there. However when I use the mod I get this error.
"Error while running the event handler:
__upgrade-planner__/control.lua:394:
LuaitemPrototype doesnt' contain key
localised_name."
"Error while running the event handler:
__upgrade-planner__/control.lua:394:
LuaitemPrototype doesnt' contain key
localised_name."
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Hey, sorry for the delay. Sadly, I can't find an old version of my mod, it looks like I deleted it... and I didn't use any version control for this mod ;(Dirayiou wrote:So I did a bit of tinkering and got the mod to load up. I can make the planner itself and the GUI is there. However when I use the mod I get this error.
"Error while running the event handler:
__upgrade-planner__/control.lua:394:
LuaitemPrototype doesnt' contain key
localised_name."
LuaEntityPrototype::localised_name was introduced in Factorio v0.12.11, in previous versions you have to use game.get_localised_item_name. To fix your issue you will have to apply the following changes to the control.lua file:
In line 46 replace:
Code: Select all
return game.item_prototypes[global["config-tmp"][player.name][index][type]].localised_name
Code: Select all
return game.get_localised_item_name(global["config-tmp"][player.name][index][type])
Code: Select all
ruleset_grid["upgrade-planner-" .. type .. "-" .. index].caption = game.item_prototypes[stack.name].localised_name
Code: Select all
ruleset_grid["upgrade-planner-" .. type .. "-" .. index].caption = game.get_localised_item_name(stack.name)
My mods
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Don't worry about the delay. I appreciate you taking the time to help me. Atempting the fix as suggested. will post an update. and I will be updating it all hopefully in the next few days.kds71 wrote:Hey, sorry for the delay. Sadly, I can't find an old version of my mod, it looks like I deleted it... and I didn't use any version control for this mod ;(Dirayiou wrote:So I did a bit of tinkering and got the mod to load up. I can make the planner itself and the GUI is there. However when I use the mod I get this error.
"Error while running the event handler:
__upgrade-planner__/control.lua:394:
LuaitemPrototype doesnt' contain key
localised_name."
LuaEntityPrototype::localised_name was introduced in Factorio v0.12.11, in previous versions you have to use game.get_localised_item_name. To fix your issue you will have to apply the following changes to the control.lua file:
In line 46 replace:with:Code: Select all
return game.item_prototypes[global["config-tmp"][player.name][index][type]].localised_name
In line 394 replace:Code: Select all
return game.get_localised_item_name(global["config-tmp"][player.name][index][type])
with:Code: Select all
ruleset_grid["upgrade-planner-" .. type .. "-" .. index].caption = game.item_prototypes[stack.name].localised_name
I still recommend to upgrade your Factorio and all mods you have instead You are missing new features and bug fixes by not doing so.Code: Select all
ruleset_grid["upgrade-planner-" .. type .. "-" .. index].caption = game.get_localised_item_name(stack.name)
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
Works flawlessly now! Get the occasional lag every now and then when I select larger areas but that's most likely just my laptop!
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
There seems to be a bug with handling deconstruction planner if one of the players is dead. Here is bug report that interested me: https://www.reddit.com/r/factorio/comme ... ur_server/ .
Basically if a player is dead LuaPlayer.cursor_stack is nil and the game crashes when trying to access property cursor_stack.valid_for_read on line 556 in control.lua. I haven't tested it with this combination of mods (too much time to setup treefarm or convince friends to install mod just to crash a game), but quick test convinced me that this is a problem: http://imgur.com/m7GT4Yw .
Basically if a player is dead LuaPlayer.cursor_stack is nil and the game crashes when trying to access property cursor_stack.valid_for_read on line 556 in control.lua. I haven't tested it with this combination of mods (too much time to setup treefarm or convince friends to install mod just to crash a game), but quick test convinced me that this is a problem: http://imgur.com/m7GT4Yw .
Re: [MOD 0.12.16] Upgrade planner - v1.1.9
This is a crashing issue for 12.33.
I'll attempt to modify the source locally based on the reddit post and see what happens.
Code: Select all
619.738 Error MultiplayerManager.cpp:110: MultiplayerManager failed: "Error while running the event handler: __upgrade-planner__/control.lua:556: attempt to index local 'stack' (a nil value)"