Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Hi again, trying to apply a bonus to melee damage for a custom ability, and I'm having trouble trying to point the eval script to the correct field. I currently am using:
#applybonus[BonMorale,hero.child[Damage],field[abValue].value] But this applies the bonus to all damage, both ranged and melee. What do I need to change to make this bonus apply only to melee damage? Thanks^6 |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Go to the menu "Develop->Floating Info Window->Show Selection Fields". In the new window search for "Damage" and select "Damage Bonus" and press "OK".
You will then get a new window that shows every field on the Damage Pick. Do any of these other fields look like a Melee Damage. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#2 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Quote:
The script reads: #applybonus[BonMorale,hero.child[dmmBonus],field[abValue].value] How should I be scripting it? |
|
#3 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
There are 3 parameters in that macro, each seperated by a ",". The first is the field you want to apply the bonus to, the second is the pick on which that field is present, and the third is the amount of the bonus. Your 2nd parameter is listing a field instead of a pick.
If this is a morale bonus to melee damage, the field you want is not dmmBonus. "dm" stands for "damage", the third "m" is for "melee", and the last bit is the bonus type. If you look through the list of fields you should see one which is specifically morale, "dmmBonMora". |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
1) FIELD name 2) Pick 3) Value So "Damage" is the Pick which contains the "FIELDS" you saw in the Debug window. Based on this what you want is: Code:
~ Give a Melee Only Damage Bonus #applybonus[dmmBonus,hero.child[Damage],field[abValue].value] Take a look at Glossary of Terms for the Editor. You may find it helpful now that you have done more scripting. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#5 |
Senior Member
Join Date: Nov 2017
Location: Trafford, PA, USA
Posts: 226
|
Thanks Aaron and Shadow. I think I understand the structure of macros a little better now. I used the script SC provided, it works, and it makes sense now.
|
#6 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
Is the bonus intended to be typed or untyped? It is important for stacking. If the bonus is untyped, then it is supposed to stack with all other bonuses, and dmmBonus is the correct field but you should not be using the macro (as that will stack incorrectly with others).
|
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
For bonuses that all stack Bob G you should just ADD in the bonus like so: Code:
~ Give a untyped bonus to Melee damage hero.child[Damage].field[dmmBonus].value += field[abValue].value Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
|
#8 |
|
|