Figured we needed a thread for questions that didn't need to take up valuable room from talented mod'rs.
Does anybody know if there's a way to make units be able to have more than 3 abilities in the design stage?
I tried looking in the ElementalDefs - nothing.
All I could find is that the accessories was limited to 4 by default:
<MaxEquippedAccessoryCount>4</MaxEquippedAccessoryCount>
But nothing about abilities. Is it hardcoded?
N/A
Look at A_Traits in CorePlayerAbilities.xml
<PlayerAbilityType InternalName="A_Traits"> <DisplayName>Traits</DisplayName> <Description>The amount of traits this faction can support.</Description> <Icon>FactionAbility_Traits.png</Icon> <UsedAsMultiplier>0</UsedAsMultiplier> <DefaultValue>4</DefaultValue> </PlayerAbilityType>
Dang, need to be quicker with the buzzer....
Thanks for the modding help. Will give it a shot. +Karma
Yeah I was hoping for something like that:
Aiming for something where one faction would, as a bonus, get one additional trait.
It seems that changing
<A_Traits>5.0000</A_Traits>
from 4 does the trick.
Edit:
<A_Traits>6.0000</A_Traits>
does not work at all. Looks like 5 is the upper limit.
Meow.
Edit 2:
Looks like it's hardcoded to 5.
Odd? I could only go up to 5?
Did you use
<A_Traits>9.0000</A_Traits>
in your race config?
You should be able to do that via a facion trait if you want, something like this in a faction trait ability should work I think...
<GameModifier>
<ModType>Player</ModType> <Attribute>AbilityBonus</Attribute> <StrVal>A_Traits</StrVal> <Provides>Faction has one more traits that other factions.</Provides> <Value>1</Value> </GameModifier>
You should be able to do that via a facion trait if you want, something like this in a faction trait ability should work I think... <GameModifier> <ModType>Player</ModType> <Attribute>AbilityBonus</Attribute> <StrVal>A_Traits</StrVal> <Provides>Faction has one more traits that other factions.</Provides> <Value>1</Value> </GameModifier>
One seems to work perfectly, right now I think the discussion is mostly centered around the upper limit.
Ok, will give it a shot and report back what I find.
Ok findings:
- It looks like starting units are indeed limited to 5 traits
- You can however give as many traits as you want to units in the unit designer
Regarding adding the trait slot(s) as a race/faction ability: if it matters to you, having extra selectable trait slots will probably not be a very beneficial ability for the faction when controlled by AI. Just look at how frequently the AI chooses the "base" unit designs without even using all three default slots.
At the very least you'd need to pre-design units to make use of all the slots at various tech levels, and I don't remember anyone ever having tested whether or not the AI will choose designs with > 4 traits.
For larger values of additional trait slots, it could potentially also cause problems on higher difficulty levels where the AI gets "bonus" traits for its units applied on top of the ones in the unit design. Worth testing, anyway.
Yeah there is that ... the AI has never been great at unit design.
Odd situation:
<ImprovementType InternalName="Fort"> <Prereq> <Type>RestrictedAbilityBonusOption</Type> <Attribute>GreatFortressTest</Attribute> <Target>Player</Target> </Prereq> </ImprovementType>
Although the faction has GreatFortressTest, it can still build Forts?
The problem lies with the fact that one never builds a fort. The city levels to a fort. So you prevent the city from leveling to a fort.
That is go to CoreAbilities.xml and add your prereq to
<AbilityBonus InternalName="CityLevel_UnlockLevel2">
<AbilityBonusOption InternalName="UnlockFortress"> <Prereq> <Type>RestrictedAbilityBonusOption</Type> <Attribute>GreatFortressTest</Attribute> <Target>Player</Target> </Prereq> </AbilityBonusOption>
</AbilityBonus>
This should prevent the choice from being available on city level-up.
Nah it was building a fort as Primal said. Got it fixed last night.
Out of curiosity, is there a way to selectively apply:
<ModType>CityTrainingBonus</ModType>
For example, only archers get 1 type of bonus, while melee combat units get another type of bonus?
Hypothetically, you could have the CityTrainingBonus apply an attribute which specified that a spell be cast at start of combat (similar to the "Noble Legacy" for Pariden.) The spell could then check a condition and apply results based on the results of the check (boolean.) Not sure if there are any testable conditions to see if a unit has an equipped ranged weapon, though.
Hmm, could something like "class" be used for that?
There are many great features available to you once you register, including:
Sign in or Create Account