[Resolved] radius visualisation

Place to get help with not working mods / modding interface.
Post Reply
TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

[Resolved] radius visualisation

Post 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
Attachments
Bio_Industries_2.0.6.zip
(8.36 MiB) Downloaded 40 times
Last edited by TheSAguy on Fri Jan 12, 2018 4:36 am, edited 2 times in total.

chrisgbk
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Mon Jan 02, 2017 4:31 am
Contact:

Re: radius visualisation

Post 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.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: radius visualisation

Post 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.

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

Re: radius visualisation

Post 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.
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.

TheSAguy
Smart Inserter
Smart Inserter
Posts: 1449
Joined: Mon Jan 13, 2014 6:17 pm
Contact:

Re: radius visualisation

Post by TheSAguy »

Thanks, I think I have it figured out.

Post Reply

Return to “Modding help”