Lone Wolf Development Forums  

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

Notices

Reply
 
Thread Tools Display Modes
Sevisin
Member
 
Join Date: Oct 2013
Posts: 78

Old August 12th, 2017, 12:11 AM
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]
I get an error saying,
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]
Why is that?

Thanks,

-S
Sevisin is offline   #1 Reply With Quote
Dami
Senior Member
 
Join Date: Mar 2013
Location: Melbourne, Australia
Posts: 206

Old August 12th, 2017, 05:50 AM
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: D&D 3.5 (GM), Pathfinder (Player), Gamma World (GM).
HeroLab: 3.5 & Pathfinder. HL User Files for PF: Greyhawk Setting, Gamma World (WIP).

DM and player of D&D since 1980.
Dami is offline   #2 Reply With Quote
Sevisin
Member
 
Join Date: Oct 2013
Posts: 78

Old August 12th, 2017, 09:01 AM
@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
Sevisin is offline   #3 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 9,569

Old August 12th, 2017, 09:40 AM
Here is the script that macro #levelcount[] is doing under the covers:
Code:
hero.tagcount[Classes.#class]
This means its looking for the "Classes.?" tag that resides on the Hero. To find this tag do the following:

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.
ShadowChemosh is offline   #4 Reply With Quote
Sevisin
Member
 
Join Date: Oct 2013
Posts: 78

Old August 12th, 2017, 12:09 PM
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
The goal of this code is to overwrite and update the natural AC given by Landforged Body, as well as the text for the special ability at given levels. Above code was recycled from class special cDDiArmor1 (or was it cFMaNatAr1? I don't remember).

Any help is appreciated.

Thanks,

-S
Attached Images
File Type: jpg Landforged Walker problem 01.jpg (224.1 KB, 2 views)
File Type: jpg Landforged Walker problem 02.jpg (140.5 KB, 3 views)
File Type: jpg Landforged Walker problem 03.jpg (79.6 KB, 1 views)
Sevisin is offline   #5 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 9,569

Old August 12th, 2017, 12:33 PM
Quote:
Originally Posted by ShadowChemosh View Post
Code:
#levelcount[Cleric]
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]
Several more notes:
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.
ShadowChemosh is offline   #6 Reply With Quote
Sevisin
Member
 
Join Date: Oct 2013
Posts: 78

Old August 12th, 2017, 01:19 PM
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
Sevisin is offline   #7 Reply With Quote
Dark Lord Galen
Senior Member
 
Join Date: Jul 2012
Location: Texas
Posts: 585

Old August 14th, 2017, 02:33 AM
Quote:
Originally Posted by ShadowChemosh View Post
................
1) DO NOT use the '(Users)' timings as those are going to go away in a future d20 update.
.
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
Dark Lord Galen is offline   #8 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 9,569

Old August 14th, 2017, 02:59 PM
Quote:
Originally Posted by Dark Lord Galen View Post
oh really??? I need to check mine then..... or will old ones be grandfathered?
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.
ShadowChemosh is offline   #9 Reply With Quote
Dark Lord Galen
Senior Member
 
Join Date: Jul 2012
Location: Texas
Posts: 585

Old August 14th, 2017, 09:58 PM
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
Dark Lord Galen 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 01:49 AM.


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