Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Pathfinder Roleplaying Game (http://forums.wolflair.com/forumdisplay.php?f=62)
-   -   Minimum ability attribute value?? (http://forums.wolflair.com/showthread.php?t=14558)

bodrin November 13th, 2011 03:22 PM

Minimum ability attribute value??
 
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!:confused:

ShadowChemosh November 13th, 2011 06:18 PM

1 Attachment(s)
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

Mathias 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.

ShadowChemosh November 14th, 2011 10:13 AM

Quote:

Originally Posted by Mathias (Post 65659)
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

Mathias 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.

Mathias 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 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).

bodrin November 15th, 2011 02:11 AM

Quote:

Originally Posted by Mathias (Post 65669)
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 (Post 65669)
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:)

Mathias 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?

bodrin November 15th, 2011 10:23 AM

Quote:

Originally Posted by Mathias (Post 65693)
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.


All times are GMT -8. The time now is 01:39 PM.

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