![]() |
|
Senior Member
Join Date: Feb 2013
Posts: 356
|
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?] Code:
trunc = length(stat)-5 stat = right(stat,trunc) Code:
stat = "#attrmod[" & stat & "]" Code:
bonus = stat I have a Patreon and PayPal. Donations are appreciated but are not mandatory. They are only to show support while I program stuff. Last edited by Illyahr; May 8th, 2022 at 11:42 AM. |
![]() |
![]() |
Member
Join Date: Dec 2014
Location: Cincinnati, OH
Posts: 54
|
length(stat)-5 might be picking up the . before aWIS, have you tried with -4?
|
![]() |
![]() |
Member
Join Date: May 2021
Posts: 79
|
So the lines
Code:
stat = "#attrmod[" & stat & "]" bonus = stat 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 |
![]() |
![]() |
Senior Member
Join Date: Feb 2013
Posts: 356
|
Fantastic, that works.
![]() 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. I have a Patreon and PayPal. Donations are appreciated but are not mandatory. They are only to show support while I program stuff. |
![]() |
![]() |
Senior Member
Join Date: Feb 2013
Posts: 356
|
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 have a Patreon and PayPal. Donations are appreciated but are not mandatory. They are only to show support while I program stuff. |
![]() |
![]() |
Member
Join Date: May 2021
Posts: 79
|
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. |
![]() |
![]() |
Senior Member
Join Date: Feb 2013
Posts: 356
|
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
I have a Patreon and PayPal. Donations are appreciated but are not mandatory. They are only to show support while I program stuff. |
![]() |
![]() |
Senior Member
Join Date: Jul 2010
Posts: 3,075
|
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 by Sendric; June 5th, 2022 at 07:23 AM. |
![]() |
![]() |
Senior Member
Join Date: Feb 2013
Posts: 356
|
Quote:
I am trying to tell the individual maneuvers to check what modifier the class uses and use that to set the DC I have a Patreon and PayPal. Donations are appreciated but are not mandatory. They are only to show support while I program stuff. |
|
![]() |
![]() |
Senior Member
Join Date: Jul 2010
Posts: 3,075
|
Quote:
ie: if (tagis[CustTaken.cHelpCru] <> 0) then use STR endif That is, unless whatever you're doing above works. Last edited by Sendric; June 7th, 2022 at 03:40 AM. |
|
![]() |
![]() |
![]() |
Thread Tools | |
Display Modes | |
|
|