Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
frumple
Senior Member
 
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841

Old January 29th, 2012, 04:24 AM
Is there a way to override the value in a derived field?

I am working on defining a dragon's age catagories via a configurable tab. I have gotten it working except for displaying the starting HP. I want the value of that field to be dependent on which age catagory the user selects.

Here is the code I have tried (the script is within the base dragon race which the user selcted via theBackground tab... in this case Dragon, Black).

Code:
Final Phase/10000

~ adjust starting HP for base dragon race

var ageCat as number
ageCat = tagvalue[Value.?]

if (ageCat = 1) then
 field[rHPStart].value = 26
elseif (ageCat = 2) then
 field[rHPStart].value = 39
elseif (ageCat = 3) then
 field[rHPStart].value = 52
elseif (ageCat = 4) then
 field[rHPStart].value = 65
elseif (ageCat = 5) then
 field[rHPStart].value = 78
elseif (ageCat = 6) then
 field[rHPStart].value = 91
elseif (ageCat = 7) then
 field[rHPStart].value = 104
elseif (ageCat = 8) then
 field[rHPStart].value = 117
elseif (ageCat = 9) then
 field[rHPStart].value = 130
elseif (ageCat = 10) then
 field[rHPStart].value = 143
elseif (ageCat = 11) then
 field[rHPStart].value = 156
elseif (ageCat = 12) then
 field[rHPStart].value = 169
endif
frumple is offline   #1 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old January 29th, 2012, 07:02 AM
rHPStart is only checked when the race is first added to the character - before any scripts are run, so, while you can change it later, it won't alter the race's hit points, because they've already been set.
Mathias is offline   #2 Reply With Quote
frumple
Senior Member
 
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841

Old January 29th, 2012, 10:42 AM
Ah. How about cHP?
frumple is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,217

Old January 29th, 2012, 10:48 AM
Not recommended, becuse if you change a value that the user's allowed to change using a script, the user can no longer change it, meaning EVERY Adult Copper Dragon has 172 HP.
Mathias is offline   #4 Reply With Quote
frumple
Senior Member
 
Join Date: Nov 2011
Location: South Riding, VA
Posts: 841

Old January 29th, 2012, 10:50 AM
Ah yes that would be bad.
frumple is offline   #5 Reply With Quote
Reply


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 Jump


All times are GMT -8. The time now is 06:41 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.