I posted this note as a reply in another topic because I didn't know how to start a new topic then. So this is a dupe of that post.
In Factorio 16, I'm running into a conflict between the Smart Display mod and Power Armor. With a Smart Display entity placed on the map, as soon as I right-click Power Armor, it crashes to an error message (attached) and ends the game. Had a similar problem with Belt Sorter, but the modder posted a code change to a Control.lua file that corrected it. I looked in the Smart Display control folder but didn't see any code comparable to what I had seen in the Belt Sorter code...thought the same fix might work here but didn't see where to try it. Could be a completely different conflict issue.
I find the Smart Display mod an invaluable tool and really need it. But I also need better armor to take on the aliens. Any ideas how to fix this?
Smart Display - conflict with Power Armor
Smart Display - conflict with Power Armor
- Attachments
-
- FactorioPowerArmorError.JPG (18.48 KiB) Viewed 2225 times
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Smart Display - conflict with Power Armor
There's 3 different versions of SmartDisplay on the portal, assuming latest...
Code: Select all
--LINE 595:
--if opened and opened.valid then --wrong
if opened and opened.valid and opened.name then --better
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Smart Display - conflict with Power Armor
Eradicator,
Thanks for the prompt reply and suggested fix. I'm not familiar with lua coding, so I must not have done it right. I copied and pasted the code you posted at Line 595 (which also extended into Line 596, but I still get an error, though slightly different than the previous one (attached). I've included a shot of the lua code section as i have it now. What am I doing wrong?
Thanks for the prompt reply and suggested fix. I'm not familiar with lua coding, so I must not have done it right. I copied and pasted the code you posted at Line 595 (which also extended into Line 596, but I still get an error, though slightly different than the previous one (attached). I've included a shot of the lua code section as i have it now. What am I doing wrong?
- Attachments
-
- FactorioPowerArmorErrorLuaCode.JPG (33.63 KiB) Viewed 2192 times
-
- FactorioPowerArmorError02.JPG (25.76 KiB) Viewed 2192 times
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Smart Display - conflict with Power Armor
Nah. You did it correctly. It's just that my quick hack didn't work. You really ought to contact the mod author and tell them to apply a proper fix. You can try one more ugly hack i can think of, but if that doesn't work there's no quick fix to it (and even if it works the author should still fix it properly).
Instead of my previous fix try this:
Instead of my previous fix try this:
Code: Select all
-- if opened and opened.valid then -- wrong
if opened and opened.valid and (player.opened_gui_type == defines.gui_type.entity) then --more hackery
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Smart Display - conflict with Power Armor
Thanks for giving it a shot. I don' t know enough about coding even to attempt finding a solution. Hopefully the mod author will have a fix in mind.
- eradicator
- Smart Inserter
- Posts: 5207
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Smart Display - conflict with Power Armor
drkusa wrote:I found the fix:
https://mods.factorio.com/mod/SmartDisplayRedux_Fixed
Lesson learned: Next time link the version you're using in the opening post. ;)eradicator wrote:There's 3 different versions of SmartDisplay on the portal, assuming latest...
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.