• 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

Editor Question for custom armor

Hello,

I'm working in the Hero Lab editor and I'm trying to make some custom armor and I'm having a really hard time figuring out something I originally thought would be simple (go figure).

The armor is not magical, but it grants a +2 Str bonus and a -4 Dex penalty when wearing it. How do I input this into the editor to get this bonus to automatically apply when the character equips the armor?

I've clicked on every button in the Armor tab and I even tried making it magical armor and clicked through everything there and I can't find anything that works. Here's what I've already tried:

1. I tried to make non-magical armor and couldn't find anything granting abilities or powers. I left the non-magical version for a base armor.
2. I tried making a magic armor but nothing in the "Armor Powers" button grants the ability to modify stats.
3. I tried appending the reference information because that has a +2STR button but that does nothing but list information. It doesn't modify the stat.
4. I tried adding +2 attribute modified in the Automatic Calculations button and then in Charge Calc Attribute I clicked Str and I set the Usage Period and Constant and that didn't do anything either.
5. I tried creating an Item Power but had the same problems as numbers 3 and 4.

Where do I input the information to make the armor provide the bonus and the penalty as soon as the character equips it?

Thanks for the help.
 
Take a look at the stat boosting belt. They have eval scripts to apply modifiers that you can copy-paste into your armor.

1. Magic armor is only needed if you don't want to let modifications be applied to it. Making it non-magical lets you select it as a form of magic armor and apply abilities.
2. Item powers are the modifiers that can be selected by magic armor or bootstrapped on. You could set up an item power with the same scripts if you wanted itto be able to be added to different things.
3. Yeah, reference info is just the description info from the referenced ability.
4. Automatic calculations and Charge Calc are used to set the tracker info, specifically # of uses per period. So that would generate a value based on 2 + your Str modifier.
5. See 2.

Here, this is the code you're wanting, so I can walk it though a bit:

Code:
      ~ Items which would add enhancement bonuses to attributes do not do so
      ~ when we are using the Auto Bonus Progression rules from Pathfinder Unchained.
      doneif (hero.tagis[source.PUAutoB?] <> 0)

      doneif (field[gIsEquip].value = 0)

      #applybonus[Bonus,hero.child[aSTR], 2]
      #applypenalty[Penalty,hero.child[aDEX], -4]



Code:
      ~ Items which would add enhancement bonuses to attributes do not do so
      ~ when we are using the Auto Bonus Progression rules from Pathfinder Unchained.
      doneif (hero.tagis[source.PUAutoB?] <> 0)

This is a standard check on things that modify attributes. It checks the hero for a tag that the Auto Bonus Progression rules setting applies to tell things to not apply their attribute bonuses.


Code:
      doneif (field[gIsEquip].value = 0)

This checks the item to see if you have it equipped. If you don't, it stops.

Code:
      #applybonus[Bonus,hero.child[aSTR], 2]
      #applypenalty[Penalty,hero.child[aDEX], -4]

These are what applies the bonus/penalty. #applybonus calls an automatic script that applies "2" to the "Bonus" field of "hero.child[aSTR]", and similar for the Dex penalty. If you look at the belts you can see they're slightly different, using #applyenhancementbonus[hero.child[aSTR],2] for instance, which will apply the enhancement bonus only if it is greater than the one currently on in that field (since they don't stack).

Hopefully this helps.
 
This does help a lot. But where am I inputting this script information for the item?do I make a custom Eval Rule? or Eval Script?

Is there a way for me to load premade data into the editor? I can often be a visual learner and if I could load up a working character, or magic item, I can see how its built and it makes it easier for me to build my own. You know what I mean?
 
you know I just decided to throw it into eval scripts to see what happened and I got it working. Thank you so much! Now I'm going to figure out how to add energy resistance to it as well. I'm going to try to figure it out on my own before I ask for more help though.

Thank you again!
 
Basically I want to make radiation resistance and if I know how fire resistance was built then it makes it easy for me to build radiation resist. Thats why it would be useful for me to be able to load up content into the editor that already exists. It gives me a roadmap.
 
