Customizable color for roboport radius

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Customizable color for roboport radius

Post by 321freddy »

I want to be able to change the color of logistic and construction radius visualization of roboports however not globally using the utility-sprites but rather in one of these ways:

Option A: Each force has individual modifiable color definitions for the radius visualizations (since forces always have seperate logistic networks).

Option B: Each roboport entity prototype has it's own modifiable radius visualization sprites like it is already the case with power poles and beacons.

Thanks in advance :)

User avatar
bobingabout
Smart Inserter
Smart Inserter
Posts: 7352
Joined: Fri May 09, 2014 1:01 pm
Contact:

Re: Customizable color for roboport radius

Post by bobingabout »

Option B:

Code: Select all

    radius_visualisation_picture =
    {
      filename = "__boblogistics__/graphics/entity/roboport/roboport-radius-visualization.png",
      width = 12,
      height = 12
    },
    construction_radius_visualisation_picture =
    {
      filename = "__boblogistics__/graphics/entity/roboport/roboport-construction-radius-visualization.png",
      width = 12,
      height = 12
    },
This is part of the entity definition, which means in theory, you can use any picture you like for it.

If you're modding though, you can probably use a white square, then add a tint line. Unfortunately you probably can't use a runtime tint, but you can still use code to specify the colour using this method.
Creator of Bob's mods. Expanding your gameplay since version 0.9.8.
I also have a Patreon.

Rseding91
Factorio Staff
Factorio Staff
Posts: 13209
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: Customizable color for roboport radius

Post by Rseding91 »

bobingabout wrote:Option B:

Code: Select all

    radius_visualisation_picture =
    {
      filename = "__boblogistics__/graphics/entity/roboport/roboport-radius-visualization.png",
      width = 12,
      height = 12
    },
    construction_radius_visualisation_picture =
    {
      filename = "__boblogistics__/graphics/entity/roboport/roboport-construction-radius-visualization.png",
      width = 12,
      height = 12
    },
This is part of the entity definition, which means in theory, you can use any picture you like for it.

If you're modding though, you can probably use a white square, then add a tint line. Unfortunately you probably can't use a runtime tint, but you can still use code to specify the colour using this method.
Was, it was changed in 0.13.0 to be defined in the utility_sprites section. The reason being: performance.

The rendering of construction/logistic overlays is incredibly expensive to do because they're large and overlap so many times. It was optimized in 0.13.0 so they don't render overlapping sections and to make sure that the colors were consistent across the displayed area it was changed to use only 2 sprites defined in utility sprites.
If you want to get ahold of me I'm almost always on Discord.

321freddy
Fast Inserter
Fast Inserter
Posts: 125
Joined: Fri Sep 23, 2016 10:16 pm
Contact:

Re: Customizable color for roboport radius

Post by 321freddy »

Rseding91 wrote:Was, it was changed in 0.13.0 to be defined in the utility_sprites section. The reason being: performance.
Can you change it so that every force has it's own customizable color for construction/logistic overlays? Because forces have completely seperate logistic networks the player is never going to be able to select two networks from different forces with different colors at the same time.

I'm thinking these two properties:
LuaForce.logistic_radius_visualization_color : Color [RW]
LuaForce.construction_radius_visualization_color : Color [RW]

Post Reply

Return to “Modding interface requests”