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') });