• 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

Minimum ability attribute value??

bodrin

Well-known member
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:
 
Last edited:
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
 

Attachments

  • Noname.jpg
    Noname.jpg
    64.4 KB · Views: 26
Instead of aNormForce, I'd recommend looking at how, and at what phase & priority, the Helpless adjustment sets DEX = 0.
 
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
 
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:
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.
 
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).
 
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.

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:)
 
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?
 
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:
Back
Top