2 Modding Questions

First of all is it possible to use a faction/player ability to grant all the units for a faction an ability or trait.

Secondly is it possible to create improvements built on resources that don't need to be built under ZoC. I know you used to be able to do this through a bug...

2,478 views 2 replies
Reply #1 Top

I think you can grant all _trained_ units a trait upon their completion. Simply make a player-wide abilitybonus

    <AbilityBonus InternalName="EnduringEmpireAbility">
        <AbilityBonusType>Player</AbilityBonusType>
        <AbilityBonusOption InternalName="EnduringEmpire">
            <DisplayName>Enduring</DisplayName>
            <Description>All units get +10 to defense when below 50% hit points</Description>
            <Icon>Ability_Enduring_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>A_UnitStat_Defense_Blunt</StrVal>
                <Value>10</Value>
                <Provides>+10 Blunt Defense when under 50% Hit Points</Provides>
                <WhenUnderPercentHitPoints>50</WhenUnderPercentHitPoints>
            </GameModifier>         
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <IsCombatAbility>1</IsCombatAbility>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

 

That's how they used to do it anyway, but you'll have to test it.

 

Second question: no idea.

Reply #2 Top

Thanks Heavenfall, I appreciate your help.