Lone Wolf Development Forums Eval Script for Charges based on Stat Modifier
 User Name Remember Me? Password
 Register FAQ Members List Search Today's Posts Mark Forums Read

 Notices 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

 Thread Tools Display Modes
Senior Member

Join Date: Oct 2011
Posts: 865

July 7th, 2014, 03:55 PM
Im trying to create a "rage-like" ability that follows pathfinders basis of rounds/day vs the times/day, and base it on con modifier. thats the problem im having.

Code:
```~ Available when not lawful - otherwise we don't meet requirements
var result as number
if (hero.tagis[Alignment.Lawful] <> 0) then
result = assign[Helper.SpcDisable]
endif

~ If we're enraged, apply the stat modifiers for that
var level as number
level = field[xTotalLev].value

var attrbonus as number
var savebonus as number
if (level >= 20) then
attrbonus = 8
savebonus = 4
elseif (level >= 11) then
attrbonus = 6
savebonus = 3
else
attrbonus = 4
savebonus = 2
endif
if (field[hIsOn1].value <> 0) then
hero.child[aSTR].field[Bonus].value += attrbonus
hero.child[aCON].field[Bonus].value += attrbonus
#applybonus[BonMorale, hero.child[vWill], savebonus]
endif

~ Set up our text fields
field[CustDesc].text = "Focus your aggression, giving you +" & attrbonus & " Str, Dex +" & attrbonus & " Con, +" & savebonus & " to Will saves and -2 to Armor Class. Many skills and abilities cannot be used while the character is enraged.{br}{br}Rage lasts for 3 rounds + Con bonus."
if (level < 17) then
field[CustDesc].text = field[CustDesc].text & " At the end of the fury, the Viking becomes fatigued (-2 Str, -2 Dex, can't charge or run) for the rest of the encounter."
endif
field[xSumm].text = "+" & attrbonus & " Str, Dex, +" & attrbonus & " Con, +" & savebonus & " to Will saves, -2 to AC when enraged."

~ If we're exhausted, apply the stat modifiers for that (we don't get
~ exhausted after level 17)
if (level < 17) then
field[hName2].text = "Exhausted"
if (field[hIsOn2].value <> 0) then
hero.child[aSTR].field[Penalty].value = hero.child[aSTR].field[Penalty].value - 2
endif
endif

~ We can Fury based on our constitution + level rounds per day
~ times per day.
var total as number
total = 2 + (level * 2) + hero.child[aCON].field[Bonus].value

field[hTotal].value += total
field[livename].text = "Fury (" & total & "rounds/day)"```
The section thats not working right:
Code:
`      total = 2 + (level * 2) + hero.child[aCON].field[Bonus].value`
Its ignoring the con bonus. Also, id like it to to be based on "real con bonus" vs "temporary con bonus".

Thoughts and help would be useful.

Thanks!
#1
Sendric
Senior Member

Join Date: Jul 2010
Posts: 3,000

July 7th, 2014, 07:45 PM
Quote:
 Originally Posted by mirtos Im trying to create a "rage-like" ability that follows pathfinders basis of rounds/day vs the times/day, and base it on con modifier. thats the problem im having. . . . The section thats not working right: Code: ` total = 2 + (level * 2) + hero.child[aCON].field[Bonus].value` Its ignoring the con bonus. Also, id like it to to be based on "real con bonus" vs "temporary con bonus". Thoughts and help would be useful. Thanks!
If you haven't gotten an answer by tomorrow morning, I'll take a look at this when I get in front of HL. First though, when are running this script? If it's ignoring the CON bonus, it could simply be running too early. If the timing is ok, you could try breaking that line up into two parts. For example:

Code:
```      total = (level * 2)
total += 2 + hero.child[aCON].field[Bonus].value```
If that works then its something to do with the structure of the equation.

PS. "perform" has replaced the need for a variable. For example:

Code:
```      var result as number
if (hero.tagis[Alignment.Lawful] <> 0) then
result = assign[Helper.SpcDisable]
endif```
can instead be done as:

Code:
```      if (hero.tagis[Alignment.Lawful] <> 0) then
perform assign[Helper.SpcDisable]
endif```
#2
Senior Member

Join Date: Oct 2011
Posts: 865

July 8th, 2014, 04:37 AM
I had it previously as two lines. No difference. I'll check the timing tonight when I get home.
#3
Senior Member

Join Date: Jul 2010
Posts: 3,000

July 8th, 2014, 06:14 AM
Alright. I took a look at this. First off, looks like you took the script from the Barbarian Rage which runs post-levels/10000. That's too early to determine your CON bonus. However, if you move the whole script to post-attributes then nothing else works. So, I recommend you move that last piece to a new script.

Second, you want to use the field "aBonus" instead of "Bonus". The former is your CON bonus before modifiers, while the latter is used for untyped bonuses to your CON score.

Post-Attributes/15000
Code:
```      ~ We can Fury based on our constitution + level rounds per day
~ times per day.
var total as number
total = 2 + (field[xTotalLev].value * 2) + hero.child[aCON].field[aBonus].value

field[hTotal].value += total
field[livename].text = "Fury (" & total & " rounds/day)"```
PS. If you right-click on your CON score and select "Show Debug Fields" you can see how the fields change when you are enraged. This tells you which field you want to use for this purpose.
#4
Senior Member

Join Date: Oct 2011
Posts: 865

July 8th, 2014, 06:18 AM
Thanks. Especially for the Show the Debug fields hint. I always forget about that.
#5

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home Lone Wolf Development Web Site Announcements Realm Works Forums     Realm Works Discussion         Realm Works in Action         Realm Works Feature Requests     Realm Works in Action     Realm Works Feature Requests Hero Lab Online Forums     Hero Lab Online Discussion     HLO - Pathfinder 1st Edition     HLO - Pathfinder 2nd Edition     HLO - Starfinder     HLO - Shadowrun Hero Lab Forums     HL - Pathfinder Roleplaying Game     HL - D&D 5th Edition SRD     HL - Shadowrun     HL - Mutants & Masterminds     HL - d20 System     HL - World of Darkness     HL - Call of Cthulhu     HL - 4th Edition     HL - Savage Worlds     HL - Cortex System     HL - Authoring Kit     HL - User Projects     HL - Alternity (user-created)     Hero Lab Discussion Army Builder Forums     Army Builder Army Builder Data Files     Babylon 5: A Call to Arms     Battlefleet Gothic     Blood Bowl     Black Powder, Bolt Action, Hail Caesar, Judge Dredd, and Pike & Shotte     Confrontation - English     Kings of War (2nd Edition)     Lord of the Rings (Tabletop)     Mordheim     Necromunda     Starship Troopers     Star Wars: X-Wing and Armada Miniatures Game     The 9th Age     Warhammer Ancient Battles     Warhammer 40,000     Warhammer Fantasy 8th Ed.     Warhammer Historical: The Great War     Warhammer Fantasy 3rd Ed.     Warlord     Warmachine & Hordes     Warmaster Card Vault Forums     Card Vault Card Vault Data Files     MLB Showdown     Lord of the Rings CCG     .hack//ENEMY     Vs. System     Yu-Gi-Oh!     D&D Miniatures

All times are GMT -8. The time now is 06:05 AM.

 -- Default Style -- Majestic Contact Us - Lone Wolf Development Forums - Archive - Top