Page 1 of 1

[Resolved] radius visualisation

Posted: Thu Jan 11, 2018 9:01 pm
by TheSAguy
Hi,

How do I adjust the radius_visualisation_picture on my custom substation?
I tried adding a shift, to radius_visualisation_picture, but that did not work.

Image
Substation

Re: radius visualisation

Posted: Thu Jan 11, 2018 10:41 pm
by chrisgbk
TheSAguy wrote:Hi,

How do I adjust the radius_visualisation_picture on my custom substation?
I tried adding a shift, to radius_visualisation_picture, but that did not work.

Image
Substation
I'm pretty sure it's caused by specifying a width/height that is double what the image actually is, see vanilla definition:

Code: Select all

      radius_visualisation_picture = {
        filename = "__base__/graphics/entity/small-electric-pole/electric-pole-radius-visualization.png",
        height = 12,
        priority = "extra-high-no-scale",
        width = 12
      }
PS: your [/spoiler] tag is misplaced in your post, it should be after [/code], not before.

Re: radius visualisation

Posted: Thu Jan 11, 2018 11:26 pm
by orzelek
It seems that game doesn't auto-scale the picture. You might need to add scale there if it's accepted and/or create bigger picture for radius visualisation.

Re: radius visualisation

Posted: Fri Jan 12, 2018 3:03 am
by eradicator
Unless you want to change the looks of the visualization you should just use the default one used by the base game. It scales automatically if you change supply_area_distance.

Code: Select all

local my_substation = util.table.deepcopy(data.raw['electrical-pole'].substation)
my_substation.supply_area_distance = 20
my_substation.pictures = {<your_picture_specification>}
data:extend(my_substation)
--not tested, might contain typos
Looking at your code...you changed the width/height of the radius picture to match your supply_area_distance....?! Those are pixel values and should not be changed unless you use a different picture.

Re: radius visualisation

Posted: Fri Jan 12, 2018 4:35 am
by TheSAguy
Thanks, I think I have it figured out.