View Single Post
Daniel V
Senior Member
Lone Wolf Staff
 
Join Date: Apr 2020
Posts: 408

Old April 16th, 2020, 06:38 PM
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.
Daniel V is offline   #2 Reply With Quote