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

Combat Tracker for GURPS

1534444614
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
In GURPS the basic speed plus modifiers determines turn order. No dice rolls. Is there a way to modify Combat Tracker so it uses only the attribute and doesn't add a roll? Similar to Group Init?
1534480836
GiGs
Pro
Sheet Author
API Scripter
I cant remember how combattracker works, but can you substitute your own roll? In which case you could use 0d0 for the roll, as a workaround.
1534512494
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
That's what I was hoping. However, I dont see where I can input that d0. Still digging.....
1534514439

Edited 1534514590
rollInitiative = (selected, sort) => { let character; selected.forEach(s => { if(s._type !== 'graphic') return; let token = getObj('graphic', s._id), //whisper = (token.get('layer') === 'gmlayer') ? '/w gm ' : '', bonus = parseFloat(getAttrByName(token.get('represents'), state[state_name].config.initiative_attribute_name, 'current')) || 0; let pr = randomBetween(1,20)+bonus pr = (Math.round(pr) !== pr) ? pr.toFixed(2) : pr; addToTurnorder({ id: token.get('id'), pr, custom: '', pageid: token.get('pageid') }); }); if(sort){ sortTurnorder(); } }, You'd probably need to modify this function.  Specifically, the lines where it is "rolling" the initiative for each token selected.  I'm assuming you could comment out/remove that logic and grab the speed from the GURPS character sheet?  Substituting in your speed value for the "pr" variable in the "addToTurnorder" function call. addToTurnorder({ id: token.get('id'), [GURPS speed here] , custom: '', pageid: token.get('pageid') });
1534517360
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
Wow this looks good. However, I was thinking we could modify this in a way that allows the user to select the how many sides for the initiative die and allow for other modifiers to be added while still including the bonus attribute. In effect that would allow the possibility of a zero sided init die for games with fixed initiative such as GURPS.
1534518463
GiGs
Pro
Sheet Author
API Scripter
The  initiative_attribute_name looks like a reference to an early defined attribute stat. You could simply define Speed as the attribute stat. To set up your own roll you could create a couple of constants earlier to work with this line: let pr = randomBetween(1,20)+bonus Making it let pr = randomBetween(numDice,dieSize)+bonus But that doesnt account for systems where initiative isnt based on a roll high system. I can think of some systems  where you roll against a target number, or roll a dice pool and count successes, etc. So coming up with a totally universal system would require a significant rewrite.