what the f is wrong with this generation? I have to have at least 8 characters AND a number in my Impulse FORUM account? Who the fuck is going to steal my ability to post shit?
Published on November 28, 2012 By kosiam In FE Modding

Is there a way to assign traits, such as Air1 to a unit inside another level up choice? such as:

    <AbilityBonus InternalName="Summon1Ability">
        <AbilityBonusOption InternalName="Summon1">
            <Description>+1 level for Summons</Description>
            <GameModifier>
                <ModType>Player</ModType>
                <Attribute>AbilityBonus</Attribute>
                <StrVal>A_SummonedBonusLevels</StrVal>
                <Value>1</Value>
                <Provides>+1 level for Summons</Provides>
            </GameModifier>

--> give this unit the 'Air1' spellbook trait here


        </AbilityBonusOption>
    </AbilityBonus>


Comments (Page 2)
2 Pages1 2 
on Nov 29, 2012

I can understand that then, but since I need to enable the spells from Air1, Air2, etc, I thought I had to use Air1 etc.

I searched the files for Air1 to see how they are unlocking the spellbook, but all I found is Air1 is the attribute in CoreSpells, making me use it (or try to).

Would I need to copy all the original spells over to a mod file and use Air1PotM as the unlock key?

 

on Nov 29, 2012

Can you instead describe what you are trying to do? Is your intent to block certain spell levels for all who are not path of the mage? Or are you trying to give path of the mage a higher chance of seeing spelltraits as choices?

on Nov 29, 2012

If I understand correctly (and I may be wrong) you're trying to buff path of the mage so that it has a high chance of getting magical picks, and can also gain elemental paths (include apprentice tier1 picks). If this is what you're trying to do... try this:

 

<AbilityBonuses>
    <!-- A new trait for Path of the Mage that unlocks Air1, this isn't hidden so that you can tell that it's working-->
    <AbilityBonus InternalName="Air1POTMUnlockAbility">
        <AbilityBonusType>Unit_Level</AbilityBonusType>
        <AbilityBonusOption InternalName="Air1POTMUnlock">
            <DisplayName>Air Apprentice (POTM)</DisplayName>
            <Description>Allows the unit to cast rank 1 Air spells like Evade and Haste</Description>
            <Icon>Ability_AirApprentice_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Provides>Allows the unit to cast rank 1 Air spells like Evade and Haste</Provides>
            </GameModifier>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>UnlockUnitAbility</Attribute>
                <StrVal>Air1</StrVal>
            </GameModifier>
            <Likelihood>1000</Likelihood>
            <RarityDisplay>Common</RarityDisplay>
            <Type>Spell</Type>
            <Prereq>
                <Type>AbilityBonusOption</Type>
                <Target>Unit</Target>
                <Attribute>PathOfTheMage</Attribute>
            </Prereq>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>
    <!-- A new trait that unlocks Air2, requires Air1 Unlock (so that it'll come in order), repeat for Air3 to 5-->
    <AbilityBonus InternalName="Air2POTMUnlockAbility">
        <AbilityBonusType>Unit_Level</AbilityBonusType>
        <AbilityBonusOption InternalName="Air2POTMUnlock">
            <DisplayName>Air Disciple (POTM)</DisplayName>
            <Description>Allows the unit to cast rank 2 Air spells like Aura of Grace and Guardian Wind</Description>
            <Icon>Ability_AirDisciple_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Provides>Allows the unit to cast rank 2 Air spells like Aura of Grace and Guardian Wind</Provides>
            </GameModifier>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>UnlockUnitAbility</Attribute>
                <StrVal>Air2</StrVal>
            </GameModifier>
            <Likelihood>2000</Likelihood>
            <RarityDisplay>Common</RarityDisplay>
            <MinimumLevel>3</MinimumLevel>
            <Type>Spell</Type>
            <Prereq>
                <Type>AbilityBonusOption</Type>
                <Target>Unit</Target>
                <Attribute>Air1POTMUnlock</Attribute>
            </Prereq>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
        </AbilityBonusOption>
    </AbilityBonus>
    <!-- Mod the old Air2 so that it doesn't come up by itself once you've gone down this upgrade path, repeat for Air3 to 5-->
    <AbilityBonus InternalName="Air2Ability">
        <AbilityBonusOption InternalName="Air2">
            <Prereq>
                <Type>RestrictedAbilityBonusOption</Type>
                <Target>Unit</Target>
                <Attribute>Air1POTMUnlock</Attribute>
            </Prereq>
        </AbilityBonusOption>
    </AbilityBonus>
</AbilityBonuses>

I honestly have no idea what you're trying to do with UnitStat_Kos_Air, so I didn't include it...

on Nov 29, 2012

I am trying to do what Kalin gave code for. I want 2 separate trees for learning magic, 1 is for path of the mage and the other for all other classes. By all rights the code above should work, but the unlockunitability does not work. All the rest works fine, we get the icons for Air1-5 but can not cast even one spell from that tree.

I wonder if something is wrong with something I've modded in (as I've done quite a bit in other areas etc) and is why the unlockunitability does not work? Can you verify that it does or does not?

Even if it does not work, perhaps someone knows of a way to auto-cast a spell that gives the Air1 immediately as that does work. Or a way to give an item to the player? If that is possible, could it also be an auto-use item?

Short of any thing else, I could duplicate all spells and set the prereq's from Air1, Air2, etc to Air1PotM, Air2PotM, etc.

Appreciate all the help here, trying to learn the intricacies of how you do this or that, and what is not possible is aggravating.

on Nov 29, 2012

Yeah, you probably have to remake spells to do this.

The other alternative is to block other traits from appearing when you play path of the mage, increasing the odds that you get a spelltrait to select.

