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
Bob G
Senior Member
 
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226

Old December 6th, 2017, 02:22 PM
Quote:
Originally Posted by Mathias View Post
In the link Minous gave you, follow the second link - the Location, Location, Location article, and then take another look at the syntax for the field transition. What you've got here is not correct.
'Location, location, location' was a very helpful tutorial Mathias, thanks for writing it. I have a question about the foreach command: When you indicate to insert a tag ID in place of "test expression", do you use the full tag ID, or just the extension (what follows after the ".")?

Example: Do I use

foreach pick in hero where wCategory.Firearm

or just

foreach pick in hero where Firearm
Bob G is offline   #11 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old December 6th, 2017, 03:07 PM
Quote:
Originally Posted by Minous View Post
Aaron the only reason I suggested a variable was for readability purposes. I find int_bonus far easier to remember then what hero.child[aINT].field[aBonus].value is referring to. Had this been a more complex request or a scaling value I would agree. But for what is just a simple reference value that is not going to be used outside of the script I felt that limiting the scope using a variable was appropriate.
The other way to keep things easier to read is to use Macros. So the above aInt stuff can be shortened to:
Code:
field[abValue].value += #attrbonus[aINT]
The above macro gets pretty much turned into hero.child[aINT].field[aBonus].value by the compiler. I find the ability to remember #attrbonus[] or #attrbonus1[] or #attmod[] much easier than remembering the field names.

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   #12 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729

Old December 6th, 2017, 03:09 PM
Quote:
Originally Posted by Bob G View Post
'Location, location, location' was a very helpful tutorial Mathias, thanks for writing it. I have a question about the foreach command: When you indicate to insert a tag ID in place of "test expression", do you use the full tag ID, or just the extension (what follows after the ".")?
The Full tag (ie the word before the period and after). Your constructing a "Custom Expression" at that point.

Take a look at THIS post I did about doing that. Hopefully it helps.

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   #13 Reply With Quote
Minous
Senior Member
 
Join Date: May 2015
Posts: 830

Old December 6th, 2017, 04:11 PM
Quote:
Originally Posted by ShadowChemosh View Post
The other way to keep things easier to read is to use Macros. So the above aInt stuff can be shortened to:
Code:
field[abValue].value += #attrbonus[aINT]
The above macro gets pretty much turned into hero.child[aINT].field[aBonus].value by the compiler. I find the ability to remember #attrbonus[] or #attrbonus1[] or #attmod[] much easier than remembering the field names.
that would require me to remember the scripts, something that I dont always do.
Minous is offline   #14 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:44 AM.


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