Senior Member
Join Date: Jul 2010
Posts: 3,147
|
I just tried it, and it seems to be the same. It might be that the if statement to determine if the character is a monk is failing, though I don't know why since it works for the Monk's Belt.
|
#11 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Timing is VERY important to this kind of advanced scripting. Does the timing off your new script run at the same timing or later than the Monk's Belt script? To test for the Class tag you would have to be running AFTER the class tag is applied to the hero.
Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#12 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
FYI timing is when a script is run compared to other scripts. Its listed just above the Script itself in the window. The window actually calls it Phase: and Priority:. The first value Phase controls when so like Post-Abilities would be scripts that need to use the values of Str or Dex has been calculated. Priority is actually the timing inside of that specific phase. With lower values done first.
Hope that helps. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#13 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Wouldn't that only matter if you have the monk's belt equipped? I don't. Incidentally, I removed the initial if statement and just did one line for the script:
Quote:
I haven't gone through all the feats, but so far I don't see any others that really use an if statement like this. Could it be that it doesn't know how to handle an if statement for feats? I copied over the script from the Monk's Belt directly, and that didn't work either. It skipped over the stuff that should have been applied if the character was a monk. FYI, phase = First and Priority = 100 Monk's Belt is First and 500, respectively. Both have a 1 as index. Not sure what that all means exactly. Edit: Changed phase to Post-Levels and Post-Levels (Users), then tried Final Phase. Still nothing. Edit 2: Just to clarify the above: This script works: Quote:
Quote:
Last edited by Sendric; August 9th, 2010 at 12:34 PM. |
|||
#14 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
For the original poster, to get around the problem I'm having with the if statement to determine if the character is a monk, you could create two feats, one that requires the character have monk levels and one that doesn't.
|
#15 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
Code:
if (hero.tagcount[Classes.Monk] <> 0) then hero.child[cMnkUnarm].field[xExtraLev].value += 4 endif Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#16 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Right. At some point I had that in there. Not sure how it came out. Thanks. Unfortunately, that doesn't solve the problem.
Last edited by Sendric; August 9th, 2010 at 01:35 PM. |
#17 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
So I just copy/pasted the script with the above fixes into HL on a new feat. I then created a new monk who had a Unarmed Strike that did 1d6. I added the feat and it changed it correctly to 1d8.
I then created a new Cleric and added the feat. It changed the damage to 1d4 and then when I added 4 more levels it was changed to 1d6 damage. Maybe I am not getting it but what is not working? Here is the script. Its Phase First Priority 500. Now this is in Pathfinder as I don't have d20 but they should be pretty similar. Code:
~First 500 var level as number level = herofield[tLevel].value var result as number var dice as string if (hero.tagis[Classes.Monk] <> 0) then hero.child[cMnkUnarm].field[xExtraLev].value += 4 else result = hero.child[wUnarmed].delete[wMain.?] if (level < 4) then result = hero.child[wUnarmed].assign[wMain.1d4_4] dice = "1d4" elseif (level < 8) then result = hero.child[wUnarmed].assign[wMain.1d6_5] dice = "1d6" elseif (level < 12) then result = hero.child[wUnarmed].assign[wMain.1d8_6] dice = "1d8" elseif (level < 16) then result = hero.child[wUnarmed].assign[wMain.1d10_304] dice = "1d10" else result = hero.child[wUnarmed].assign[wMain.2d6_104] dice = "2d6" endif field[livename].text = field[name].text & " (" & dice & ")" endif Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#18 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Well, it works now. Obviously, I must have had a typo somewhere. /sigh. Thanks for your help.
|
#19 |
Senior Member
Join Date: Mar 2010
Posts: 184
|
You guy are all awesome. I appreciate everything you guys have done, this has shown me some more information i have to watch out for to do these scripts. Thank you.
|
#20 |
|
|