• 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

Adding a Custom Dodge Bonus

zylo47

Member
Our campaign is using some custom rules for Dodge Bonus. There are four categories of bonus based on class & level.

Here are the categories

  • Amazing - Barbarian, Ranger, Duelist
  • Good - Cavalier, Fighter, Gunslinger, Monk, Paladin, Rogue, Samurai, Assassin, Blackguard, Shadowdancer, Aristocrat, Noble, Warrior
  • Fair - Alchemist, Bard, Druid, Cleric, Inquisitor, Magus, Arcane Archer, Dragon Disciple, Stalwart Defender, Eldritch Knight, Horizon Walker, Expert
  • Poor - Oracle, Sorcerer, Summoner, Witch, Wizard, Arcane Trickster, Lore Master, Mystic Theurge, Pathfinder Chronicler, Adept, Commoner

Here is the progression for each category
  • Amazing - +1 dodge bonus every 2 levels starting at level 2 (+1 at 2, 4, 6, etc...)
  • Good - +1 dodge bonus every 3 levels starting at level 3 (+1 at 3, 6, 9, etc...)
  • Fair - +1 dodge bonus every 4 levels
  • Poor - +1 dodge bonus every 5 levels

I cannot figure out how to implement this correctly using the editor. For simplicity's sake, I tried just implementing a dodge bonus regardless of class (take Good category for instance). I used the following eval script under the Adjustment tab but it doesn't seem to have any effect

var nDodge as number
nDodge = #totallevelcount[] / 3
hero.child[ArmorClass].field[tACDodge].value += nDodge

Is there anything I need to do under bootstrap / tag? Can you post the steps + code in extreme layman's terms (step by step) so I can implement this? Ideally I'd like one file which would cover all classes + the logic to calculate the bonus.

Any help is greatly appreciated.

Thanks.
 
You've given us a script, but you didn't say what phase & priority you set for that script.

The script you've given will always add +0 if you don't change the phase to something other than the default, so this is definately a case where timing matters. You need to be after #totallevelcount[] is calculated and before AC is calculated.
 
How do I figure out the proper phase to set? Can you explain in more detail or point me to some documentation that I can read through? I'm just very new to using the editor (just trying to help the group out) so any additional information to help me understand the process is appreciated.

Thank you :)
 
How do I figure out the proper phase to set?
Some of it you have to look at the Phase name is maybe the best way.

In example:
First - Runs before anything else
Pre-Levels - Runs before calculating level/hit dice information
Levels - Runs at the time its calculating level/hit dice information
Post-Levels - Runs after calculating level/hit dice information
etc...

From the editor go to "Help->Help on using the Editor". In the new page click on "Choosing a Phase" for full details.

Also if just starting out read Question#2 in the FAQ about learning the editor. Especially read the Help inside the Editor and watch the 4 part YouTube video.
 
Great! Thank you so much! I will read through this and if I get a working solution I'll post it so everyone can see how I did it.
 
I still have not had luck getting this working.

I am wondering if I am going about this the wrong way. Since this is more of a class related bonus for this specific campaign, should I be overriding the default class templates instead of just granting the bonus via one script?

Also, would it be better to use a modified Dodge feat (one that is not dodge so it doesn't impact the pre-requisites for other feats like mobility) and just grant it every x levels to the class rather than using a custom script to grant the bonus?

Any guidance is appreciated

*edit* I tried making it a custom ability and modifying the ability called Dodge Trick. I removed the pre-requisite and made it available to Fighters as a test (my test profile is a level 5 fighter). Nothing happened. It's as if the eval scripts just don't run. I'm really at a loss here.
 
Last edited:
Let me give this a try, I think this would be best as either an adjustment you can add to characters that follow this house rule, or maybe a mechanic.

I'll post some code in a bit.
 
Be much easier to help to A) please post your full script plus the timing its running at and B) let us know what type of Thing its running on (feat, class ability, adjustment).

Otherwise sort of flying blind here as I know stuff like this works as I built a similar system for a Pirates campaign.
 
Here is something to get you started, with a bit of explanation thrown in to guide you.

