• 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

Ok, why is this not working?

Illyahr

Well-known member
Doing some code and, as far as I can tell, it all works. However, it keeps coming back wrong.

Code:
var stat as string
var bonus as number
var trunc as number
stat = hero.child[cHelpStk].tagids[User.a?]

Comes back as "User.aWIS" (it can be changed later, hence the code)

Code:
trunc = length(stat)-5
stat = right(stat,trunc)

Comes back as "aWIS"

Code:
stat = "#attrmod[" & stat & "]"

Comes back as "#attrmod[aWIS]"

Code:
bonus = stat

Comes back as 0. Actually putting the stat in comes back correctly, but not if I use the script.
 
Last edited:
So the lines

Code:
stat = "#attrmod[" & stat & "]"
bonus = stat

are making a string, and then converting that string to a value (which is 0, since there isn't a number in the string).

You aren't actually using the #attrmod macro, it's just text in the string.



The field might be different for d20, but in Pathfinder I would change those lines to be something like this instead:
Code:
~ make a tag expression to match the right attribute
stat = "thingid." & stat

~ get the current bonus/modifier for that attribute
bonus = hero.firstchild[stat].field[aModBonus].value
 
Fantastic, that works. :D

The reason I needed this code to work is that it is going to be repeated a lot in Path of War and Path of War: Expanded. Maneuvers and abilities rely on "initiation modifier" instead of just stating what modifier to use.
 
Ok, these Things will be able to be shared among multiple classes. How would I go about making these Things check for the tag on the class they are in?
 
I think all class-based special abilities (for d20 and pathfinder) are tagged with a SpecSource.? tag that gives you the id string for the class helper that provides the class special ability.

If it is tagged with SpecSource.cHelpExample, you can find the class helper by searching for thingid.cHelpExample in the Hero container.
 
Doesn't help in this regard. These Things have their own unique source so they can be assigned to a class with a script. What I need is to be able to run script that'll pull a tag from the class they have been assigned to
 
Doesn't help in this regard. These Things have their own unique source so they can be assigned to a class with a script. What I need is to be able to run script that'll pull a tag from the class they have been assigned to

How are they getting assigned? Are you using a chooser? If so, you can pull information through the chooser (ie field[usrChosen1].chosen.tagnames[Classes.?]).
 
Last edited:
How are they getting assigned? Are you using a chooser? If so, you can pull information through the chooser (ie field[usrChosen1].chosen.tagnames[Classes.?]).

The ToB disciplines (and Path of War, by extension), each have their own Source. Each of the PoW classes have access to different disciplines and have different initiation modifiers (kinda like how a Wizard uses Int for spells and a Sorcerer uses Cha). Some disciplines are shared among different classes and can even be assigned to a class later.

I am trying to tell the individual maneuvers to check what modifier the class uses and use that to set the DC
 
The ToB disciplines (and Path of War, by extension), each have their own Source. Each of the PoW classes have access to different disciplines and have different initiation modifiers (kinda like how a Wizard uses Int for spells and a Sorcerer uses Cha). Some disciplines are shared among different classes and can even be assigned to a class later.

I am trying to tell the individual maneuvers to check what modifier the class uses and use that to set the DC

Ok. Well, in ToB, when a maneuver is taken by a class, it gets assigned the tag "CustTaken.cHelp???" which indicates which class has taken it. I can't think of a way to discover which attribute to use, so you might just have to tell the script.

ie:

if (tagis[CustTaken.cHelpCru] <> 0) then
use STR
endif

That is, unless whatever you're doing above works.
 
Last edited:
Got it working. A bit of complicated script but it now checks what class it is, pulls the initiator tag, and then uses that tag to calculate DC :)
 
Back
Top