Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
LordValerius
Junior Member
 
Join Date: Oct 2011
Posts: 29

Old October 12th, 2011, 03:36 PM
...when it comes to trying to script things in HL that I would like to script. I have a question and I think I know the answer, but figured I would ask anyway on the off chance I am wrong.

Is it possible to script a Wondrous Item that gives a +1 enhancement bonus to Strength, but does not actually modify the Strength Score, only the carrying capacity? In other words, when wearing the item, your carrying capacity is equal to 1 Strength score better than current, but does not modify any other aspect of the Strength score.

Thanks!

Val
LordValerius is offline   #1 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old October 12th, 2011, 06:01 PM
That's be tricky, but possible. You'll want to...

Find the value of strength +1, and use that in the encumberance calculations (don't forget to check for a tag for quadraped and adjust for size) to find out what your new encumberance should be. You'll want to break it down into light medium and heavy limit.

Then compare each of those to the hero fields "tEncumLgt", "tEncumMed", and "tEncumHvy" to find the difference for each. Then add that difference to the hero fields (so that it now matches your calculated value). I'd say add rather than set equal to so later calculations can easily adjust further.

Clear as mud?
Lawful_g is offline   #2 Reply With Quote
LordValerius
Junior Member
 
Join Date: Oct 2011
Posts: 29

Old October 12th, 2011, 06:39 PM
Heh, yep, total mud. I suck at this scripting language. I've muddled through with simple stuff using examples I've found, etc. The character has a current Strength of 12. Examining the carrying capacity chart, it seems a +1 Strength bonus would increase each as follows; Light by 7 lbs., Medium by 14 lbs. and Heavy by 20 lbs.

What you have suggested...is this to be done with an Eval Script or Bootstrap? I'm not too good on finding the id's you'd mentioned...as I said, I suck at this. Trying to understand it so I don't have to ask so many questions. And I hate being a noob. LOL Is there a more definitive guide or place to learn this Editor other than the brief Editor Help File?

Any further clarification would be greatly appreciated.

Thanks!

Val

Last edited by LordValerius; October 13th, 2011 at 04:52 AM.
LordValerius is offline   #3 Reply With Quote
Lawful_g
Senior Member
Volunteer Data File Contributor
 
Join Date: Mar 2007
Posts: 1,245

Old October 13th, 2011, 07:25 AM
It'd be an eval script. Looking at the encumberance table there doesn't seem to be a set formula for max weight, which will make things tedious. Here is a rough sketch of the eval,

var newstr as number
var newmaxwt as number
var newmedwt as number
var newlitwt as number

~ If we have enhancement bonus 1 or higher, we don't stack, so stop now.
doneif (hero.child[aSTR].field[BonEnhance].value >= 1)

~ Get our strength +1
newstr = hero.child[aSTR].field[aFinalVal].value + 1

~ Generate our new max encumberance, this is annoying
if (newstr = 29) then
newmaxwt = 1400
elseif (newstr = 28) then
newmaxwt = 1200
~ On and on until newstr = 2, just following the table

~ If we are quadrapedal we multiply by one factor based on size...
if (hero.tagis[Helper.Quadraped] <> 0) then

~ If we are Colossal for example it is x24
if (herofield[tSize].value >= 4) then
newmaxwt *= 24

~ If we are gargantuan...
elseif (herofield[tSize].value = 3) then
newmaxwt *= 12

~ and down through all the sizes
BLAHBLAH
endif
~ now we need to check for non-quadraped and do the same
elseif (hero.tagis[Helper.Quadraped] = 0) then
~ If we are Colossal for example it is x16
if (herofield[tSize].value >= 4) then
newmaxwt *= 16

~ If we are gargantuan...
elseif (herofield[tSize].value = 3) then
newmaxwt *= 8

BLAHBLAH
endif
endif

~ Now that we have the max wt, we need to define out medium encumberance and light encumberance limits. Fortunately they are merely 2/3 and 1/3 of our max, rounded down to the nearest pound.

newmedwt = round(newmaxwt *.66, 0, -1)
newlitwt = round(newmaxwt *.33, 0, -1)

~ Now compare our values to the current encumberance values and adjust them up
var diff as number

diff = newmaxwt - herofield[tEncumHvy].value
herofield[tEncumHvy].value += diff

diff = newmedwt - herofield[tEncumMed].value
herofield[tEncumMed].value += diff

diff = newlitwt - herofield[tEncumLgt].value
herofield[tEncumLgt].value += diff
Lawful_g is offline   #4 Reply With Quote
Kendall-DM
Spy
 
Join Date: Jan 2011
Location: Overland Park, Kansas
Posts: 1,217

Old October 13th, 2011, 08:26 AM
Agreed, the encumbrance table is weird stuff, there is a formula, but the book doesn't adhere to it. You can carry more (relatively) at Str 10 than you can at Str 19. According to the formula, +10 to Str should be 4 times the value of the Str at 10 less. So at Str 10 thru 19 you can carry progressively less weight until you hit Str 20, where everything magically meets the formula. Crazy math, needs to go into Murphy's Law (of Gaming, if anyone remembers that from way back).
Kendall-DM is offline   #5 Reply With Quote
Provos
Senior Member
 
Join Date: Mar 2011
Location: USA
Posts: 132

Old October 13th, 2011, 09:48 AM
I would be nice if the code was the same as it is for Pathfinder. If you look under Backpack, Master work the code is basically one line.

Code:
if (field[gIsEquip].value <> 0) then
  herofield[tEncumSTR].value += 1
  endif
Provos is offline   #6 Reply With Quote
LordValerius
Junior Member
 
Join Date: Oct 2011
Posts: 29

Old October 13th, 2011, 12:05 PM
Ok, thanks for the assist...question....and please forgive my lack of scripting knowledge...but I am trying to understand what number this is...

~ If we are Colossal for example it is x24
if (herofield[tSize].value >= 4) then
newmaxwt *= 24

Mostly understanding the rest of it, but this number confuses me even more. Once I know what that number represents, I should be able to work out the rest....I hope. LOL

Thanks!

Val
LordValerius is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 12,533

Old October 13th, 2011, 12:09 PM
Character size in d20 is stored as a number.

-1 = small
0 = medium
4 = colossal

(Of course I left out a few numbers, but you can see how the progression works)
Mathias is offline   #8 Reply With Quote
LordValerius
Junior Member
 
Join Date: Oct 2011
Posts: 29

Old October 13th, 2011, 02:10 PM
Thank you very much!

Val

Edit: Seems it doesn't like the "helper.quadraped" statement....States it is not defined...Is this a tag I have to add to the item?

Last edited by LordValerius; October 13th, 2011 at 02:32 PM.
LordValerius is offline   #9 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,639

Old October 13th, 2011, 02:42 PM
Quote:
Originally Posted by LordValerius View Post
"helper.quadraped" statement....States it is not defined...Is this a tag I have to add to the item?
Hero Lab is a case sensitive language. So helper.quadraped is not the same as Helper.Quadraped.

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   #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 05:00 AM.


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