on Nov 29, 2012

kosiam
1 is for path of the mage and the other for all other classes.

It seems to me that the easiest way to do this is that in spells that require PotM you would have to put this:

<Prereq>
            <Type>AbilityBonusOption</Type>
            <Attribute>PathOfTheMage</Attribute>
        </Prereq>

As for how to do this in CoreAbilities, I have no idea.

One thing I plan on doing with the Aetheria core mod is changing elemental schools level 3 and higher to require PathOfTheMage.

on Nov 29, 2012

kosiam
I am trying to do what Kalin gave code for. I want 2 separate trees for learning magic, 1 is for path of the mage and the other for all other classes. By all rights the code above should work, but the unlockunitability does not work. All the rest works fine, we get the icons for Air1-5 but can not cast even one spell from that tree.

I wonder if something is wrong with something I've modded in (as I've done quite a bit in other areas etc) and is why the unlockunitability does not work? Can you verify that it does or does not?

Even if it does not work, perhaps someone knows of a way to auto-cast a spell that gives the Air1 immediately as that does work. Or a way to give an item to the player? If that is possible, could it also be an auto-use item?

Short of any thing else, I could duplicate all spells and set the prereq's from Air1, Air2, etc to Air1PotM, Air2PotM, etc.

Appreciate all the help here, trying to learn the intricacies of how you do this or that, and what is not possible is aggravating.

 

Strange, I guess you can't unlock abilities inside another ability... which is a bit odd, because you can unlock spells inside spells. I'm not sure if I messed up somewhere, but anyway, to address your current problem... 

You can also unlock spells like you do abilities with UnlockSpell (and this definitely works inside a trait). Basically you'd add the following:


        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>UnlockSpell</Attribute>
            <StrVal>Haste</StrVal>
            <Provides>Unlocks Haste: Target unit is +3 to Initiative (+1 per air shard)</Provides>
        </GameModifier>

... to Air1POTM, and the same for all other spells in their appropriate location. This will allow you to unlock the spells without duplicating everything. The problem with this approach would be the multi-path spells. Which you could either ignore, put into one of the other paths, or you can duplicate just those multi-path spells (much less than everything).

 

As to your question, you can try to create an item to give you the path... using GiveItem (quest reward style). Although I haven't tested to see if this works with unit level up traits (or how it would handled if you're in an army with other heroes). I don't think you can make it auto use though.

Basically, something like this:


            <GameModifier>
                <ModType>GiveItem</ModType>
                <Attribute>TomeoftheWind</Attribute>
            </GameModifier>

Regarding autocast spells, you can only do that at the beginning of a battle... via BattleAutoCastSpell, so you might be able to do it that way, but you'd need to enter another tactical battle before you gain that path. So you'd have to have something along the lines of "training Air1" trait in PoTM (with high likelihood) that would then autocast a spell that give you that Air1 path when you enter a battle. That SHOULD give you the appropriate trait and the spells that goes with it.

Basically:


    <AbilityBonus InternalName="Air1POTMUnlockAbility">
        <AbilityBonusOption InternalName="Air1POTMUnlock">
            <DisplayName>Training Air Apprentice</DisplayName>
            <Description>This mage is currently practicing Air magic, and will become an Air Apprentice by the next battle.</Description>
            <Icon>Ability_AirApprentice_Icon.png</Icon>
            <GameModifier>
                <ModType>Unit</ModType>
                <Attribute>BattleAutoCastSpell</Attribute>
                <StrVal>Air1POTMUnlockSpell</StrVal>
                <Value>100</Value>
                <Provides>This mage has become an Air Apprentice.</Provides>
            </GameModifier>
            <Likelihood>1000</Likelihood>
            <RarityDisplay>Common</RarityDisplay>
            <Type>Spell</Type>
            <Prereq>
                <Type>AbilityBonusOption</Type>
                <Target>Unit</Target>
                <Attribute>PathOfTheMage</Attribute>
            </Prereq>
            <AIData AIPersonality="AI_General">
                <AIPriority>5</AIPriority>
            </AIData>
    </AbilityBonus>

You'd need the auto cast spell (Air1POTMUnlockSpell) that unlocks Air1 as well, of course...

on Nov 29, 2012

Would it be possible to force these options like the various paths are forced at level 4?  Or is that hard coded?

on Nov 29, 2012

I have read the responses and thank all for suggestions. I have played with this for hours since getting home from work. The findings are not good. I can not use the Air1, Air2 tags, they seem to be tied to the Air1Ability, Air2Ability etc. If you try then very strange things happen, prereqs and AdjustUnitStat quits working also.

 

So I went with both having PotM in them and while that did not unlock the spells, it did go by the correct prereqs and incremented the unitstat_flags. The strange part is you get a separate icon for each level, so with Air1 & Air2 I had 2 icons on my Sovereign window. Not sure how they made them stack into one. I tried using the spell_rank tag but still no luck.

 

The suggestion to unlock the spells individually sounds great, only it does not unlock the spell either. I wonder if 1.02 has changed things from the beta days etc? So it is not much fun, but it seems I will be doing a copy & paste of all the spells. I've done worse in my life

 

Anyone have an idea how to stack the spell icons?

EDIT: just to make sure, I copied Haste over as HastePotM, gave it prereq of Air1PotM and it shows up after picking Air Apprentice.

on Nov 29, 2012

the only problem I see with  this, is what happens if you have the legitimate air apprentice?   Will it pop up as an option to take the whole set a second time?

on Nov 29, 2012

emmagine
the only problem I see with  this, is what happens if you have the legitimate air apprentice?   Will it pop up as an option to take the whole set a second time?

It will not as we disable the original magic schools by giving them impossible prereqs

2 Pages1 2