• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.

XoPhyte1

Recruit
Oct 15, 2021
4
1
I am trying to reduce the amount of alloy upkeep for defense stations, and the upkeep_mult does not work on defense stations. Therefore I am trying to modify the components templates to reduce the upkeep cost when it is being applied to a defense station. I have playing with several iterations of code, but no luck on any in the below...

Code:
#### TRY 1 #####
resources = {
    upkeep = {
        not {
            is_ship_class = shipclass_military_station
            alloys = @s_t1_upkeep_alloys
        }
    }
}

Code:
#### TRY 2 #####
resources = {
    upkeep = {
    energy = @s_t1_upkeep_energy
    alloys = @s_t1_upkeep_alloys
    if = {
        limit = { shipclass_military_station}
        alloys = @XO_s_t1_upkeep_alloys    #try to override prior set value
    }
}

Code:
### TRY 3 #####
if = {
    limit = { shipclass_military_station}


        resources = {
        category = ship_components
        cost = {
            alloys = @s_t1_cost
        }
        upkeep = {
            energy = @s_t1_upkeep_energy
            alloys = @s_t1_upkeep_alloys
        }
    
}
else = {
    resources = {
        category = ship_components
        cost = {
            alloys = @s_t1_cost
        }
        upkeep = {
            energy = @s_t1_upkeep_energy
            alloys = @s_t1_upkeep_alloys
        }
    }
}

But no luck. Is there something wrong with the conditions above, or can you not set a condition on the upkeep this way at all?
 
Try this:

Code:
resources = {
    upkeep = {
        energy = @s_t1_upkeep_energy
    }
    upkeep = {
        trigger = { NOT = { is_ship_class = shipclass_military_station } }
        alloys = @s_t1_upkeep_alloys
    }
    upkeep = {
        trigger = { is_ship_class = shipclass_military_station}
        alloys = @XO_s_t1_upkeep_alloys
    }
}