[QUESTION] Ability requirements

I've been working on a mod and I made two abilities intended for units which requires the unit to have already selected another ability. However when I tried to test it, the two abilities didn't show up when I selected the ability intended to unlock them. Is it actually possibly to do I'm trying?

11,806 views 19 replies
Reply #1 Top

For those that get traits on level-up yes, for unit design no.

Reply #3 Top

Thus is the core emotion of the FE modder...

Reply #4 Top

what abilities are you trying to add? maybe we can help you find a way to do something similar.

Reply #6 Top

After you have created a sovereign, go into your documents\my games\fallen enchantress\units

folder and edit the .xml file associated with your sovereign you want to have the ability. Then add these two lines next to other options that say something similar.

<SelectedAbilityBonusOption>Swordsman2Ability</SelectedAbilityBonusOption>
<SelectedAbilityBonusOption>Swordsman3Ability</SelectedAbilityBonusOption>

 

Reply #7 Top

Quoting parrottmath, reply 6

After you have created a sovereign, go into your documents\my games\fallen enchantress\units

folder and edit the .xml file associated with your sovereign you want to have the ability. Then add these two lines next to other options that say something similar.

<SelectedAbilityBonusOption>Swordsman2Ability</SelectedAbilityBonusOption>
<SelectedAbilityBonusOption>Swordsman3Ability</SelectedAbilityBonusOption>

 

 

Actually Swordsman3 no longer exists. ;)

So the two lines to add would be:

 

<SelectedAbilityBonusOption>Swordsman</SelectedAbilityBonusOption>

<SelectedAbilityBonusOption>Swordsman2</SelectedAbilityBonusOption>

 

Edit as I was only thinking in terms of LH. If you're playing FE then I would add these three lines:

 

<SelectedAbilityBonusOption>Swordsman</SelectedAbilityBonusOption>

<SelectedAbilityBonusOption>Swordsman2</SelectedAbilityBonusOption>

<SelectedAbilityBonusOption>Swordsman3</SelectedAbilityBonusOption>

 

Reply #8 Top

Thanks a lot guys! Now how did you guys know the name that was needed? Where did you learn to input the codes? But again thanks a lot!

Reply #9 Top

Quoting alphalobo1, reply 8

Thanks a lot guys! Now how did you guys know the name that was needed? Where did you learn to input the codes? But again thanks a lot!

We looked into the the folder that contains the actual program. It's under data\english\

there you will find a lot of core files with all the code that you can put into your game.

Reply #12 Top

Where ever your steam is installed (usually under program files) get to the steam folder and that is the path.

...\Steam\steamapps\common\FE Legendary Heroes\data\English

If you are running fallen enchantress then

...\Steam\steamapps\common\Fallen Enchantress\data\English

happy modding.

Reply #14 Top

Quoting mqpiffle, reply 3

Thus is the core emotion of the FE modder...
<X3

Reply #15 Top

<SelectedAbilityBonusOption>Swordsman</SelectedAbilityBonusOption>

<SelectedAbilityBonusOption>Swordsman2</SelectedAbilityBonusOption>

 

I've done that, but to no avail... I still am not getting that ability, but it's no biggie. I'm just baffled that the coding seems correct especially after checking out the coreabilites.xml file O_O

Reply #16 Top

We also ask a lot of questions, and read questions others have asked.

 

My advice:

 

