Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - D&D 5th Edition SRD
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
daplunk
Senior Member
 
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,294

Old January 30th, 2016, 04:50 AM
Hi Team,

I'm having a crack at the scripting language and have come across some questions.

#1
Is there a tutorial to show how to handle choices made by the player in an Array-Based Menu? Specifically i am playing with Feat creation. I can get a menu to give the player a choice. I assume i just need to know the handle of that thing in order to work with it.

#2
I'm trying to get simple IF / THEN statements to work. Given the code below I believe it should check to see is the Charisma Attribute is less than 5, if so add +1 Charisma. However it is adding +1 Charisma no matter what.

if (hero.child[aCHA].field[aStartMod].value < 5) then
hero.child[aCHA].field[aStartMod].value += 1
else
~ do nothing
endif

#3
Does Hero Lab 5E SRD allow attributes to exceed 20?

Can anyone provide some insight here?
daplunk is offline   #1 Reply With Quote
Hollis
Senior Member
Lone Wolf Staff
 
Join Date: Aug 2012
Posts: 779

Old January 30th, 2016, 07:40 AM
Quote:
Originally Posted by daplunk View Post
Hi Team,

I'm having a crack at the scripting language and have come across some questions.

#1
Is there a tutorial to show how to handle choices made by the player in an Array-Based Menu? Specifically i am playing with Feat creation. I can get a menu to give the player a choice. I assume i just need to know the handle of that thing in order to work with it.
An array-based menu stores the index of your selection in the usrIndex field. Note that this is the position of the choice they made, and not the text. Plus arrays count from 0, not from 1, so the first choice on the list is at 0.
Quote:
#2
I'm trying to get simple IF / THEN statements to work. Given the code below I believe it should check to see is the Charisma Attribute is less than 5, if so add +1 Charisma. However it is adding +1 Charisma no matter what.

if (hero.child[aCHA].field[aStartMod].value < 5) then
hero.child[aCHA].field[aStartMod].value += 1
else
~ do nothing
endif
The aStartMod field is for attribute modifiers from character creation. For example. racial stat modifiers are applied there. What precisely are you trying to accomplish? Are you trying to give the character a minimum Charisma value, use the Minimum field.

Quote:
#3
Does Hero Lab 5E SRD allow attributes to exceed 20?
Currently, player character attribute scores are capped at 20. You can change this by altering the Maximum field on the attribute.
Hollis is offline   #2 Reply With Quote
daplunk
Senior Member
 
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,294

Old January 30th, 2016, 12:31 PM
Thanks,

Quote:
The aStartMod field is for attribute modifiers from character creation. For example. racial stat modifiers are applied there. What precisely are you trying to accomplish? Are you trying to give the character a minimum Charisma value, use the Minimum field.
I'm trying to check to ensure CHARISMA is less than 20. If so Add +1 Charisma.

You answer below rules out the requirement for this however.

Quote:
Currently, player character attribute scores are capped at 20. You can change this by altering the Maximum field on the attribute.
daplunk is offline   #3 Reply With Quote
Elindor
Member
 
Join Date: Feb 2013
Posts: 67

Old January 30th, 2016, 03:43 PM
When looking for these sorts of things, I like to look at something similar and adapt it. So, I'd be checking the code from the Ioun Stone of Leadership for this - that increases Charisma by 2, to a maximum of 20.

So, the feat would include the code
Code:
hero.child[aCHA].field[Bonus].value += 1
to add the charisma bonus.
Elindor is offline   #4 Reply With Quote
daplunk
Senior Member
 
Join Date: Jan 2016
Location: Adelaide, Australia
Posts: 2,294

Old January 30th, 2016, 03:53 PM
From what i can tell this does this same thing.

Quote:
#skillbonus[aCHA] = #skillbonus[aCHA] + 1
Are you aware of any differences using both methods?
daplunk is offline   #5 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 06:22 PM.


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