Two questions

Is it possible to change the costs of upgrading weapons and armor on your trained units? I'd like to be able to raise the costs or lower the costs.

 

How do you add traits to the create sovereign screen? I want to add more options to start with.

4,871 views 10 replies
Reply #1 Top

As I understand it, the weapons and armor have their cost determined as a factor of their original cost.

New sovereign histories just need to belong to the right AbilityBonus like they do in CoreAbilities.xml

For example

    <AbilityBonus InternalName="Champion_History">
        <AbilityBonusOption InternalName="Adventurer">
            <DisplayName>Adventurer</DisplayName>
            <Description>Recruiting champions is free</Description>
            <Icon>Ability_Adventurer_Icon.png</Icon>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>A_Recruiting</StrVal>
                <Value>-100</Value>
                <Provides>Recruiting champions is free</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

 or if you just want it to be a talent you can select go with

   <AbilityBonus InternalName="Anythinghere">
        <AbilityBonusType>Champion_Talent</AbilityBonusType>
        <AbilityBonusOption InternalName="Wealthy">
            <DisplayName>Wealthy</DisplayName>
            <Description>Sovereign starts with an additional 800 Gildar</Description>
            <Icon>Ability_Wealthy_Icon.png</Icon>
            <GameModifier>
                <ModType>Resource</ModType>
                <Attribute>Gold</Attribute>
                <Value>800</Value>
                <Provides>+800 Starting Gildar</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

 

Reply #2 Top

That is correct in adding these abilities to the sovereign screen is it possible to link weapon and armor cost this way? Would you have to set up a global number that is used to subtract or add to the production cost of each item? If that is the case then one would have to re-write every unit and ruin compatability with several mods. But then again I could be very wrong.

Reply #3 Top

Oh wait there's also this

            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>A_UnitUpgrades</StrVal>
                <Value>-50</Value>
                <Provides>-50% Upgrade costs</Provides>
            </GameModifier>

from the Master Smiths faction ability. So I guess you could use that to alter how much you pay.

In CorePlayerAbilities.XML there's this

   <PlayerAbilityType InternalName="A_UnitUpgrades">
        <DisplayName>Unit Upgrades</DisplayName>
        <Description>Percent multiplier on unit upgrade costs.</Description>
        <DefaultValue>100</DefaultValue>
        <Icon>Icon_Level.png</Icon>
    </PlayerAbilityType>

so if you wanted to increase the default cost to 200%, you could do that there.

Reply #4 Top

Now that's what I'm talking about Heavenfall. I like it.

Reply #5 Top

Thank you guys for this info.

Unfortunately I could not get it to work. I made the following

 

<container>
    <AbilityBonus InternalName="AcrobatAbility_Level">
        <AbilityBonusType>Champion_Talent</AbilityBonusType>
        <AbilityBonusOption InternalName="Acrobat_Level">
            <DisplayName>Acrobat</DisplayName>
            <Description>+1 Dodge per Level</Description>
            <Icon>Ability_Acrobat_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_Dodge</StrVal>
                <Value>1</Value>
                <PerLevel>1</PerLevel>
                <Provides>+1 Dodge per Level</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <Type>Army</Type>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>
</container>

 

This did not work

 

    <AbilityBonus InternalName="AcrobatAbility_Level">
        <AbilityBonusType>Champion_Talent</AbilityBonusType>
        <AbilityBonusType>Unit_Level</AbilityBonusType>
        <AbilityBonusOption InternalName="Acrobat_Level">
            <DisplayName>Acrobat</DisplayName>
            <Description>+1 Dodge per Level</Description>
            <Icon>Ability_Acrobat_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>AdjustUnitStat</Attribute>
                <StrVal>UnitStat_Dodge</StrVal>
                <Value>1</Value>
                <PerLevel>1</PerLevel>
                <Provides>+1 Dodge per Level</Provides>
            </GameModifier>
            <Cost>1</Cost>
            <HideWhenUpgraded>0</HideWhenUpgraded>
            <Likelihood>100</Likelihood>
            <RarityDisplay>Rare</RarityDisplay>
            <Type>Defensive</Type>
            <Prereq>
                <Type>AbilityBonusOption</Type>
                <Target>Unit</Target>
                <Attribute>Dodge3</Attribute>
            </Prereq>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>

 

This did not work either. Any more suggestions?

Reply #6 Top

There is something already with the internal name "AcrobatAbility_Level"

I recommend you use different internal names than what the program is using unless you plan on overwriting the coreability.xml

There is problems with the object sanity in this game. Somethings will be completely overwritten like units files and somethings that just combine together like abilities. So for here if you want to replace AcrobatAbility_Level to be able be selected at the beginning use

<container>    

<AbilityBonus InternalName="AcrobatAbility_Champion">

<AbilityBonusType>Champion_Talent</AbilityBonusType>

<AbilityBonusOption InternalName="Acrobat_Champion">

<DisplayName>Acrobat</DisplayName>

<Description>+1 Dodge per Level</Description>

<Icon>Ability_Acrobat_Icon.png</Icon>

<GameModifier>

<ModType>Unit</ModType>

<Attribute>AdjustUnitStat</Attribute>

<StrVal>UnitStat_Dodge</StrVal>

<Value>1</Value>

<PerLevel>1</PerLevel>

<Provides>+1 Dodge per Level</Provides>

</GameModifier>

<Cost>1</Cost>

<HideWhenUpgraded>0</HideWhenUpgraded>

<Type>Defense</Type>

<AIData AIPersonality="AI_General">

<AIPriority>5</AIPriority>

</AIData>

</AbilityBonusOption>

</AbilityBonus>

</container>

If you don't want the ability to select it as a level up option then you will need to have

<AbilityBonus InternalName="AcrobatAbility_Level">

<AbilityBonusOption InternalName="Acrobat_Level">

<Prereq>

<Type>RestrictedAbilityBonusOption</Type>

<Attribute>Acrobat_Champion</Attribute>

<Target>Unit</Target>

</Prereq>

</AbilityBonusOption InternaName="Acrobat_Level">

</AbilityBonus> 

Reply #7 Top

Thank you parrotmath, that worked great!

 

Edit.

 

So how would this work in making the ability upgrade? For instance if I wanted Lethal 1 as a start choice, but I have to change the internal name, would it still upgrade to Lethal II? Or would I have to change the prereqs for Lethal II?

Reply #8 Top

You would probably have to rewrite lethal II to have the pre-req of your new lethal I. Heavenfall might have a better suggestion.

Reply #9 Top

From the mods folder this is all you need to make lethal 1 available, and subsequent upgrades pop up as normal.

    <AbilityBonus InternalName="Lethal1Ability">
        <AbilityBonusType>Champion_Talent</AbilityBonusType>
    </AbilityBonus>

I should have been more clear in the start, sorry.

Reply #10 Top

Thank you Heavenfall. that worked. So I had to add a cost line to make it deduct points when selected so this is what I ended up with, and it works. Thank you all for your help.

 

    <AbilityBonus InternalName="Lethal1Ability">
        <AbilityBonusType>Champion_Talent</AbilityBonusType>
        <AbilityBonusOption InternalName="Lethal1">
            <Cost>1</Cost>
        </AbilityBonusOption>
    </AbilityBonus>