Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
I have a template that adjusts three abilities to a minimum of 1. I've searched the forums for a script example already but only found the Feeblemind adjustment in the D20 section.
Heres what I have and it compiles but again I'm encountering the abValue doesn't exist for XXX error. Attempt to access field 'abValue' that does not exist for thing 'aSTR' - - - Attempt to access field 'abValue' that does not exist for thing 'aSTR' - - - Attempt to access field 'abValue' that does not exist for thing 'aCON' - - - Attempt to access field 'abValue' that does not exist for thing 'aCON' - - - Attempt to access field 'abValue' that does not exist for thing 'aDEX' - - - Attempt to access field 'abValue' that does not exist for thing 'aDEX' Code:
~Ensure we have a minimum of 1 in our Strength, Constitution and Wisdom scores if (hero.child[aSTR].field[aFinalVal].value >= 0) then #applyvalue[aSTR, 1] endif if (hero.child[aCON].field[aFinalVal].value >= 0) then #applyvalue[aCON, 1] endif if (hero.child[aDEX].field[aFinalVal].value >= 0) then #applyvalue[aDEX, 1] endif Code:
~Ensure we have a minimum of 1 in our Strength, Constitution and Wisdom scores perform hero.child[aSTR].delete[Value.?] if (hero.child[aSTR].field[aFinalVal].value >= 0) then #applyvalue[aSTR, 1] endif perform hero.child[aCON].delete[Value.?] if (hero.child[aCON].field[aFinalVal].value >= 0) then #applyvalue[aCON, 1] endif perform hero.child[aDEX].delete[Value.?] if (hero.child[aDEX].field[aFinalVal].value >= 0) then #applyvalue[aDEX, 1] endif Last edited by bodrin; November 13th, 2011 at 03:24 PM. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
The ability score Things don't have a field called abValue. I have attached a pic showing all the fields. The macros #value or #applyvalue are all set to adjust/modify the abValue field on Things. Using a macro is just a short cut.
In example: Code:
#value[xFly] += 50 Code:
hero.child[xFly].field[abValue].value += 50 Code:
#applyvalue[xFly, 50] Code:
~ Apply only the higher of the two values do NOT add them together hero.child[xFly].field[abValue].value = maximum(hero.child[xFly].field[abValue].value,50) Phase: Pre-Attributes Priority: 100000 Code:
hero.child[aDEX].field[aNormForce].value = 1 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. |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
Instead of aNormForce, I'd recommend looking at how, and at what phase & priority, the Helpless adjustment sets DEX = 0.
|
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
I often see you say we should use something else or don't use X but you never actually give a full reason. Which makes it confusing to learn at least for myself as I need to know the "why" behind things. What reason is there not to use it? What is on the Helpless adjustment that works better? What does aNormForce interact with that causes issues? Is it simply that this feature is deprecated? Thanks 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. |
|
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
If I remember correctly, aNormForce is intended to be a permanent change, and doesn't work correctly for effects that can be turned on or off. It alters the minimum and maximum values for that attribute, meaning that once you turn it off, the user-entered value has changed (because the user-entered value is bounded by the minimum and maximum).
Helpless works by just subtracting a modifier equal to what's currently there, being careful with the timing so that it cancels out any other modifiers that were added. Last edited by Mathias; November 14th, 2011 at 11:29 AM. |
#5 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
Change a blank character's Charisma to something other than 10, then add and delete the Skeleton template (which sets Cha's aNormForce = 10), and the character's Charisma has been permanently changed to 10.
|
#6 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
Actually, the original question was how to keep a large penalty on a template from taking an attribute below 1, wasn't it? We haven't bothered enforcing that sort of thing in other cases - it'll be pretty obvious to the user that they have a negative attribute value, and they can fix it themself, and it's a lot of effort to get it to work properly with any possible combination of templates and other bonues/penalties (what if they have this template along with another template that adds bonuses to those attributes - you don't want to apply the minimum until after that other template's done its work, since if you applied the minimum first, the total would come out differently than if you applied the other template's bonus before applying the minimum).
|
#7 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
Quote:
|
||
#8 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
The check is better handled on the attribute itself, not on the template - we need firm definitions in the game system of what an attribute value of 0 means, and whether you're allowed to go any lower, and when you're even allowed to go to 0 (or is 1 the normal minimum?). Then, implement those definitions as a function of how the attributes work, That way, you don't need massive scripts on EVERY template.
How many creatures are actually going to get made that have attributes so low that this template will take their attributes below 1? Given that percentage, how many hours of work is this project worth? |
#9 |
Senior Member
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265
|
Quote:
I don't have the percentage of creatures with really low attribute values but I'm going to presume in the grand scheme of things there are better uses of manpower that can be devoted elsewhere. Also IIRC an attribute value of zero usually indicates Helpless, dead or other forms of debilitating symptoms. So I'd presume a minimum of 1 is the correct value regardless of circumstances, so maybe it's not that unrealistic to consider an overcheck script. Last edited by bodrin; November 15th, 2011 at 10:27 AM. Reason: Thought of PFSRD core ruling regarding zero attribute score. |
|
#10 |
|
|