• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Custom Armor device

Rev Haus 235

Well-known member
Once again I'm reaching out for some help.

In the game setting I play in, they have Greatcoats. They give the wearer a +1 AC bonus, can be worn over most armor, and can work in conjunction with shields.

How can I make this work?

I've tried adding it in as a piece of armor, but it won't stack on top of my normal armor (studded leather).
I've tried adding it as a shield, but it won't let me use a normal shield.

I've figured out some ways I could "trick" the system into letting me use it, but I'd like it to work right.
 
In general, according to the RAW, stacking armor doesn't work. However, let me see if I understand you correctly. You have Greatcoats, that can be worn OVER armor to enhance the AC of the item (is this an enhancement bonus that doesn't stack with magic, or is it something that always stacks with everything?). Does it provide the +1 to both armor and the shield, or just one or the other?

This is pretty easy to implement, I just need to know what kind of bonus your Greatcloak provides and how it stacks. Most likely, this will be added as either an item, or as a material, but we'll see. We'll get it working as you expect.
 
It should be an item as near as I can tell.
It's a coat that is worn, sometimes. over armor. It adds a +1 bonus to AC.
It should stack with everything, but it doesn't add its bonus to items because it is an item unto its self.
 
The way herolab is set up, you can't stack armor. So making it a separate item with armor in and of itself won't stack with any other armor. The fact that you want it to provide armor, is an item, and it will be classified as armor. There is a problem with this setup, and I'll try to point out what it is in simple terms. If you wear full plate (+8) enchanted to +5 (+13 armor) and you have a Greatcoat that stacks with it (+1) that can also be enchanted (because it is also armor) to +5 (+6 armor), you'll end up with an AC of +19, not including any shields. Is that your intent, to have them stack as they do. This is the reason they are not meant to stack, and why I was thinking it wasn't armor in and of itself. Also, does a greatcoat also add the +1 to a shield, or does it just work in conjunction with a shield (but doesn't add any bonuses)?
 
Sounds like it's just a matter of checking the count of Hero.Armor and Hero.EquipArmor tags on the hero - if you're wearing a greatcoat, and there are exactly 2 of each, delete those and assign one new one. (delete[] removes ALL tags that match its pattern, which is why you'll need delete + assign (or tagreplace)).
 
Sorry - the Armor ratings wouldn't stack in that case. (Although you could write a script that came after the normal script that assembles the armor ratings of the armor pieces and manually add +1 to the total of hero.child[ArmorClass].field[tACArmor].value). (Or have the script find some other piece of armor and improve its armor rating as long as the greatcoat is being worn).

In Pathfinder, there's an item called an armored kilt that's implemented as an item power - it modifies the Armor rating of the piece of armor it's attached to.
 
It's not meant to enhance anything, its a coat. I understand where there could be a great deal of abuse if it were enchanted because it is a separate item. Frankly, they aren't meant to be enchanted, its like enchanting your shirt. It just happens to add a +1 AC bonus. It doesn't add a plus to you armor, or to a shield, its adds a +1 to your AC. It's like a shield, but could be used while you were using a shield too.

The problem is that theoretically, one could wear the greatcoat as their only source of armor if they wanted to. Giving them an armor class bonus of +1, in addition to whatever their normal Dexterity modifier is.

As for writing scripts, I wouldn't have the foggiest clue as to how to start that.
I'm already running into that same kind of problem with customizations for weapons that add minor bonuses. The customizations are physical changes that have been made to the weapon, like adding a scope to a gun, or having it bored or precision shooting. I'm trying to add them in as Item Powers but not having any idea how I would write a script to add +1 to hit that stacks with all the other normal bonuses, or reducing the range increment penalty to -1 instead of -2.
 
Make a greatcoat as an armor that can be worn, using the Editor under the Gear tab. Make sure that you check the box Show in Charges List? and in Charge Effect 1 type in Worn. Then add this script to the greatcoat.

@Post-Attributes (User) 20000
Code:
doneif (field[hIsOn1].value = 0)

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

This should work for what you want. To equip a greatcoat, just go to the In Play tab and select that it is worn. Tell me if this works for you.
 
Pardon my awakening of an old thread.

Is there any way I can get a step-by-step on adding the Greatcoat? I just bought Hero Lab today. I figured out getting into the editor and being in the Gear tab. I can't find Show in Charges or Charge Effect 1, and when I put that script in Gear and try to test it, it gives me an error.

Thanks in advance!
 
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. :D 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. ;)
 
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.
 
So confused...

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!
 
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?
 
Back
Top