Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old November 13th, 2011, 03:22 PM
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
Also tried this script too!

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
Once more help!

Last edited by bodrin; November 13th, 2011 at 03:24 PM.
bodrin is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 13th, 2011, 06:18 PM
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
is the exact same thing as writting:
Code:
hero.child[xFly].field[abValue].value += 50
Apply Value is a little more as it has a Maximum function built in. So in example:
Code:
#applyvalue[xFly, 50]
is the same as:
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)
What you are looking for is to use the aNormForce field to force the attribute to be the value you set.
Phase: Pre-Attributes Priority: 100000
Code:
hero.child[aDEX].field[aNormForce].value = 1
Attached Images
File Type: jpg Noname.jpg (64.4 KB, 25 views)

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.
ShadowChemosh is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 14th, 2011, 09:44 AM
Instead of aNormForce, I'd recommend looking at how, and at what phase & priority, the Helpless adjustment sets DEX = 0.
Mathias is online now   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old November 14th, 2011, 10:13 AM
Quote:
Originally Posted by Mathias View Post
Instead of aNormForce, I'd recommend looking at how, and at what phase & priority, the Helpless adjustment sets DEX = 0.
Always glade to get help but can I ask we get more of a reason why? I have tested the above script and it seems to work just fine. Is there an actual problem this can cause or it is just *would* be nicer to use some other feature of HL.

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.
ShadowChemosh is offline   #4 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 14th, 2011, 11:27 AM
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.
Mathias is online now   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 14th, 2011, 11:36 AM
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.
Mathias is online now   #6 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 14th, 2011, 01:14 PM
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).
Mathias is online now   #7 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old November 15th, 2011, 02:11 AM
Quote:
Originally Posted by Mathias View Post
Actually, the original question was how to keep a large penalty on a template from taking an attribute below 1, wasn't it?
Yes exactly.

Quote:
Originally Posted by Mathias View Post
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).
The bold part is the most pertinent bit of this question. The template could be added to numerous combinations however this template only requires the check to ensure that the ability is a minimum of 1 regardless of other factors. And i'm aware that anybody could just up the score until it reads correctly but I like the idea of having a code to check and alter it automatically. IMO
bodrin is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old November 15th, 2011, 08:25 AM
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?
Mathias is online now   #9 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old November 15th, 2011, 10:23 AM
Quote:
Originally Posted by Mathias View Post
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?
Not suggesting EVERY template just the ones that specify a minimum attribute value of 1 if it's reduced. Lets face it a simple is XXX lower than value Y script is all that is needed to set the correct value.

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.
bodrin is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

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 03:37 PM.


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