You see an effect in the game, like the spell Alchemy which turns Mana to Gold and say "Wow! Too bad it doesn't make crystal turn to gold!" Looking at the spell, you realize you can create a file called "Conjure Crystal" and put it in the My Games\LegendaryHeroes\Mods. You cut-paste the spell Alchemy, and change some tags.

 

    <SpellDef InternalName="ConjureCrystals">
        <DisplayName>Conjure Crystals</DisplayName>
        <Description>Convert 150 mana into 50 Crystals.</Description>
        <Image>S_Alchemy_Painting.png</Image>
        <IconFG>S_Alchemy_Icon.png</IconFG>
        <SpellBookSortCategory>World</SpellBookSortCategory>
        <SpellBookSortSubCategory>Other</SpellBookSortSubCategory>
        <SpellType>Strategic</SpellType>
        <SpellClass>Other</SpellClass>
        <SpellSubClass>Other</SpellSubClass>
        <SpellTargetType>Self</SpellTargetType>
        <AutoUnlock>1</AutoUnlock>
        <Cooldown>20</Cooldown>        
        <CasterMustBeSov>1</CasterMustBeSov>
        <Prereq>
            <Type>Tech</Type>
            <Attribute>Enchantment</Attribute>
        </Prereq>        
        <SpellResourceCost>
            <Resource>Mana</Resource>
            <Amount>150</Amount>
        </SpellResourceCost>
        <GameModifier>
            <ModType>Resource</ModType>
            <Attribute>RefinedCrystal</Attribute>
            <Value>50</Value>
        </GameModifier>
        <AIData AIPersonality="AI_General">
            <AIPriority>5</AIPriority>
        </AIData>
        <HitSoundFX>Spell_Alchemy_01</HitSoundFX>
        <SpellDefEffect>
            <EffectName>S_Alchemy_Particle</EffectName>
            <LocalPosition>0,0,0</LocalPosition>
            <EffectScale>.75</EffectScale>
            <EffectDelay>0</EffectDelay>
            <SnapToTerrain>1</SnapToTerrain>
        </SpellDefEffect>
    </SpellDef>

 

You will learn certain commonalities. Everything has an InternalName and DisplayName, some things have Prerequisites. GameModifiers are fickle, this is where you actually do your effect.

 

How to get started?

 

Copy CoreAbilities, CoreItems, CoreWeapons, CoreArmor, CoreSpells into a folder called Modname, or MyMod or whatever. make this folder on your desktop for easy access. Open a file, and play the game. When you see something like a cool item or ability, or whatever, a building... look it up in the file inside of your folder.

 

There are a lot of helpful threads here for you to look through about <ArtDef> and the way the game loads the Core Files vs the Mod Files, for example you want to change an existing sword vs making a new one with a similar name.

Reply #17 Top

Quoting alphalobo1, reply 15

<SelectedAbilityBonusOption>Swordsman</SelectedAbilityBonusOption>
<SelectedAbilityBonusOption>Swordsman2</SelectedAbilityBonusOption>

 

I've done that, but to no avail... I still am not getting that ability, but it's no biggie. I'm just baffled that the coding seems correct especially after checking out the coreabilites.xml file

 

I've just tested it with a custom sovereign and it works. The skill shows up in the new game menu and appears ingame. You just graft the two "Swordsman" lines to these when you edit your custom sovereign:

 

<SelectedAbilityBonusOption>Blood_Trog</SelectedAbilityBonusOption>                <SelectedAbilityBonusOption>TrainJuggernauts</SelectedAbilityBonusOption>                <SelectedAbilityBonusOption>Adventurer</SelectedAbilityBonusOption>                                 <SelectedAbilityBonusOption>Might</SelectedAbilityBonusOption>                             <SelectedAbilityBonusOption>Discipline_Level</SelectedAbilityBonusOption>          <SelectedAbilityBonusOption>VeteranSovereign</SelectedAbilityBonusOption>                       <SelectedAbilityBonusOption>Tactician</SelectedAbilityBonusOption>                                    <SelectedAbilityBonusOption>Hardy</SelectedAbilityBonusOption>                               <SelectedAbilityBonusOption>Swordsman</SelectedAbilityBonusOption>                                 <SelectedAbilityBonusOption>Swordsman2</SelectedAbilityBonusOption>

 

Reply #18 Top


You also must start a new game... that is a must when modding in FE

Reply #19 Top

You're right. It is working, but strangely enough, it doesn't show up as a skill that I own... Unless, I choose warrior path, and then I'll see it as already owned. Weird, but it truly works.