• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Trying to do two things that should be simple

enrious

Well-known member
Ok, I'm trying to figure out how to do two things:

1) I'm trying to force all character to select a Trait with the category "Ethnic", and they can only have 1. (Similar to "Social" and "Combat", but I think those are hardwired to not validate more than 1).

I've created the following Mechanic:

<thing id="MechEtnic" name="Ethnic Trait" compset="Mechanics" uniqueness="unique">
<evalrule phase="First" message="You must have exactly 1 Ethnic Trait." severity="warning">validif (tagcount[trCategory.Ethnic] = 1)</evalrule>
</thing>

When creating a character, it never seems to recognize a Trait I've created with the "Ethnic" custom category, an example of which is as follows:

<thing id="trScania" name="Caldimaran, Scanian" description="A native of the Scania nation on the Caldimaran continent." compset="Trait" uniqueness="useronce">
<usesource source="DifekLingv" parent="UserParent" name="Difekta Lingvo"/>
<tag group="trCategory" tag="Ethnic" name="Ethnic" abbrev="Ethnic"/>
<tag group="Helper" tag="NoPathSoc" name="Not Allowed for Pathfinder Society Characters" abbrev="Not Allowed for Pathfinder Society Characters"/>
<bootstrap thing="langscania"></bootstrap>
<eval phase="First">~ Add to traits allowed
hero.child[resTrait].field[resMax].value += 1</eval>
</thing>


What this does is basically always throw the error, even if that Trait is selected - thus it doesn't appear to be recognizing the category.


2) As I don't think I can easily edit a class like Rogue to grant an automatic language, how can I create a language that will grant a bonus language to Rogues if it's selected, but not grant the language otherwise.

In other words, create the language "Cant". If a Rogue selects it, it subtracts one from their available languages but then checks their class and sees that they're a Rogue and gives it back.

I tried doing something in the Eval Script like:

if (tagis[wGroup.cHelpRog] >= 1) then herofield[tLangsSpk].value += 1 endif


However, it doesn't work.

Any ideas? Yes, I know these can be done by having the players use the Permanent Adjustment function; I'm trying to avoid this however.
 
For #1, your problem is your script is looking for the Ethnic tag on the hero itself, rather than on the trait. The tag is attached to the trait, not to the hero. Try this script instead:

Code:
var found as number
found = 0

foreach pick in hero where "trCategory.Ethnic"
  found += 1
nexteach

validif (found = 1)


For #2, I don't think I've had enough coffee yet to understand what you're trying to do. Can you clarify?
 
Last edited:
Also if you actually know how the trait system works from the Pathfinder Rule Books, the traits are set up in the books such that you cannot take more than one per category. You cannot have two combat or magic or faith traits. That is the way the game system is set up.
 
Also if you actually know how the trait system works from the Pathfinder Rule Books, the traits are set up in the books such that you cannot take more than one per category. You cannot have two combat or magic or faith traits. That is the way the game system is set up.

Sorry - those restrictions are hard-coded category-by-category. User created tag groups do need a new rule created for them.
 
For #1, your problem is your script is looking for the Ethnic tag on the hero itself, rather than on the trait. The tag is attached to the trait, not to the hero. Try this script instead:

Code:
var found as number
found = 0

foreach pick in hero where "trCategory.Ethnic"
  found += 1
nexteach

validif (found = 1)

Lightbulb moment, thanks for the code and the explanation.

For #2, I don't think I've had enough coffee yet to understand what you're trying to do. Can you clarify?

Essentially make Cant a selectable language, but give rogues a refund if they take it, so for them it'd effectively be free.
 
I tried this eval script successfully, at Post-Levels (Users) / 100

Code:
if (hero.tagcount[Classes.Rogue] <> 0) then
  herofield[tLangsSta].value += 1
endif
 
Back
Top