Page 1 of 1

Smart Display - conflict with Power Armor

Posted: Wed Jul 11, 2018 10:17 pm
by drkusa
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?

Re: Smart Display - conflict with Power Armor

Posted: Thu Jul 12, 2018 5:35 am
by eradicator
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

Re: Smart Display - conflict with Power Armor

Posted: Thu Jul 12, 2018 1:39 pm
by drkusa
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?

Re: Smart Display - conflict with Power Armor

Posted: Thu Jul 12, 2018 2:08 pm
by eradicator
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:

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

Re: Smart Display - conflict with Power Armor

Posted: Thu Jul 12, 2018 2:26 pm
by drkusa
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.

Re: Smart Display - conflict with Power Armor

Posted: Sun Jul 15, 2018 10:48 pm
by drkusa

Re: Smart Display - conflict with Power Armor

Posted: Mon Jul 16, 2018 11:51 am
by eradicator
eradicator wrote:There's 3 different versions of SmartDisplay on the portal, assuming latest...
Lesson learned: Next time link the version you're using in the opening post. ;)