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
Customizable color for roboport radius
- bobingabout
- Smart Inserter
- Posts: 7352
- Joined: Fri May 09, 2014 1:01 pm
- Contact:
Re: Customizable color for roboport radius
Option B:
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.
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
},
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.
Re: Customizable color for roboport radius
Was, it was changed in 0.13.0 to be defined in the utility_sprites section. The reason being: performance.bobingabout wrote:Option B:This is part of the entity definition, which means in theory, you can use any picture you like for it.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 },
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.
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.
Re: Customizable color for roboport radius
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.Rseding91 wrote:Was, it was changed in 0.13.0 to be defined in the utility_sprites section. The reason being: performance.
I'm thinking these two properties:
LuaForce.logistic_radius_visualization_color : Color [RW]
LuaForce.construction_radius_visualization_color : Color [RW]
My mods: