Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System
Register FAQ Community Today's Posts Search

Notices

Reply
 
Thread Tools Display Modes
Nightfox
Senior Member
 
Join Date: Dec 2011
Posts: 100

Old July 10th, 2012, 10:34 PM
Since nobody else will put something like this up, here is a complete breakdown of the steps (with a lot of extra information) so that you can add the Greatcoat as well as anything else you want. I don't know all the stats for a Greatcoat, so I'm going to use the following generics.

Cost: _$C_
AC: _AC_
Weight: _lbs_

In the editor, go the the Gear tab.
We want to add a new item, so we need to press one of the new buttons in the lower left. Usually you'll want something that is similar to something else so you'd press [New (Copy)] and select the item that you want to modify from a list. In this case though, lets go with [New (Blank)].

When you press it, all the fields will light up, so let's go through them one at a time starting from the top.

Name: delete the "????" and type in "Greatcoat"

Unique Id: again, delete the "?" but it is generally a good idea to leave the lower case letter there. After the letter you'll need to type in a unique id for the Greatcoat. This id is case-sensitive. For now we can probably go with gGrtCoat.

Uniqueness: This is just a matter of limiting someone to only one of these. For standard items, it is generally ok to leave this as No.

Summary Text: Here you can write a quick summery of what the item does. "When worn, the coat adds +1 to the armor bonus." This field is not required, and is there only to help you.

Description Text: <Insert Fluff Here> This is where you can write out the history of the item, everything it does, what it looks like... anything. It is not required, but it is usually nice to have the information.

Cost(gp): _$C_ (make sure the cost is in gold pieces. if it costs 3 silver, then _$C_ is 0.3)

Weight(lbs): _lbs_

Gear Type: This is a drop-down menu of the various gear types. For S&G you should look through it, but you'll probably want to use Adventuring Gear for the Greatcoat.

Is a Container? This is a check box asking if the item is something you can put other things into. Examples of containers are belt pouch and backpack.

Is a "Top-Level" Container? This is similar to the above, but is used for containers that are not carried by the character. Examples would be a donkey or cart, onto which you've loaded all your shinny loot.
NOTE: an item cannot be a Container and a "Top-Level" container.

Weight depends on Size? When a character selects gear they select gear based on their size (humans buy medium gear, halflings by small gear, ogres buy large gear, etc). This check box indicates if the weight of the object changes based on the size it is being bought for. Most physical gear that is carried will vary in weight based on its size, so let's check this box.

Size never changes? If the item only comes in one size then you'd check this box. Most things that are fitted to a character will need to come in various sizes to accommodate characters of different sizes. Many things that are separate from the character (the example they give is a donkey) don't come in different sizes.

Custom Type? This is a tricky one. If you check the box, then when you add it to a character, there will be a place for the player to write in some information. This can be useful if the item needs to have something specified. Otherwise, it will just end up confusing people and not get used. For this, I'd suggest not checking the box.

Show in Charges List? This check box indicates if you want this to be listed on the In-Play tab in Hero Lab. Since we want to be able to note if this is being worn or not, let's check that box.

Total Charges: This field is for if the item has a limited number of uses whether that is per day, week, hour, or if once used x number of times it is used up. Later on you'll end up using it or referencing it for many things. Since the greatcoat doesn't have limited uses, leave the field blank.

Charge Effect 1: If your item can do something or affect something under certain conditions, here is where you would put a brief note. For this case we'll use Is worn. Since this field is not blank, when we add this item to our hero, we will have a check box on the In-Play tab next to the items name with the label "Is worn" next to it.

Charge Effect 2: If your item can do something else under a different set of circumstances, you can add a label for the second effect here. This is useful for items that have multiple abilities that you may not want to have active at the same time.

Charge allows Freeform Text? If you check this box, then on the In-Play tab next to the items name (and check boxes) you'll have a blank field that the user can write in. This can be useful when a user needs to designate a target for some ability, but the target can change from encounter to encounter. For example, if an item gave you protection 5 from an element for a period of 5 minutes a day, you might add this field so that once activated, you could enter the element type. For now, let's leave this unchecked.

The last 2 lines are for User Tags and Sources. If you start adding more items you may come across times when you want to add tags to a group of items. But for now, let’s leave that alone. As for Sources, it is good practice to enter a source for your additions. If the menu that pops up when you press the [Edit] button doesn’t list the source (it shouldn’t since your adding it for the first time), check the -New Source- box and hit ok. The window that pops up will ask for the source name Source Unique Id and Parent Source. The Source Name should be something meaningful to you. If what you are adding is from a book or module, enter the title, if it is specific to your campaign, enter the campaign name. If it is just some custom coolness you’ve come up with, enter My Custom Coolness. The Source Unique Id is a little more critical. Much like the Unique Id we talked about earlier, this must be “Unique” and is case sensitive. Finally, there’s the Parent Source. This will default to UserParent which is fine for now. Later when you go to create a character you should see whatever name you gave the source in the list on the right side of the Configure Your Hero screen.

Now all of this will get you an item called Greatcoat and a check box on the In-Play tab but it won’t do anything for you yet.

To the right side are a series of buttons. The only one we are concerned with right now is [Eval Scripts]. When you click on this, a window will pop up titled Edit Eval Scripts with a line under it marked Click to add another eval script. Click it and the window will change. This is where the work is done. If your item does something that isn’t already covered, this is where you can add it.

