Senior Member
Join Date: Sep 2009
Posts: 175
|
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. |
#1 |
Senior Member
Join Date: Jul 2007
Location: Syracuse, NY (USA)
Posts: 213
|
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 by huntercc; December 30th, 2011 at 06:56 AM. Reason: just saw there were 2 items in original post |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
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.
|
#3 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Quote:
|
|
#4 |
Senior Member
Join Date: Sep 2009
Posts: 175
|
Quote:
Quote:
|
||
#5 |
Senior Member
Join Date: Jul 2007
Location: Syracuse, NY (USA)
Posts: 213
|
I tried this eval script successfully, at Post-Levels (Users) / 100
Code:
if (hero.tagcount[Classes.Rogue] <> 0) then herofield[tLangsSta].value += 1 endif |
#6 |
Senior Member
Join Date: Sep 2009
Posts: 175
|
Thank you very much, it worked like a charm.
|
#7 |
|
|