Page 1 of 1

Demolisher territory colors

Posted: Wed Jan 08, 2025 7:00 am
by jurgy
Hi, I've released a mod people on Reddit asked for that hides the Demolishers' territory. But when implementing it, I was surprised to see there is no clean way to change the color of just the territory on Vulcanus. I had to modify to default values, namely default_enemy_territory_color for the diagonal strikes and default_enemy_color for the borders. Especially that last one has many side effects in changing the color of all the enemies since (almost?) none of them have a color defined in their prototype.

So my only solution is to set it on all the prototypes (see bellow)

The simplest form of my request is to get a different (new) default for the color of territory borders as to not mess with all the unit types. And secondly a way to define the colors for just the Demolisher's territory or just the territory on Vulcanus. Is it possible to include it in TerritorySettings?

Thanks!

Code: Select all

local default_enemy_color = data.raw["utility-constants"]["default"]["chart"]["default_enemy_color"]
local unit_types = {"unit-spawner", "segment", "segmented-unit", "spider-unit", "unit"}
for _, unit_type in pairs(unit_types) do
    for _, prototype in pairs(data.raw[unit_type]) do
        if not prototype.enemy_map_color then
            prototype.enemy_map_color = default_enemy_color
        end
    end
end

data.raw["utility-constants"]["default"]["chart"]["default_enemy_territory_color"] = {0, 0, 0, 0}
data.raw["utility-constants"]["default"]["chart"]["default_enemy_color"] = {0, 0, 0, 0}

Re: Demolisher territory colors

Posted: Fri Jan 10, 2025 12:29 pm
by MrSmoothieHuman
+1