Phase: This is a drop down list for when you want this script to do whatever it is that it does. This is important because you may need this to run after some things, but before others. In this case, we want this script to run kind of late so their suggestion is Post Attribute (Users).
Priority: This field is to tell the script when you want it to run in the selected phase. In general, anything you add should be after 1000 unless you need it to run before something else. Their suggestion for this item is to run at 20000. This will pretty much ensure that it runs after everything else in the phase.
Index: For the most part you can ignore it. When you start having multiple eval scripts on the same item, they’ll each have their own index.
Script: This is where you add the code that they mentioned earlier, but I’ll break it down, since nobody else does.

Code:
doneif (field[hIsOn1].value = 0)
doneif” - this is an if statement. If it is true, the script will stop here and won’t go any further.
field[hIsOn1].value - this is the check box we created when we told the item to show in charges list, and put Is worn in charge effect 1.
= 0 - a check box is either on (1) or off (0)

Code:
~ Add a +1 bonus to our AC.
The “~” is our way of telling hero lab that what follows it, isn’t something that it should look at. When writing scripts, it is a good idea to add notes of what you want the script to do. That way, if you find a month down the line that it isn’t working right, you can just read it and know what you had intended it to do.

Code:
hero.child[ArmorClass].field[Bonus].value += 1
hero - this is the hero the item is currently on.
child - this is something on the hero.
[ArmorClass] - this is the primary “Thing” that we want to modify.
field[Bonus].value - this is the specific area we want to modify.
+= 1 - this is telling the system to add 1 to whatever value we currently had there.

one thing of note, in the top right is a button called [Find Thing...]. Learn it, love it. Behind this button are almost all the "Things" that hero lab has. If you want to modify something, but you don't know what the unique id is, this is where you can probably find it.

When we're done, click ok at the bottom.
Now click [Save] in the bottom left.

The final, and perhaps most crucial, step is to get hero lab to acknowledge your contribution. Even though we've saved this, hero lab won't use it until it is tested. Click the [Test Now!] button in the top left and hero lab will test the item. As soon as it has made sure there are no validation errors you can add it to your characters.

I hope this helps. Not so much with the Greatcoat, but with the next 50 things you make.
Nightfox is offline   #11 Reply With Quote
Rev Haus 235
Member
 
Join Date: May 2012
Location: Lisle, IL
Posts: 91
Send a message via AIM to Rev Haus 235 Send a message via Yahoo to Rev Haus 235

Old February 11th, 2013, 06:27 PM
Step by step for making a Greatcoat.

Step 1) Open Hero Labs
Step 2) From "Tools", choose "Launch Editor"
Step 3) From the Hero Labs Editor, click on "File" and choose "New Data File"
Step 4) With the new Data File open, choose the "Gear" tab
Step 5) In the bottom left corner choose "New(Blank)
Step 6) Fill in the Name, Greatcoat.
Step 7) Give it a Unique ID, I used "gGreatcoat"
Step 8) Fill in the description if desired, I use the flavor text from the course material.
Step 9) Fill in the GP value to purchase the coat (20GP), and give it a weight value (5lbs for a coat that fits a Medium sized character).
Step 10) Under "Gear Type", choose "Clothing"
Step 11) Click the box next to "Weight depends on size?"
Step 12) Click on the box next to "Show in charges list?"
Step 13) Under "Charge Effect 1", put "Worn"
Step 14) Under the "Eval Scripts" tab on the right hand side of the page, click on "Click to add another Eval Script". Add the script:
"doneif (field[hIsOn1].value = 0)

~ Add a +1 bonus to our AC.
hero.child[ArmorClass].field[Bonus].value += 1

Making sure to set the phase to "Post Attributes", Priority to "20,000", and the Index to "1"

Step 15) On the right hand side, below the group of tabs where the "Eval Scripts" tab is, make sure to set the "Lot Size" to 1, and check the box next to "Holdable".
Step 16) Save your data file, I use the Unique ID as the save file name.
Step 17) In the upper left corner of the page click on the "Test Now" button. This will compile the file and allow you to try it out in the Hero Labs character builder.

That should be the end of it, and you should now be able to use the Greatcoat in your regular Hero Lab stuff. I hope that I got this all right for you, and that it works. Good luck.
Rev Haus 235 is offline   #12 Reply With Quote
Anj
Junior Member
 
Join Date: Aug 2015
Posts: 1

Old September 5th, 2015, 04:32 PM
Sorry about resurrecting a very old thread here, but i have been trying to do this for the last two days and nothing is working.

The charges portion is no longer in the editor and it fails compiling the new item at the hIsOn portion.

Unfortunately, i can't seem to find anything on how to fix this...
I am so close to giving up on it and telling the PC to just add the +1 AC themselves because this system is too complicated.

Please help me!
Anj is offline   #13 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,147

Old September 15th, 2015, 10:07 AM
Quote:
Originally Posted by Anj View Post
Sorry about resurrecting a very old thread here, but i have been trying to do this for the last two days and nothing is working.

The charges portion is no longer in the editor and it fails compiling the new item at the hIsOn portion.

Unfortunately, i can't seem to find anything on how to fix this...
I am so close to giving up on it and telling the PC to just add the +1 AC themselves because this system is too complicated.

Please help me!
Apparently, I completely missed this. Apologies for that. If you are still having trouble, and want help, can you post the script you are using that isn't working?
Sendric 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 12:28 PM.


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