Senior Member
Join Date: May 2013
Posts: 1,458
|
I'm working from the skeleton game system, and I'm adding abilities. I'm looking for a way to set the existence or absence of an ability as a prerequisite for another ability. For example, two of the abilities I'm adding are "Attractive" and "Unattractive" (abAttr and abUnattr). Obviously, these are mutually exclusive. So if someone chooses both, they should both report as invalid.
Also, there's an "Alien" ability, and there are many other abilities for which "Alien" is a prerequisite. For example, "Extra Limb". I've tried something like this: Code:
<!-- Define any appropriate pre-requisites for the ability <exprreq iserror="yes" message="Strength 5 required."><![CDATA[#trait[abAttr] = 0]]></exprreq> Is there a simple way to do this? |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
I highly recommend studying the Savage Worlds Walkthrough in the authoring kit if you're going to be creating a new game system - that's a record of what was done as the skeleton files were turned into the Savage Worlds files, so you can read how a great many things were accomplished there.
http://hlkitwiki.wolflair.com/index....s_Walk-Through Go to the "Hindrance Support" page there, then to the "Identification for Prereqs" section of that page. That's where they set up the basic mechanism behind their version of #hastrait[]. Once you've got those identity tags added, can you figure out how to test for the presence of a tag? |
#2 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
I'll have to see. I'm not as good at learning from documentation as I am at learning from reverse engineering. I'll take what you gave me and see what I can do with it.
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,217
|
In that case, on the link I provided, I recommend checking out the "Where to find the source" section, so that you have a more complete game system to study from than just the skeleton files themselves. For example, there are examples of similar things in the thing_edges.dat file. (Edges areSavage World's most common type of "ability").
|
#4 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Indeed. Your link led me to the <prereq> attribute which actually did exactly what I needed.
|
#5 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
Sorry, I meant <pickreq>. Such as:
<pickreq ispreclude="yes" thing="abMnUnAttr"/> |
#6 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
And if I want an ability to require another ability, I change the "yes" to "no".
<pickreq ispreclude="no" thing="abMnUnAttr"/> |
#7 |
Senior Member
Join Date: May 2013
Posts: 1,458
|
And if I want an ability to require another ability, I change the "yes" to "no".
<pickreq ispreclude="no" thing="abMnUnAttr"/> |
#8 |
|
|