
Hey all, first of all I am quite new to the custom roll parsing, but the character sheet I am working on has quite unique rolls and without this that involves around 1000 lines of roll greater than this but less than this roll and greater than this roll but the same as this roll yadda yadda yadda
and using the roll parsing I can cut down on that by a crap ton, but I was curious if it is possible to change what it shows: an example
on('clicked:passive', (info) => {startRoll("&{template:passiveDefence} {{type=?{Type|Defence,[[1]]|Resistance,[[2]]}}} {{mitigation=@{mitigation}}}{{roll2=}} {{roll=[[1d10]]}} {{whelming=[[1d10]]}} {{bonus=(?{Bonus Modifier|0})}} {{target=[[?{Target's Modifier|0}]]}}{{targetDouble=[[?{Target's Modifier|0}*2]]}} {{targetHalf=[[?{Target's Modifier|0}/2]]}} {{defence=@{defence}}}{{overwhelming=[[10+1d10+(?{Bonus Modifier|0})]]}} {{underwhelming=[[1-1d10+(?{Bonus Modifier|0})]]}}{{resistanceRoll=[[1d10+(?{Bonus Modifier|0})+@{resistance}-(?{Target's Modifier|0})}}{{resistanceOverwhelming=[[10+1d10+(?{Bonus Modifier|0})+@{resistance}-(?{Target's Modifier|0})]]}}{{resistanceUnderwhelming=[[1-1d10+(?{Bonus Modifier|0})+@{resistance}-(?{Target's Modifier|0})]]}}", (results) => {const roll = results.results.roll.result;const overwhelming = results.results.roll.result + results.results.whelming.result;const underwhelming = results.results.roll.result - results.results.whelming.result;console.log(results.results.roll);const computed = roll === 10 ? overwhelming : roll === 1 ? underwhelming : roll;finishRoll(results.rollId,{roll: computed});});});
To make it quick, basically a "crit" or "fumble" rolls a second 1d10 and either adds or subtracts it to the base roll. The good part is that the value I send back is correctly either normal, higher or lower based on the roll, however when you hover over the roll it simply says "Rolling 1d10 = (16)" which everyone should be able to tell means that this was a 1d10 + 1d10 but is it possible to show that? Or in the case of the negative that it shows 1d10 - 1d10?
Or better yet show something like "Rolling 1d10 (10) + 1d10 (6) = 16?
I do not mind showing or hiding the rolls depending on what is needed if someone has any idea whatsover that would work for this
To give an idea, the current method I was using before this was litterally roll 3 times, one was 1d10, one was 10+1d10 and the other was 1-1d10 and based on whether the first roll was a fumble, crit or normal it would choose which to show
Basically right now we can edit the "results.results.<roll>.result", but what I want to do is edit "results.results.<roll>.expression"