• 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

Specific Editor Question

Hyrum

Member
Hey everyone,

I'm adding a custom ability and I'm having trouble with the following class power:

Sphere of Influence: A war master with this talent has learned how to maximize his efforts within a certain class of skills. The war master gains a +1 bonus to all skill and ability checks based on a single ability score selected when this talent is taken. If the war master is 10th level or higher, this bonus increases to +2. This talent may be selected more than once. A different ability score must be selected each time the talent is taken.

Any idea on how to do this within the editor?

Hyrum.
 
In the "Select From" option in the editor, select "Attributes" - that way the user can select the attribute this is based on.

Since this eval script is looking up final attribute values, we'll need to be in the Post-Attribute phase or later. Skills are handled relatively early in Poat-Attributes, so we'll need to be even earlier - Set the timing to Post-Attributes/5000.

Now, in the Eval script for that ability, start with the usual test:

Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)

Set up the bonus we're applying:
Code:
if (linkage[table].field[cTotalLev].value >= 10) then
  field[abValue].value += 2
else
  field[abValue].value += 1
  endif

Next, identify the chosen attribute (and don't do any more if nothing's been chosen):

Code:
perform field[usrChosen1].chosen.setfocus
~if we haven't chosen anything yet, just get out now
doneif (state.isfocus = 0)

Now, so that it can be referenced easily, pull in the override tag from that attribute:

Code:
perform focus.pulltags[SkillOver.?]

Now, search through all the skills on the hero:

Code:
foreach pick in hero from BaseSkill

Now, find any skills that have an override tag (from various abilities that say "Skill X is now based on attribute Y instead of attribute Z), and compare the SkillOver tag we retrieved with the SkillOver tag on that skill.

Code:
if (eachpick.intersect[SkillOver,SkillOver] <> 0) then
  eachpick.field[Bonus].value += field[abValue].value

If there isn't one of those, test for the regular link to the attribute:

Code:
elseif (eachpick.islinkage[skillattr] <> 0) then
  if (eachpick.linkage[skillattr].intersect[SkillOver,SkillOver] <> 0) then
    eachpick.field[Bonus].value += field[abValue].value
    endif
  endif

Note that the line:

Code:
eachpick.field[Bonus].value += field[abValue].value
should be replaced with the specific bonus type this is adding, if it's not adding a generic bonus - for example, here's a sacred bonus:

Code:
#applybonus[BonSacred, eachpick, field[abValue].value]

Here's all that assembled into a single place, with the proper close for the foreach:

Code:
~ If we're not shown, just get out now
doneif (tagis[Helper.ShowSpec] = 0)
 
if (linkage[table].field[cTotalLev].value >= 10) then
  field[abValue].value += 2
else
  field[abValue].value += 1
  endif
 
perform field[usrChosen1].chosen.setfocus
~if we haven't chosen anything yet, just get out now
doneif (state.isfocus = 0)
 
perform focus.pulltags[SkillOver.?]
 
foreach pick in hero from BaseSkill
  if (eachpick.intersect[SkillOver,SkillOver] <> 0) then
    eachpick.field[Bonus].value += field[abValue].value
  elseif (eachpick.islinkage[skillattr] <> 0) then
    if (eachpick.linkage[skillattr].intersect[SkillOver,SkillOver] <> 0) then
      eachpick.field[Bonus].value += field[abValue].value
      endif
    endif
  nexteach
 
One more if it's not too much of a bother.

Mark of Quality: At 5th level the war master’s appreciation for high-quality gear grows into a knack for getting more out of masterwork equipment. Anytime the war master uses a masterwork weapon, armor, tool, kit or similar item he receives a +1 circumstance bonus. If the object is a masterwork weapon, the bonus is applied to attack rolls. If armor, the maximum Dex bonus is increased by 1 when the war master is wearing it. If the equipment is some other piece of gear (such as a masterwork tool), the bonus applies to whatever skill or ability check the equipment normally grants a bonus to. (See Other New Rules for more information on nonstandard masterwork equipment.)

These bonuses do apply to all magic weapons and armor the war master may use (which must be masterwork to be imbued with magic), but normally do not apply to other magic items unless they are magical versions of mundane masterwork tools or kits. If the war master is 10th level or higher, the circumstance bonus increases to +2.

Hyrum.
 
Nice abilities :)

This ons is quite more complicated I think.

First you need to check each and every item that is on the hero (equiped) - another thread showed how to do this.

and then increase what every 'benefit' that particular item gives you.

hmm

there may be away to just force an if mastwerowrk bonus = bonus +1 script, but wont work for amor as MW armor reduces check penalty.
 
Here's how to do a normal search for the sort of information in Hero Lab that you'd use to build this sort of thing:

In the Develop menu, make sure "Enable Data File Debugging" is enabled, and then add a number of various items to the hero - in this case, masterwork, non-masterwork, and magical weapons and armor. Now, for each one, right-click on it, and select "Show Debug Tags for XXX" - compare and contrast the tag lists for various things, and you should be able to figure out how various information is stored in Hero Lab. Once you get to the point of applying the modifiers, you'll select "Show Debug Fields for XXX" - there you'll find things like the Circumstance modifier, or the armor check penalty.

For searching through the various things in Hero Lab, you'll want to take a look at the various component tags that are on the things you're looking at.

As in the previous answer, searches are done with foreach:

Code:
foreach pick in hero from component where expression

Replace "component" with a component that's specific to the category of item you're searching through, like BaseWep for weapons.

Replace "expression" with any tags you've identified that are specific to the items you're looking for, and won't be found on other things in the same component, like "IsWeapon.wScimitar" to find all the scimitars or "wType.B" to find all the Bludgeoning weapons.
 
Now, for the problem. You won't find masterwork status stored in the tags and fields. The custom armor/weapon items in Hero Lab use the "gizmo" mechanism, so that the custom armor/weapon can inherit all the stats of an existing weapon without having to make the user re-enter all of them for each custom item.

The tag and field reports don't report anything about the gizmo, just the final results.

What's worse is that masterwork isn't consistently recorded from thing to thing. For example, I can't figure out how to find something that can tell me that the Mithral Shirt specific item is masterwork.

I'll put on my to-do list to figure out a way to specifically tag all the masterwork items. But until then, I don't know a way to search for all the masterwork items on the character.

You're going to have to leave your ability as text only until then. Sorry.
 
Back
Top