Member
Join Date: Oct 2013
Posts: 79
|
Hello,
This seems like it should be a simple thing, but I can't seem to figure it out. I am creating the Landforged Walker (Secrets of Xen'dirt, pg 123), but I'm having problems with Body of Nature. At level 1, they get Body of Nature. At level 2, Body of Nature gives some resistance, and +1 natural AC. When I created this as a new and separate class special, the natural armor class rose at level 1, even though the Level Requirement was placed at 2. So, it turns out I need to get the levels of that specific class. Here is what I tried. Code:
var classLvl as number classLvl = #levelcount[Landforged Walker] Syntax error in 'eval' scrit for Thing 'cAM-BoN' (Eval Script '#1' on line 2 -> Tag 'Classes.Langforged' not defined. However, the following code works Code:
var classLvl as number classLvl = #levelcount[Crusader] Thanks, -S |
#1 |
Senior Member
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 1,086
|
The format of the macro you are using should be #levelcount[class_ID]
Normally your class ID isn't going to be 2 words, so "Landforged Walker" is likely to give you an error. Also, note the actual text in your error message given is "Langforged" - not "Landforged". There may be a typo in your original code. Current RPG's: Pathfinder (GM), Pathfinder (Player), Gamma World (GM, Pathfinder homebrew). HeroLab: 3.5 & Pathfinder. HL User Files for PF: Greyhawk Setting, Gamma World (WIP). DM and player of D&D since 1980. |
#2 |
Member
Join Date: Oct 2013
Posts: 79
|
@Dami
Thank you for the reply. How would I go about making a class ID that the macro will understand? I have used the unique ID... or, wait. You mean the name created when the class was first created? I didn't think of that. As for the typo, that was not a direct copy and paste so the spelling is actually correct. Thanks, -S |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Here is the script that macro #levelcount[] is doing under the covers:
Code:
hero.tagcount[Classes.#class] 1) Start with a new character and add one level of the class you want to count to a character. 2) Go to "Develop->Floating Info Windows->Show Hero Tags". 3) In the new window that appears type "Classes" into the TOP LEFT corner text area. This will then show you all tags that have that word. The "Tag ID" will show you the value your looking for which is AFTER the Classes Period. In example for the Cleric the tag is "Classes.Cleric". Which would make the macro look like this: Code:
#levelcount[Cleric] 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. |
#4 |
Member
Join Date: Oct 2013
Posts: 79
|
Thank you all for the replies. However, I am still having problems with this simple matter.
01.jpg shows the hero tags for a single level of the class 02.jpg shows the simple if statement used 03.jpg shows the error after compile/test The code below is code I used that worked, but would CRASH THE PROGRAM after compiling. After I reload the program, the class would work normally. Not sure why. Code:
var level as number var total as number level = field[xTotalLev].value if (level >= 4) then field[livename].text = "Body of Nature rank 2, +2 Natural Armor, Resistance 10 Cold/Electricity" total = 2 elseif (level >= 2) then field[livename].text = "Body of Nature rank 1, +1 Natural Armor, Resistance 5 Cold/Electricity" total = 1 endif ~ Note: This power increases our natural armor, it doesn't just add a nonstackable bonus. hero.child[mNatural].field[Bonus].value = hero.child[mNatural].field[Bonus].value + total field[livename].text = field[livename].text & total Any help is appreciated. Thanks, -S |
#5 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Please note the group + tag is "Classes.Cleric" but the macro ONLY wants the "TAG" of "Cleric".
You have Classes.LndfgWlkr instead of just: Code:
#levelcount[LndfgWlkr] 1) DO NOT use the '(Users)' timings as those are going to go away in a future d20 update. 2) If your on a Class Special and after Post-Level/10000 you don't need to use this macro at all. Just use "field[xTotalLev].value" like you did in your script above as it will already contain the value you want. What is also great is if you bootstrap the class special to a different class it will also work for that classes without making changes. 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. |
#6 |
Member
Join Date: Oct 2013
Posts: 79
|
Alright, I went to my old version of the code. Still buggy, but I sent in a bug report to support. Hopefully, they can fix my crashing.
Again, thank you for all of your help. Next, Celestial Mystic. -S |
#7 |
Senior Member
Join Date: Jul 2012
Location: Texas
Posts: 707
|
oh really??? I need to check mine then..... or will old ones be grandfathered?
D&D> Pre 1e White Box Edition, 1e, 2e, 3.5 Currently, Set in the World of Greyhawk (The first, longest running and Best Campaign Setting) Software>Extensive use of all forms of MS Products, Visual Studio 2012, DAZ 3d, AutoCAD, Adobe Products. Gaming Specific>Campaign Cartographer, D20 Pro Alpha & BattleGrounds Beta Tester, World Builder, Dungeon Crafter, LWD Hero Lab, Realm Works, Inkwell Ideas Citybuilder & Dungeon Builder, Auto-Realm, Dundjinni Contributing Writer for TSR, WOC, & Canonfire |
#8 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Great question for LW. I am just sharing that they are planned to be deprecated at a future point. So may as well move away from them now and save yourself any issues.
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. |
#9 |
Senior Member
Join Date: Jul 2012
Location: Texas
Posts: 707
|
Gotcha.. well it will be one of the growing list of things I'll ask while at the Gencon this year....
D&D> Pre 1e White Box Edition, 1e, 2e, 3.5 Currently, Set in the World of Greyhawk (The first, longest running and Best Campaign Setting) Software>Extensive use of all forms of MS Products, Visual Studio 2012, DAZ 3d, AutoCAD, Adobe Products. Gaming Specific>Campaign Cartographer, D20 Pro Alpha & BattleGrounds Beta Tester, World Builder, Dungeon Crafter, LWD Hero Lab, Realm Works, Inkwell Ideas Citybuilder & Dungeon Builder, Auto-Realm, Dundjinni Contributing Writer for TSR, WOC, & Canonfire |
#10 |
|
|