Quote:
Originally Posted by athelu
if (hero.tagis[race.dwarf] <> 0)
|
The basic syntax is correct but HL cares about capitalization. So its "Race.rDwarf". "rDwarf" is the unique id of the Dwarf Thing.
Macros are your friend here and you can do:
Code:
if (#hasrace[rDwarf] = 0) then
Quote:
Originally Posted by athelu
this should evaluate the current portfolio to see if the race is set to dwarf (I think).
What I am unsure of, is if I have built the field/content correctly. When I use the "findthing" button, and locate the race, it gives me something different (rDwarf). so, should I be using rDwarf? or is that a different way to reference the object?
I am wondering where I may find the canonical naming for these. Or better yet, even a list of the actual fields on the character. I have done a bit by picking out examples that already live in the system to lean some naming syntax for my custom items, but when it comes to some of the core items for the game system I am not sure where to find them.
|
All this is covered in the videos or
FAQ#9. Basically turning on and using debug tools.
Quote:
Originally Posted by athelu
Outside of that and returning to the question at hand. You suggested that I create a simpleThing ( I think this is the Simple tab). There are a number of options - and I see you suggested using Pre-Reqs to perform this. I assume there is a reason this is preffered, and not the eval scripts, or Eval Rule?
|
Figured its easier to setup if each Race is its own Simple Thing. I say Pre-Req as they are easy to use instead of Eval Rules. You don't need the added power of Eval Rules. And we are doing pre-req logic so Eval Scripts won't help you.
This is allot of the basic information you would get from the videos.
Quote:
Originally Posted by athelu
Should I create a Pre-req for each class combination for the race, or would it be ok to just use a single if statement to test all of the possible offending classes?
|
On each Simple Thing I would do one Pre-Req per Class/Race combo.
In example lets assume Elfs can't be Inquisitor's
Code:
#hasrace[rElf] + hero.tagis[Classes.Inquisito] <> 2
Then you can add multiple Pre-Req like the above to take into account each situation.
To explain the above code some:
#hasrace[rElf] - This is a macro that tests for the presence or absence of the Race.rElf tag on the hero (ie character). The macro returns a Boolean of true (1) or false (0).
+ - We want to add the results of our two "functions" together to see if they are "both" true (ie 2).
hero.tagis[Classes.Inquisito] - Test for the presence or absence of the Classes.Inquisito tag on the hero. This function returns a Boolean of true (1) or false (0).
<> 2 - A Pre-Req is always setup to display the "error" on a condition that is not valid. If we are NOT 2 then we will not display what is in the "message" section of the pre-req.