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

Traveller (Mongoose 2E) Character Sheet Rolltemplate Help

1683705543

Edited 1683705689
Coryphon
Pro
Sheet Author
Compendium Curator
Hi All, I'm revisiting Traveller after 40 years and am setting up Fall of Tinath for my players. I'm making a custom version of the existing character sheet for fun, and to fix a couple of bits like Initiative. I'm happy with the result but have a question about rolls and rolltemplates... In Traveller when you roll to hit, anything over 8 (the 'Effect') gets added to the damage: 'Damage and Effect The Effect of an attack roll is always applied to the damage of a weapon unless the weapon is Destructive or a weapon is being used on a target of a smaller scale (See page 157).' I know I cannot do arithmetic inside the rolltemplate itself, it has to be resolved in the roll definition, but is there any way of doing this? Here is the roll definition: < button class ="sheet-weaponroll" style ="width:25px;" name ="roll_weapon-1" type ="roll" value ="&{template:range} {{character=@{character_name}}} {{weapon=@{weapon_name-1}}} @{ro_default_rolltype} + @{weapon_DM-1}[DM] + @{weapon_skill-1}[Skill] @{ro_default_mod}]]}} {{damage=[[@{weapon_damage-1}]]}} {{range=@{weapon_range-1}}}" ></ button > ro_default_type is a prefix, generally: {{roll=[[2d6 ro_default_mod seems to be a text label, e.g. 'Modifier' So, the problem is that that if 'roll' (2D6 plus various 'to hit' modifiers) > 8 then damage = damage + (roll - 8)... I have checked the forums and there is some 're-use' use cases based on using the same variable(?) names...but I can't make head or tail of them! I know that API scripts can help here, and I do have a Pro subscription, but was hoping to keep it fairly agnostic... Any insights gratefully received, Coryphon
1683732762

Edited 1683742974
John D.
Pro
Sheet Author
Sounds like Custom Roll Parsing would be your best solution here.  There is a way to perform if/then type math logic but I can't find the wiki/forum reference to it.  Perhaps someone else here can point that out.  Would be great to see it linked in Dice Reference (maybe it is and I just haven't had enough coffee to find it!), or in GiGs's super mega ultra awesome Roll20 reference site . [Update] Conditional Math ...found it!  And a forum post that might make better sense of it. 
1683749942
Coryphon
Pro
Sheet Author
Compendium Curator
Many thanks for taking the time, will look into those 
1683833634
GiGs
Pro
Sheet Author
API Scripter
Custom Roll Parsing is the natural (and supported) solution. This might be possible with soem fiddly reusing Rolls logic too. But you would need to separate the attack roll part out into something that can be treated a s anumber. This won't work: {{roll=[[2d6 , you would need 2d6 or [[2d6]] .