Natural disaster traits are a mess. How can I effectively prevent damage to structures?

Lear19

Chieftain
Joined
Feb 16, 2022
Messages
9
I started with modifier that Liang uses, by linking it to a building. It didn't work at all. I suppose it makes sense, since the modifier had the word "GOVERNOR" in it, suggesting it has a very narrow use.

So then I tried to use the modifier right for Iteru - "MODIFIER_PLAYER_ADJUST_AVOID_RANDOM_EVENT" by liking it to civilization trait. And it worked for floods (no surprise) and I think it worked for Blizzards (but it's obviously not easy to check all the disasters when they're so random).

But it certainly failed against Vulcano erruption.

So then I tried finding Hojo's ability that supposedly prevents Hurricane damage to structures, I found only the modifiers preventing damage to units (I tried it out; it didn't stop structural damage from a flood or sand storm).

So does anyone has an idea how to prevent structural damage to improvements, cities and districts from disasters like Vulcanos?
 
I started with modifier that Liang uses, by linking it to a building. It didn't work at all. I suppose it makes sense, since the modifier had the word "GOVERNOR" in it, suggesting it has a very narrow use.
I think this would be the way to go as it uses the effect "EFFECT_ADJUST_PREVENT_STRUCTURAL_DAMAGE". Unless that effect is coded strictly for Governors in the dll I don't see why it couldn't work. Maybe post your mod/code.
 
I think this would be the way to go as it uses the effect "EFFECT_ADJUST_PREVENT_STRUCTURAL_DAMAGE". Unless that effect is coded strictly for Governors in the dll I don't see why it couldn't work. Maybe post your mod/code.

Yeah, I also thought that would be the way to go.

I'm trying it out on uncooked Poland, so there's not too much to go on.

Code:
    <BuildingModifiers>
        <Row>
            <BuildingType>BUILDING_SUKIENNICE</BuildingType>
            <ModifierId>SUKIENNICE_IMMUNITY_TO_DISASTERS</ModifierId>
        </Row>
    </BuildingModifiers>
    <Modifiers>
        <Row>
            <ModifierId>SUKIENNICE_IMMUNITY_TO_DISASTERS</ModifierId>
            <ModifierType>MODIFIER_GOVERNOR_ADJUST_PREVENET_STRUCTURAL_DAMAGE</ModifierType>
        </Row>
    </Modifiers>
    <ModifierArguments>
        <Row>
            <ModifierId>SUKIENNICE_IMMUNITY_TO_DISASTERS</ModifierId>
            <Name>Prevent</Name>
            <Value>true</Value>
        </Row>
    </ModifierArguments>

Sadly, it doesn't work.

o2T7ESy.png
 
Back
Top Bottom