Page 1 of 1

Request: Upgrade of Smart Display Mod to 0.17

Posted: Wed May 22, 2019 11:44 pm
by Pixel_Builder
Greetings,

I was wondering if anyone could upgrade the Smart Display mod from 0.16 to 0.17.
I've been waiting (and even tried and failed to do it myself) for someone to do it but nothing.

Here's the URL: https://mods.factorio.com/mod/SmartDisplayRedux_Fixed

Thanks for such a great game! :)

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 8:40 am
by darkfrei
Pixel_Builder wrote: Wed May 22, 2019 11:44 pm I was wondering if anyone could upgrade the Smart Display mod from 0.16 to 0.17.
Did you try just change the game version in the info.json?

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 12:59 pm
by Pixel_Builder
Yes - But that failed as well.

Here's the error msg I get when loading:

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 1:38 pm
by darkfrei
You are need to find and replace "textfield_style" to "textfield"

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 2:37 pm
by eduran
darkfrei wrote: Thu May 23, 2019 1:38 pm You are need to find and replace "textfield_style" to "textfield"
That is not correct, you need to replace every instance of "textfield_style" with "textbox_style":

Code: Select all

type = "textbox_style"  -- good
type = "textfield_style"  --bad
There were a lot of changes to GUI elements, so I would expect further errors after this one.

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 3:49 pm
by Pixel_Builder
Thank you so much for your assistance. :D
That fixed that error but you are correct - It led to another.

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 4:21 pm
by eduran
Sprite width and height can no longer be zero in 0.17. You need to replace all instances of "height = 0" and "width = 0" with "height = 1" and "width = 1".

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 5:10 pm
by Pixel_Builder
:) Which now produces this...

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 5:36 pm
by eduran
That's a 0.17 classic :D Delete every line that says

Code: Select all

flags = {"goes-to-quickbar"}

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 5:58 pm
by Pixel_Builder
OK - I was able to fix that and I was also able to fix the Research Tech packs but now I get this:

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 6:58 pm
by eduran
A bit more complicated. In prototypes/display.lua find

Code: Select all

if invisible then
  -- invisible.additional_pastable_entities = {"smart-display"}
  invisible.minable.result = "smart-display-visible"
  invisible.picture_off.filename = "__SmartDisplayRedux_Fixed__/graphics/empty.png"
  invisible.picture_off.width = 0
  invisible.picture_off.height = 0
  invisible.picture_on.filename = "__SmartDisplayRedux_Fixed__/graphics/empty.png"
  invisible.picture_on.width = 0
  invisible.picture_on.height = 0
end
and replace it with

Code: Select all

if invisible then
  invisible.minable.result = "smart-display-visible"
  invisible.picture_off = {
    filename = "__core__/graphics/empty.png",
    width = 1,
    height = 1,
  }
  invisible.picture_on = {
    filename = "__core__/graphics/empty.png",
    width = 1,
    height = 1,
  }
end

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 7:00 pm
by darkfrei
The prototype with the "empty.png" must be 1x1, not 1x2 as yo made

Code: Select all

filename = "__SmartDisplayRedux_Fixed__/graphics/empty.png"
width = 1
height = 1
Or just change this picture to 2x2, it can help too.

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 7:41 pm
by Pixel_Builder
OK - So now I'm getting this:

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 7:51 pm
by eduran
You must have missed one "width = 0".

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 8:57 pm
by Pixel_Builder
OK - Thanks for your help.


Maybe someone more knowledgeable in this can take a look because it's beyond me.

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 9:54 pm
by darkfrei
Pixel_Builder wrote: Thu May 23, 2019 8:57 pm Maybe someone more knowledgeable in this can take a look because it's beyond me.
Place your work here and I can fix the rest, it's not so difficult as you think.

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Thu May 23, 2019 11:23 pm
by Pixel_Builder
Great - Here it is. I've done what is on this page. Thank you.

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Fri May 24, 2019 1:33 pm
by eduran
This version loads, but I can't promise it will work properly.

Re: Request: Upgrade of Smart Display Mod to 0.17

Posted: Fri May 24, 2019 3:11 pm
by Pixel_Builder
Good Morning,

Thank you eduran for all your help. It did load as expected and I'll report back as soon as I test it.

Update 1: Works as it should!!!

Thank you so much for your help again and enjoy your weekend! :D