Junior Member
Join Date: Nov 2012
Location: New York
Posts: 7
|
Our campaign is using some custom rules for Dodge Bonus. There are four categories of bonus based on class & level.
Here are the categories
Here is the progression for each category
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. |
#1 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
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. |
#2 |
Junior Member
Join Date: Nov 2012
Location: New York
Posts: 7
|
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 |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. 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. |
#4 |
Junior Member
Join Date: Nov 2012
Location: New York
Posts: 7
|
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.
|
#5 |
Junior Member
Join Date: Nov 2012
Location: New York
Posts: 7
|
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 by zylo47; November 14th, 2012 at 02:37 PM. |
#6 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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. |
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
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. 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 |
Senior Member
Join Date: Oct 2011
Posts: 6,793
|
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 by Aaron; November 14th, 2012 at 11:59 PM. |
#9 |
Junior Member
Join Date: Nov 2012
Location: New York
Posts: 7
|
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.
|
#10 |
|
|