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 1)
2 Pages1 2 
on Nov 28, 2012

Try

      <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>UnlockUnitAbility</Attribute>
            <StrVal>Air1</StrVal>
        </GameModifier>

if that doesn't work nothing will

on Nov 28, 2012

Thanks once again for fast answers, but sadly it does not work. And I am out of ideas on how to fix my problem

For some reason the prereqs of 'Air1, Air2, Fire1...etc' are being ignored and I am offered any ability such as Earth5 before any other Earth books.

 

Quite aggravating!

Back to the drawing board.

on Nov 28, 2012

out of topic.

is there a spell that grants such abilities to receiver? (like flying, diving in future etc)

 

on Nov 28, 2012

Yes, use that modifier above. It should work fine inside a spell, I used it like that many times.

on Nov 29, 2012

I can say for sure that it does work in spells also. But for some reason alot of things don't work as you would think in CoreAbilities.

This code below does not set the Flag Kos_Air to 2 as it would seem to, even though it allows me to pick the skill Air1. Upon initialization the flag is set to 1 and I verify this.

  <AbilityBonus InternalName="Air1AbilityPotM">
    <AbilityBonusType>Unit_Level</AbilityBonusType>
    <SpellbookType>Air</SpellbookType>
    <AbilityBonusOption InternalName="Air1">
      <DisplayName>Air Apprentice in PotM</DisplayName>
      <Description>Allows the unit to cast rank 1 Air spells like Evade and Haste</Description>
      <Icon>Ability_AirApprentice_Icon.png</Icon>
      <Likelihood>400</Likelihood>
      <Prereq>
        <Type>UnitStat</Type>
        <Attribute>UnitStat_Kos_Air</Attribute>
        <Value>1</Value>
      </Prereq>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_Kos_Air</StrVal>
        <Value>1</Value>
      </GameModifier>
      <GameModifier>
        <ModType>Unit</ModType>
        <Provides>Allows the unit to cast rank 1 Air spells like Evade and Haste</Provides>
      </GameModifier>
      <Type>Spell</Type>
      <AIData AIPersonality="AI_General">
        <AIPriority>5</AIPriority>
      </AIData>
    </AbilityBonusOption>
  </AbilityBonus>

 

As a result, you pick Air1 ( and it says in the pick box - 'Air Apprentice in PotM' so I know it is this code ) and it offers it to you again at future level ups.

Anyone see a reason why it would act like this?

on Nov 29, 2012

the only thing i see missing is the following:

 <Cost>2</Cost>

 <SpellbookRank>1</SpellbookRank>

 

which is inserted right above the <type> tag, under the <gamemodifier> tag

try putting in the spellbookrank tag, i think it will behave then.

 

I'm wondering if the spellbook rank tag serves a dual purpose:

a: does it tell the level up system this ability is already chosen.

b: does it give access to generic rank 1 spells - i'm wondering about this one since i know there are generic quest spells that henchmen are not able to cast.

 

 

 

EDIT: Why do you have this as a prereq AND a state given by the attribute? Shouldn'tit be  one or the other not both.

 

 <Prereq>

         <Type>UnitStat</Type>

         <Attribute>UnitStat_Kos_Air</Attribute>

         <Value>1</Value>

  </Prereq>

 

   <GameModifier>

         <ModType>Unit</ModType>

         <Attribute>AdjustUnitStat</Attribute>

         <StrVal>UnitStat_Kos_Air</StrVal>

         <Value>1</Value>

    </GameModifier>


 

on Nov 29, 2012

Glowing_Ember
the only thing i see missing is the following:

 <Cost>2</Cost>

 <SpellbookRank>1</SpellbookRank>

 

which is inserted right above the <type> tag, under the <gamemodifier> tag

try putting in the spellbookrank tag, i think it will behave then.

 

I'm wondering if the spellbook rank tag serves a dual purpose:

a: does it tell the level up system this ability is already chosen.

b: does it give access to generic rank 1 spells - i'm wondering about this one since i know there are generic quest spells that henchmen are not able to cast.


 

I wondered the same thing but, the spellrank tag is missing on ranks 3 to 5, which makes me think it is more for the available choices when creating your Sovereign. I did go so far as to place 1 to 5 in the choices but no change at all.

on Nov 29, 2012


have another look i edited my post

 

on Nov 29, 2012

