[?] Modding Spell Traits Questions

Alright so I am trying to create racial spellbooks and I am wondering about the prereq tags involved. To make a spell granting trait unique to a race would this tag work?

            <Prereq>
                <Type>Race_Type</Type>
                <RaceType>Race_Type_Island</Attribute>
            </Prereq>

and in order to deny an already existing spell trait to a certain race is there a tag I could add, or would I have to add similar tags to the one above for all the other races except the one I want to exclude.

3,282 views 9 replies
Reply #1 Top

            <Prereq>
                <Type>Race</Type>
                <Attribute>Race_Type_Wraiths</Attribute>
            </Prereq>

for race-types. In order for a trait to appear, all the prereqs must be fulfilled. If you have two different races you'll never see it.

If you specifically want to exclude only one unit or race, you can prereq a unitstat at 0, then set the unitstat to -1 for those units you wish to exclude. (edit, I haven't actually tried that, but it should work)

Reply #2 Top

Thanks Heavenfall. So there are no negative or not prereq tags. I guess I will add that to the mod wishlist thread if no one else has.

Reply #3 Top

I believe that to be the case, but you can TECHNICALLY add excluding prereqs using the method I described.

            <Prereq>
                <Type>UnitStat</Type>
                <Attribute>UnitStat_BG_HasInjuries</Attribute>
                <Value>0</Value>
            </Prereq>

All units start with this stat at 0. So every unit can get it. But if one unit starts with this stat at -1:
<UnitStat_BG_HasInjuries>-1</UnitStat_BG_HasInjuries>

then he can't get it and it won't appear. I tested it this time.

Reply #4 Top

huh

            <Prereq>
                <Type>Race</Type>
                <Attribute>Race_Type_Wraiths</Attribute>
            </Prereq>

 

doesn't appear to work for me. Everyone can still select it.

Reply #5 Top

When you put that prereq in, it checks to see if your faction is that racetype. It is not a check against the individual's racetype. In other words, an Altarian faction may recruit a Mancer hero who would still gain the trait.

Reply #6 Top

What is happening is that when I create custom sovereigns no matter what faction I assign them they can still all select spirit magic.

Reply #7 Top

Oh, you're talking about the screen where we create custom sovereigns? Yeah, I could see some complications arising there. I was talking about level-up traits. The custom sov screen most likely was not set up to accommodate the prereq thing

Reply #8 Top

Well a prereq for allegiance already exists, for life and death magic, so if the race tag was working you would think it would work in the custom sov creation screen as well.

Reply #9 Top

Well now... you can create custom allegiances! That changes things. :grin: