Smart Display - conflict with Power Armor

Place to get help with not working mods / modding interface.
Post Reply
drkusa
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 18, 2016 9:30 pm

Smart Display - conflict with Power Armor

Post by drkusa » Wed Jul 11, 2018 10:17 pm

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?
Attachments
FactorioPowerArmorError.JPG
FactorioPowerArmorError.JPG (18.48 KiB) Viewed 195 times

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2022
Joined: Tue Jul 12, 2016 9:03 am

Re: Smart Display - conflict with Power Armor

Post by eradicator » Thu Jul 12, 2018 5:35 am

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

drkusa
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 18, 2016 9:30 pm

Re: Smart Display - conflict with Power Armor

Post by drkusa » Thu Jul 12, 2018 1:39 pm

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?
Attachments
FactorioPowerArmorErrorLuaCode.JPG
FactorioPowerArmorErrorLuaCode.JPG (33.63 KiB) Viewed 162 times
FactorioPowerArmorError02.JPG
FactorioPowerArmorError02.JPG (25.76 KiB) Viewed 162 times

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2022
Joined: Tue Jul 12, 2016 9:03 am

Re: Smart Display - conflict with Power Armor

Post by eradicator » Thu Jul 12, 2018 2:08 pm

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

drkusa
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 18, 2016 9:30 pm

Re: Smart Display - conflict with Power Armor

Post by drkusa » Thu Jul 12, 2018 2:26 pm

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.

drkusa
Burner Inserter
Burner Inserter
Posts: 10
Joined: Fri Mar 18, 2016 9:30 pm

Re: Smart Display - conflict with Power Armor

Post by drkusa » Sun Jul 15, 2018 10:48 pm


User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 2022
Joined: Tue Jul 12, 2016 9:03 am

Re: Smart Display - conflict with Power Armor

Post by eradicator » Mon Jul 16, 2018 11:51 am

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. ;)

Post Reply

Return to “Modding help”