Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
GodPole
Member
 
Join Date: Feb 2010
Location: Charlotte, NC
Posts: 81

Old October 20th, 2010, 11:35 AM
Greetings all,

I have been experimenting with entering many of the Buffs and "Snuffs" (negative Buffs, ie. "Bane") spells as Conditions accessible via the Adjustments tab. I have found this a great way to let HL calculate ALL of the effects of a Buff/Snuff on an ally or enemy.
However, I have run into a snag when trying to implement the spell "Feeblemind". I have had no problem up to this point applying bonuses or penalties to existing stat values, but this spell is requiring me to hard-set the character's INT and CHA to a value of 1; regardless of what bonuses may or may not be there.
I know I have screwing the syntax up somewhere, but there isn't really anything in the docs or tutorials detailing how to do this; everything there focuses on bonuses and penalties.
Has anyone done this and can give me some pointers?
Thanks!

-GP
GodPole is offline   #1 Reply With Quote
bodrin
Senior Member
 
Join Date: Feb 2007
Location: Nottinghamshire, United Kingdom
Posts: 1,265

Old October 20th, 2010, 12:16 PM
I don't have hero lab in front of me at the moment so I'm only guessing! Have a look at an undead template, Zombie, skeleton these set Con to no score as undead don't have constitution. Maybe the info contained can shed some light for you.
bodrin is offline   #2 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old October 20th, 2010, 12:28 PM
Phase/Priority: Pre-attributes/any
Code:
 
hero.child[aINT].field[aNormForce].value = 1
hero.child[aCHA].field[aNormForce].value = 1
Mathias is offline   #3 Reply With Quote
Kaelryk
Junior Member
 
Join Date: Sep 2010
Posts: 7

Old October 20th, 2010, 12:30 PM
You should be able to achieve the result you want with something like this for an eval script:

~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)

~ If we're not enabled, get out now
doneif (field[pIsOn].value = )

~ Set INT & CHA to 1
hero.child[aINT].field[ModCirc].value = 1
hero.child[aCHA].field[ModCirc].value = 1

You may need to fiddle with the 'phase' & 'priority' settings to get it to work properly.


Oops! I type too slow!

Last edited by Kaelryk; October 20th, 2010 at 12:32 PM. Reason: I got beat to the punch...
Kaelryk is offline   #4 Reply With Quote
GodPole
Member
 
Join Date: Feb 2010
Location: Charlotte, NC
Posts: 81

Old October 20th, 2010, 12:34 PM
You people are AWESOME!!!

Mathias, is this documented somewhere that I missed?
I've looked all over the docs that I know about and can't find any reference to "aNormForce".


Thank you very much!!!

-GP

Last edited by GodPole; October 20th, 2010 at 12:37 PM.
GodPole is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old October 20th, 2010, 12:50 PM
It was originally added for the INT of arcane familiars, but was ditched in favor of a minimum INT, so there's nothing else in the files that actually uses this mechanism, which is why it isn't documented anywhere.

Here's the only way I know of to find it (without access to the raw files) (and this is a useful tool in other situations, anyway):
In the debug menu, make sure that the first option, "Enable Data File Debugging" is checked.
Then, right-click on the INT attribute on the basics tab (or the basics summary panel), and choose "Show debug fields for Intelligence" - that will show you all the fields that exist for intelligence, and their final values.

You can also use the floating info windows option at the bottom of the debug menu, then "Show Selection Fields" to get at the same list of fields (this becomes important when you're looking at the fields of a class - there isn't anything on a character you can right-click when trying to figure something out in that case).
Mathias is offline   #6 Reply With Quote
GodPole
Member
 
Join Date: Feb 2010
Location: Charlotte, NC
Posts: 81

Old October 20th, 2010, 01:01 PM
...speechless.



This is the Holy Grail.


Thank you!!!
Thank you!!!
GodPole is offline   #7 Reply With Quote
GodPole
Member
 
Join Date: Feb 2010
Location: Charlotte, NC
Posts: 81

Old October 22nd, 2010, 02:03 PM
Ok,

The help you guys have given me has been great, but I have run into a small snag.

Apparently, the aNormForce modifier worked great at setting the INT and CHA to 1 when I select the Feeblemind condition, however, when I unselect it, the INT and CHA don't go back to what they were before; they stay at a value of 1.
Now, I think this is because the aNormForce actually changes the value and doesn't actually act as a "modifier". Is this a correct assumption, or is there some setting I am omitting to get that to work.

In the meantime, I was trying to work out a script that would actually calculate the correct penalty to drop someone's INT and CHA to 1 so that unselecting it would "undo" the penalty, reverting the INT and CHA back to their original values.
Here is what I have so far:


~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)

~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)

var feebpenINT as number
var feebpenCHA as number

feebpenINT = (hero.child[aINT].field[aFinalVal].value - 1)
feebpenCHA = (hero.child[aCHA].field[aFinalVal].value - 1)

#applypenalty[Penalty, hero.child[aINT], feebpenINT]
#applypenalty[Penalty, hero.child[aCHA], feebpenCHA]

It works exactly as I expected, but it doesn't decrease the attributes by their original value (aFinalVal?) minus 1, it only decreases the value by 1. So if my INT/CHA is 10, then when I check Feeblemind, it only reduces them to 9. Something must be wrong with my feebpenINT and feebpenCHA variable calculations but, for the life of me, I can't see what.
Can I have a 2nd set of eyes look at this and tell me what I am overlooking?

Thanks.

GP
GodPole is offline   #8 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,215

Old October 22nd, 2010, 02:28 PM
You're right about aNormForce - it forces the user value to that value, which doesn't reset.

rather than using #applypenalty, you'll have to modify aFinalVal - by the phase and priority that aFinalVal has been calculated, Penalty has already been incorporated into aFinalVal, and isn't checked again.

Note: Penalty is a non-stacking field, so rather than using #applypenalty, which is used for those fields that do stack, just do it this way:

Code:
 
hero.child[aINT].field[Penalty].value -= feebpenINT
Or rather:

phase: Attributes, priority: 150000
Code:
 
~ If we're in output mode, don't do anything
doneif (state.isoutput <> 0)
 
~ If we're not enabled, get out now
doneif (field[pIsOn].value = 0)
 
hero.child[aINT].field[aFinalVal].value = 1
hero.child[aINT].field[aModBonus].value = -5
 
hero.child[aCHA].field[aFinalVal].value = 1
hero.child[aCHA].field[aModBonus].value = -5
Sorry for not thinking of this script earlier
Mathias is offline   #9 Reply With Quote
GodPole
Member
 
Join Date: Feb 2010
Location: Charlotte, NC
Posts: 81

Old October 24th, 2010, 06:03 AM
Thanks Mathias!
This worked perfectly.

Just out of curiosity, is there a reason the #applypenalty script didn't work?

-GP
GodPole is offline   #10 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 03:51 AM.


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