Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
vrimage
Junior Member
 
Join Date: May 2015
Posts: 14

Old May 1st, 2017, 05:05 AM
Greetings.

I am trying to set up a Spell Point system in Hero Lab (based on the old AD&D Player's Option system)
I am trying to make this as dynamic as possible, hoping for compatibility with custom classes etc. Though most of my issues I have found way's around, some questions about the capabilities of Hero Lab's scripting engine have arisen.

Can you define a new custom variable and place it in a container, (hero container)?

Is it possible to add objects to the ui using scripts only (text to a tab, tracked resource, etc)

Does a switch statement exist?

Can you access things using id from a variable (ex. id="abValue" & 2; debug field[id])


Thanks
vrimage is offline   #1 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old May 1st, 2017, 10:14 AM
Quote:
Originally Posted by vrimage View Post
Can you define a new custom variable and place it in a container, (hero container)?
You can not modify the Hero container or hero fields. You could make new Things and bootstrap them to a mechanic to get them to be attached to all heroes. That would be the easy way to get new fields that can be manupulated on each character.

Quote:
Originally Posted by vrimage View Post
Is it possible to add objects to the ui using scripts only (text to a tab, tracked resource, etc)
For the most part "no". You could affect livename of Picks which will get displayed. In example if a tracker was on the In-Play tab you could change its Livename field to display something different.

But 99% of the UI in HL is not changeable in a way to make your own tabs.

Quote:
Originally Posted by vrimage View Post
Does a switch statement exist?
No.

Quote:
Originally Posted by vrimage View Post
Can you access things using id from a variable (ex. id="abValue" & 2; debug field[id])
I am not 100% following your question. But yes any 'field' on a Pick can be accessed via a script.

So abValue is usually accessed like:
Code:
hero.child[fDodge].field[abValue].value += 2
You can also use a macro:
Code:
#value[fDodge] += 2

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.

Last edited by ShadowChemosh; May 1st, 2017 at 10:16 AM.
ShadowChemosh is offline   #2 Reply With Quote
vrimage
Junior Member
 
Join Date: May 2015
Posts: 14

Old May 1st, 2017, 11:37 AM
Quote:
Originally Posted by ShadowChemosh View Post
I am not 100% following your question. But yes any 'field' on a Pick can be accessed via a script.

So abValue is usually accessed like:
Code:
hero.child[fDodge].field[abValue].value += 2
You can also use a macro:
Code:
#value[fDodge] += 2
Thank you so much for your answer. Let me clarify the last question:

Let's say I have a loop going from 2 to four.
To access the different abValues I would check the iteration
Code:
if (i=2) then
hero.child[fDodge].field[abValue2].value += 2
endif
etc...

But if I could use .field[abValue&i] (to get the number part of the field name), then I could save some ifs

Thank you
vrimage is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 1st, 2017, 11:45 AM
No, field[] must be given the Id of a known field, and cannot use variables.
Mathias is offline   #4 Reply With Quote
vrimage
Junior Member
 
Join Date: May 2015
Posts: 14

Old May 1st, 2017, 12:08 PM
Quote:
Originally Posted by Mathias View Post
No, field[] must be given the Id of a known field, and cannot use variables.
Thought as much

One last question (for now)

How would I go about adding an ability a number of times equal to the number of spellcasting classes present.

Thanks
vrimage is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 13,213

Old May 1st, 2017, 12:26 PM
You'd need an appropriate number of bootstraps, each with a slightly different conditional expression, that will make that copy go live at the right level (and above).
Mathias is offline   #6 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 10:28 AM.


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