Eval scripts are where things of this nature are handled, applying numerical modifications and such. You CAN run things in eval rules, but that's used for checking if the thing has certain parameters fulfilled after you have added it to a hero. Ability Focus is a good example. It applies its effects in an eval rule, where is also assigns a tag to the selected ability. Then it checks how many of that tag is present on the ability and if there are 2+ it returns invalid, and shows the error message of the eval rule. Generally you won't put things in eval rules, but there are cases where it's appropriate.

When you're in the tab of the kind of thing you're trying to create in the editor, hit "New (Copy)" in the bottom left. That will pull up a list of all the things of that type, which you can load. Things in grey are read-only, but you can copy the scripts. Things in black you can edit and save, setting a new id, which is useful for making variations of items, or having a place to start. Keep in mind they'll be the same thing type though, so you can't for instance load a belt of giant strength and change it to armor, you have to make armor and copy the script from the belt. Looking at existing things and a lot of trial and error are how I learned!

Good luck on the energy resist!
 
Last edited:
So I tried adding this to the script to include fire resistance

#applybonus[Bonus,hero.child[iResFire], 20]

it didn't work. I'm assuming it is because of something in Bonus, or in hero.child that I need to change to properly point to iResFire?
 
I'm not sure what iResFire is, but it's not fire resistance (or it's not the real fire resistance - it may be something else that's adding to the real fire resistance).


The "i" prefix suggests that it's a "magIc item". - you're looking for a generic ability - prefix "x" or an ability - prefix "ab". So I'll bet it's the Fire Resistance power that you can add to magic armor.
 
forgive me if I seem ignorant of simple things. I've been using the iOS version for years but I've only started using the Windows version in the last couple days. So I'm still not used to even looking to see where energy resistance even shows up on the Windows version. I assume its in the In Play tab but I'm not seeing it. I even put on a ring of cold resistance just to try to find one that I know would work.
 
#applybonus[Bonus,hero.child[iResFire], 20] is applying a value of 20 to the Bonus field of the thing iResFire that it's looking for on the character, but since it isn't finding it, nothing happened. Also general thing of note, use "childfound" in most cases, "child" alone can return an error, while "childfound" only applies if the thing is present.

iResFire is the fire resistance armor property.
 
I see what you mean about the document being huge. It will take some time to even scan over the thing to get a feel for it. But it does look like it will be helpful.

I created a new(copy) of fire resistance and made a radiation resistance ability. I then added this line to my eval script:

#applybonus[Bonus,hero.child[abFNO_rads], 20]

I'm not sure how to tell if it works. I'm not seeing anything when I equip that tells me I have resistance 20.
 
so if I'm understanding what I'm learning from the .pdf you guys sent me and everything we've talked about so far my problem may be in my child setting?

The game is looking for a resist energy ability on my hero because the child is set to hero. But what I'm trying to do is attach the ability to the armor so I need to make the armor the child?
 
I figured it out.

I needed this line:
#applyresist[xDamRsFire, 20]

Now I've found where to make xDamRsRad for my radiation and I've applied it to the armor. Still not sure where to look to make sure its working but it is the code that the rings of fire resist used so I'm sure it is, even if I can't tell yet.
 
The concept is fine, "hero.child" is looking for a thing present on the character, in this case the thing with id "abFNO_rads". That ability is not being found though. Also "Item Powers" is specifically things that can be added to weapons/armor, like flaming or such. Wondrous is generally the best place to look for references, though in this case I'd look at Ring of Fire Resistance.
 
In your case you're going to want to bootstrap xDamRsRad to the armor as well, so it will be added to the hero. xDamRsFire is by default on the hero, but new things like that are not.
 
and I am good to go. I found the resistance marked in the Special section and it is what it is supposed to be.
I'll keep reading this document you guys linked to me to help me learn the details....looks like it will teach me some basics on coding too. Fun.

Thank you for all your help. You guys have been great.
 
Back
Top