Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

[5e Shaped] Adjusting Initiative Formula

Is it possible to hack the shaped sheet to adjust the initiative rolls? I want to add wisdom and proficiency bonus to the initiative roll (on top of the dex bonus). Can I do this?
1457649439
Kryx
Pro
Sheet Author
API Scripter
Initiative bonus is text, so yes, you can do this. Under Initiative bonus (settings page for the original shaped sheet and v2.1.3 of the redesign. For 2.2.X+ the bonus is on the core page in edit mode) put: @{pb}+@{wisdom_mod}
1457649947
Kryx
Pro
Sheet Author
API Scripter
I just released version 2.2.4 of the redesigned shaped sheet to fix an issue with initiative. Please manually update to make this work: <a href="https://github.com/mlenser/roll20-character-sheets" rel="nofollow">https://github.com/mlenser/roll20-character-sheets</a>...
Thx for the reply. I'm having trouble figuring out what this edit mode is. Can't find anything on the character sheet. Tried putting the html and css files into notepad to see if I could find what I need to edit there, no luck. Could you tell me where to go to make the edit pls? While you're here, out of curiosity, could you edit the proficiency bonus to be a die roll instead of a flat number and have the sheet roll that die correctly and apply to as a modifier to anything that draws from the pb?
1457686370
Kryx
Pro
Sheet Author
API Scripter
There are two version of the Shaped sheet - the old version and the redesigned version (2.X.X). If you look at the version at the top of the page it'll either show a number or a date. If it's a date you're on the old sheet. If you look under the settings page you can see initiative bonus there and you can put in the code I put above in that field. Adjusting PB to a dice roll won't work on the redesigned sheet, but it may work on the old sheet. You'll have to adjust the attribute "pb" on the attributes and abilities page to be d4 or d6 or whatever you want it to be.
I'm not really sure what I'm doing so after spending some time reading through the code I found the following lines var updateInitiative=function updateInitiative(){var collectionArray=['dexterity_mod','dexterity_check_bonus','initiative_bonus','jack_of_all_trades_toggle','jack_of_all_trades','remarkable_athlete_toggle','remarkable_athlete','global_check_bonus'];var finalSetAttrs={};finalSetAttrs.initiative=0;getAttrs(collectionArray,function(v){var dexMod=getIntValue(v.dexterity_mod);if(exists(dexMod)){finalSetAttrs.initiative+=dexMod;}finalSetAttrs.initiative_formula=dexMod+'[dex]';var dexCheckBonus=getIntValue(v.dexterity_check_bonus);if(exists(dexCheckBonus)){finalSetAttrs.initiative+=dexCheckBonus;finalSetAttrs.initiative_formula+=' + '+dexCheckBonus+'[dex check bonus]';} I want to make changes to the formula itself rather than add an initiative bonus that would block me using any further bonus (or requiring me to manually override the built-in bonus). Can I add wisdom modifier and proficiency bonus to all the above lines where the code asks for the dexterity modifier? Is this the whole base initiative code (initiative bonus follows next in the code)?
1457882479
Kryx
Pro
Sheet Author
API Scripter
If you're going to modify the sheet you're best served by creating a fork and making sure to keep up to date. With your method you will cut yourself off from future updates. It's also much easier to see the original code instead of the compiled code. You have to fork it, make changes, and then compile. Every so often you'll want to pull my latest and then recompile. updateInitiative is indeed the only place I calculate initiative. However uUnless you know what you're doing you're bound to get frustrated and give up on this method.