First 10000
Code:
     ~ If the user has not checked the box that says this adjustment is "On" then we are 
     ~ done, go no further.
     doneif (field[pIsOn].value = 0)

     ~ First we're going to establish some variables that store numbers. If this were something 
     ~ other than an adjustment, we might store the numbers in fields, but this type of thing 
     ~ (the adjustment type) doesn't have any fields for that.

     ~ The first 4 are to track how many levels we have in the different tracks, and we give 
     ~ names that indicate that
     var amazelev as number
     var goodlev as number
     var fairlev as number
     var poorlev as number

     ~ The last is the total bonus from all our levels.
     var totalbon as number

     ~ I'm assuming that all levels in classes with the same progression are totalled before 
     ~ division and rounding to the nearest whole number. If that's not the case (for example,
     ~ each class could calculate its bonus independantly of other classes, even those on the
     ~ same track), you'll have to adjust the following.

     ~ The text of the things in the #levelcount macro is the name of the Classes tags for
     ~ that class. Be careful, it's not always the full name. For example, the Gunslinger class
     ~ applies the Classes.Gunsling tag. If you're curious about the tag for a particular class,
     ~ create a hero, add a level of the appropriate class, and then look at the debug for all 
     ~ tags on the hero. You can look at debug by going to "Develop -> Enable Data File 
     ~ Debugging". Then you can go to "Develop -> Floating Info Windows -> Show Hero Tags".
     amazelev = #levelcount[Barbarian] + #levelcount[Ranger] + #levelcount[Deulist]
     totalbon += round(amazelev/2,0,-1)

     ~ Not all the classes are added here, you can complete the rest, I am sure.
     goodlev = #levelcount[Fighter] + #levelcount[Monk] + #levelcount[Rogue]
     totalbon += round(goodlev/3,0,-1)

     fairlev = #levelcount[Bard] + #levelcount[Druid] + #levelcount[Cleric]
     totalbon += round(fairlev/4,0,-1)

     poorlev = #levelcount[Sorcerer] + #levelcount[Wizard]
     totalbon += round(poorlev/5,0,-1)

     ~ Now we've got the bonus from all our different advancements, add to the dodge bonus to AC.
      hero.child[ArmorClass].field[tACDodge].value += totalbon
 
Last edited:
Great thank you! I'm going to try again today/tomorrow using this as a guide. If I get stuck again I'll post exactly what I'm doing with screenshots.
 
This worked!! I will work on expanding it out now to include the rest of the classes. Thank you so much for your help.

Just FYI, I set the Phase to Post-Levels (users) and left the priority alone.
 
So I went and added the additional classes from the original list but I'm getting an error for many of them saying that there's a syntax error in the eval script because Classes.<whatever class I added> is not defined.

Yet the class is selectable from the list of things.

Here are some that are not working: Duelist, Cavelier, Gunslinger, Paladin, and Samarai.

I tried re-activating my license and I made sure that my laptop and my desktop both have different licenses.

Here is the script without all the comments (i only commented out some of the classes that weren't working until I gave up realizing almost every new class I added had this problem)
doneif (field[pIsOn].value = 0)

var amazelev as number
var goodlev as number
var fairlev as number
var poorlev as number

var totalbon as number

~ Not all the classes are added here (Duelist from the list is not working properly for some reason)
amazelev = #levelcount[Barbarian] + #levelcount[Ranger]
~ + #levelcount[cDuelist]
totalbon += round(amazelev/2,0,-1)

~ Not all the classes are added here (black guard and noble from
~ the list were not found in the list of "things", cavelier,
~ gunslinger, and paladin are not working for some reason)
goodlev = #levelcount[Fighter] + #levelcount[Monk] + #levelcount[Rogue] + #levelcount[cAristoc] + #levelcount[cWarrior]
~ + #levelcount[cCavalier] + #levelcount[cGunsling] + #levelcount[cPaladin] + #levelcount[cSamurai] + #levelcount[cAssassin] + #levelcount[cShadowdan]
totalbon += round(goodlev/3,0,-1)

fairlev = #levelcount[cAlchemist] + #levelcount[Bard] + #levelcount[Druid] + #levelcount[Cleric] + #levelcount[cInquisito] + #levelcount[cMagus] + #levelcount[cArcArch] + #levelcount[cDragDisc] + #levelcount[cStalwartD] + #levelcount[cEldritchK] + #levelcount[cHorizon] + #levelcount[cExpert]
totalbon += round(fairlev/4,0,-1)

poorlev = #levelcount[cOracle] + #levelcount[Sorcerer] + #levelcount[cSummoner] + #levelcount[cWitch] + #levelcount[Wizard] + #levelcount[cArcTrick] totalbon += round(poorlev/5,0,-1)

hero.child[ArmorClass].field[tACDodge].value += totalbon

Any help would be appreciated.

*edit* nevermind, i figured out by going into the developer Show Hero Tags feature you can find the actual class names. The ones given to me in the Things search weren't exactly correct
 
Last edited:
Back
Top