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?

I've been stuck for days on this. Beginning to think it will not work.

Trying to use this in a spell:

 

Code: xml
  1.         <Prereq>
  2.             <Type>Unit</Type>
  3.             <Attribute>UnitStat_Kos_Flag2</Attribute>
  4.             <Value>1</Value>
  5.         </Prereq>
  6. also tried:
  7.         <Prereq>
  8.             <Target>Unit</Target>
  9.             <Attribute>UnitStat_Kos_Flag2</Attribute>
  10.             <Value>1</Value>
  11.         </Prereq>

I really need a check in the prereq to test for value, but it could be anything > 0.

Any ideas?


Comments
on Nov 27, 2012

Use this

   <Prereq>
      <Type>UnitStat</Type>
      <Attribute>UnitStat_Goes_here</Attribute>
      <Value>1</Value>
    </Prereq>

 also works in abilitybonusoptions (aka traits) for level-up

on Nov 27, 2012

Heavenfall
Use this

   <Prereq>
      <Type>UnitStat</Type>
      <Attribute>UnitStat_Goes_here</Attribute>
      <Value>1</Value>
    </Prereq>

 also works in abilitybonusoptions (aka traits) for level-up

 

Awesome! How did you figure out to use UnitStat for type? I searched those files for hours.

 

At any rate, it works now and +1 Karma

on Nov 27, 2012

I believe it was used in an early beta build for something, can't remember what now.

Edit: It's actually still in use in CoreSpells.xml

 <Prereq>
            <Type>UnitStat</Type>
            <Attribute>UnitStat_HitPoints</Attribute>
            <Value>4</Value>
        </Prereq>

on Nov 27, 2012

Ok, so now I'm stuck on this...

On each Pathofthewhatever...

I am using this code:

        <GameModifier>
            <ModType>Unit</ModType>
            <Attribute>SetUnitStat</Attribute>
            <StrVal>UnitStat_Kos_Flag1</StrVal>
            <Value>1</Value>            
        </GameModifier>

 

I was hoping by specifying SetUnitStat it would assign it a value of 1, but it simply adds to the Flag1.

Any hope of fixing that?

on Nov 27, 2012

Why not adjustunitstat?

on Nov 27, 2012

Heavenfall
Why not adjustunitstat?

 

I need the value to be 0 or 1 only and since I allow multi-paths, if I use adjustunitstat it goes to 2 or more. I want to be able to test for a 1 there (path has been chosen), no matter how many paths or which path. I am thinking maybe that BoolVal1 thing could fit but haven't figured it out either.

 

I could do this if I could figure out how to test for value > 0 in prereq but I have had no luck with that.

on Nov 27, 2012

If you set a prereq unitstat it is always >=.

 

on Nov 27, 2012

Heavenfall
If you set a prereq unitstat it is always >=.

 

 

Really? I figured if I tested for 1 then an actual value of 2 would fail...thanks alot and back to fixing this up now

 

edit:

If I use the same internal names from CoreAbilities in my mod file, and put two different prereqs in two different sections, will they be added to the originals, or are they viewed as replacing, or are all 3 separate? i.e....

 

Code: xml
  1.     <AbilityBonus InternalName="Fire1Ability">
  2.         <AbilityBonusType>Unit_Level</AbilityBonusType>
  3.         <AbilityBonusOption InternalName="Fire1">
  4.             <Likelihood>400</Likelihood>
  5.         <Prereq>
  6.                 <Type>AbilityBonusOption</Type>
  7.                 <Target>Unit</Target>
  8.                 <Attribute>PathOfTheMage</Attribute>
  9.         </Prereq>
  10.         </AbilityBonusOption>
  11.     </AbilityBonus>
  12.     <AbilityBonus InternalName="Fire1Ability">
  13.         <AbilityBonusType>Unit_Level</AbilityBonusType>
  14.         <AbilityBonusOption InternalName="Fire1">
  15.             <Likelihood>50</Likelihood>
  16.         <Prereq>
  17.             <Type>UnitStat</Type>
  18.             <Target>Unit</Target>
  19.             <Attribute>UnitStat_Kos_Flag1</Attribute>
  20.             <Value>1</Value>
  21.         </Prereq>
  22.         </AbilityBonusOption>
  23.     </AbilityBonus>

 

Will that be tested as 3 different choices or be a no way to succeed? Or?

on Nov 28, 2012

You're adding it to the same ability, at least when working with abilitybonusoptions. See https://forums.elementalgame.com/434780

on Nov 28, 2012

So if I change the AbilityBonus internal name and retain the AbilityBonusOption names would I be able to use 3 separate ability sections with different prereq's and still assign the ABO correctly? I'm guessing by 'we can block the originals' = give them unattainable prereqs?

 

Sorry to ask so many questions but I just can't seem to understand all the intricacies of the data formats and syntax.

on Nov 28, 2012

That's an interesting idea, I don't know what happens if you change the abilitybonus internalname.

ABO? Don't know what that means.

You want to have three different ways of getting a trait? I don't think that's doable, although some have said that if you simply include multiple unitstat prereqs in the same abilitybonusoption it only needs one to appear. I don't know, never tried.

Yes, giving them unobtainable prereqs blocks them from appearing (but not being given out to champions in unittypes for example).

 Other than that, you are entering the area where I have no answers. You'll have to try it for yourself and see how it works.

on Nov 28, 2012

Thanks for all the help Heavenfall

ABO - was short for AbilityBonusOption