The logic is this... if I simply use the normal prereq of 'AbilityBonusOption' 'Air1' like in the core coreabilities.xml, it simply will not work with my new tag name of Air1AbilityPotM. So I decided to prereq it with a unit flag Kos_Air and so to make Air1 a valid choice it is prereq kos_air=1 and then we modify it to 2. (but this doesn't happen). Then it will be set for the Air2 prereq which is kos_air=2.

 

on Nov 29, 2012

<Prereq>

                 <Type>AbilityBonusOption</Type>

                 <Target>Unit</Target>

                 <Attribute>Air1</Attribute>

</Prereq>

 

my thoughts, in no particular order.

I don't think it's working as you intended

The attribute Air1 is based off the internal name

I believe <value> is a boolean, not a numerical data so value = 2 wouldn't work. Have you tried adjusting it to value = 2

 <GameModifier>

         <ModType>Unit</ModType>

         <Attribute>AdjustUnitStat</Attribute>

         <StrVal>UnitStat_Kos_Air</StrVal>

         <Value>2</Value>

  </GameModifier>

Are you trying to make a limited caster like a henchmen or a full caster like a sov/hero ?

 

 

Re-reading your posts. So your saying everything is working as you want EXCEPT you get offered the rank 1 ability again at a later level up ?

<Prereq>

         <Type>UnitStat</Type>

         <Attribute>UnitStat_Kos_Air</Attribute>

         <Value>1</Value>

  </Prereq>

 

try taking this out.

 

 

on Nov 29, 2012

Here's some XML that works

<?xml version="1.0"?>
<container>
  <UnitStatType InternalName="UnitStat_Kos_Air">
    <DisplayName>Hidden</DisplayName>
    <DisplayNameShort>Hidden</DisplayNameShort>
    <Description>Hidden</Description>
    <Icon>Piercing_Stat_Icon.png</Icon>
    <Hidden>1</Hidden>
    <DefaultValue>1</DefaultValue>
    <UnitStatGrouping>CombatStat</UnitStatGrouping>
    <UnitStatGrouping>UnitDetailsCombatStat</UnitStatGrouping>
  </UnitStatType>
  <AbilityBonus InternalName="Air1Ability">
    <AbilityBonusType>Unit_Level</AbilityBonusType>
    <AbilityBonusOption InternalName="Air1">
      <Prereq>
        <Type>UnitStat</Type>
        <Attribute>UnitStat_Kos_Air</Attribute>
        <Value>1</Value>
      </Prereq>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_Kos_Air</StrVal>
        <Value>1</Value>
      </GameModifier>
      <Likelihood>4000</Likelihood>
    </AbilityBonusOption>
  </AbilityBonus>
  <AbilityBonus InternalName="Air2Ability">
    <AbilityBonusType>Unit_Level</AbilityBonusType>
    <AbilityBonusOption InternalName="Air2">
      <Likelihood>5000</Likelihood>
      <Prereq>
        <Type>UnitStat</Type>
        <Attribute>UnitStat_Kos_Air</Attribute>
        <Value>2</Value>
      </Prereq>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_Kos_Air</StrVal>
        <Value>1</Value>
      </GameModifier>
      <AIData AIPersonality="AI_General">
        <AIPriority>5</AIPriority>
      </AIData>
    </AbilityBonusOption>
  </AbilityBonus>
  <AbilityBonus InternalName="Air3Ability">
    <AbilityBonusType>Unit_Level</AbilityBonusType>
    <AbilityBonusOption InternalName="Air3">
      <Likelihood>5000</Likelihood>
      <Prereq>
        <Type>UnitStat</Type>
        <Attribute>UnitStat_Kos_Air</Attribute>
        <Value>3</Value>
      </Prereq>
      <GameModifier>
        <ModType>Unit</ModType>
        <Attribute>AdjustUnitStat</Attribute>
        <StrVal>UnitStat_Kos_Air</StrVal>
        <Value>1</Value>
      </GameModifier>
    </AbilityBonusOption>
  </AbilityBonus>
</container>



on Nov 29, 2012

Thank you Heavenfall, I can see how that would work as it uses the same internal names as coreabilities in install folder. But that is the real problem as I need to intercept the process since I want the PathOfTheMage to have high likelihood of coming up while all other paths are very low. To this end I have created:

    <AbilityBonus InternalName="Air2Ability">
        <AbilityBonusOption InternalName="Air2">
            <Likelihood>0</Likelihood>
        </AbilityBonusOption>
    </AbilityBonus>
    <AbilityBonus InternalName="Air3Ability">
        <AbilityBonusOption InternalName="Air3">
            <Likelihood>0</Likelihood>
        </AbilityBonusOption>
    </AbilityBonus>

and repeated for all 5 of each type of school. Then I used 2 new InternalNames ( Air1AbilityPotM & Air1AbilityNoPotm ). This does not seem to work. I will use your code and see if I can change the starting name though and get it to work. I don't know for sure, but something tells me we can't use our own InternalNames.

on Nov 29, 2012

You most definitely can. In the XML above you just didn't do that:     <AbilityBonusOption InternalName="Air1">

on Nov 29, 2012

Aye, the xml above in my last post is from the disable original calls. In my original post, you see the change I talk about...

<AbilityBonus InternalName="Air1AbilityPotM"> (from reply #6)

this does not seem to work. I changed it back to Air1Ability and the unitstat_kos_air flag is being incremented.

on Nov 29, 2012

That's what I meant.

AbilityBonus is a container for the following AbilityBonusOptions.

This

    <AbilityBonus InternalName="Air2Ability">
        <AbilityBonusOption InternalName="Air2">
            <Likelihood>0</Likelihood>
        </AbilityBonusOption>
    </AbilityBonus>

is not the same as this

    <AbilityBonus InternalName="Air2AbilityPOTM">
        <AbilityBonusOption InternalName="Air2">
            <Likelihood>0</Likelihood>
        </AbilityBonusOption>
    </AbilityBonus>

but you are still interfering with the same abilitybonusoption!

<AbilityBonus InternalName="Air1AbilityPotM">
    <AbilityBonusOption InternalName="Air1">

turn that Air1 into Air1PoTM

2 Pages1 2