Skip to content

Instantly share code, notes, and snippets.

Avatar
🔭

Rafael Ungar Silvyre

🔭
View GitHub Profile
View [Tampermonkey] dominion.games Automated Table Setup
// ==UserScript==
// @name dominion.games Automated Table Setup
// @description Click on the 'New Table' button to trigger the script
// @version 0.2
// @author Rafi_
// @match https://dominion.games/
// @namespace http://tampermonkey.net/
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js
// @require https://greasyfork.org/scripts/6250-waitforkeyelements/code/waitForKeyElements.js?version=23756
// @grant GM_addStyle
View [Demon Gate] Level Calculator
[[ [[floor({?{Level|1+1} - 3, 0}kh1 / 10)]]d20! + 1d[[(({?{Level}, 1}kh1 - 3 + 2 * [[{abs((?{Level} - 10) % 10 - 4.5) + {1/2}, {3} }<2]]) % 4 + 3) * 2 + [[{abs((?{Level} - 5) % 10 - 4.5) + {1/2}, {4} }<3]] * ((floor(({?{Level}, 1}kh1 - 7) / 10) % 2 * 4 - 2 * floor(({?{Level}, 1}kh1 - 7) % 10 / 2)) * (1 - 2 * (1 - floor(({?{Level}, 1}kh1 - 7) / 2) % 2)) * (1 - floor(({?{Level}, 1}kh1 - 7) / 10) % 2 * 2))]]! + [[{abs((?{Level} - 5) % 10 - 4.5) + {1/2}, {4} }<3]]d[[{(floor(({?{Level}, 1}kh1 - 7) % 10 / 2) + 4) * 2, {12} }kl1]]! ]]
View [Gamma World 2E] Attack Matrix Macros
Attacker's Weapon Class roll: [[ 1d20>[[20 - {3,10,10,11,14,14,16,16}<?{AWC} - 4 * {4,5,7,13}=?{AWC} - 3 * {6,0}=?{AWC} - 2 * {5,0}=?{AWC} - {1,2,3,7,8,9,10}=?{AWC} * ?{DAC} - {1,9,16}=?{AWC} * {2, 11 - [[{16,0}=?{AWC}]]}<?{DAC} - {2,0}=?{AWC} * {3,4,11}<?{DAC} - {4,5,6,13}=?{AWC} * {2, 3 + 4 * [[{7,0}=?{AWC}]], 3 + 4 * [[{7,0}=?{AWC}]], 10 - 7 * [[{13,0}=?{AWC}]]}<?{DAC} - 6 * {9,11}<?{DAC} * {6,0}=?{AWC} + 7 * {4,0}=?{DAC} * {16,0}=?{AWC} - {2,5,6,6,6,7,8,9,9,10}<?{DAC} * {11,0}=?{AWC} - {2,7,7,7,7,8,8,9,9,9,10}<?{DAC} * {12,0}=?{AWC} - {2,3,4,6,8,9}<?{DAC} * {14,0}=?{AWC} - {2,9,9,9,9,9}<?{DAC} * {15,0}=?{AWC}]] ]]
Attacker's Hit Dice roll: [[ 1d20>[[21 - ?{DAC} - {6,11}<?{DAC} - {2,4,6,9,11,15}<?{AHD}]] ]]
Attacker's Mental Strength roll: [[ 1d20>[[{10 + ?{DMS} - ?{AMS}, 1}kh1]] ]]
View [WHFB] To-Hit & To-Wound Chart Macros
To hit: [[ 3 + {@{ws}, @{ws} * 2 + 1}<@{target|ws} ]]
To wound: [[ 2 + {{@{target|tns} - @{str} + 2, 0}kh1, {4}}kl1 ]]
View [Car Wars] Control Roll
[[ 1d6cs0cf<[[ {1e2 - 6 + {1e3,105}<@{selected|SPD} + 5 * {115,265}<@{selected|SPD} - 1e2 * {1,3,57}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 4 + 3 * {85,235}<@{selected|SPD} + 2 * {235,275}<@{selected|SPD} - 1e2 * {1,3,5,7,11,15,45,51}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 6 + {35,95}<@{selected|SPD} + 2 * {145,275}<@{selected|SPD} + 3 * {145,295}<@{selected|SPD} - 1e2 * {1,3,9,11,15,21,27}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 3 + 5 * {1e3,175}<@{selected|SPD} - 1e2 * {1,3,5,7,9,13,33}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 3 + 5 * {1e3,205}<@{selected|SPD} - 1e2 * {1,3,5,7,9,39}=[[floor(@{selected|SPD} / 10 + 1/2) * 2 - 1]], 1e2 - 6 + floor(@{selected|SPD} / 30 - 1/2) - 1e2 * {1,2}=[[(floor(@{selected|SPD} / 10 + 1/2) * 2 - 1) % 3]], 1e2 - 5 + floor(@{selected|SPD} / 30) + {-1e3,0}=[[(floor(@{selected|SPD} / 10 + 1/2) * 2 - 1) % 3]] - {-1e3,24}>@{selected|SPD}}>[[@{selected|HC} + (?{HC mods|0}) + 1e2]] ]] ]]
View [D&D 5e] Animate Objects
&{template:5e-shaped} {{title=Animate Objects}} {{subheader=*?{Size|Tiny, [Tiny](-2)|Small, [Small](0)|Medium, [Medium](1)|Large, [Large](2)|Huge, [Huge](4)} objects attack!*
}} {{[1](#).=[[ ?{Roll|Normal, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} + [[abs(?{Size} - 1) + 5]] + {0} ]] vs. AC for [[ [[1 + ceil(?{Size} / 4)]]d[[floor((?{Size} - 2 * {0, 3}=[[2 + ?{Size}]]) / 2) * 2 + 8]] + [[abs(?{Size} - 1) + 1]] ]] damage (if crit, +[[ [[1 + ceil(?{Size} / 4)]]d[[floor((?{Size} - 2 * {0, 3}=[[2 + ?{Size}]]) / 2) * 2 + 8]] ]])
}} {{[[[{?{Number of attacks|1|2|3|4|5|6|7|8|9|10}, 2}kl1]]](#).=[[ ?{Roll} + [[abs(?{Size} - 1) + 5]] + {0} ]] vs. AC for [[ [[1 + ceil(?{Size} / 4)]]d[[floor((?{Size} - 2 * {0, 3}=[[2 + ?{Size}]]) / 2) * 2 + 8]] + [[abs(?{Size} - 1) + 1]] ]] damage (if crit, +[[ [[1 + ceil(?{Size} / 4)]]d[[floor((?{Size} - 2 * {0, 3}=[[2 + ?{Size}]]) / 2) * 2 + 8]] ]])
}} {{[[[{?{Number of attacks}, 3}kl1]]](#).=[[ ?{Roll} + [[abs(?{Size} - 1) + 5]] + {0} ]] vs. AC for [[ [[1 + ceil(?{Size} / 4)]]d[[
View [Pokéthulhu] Ability Test
/em rolls ?{d|1|2|3}d vs. Ability ?{A|1|2|3|4|5|6|7|8|9|10|11|12}:
/r {[[ d12cs?{A}cf>[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]], [[ (?{d}/4)d12cs?{A}cf>[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]], [[ (?{d}/6)d12cs?{A}cf>[[?{A}+1]] % (?{A}+11) % (?{A}+10) % (?{A}+9) % (?{A}+8) % (?{A}+7) % (?{A}+6) % (?{A}+5) % (?{A}+4) % (?{A}+3) % (?{A}+2) % (?{A}+1) ]]}kh1
View [Earthdawn] Step Calculator
Step [[?{Step|5+4+3}]] ⇒ [[ [[{1e3, 14}<[[{?{Step}, 0}kh1 % 22]] + floor(([[{?{Step}, 0}kh1]]) / 22)]]d20! + [[{0, 1, 1, 2, 6, 10}=[[{?{Step}, 0}kh1 % 11]] - {-1, 1}=[[{?{Step}, 0}kh1]] + floor(([[{?{Step}, 0}kh1]] - 3) / 22)]]d10! + [[{0, 5, 9}=[[{?{Step}, 0}kh1 % 11]] + {1, 2}=[[{?{Step}, 0}kh1]] + floor(([[{?{Step}, 0}kh1]] - 3) / 22)]]d8! + [[{-1, 8}=[[{?{Step}, 0}kh1 % 11]] - {0, 1, 5, 6}=[[{?{Step}, 0}kh1 % 11]] + {-1, 1}=[[{?{Step}, 0}kh1]] + 1]]d[[4 + 2 * {4, 8, 9, 10}=[[{?{Step}, 0}kh1 % 11]] + 8 * ({2, 7}=[[{?{Step}, 0}kh1 % 11]] * (1 - {-1, 2}=[[{?{Step}, 0}kh1]]))]]! - [[{1, 2}=[[{?{Step}, 0}kh1]] * (3 - [[{?{Step}, 0}kh1]])]] ]]
View [Monastyr, Neuroshima] Homebrew Dice Roller
&{template:default} {{Results
[[ d20cf<?{Attribute|11}cf>[[?{Ability|3}*2 + ?{Attribute} + 1]]cs<[[?{Ability} + ?{Attribute}]] ]] [[ d20cf<?{Attribute}cf>[[?{Ability}*2 + ?{Attribute} + 1]]cs<[[?{Ability} + ?{Attribute}]] ]] [[ d20cf<?{Attribute}cf>[[?{Ability}*2 + ?{Attribute} + 1]]cs<[[?{Ability} + ?{Attribute}]] ]]
= *Attribute ?{Attribute}*
*Ability ?{Ability}*
}} {{Reference
``L M H``
``[[d0cf0]] S S S``
``[[d0]] F * S``
``[[d0cs1cf1]] F F *``
``[[d0cs1cf0]] F F F`` =
View [WHQ] To-Hit Chart Macro
[[ [[2 + {3 - ?{Weapon Skill|1|2|3|4|5|6|7|8|9|10}, 0}kh1]] + {[[2 + [[{-1, 1}=?{Weapon Skill}]] + {?{Weapon Skill} - 7, 0}kh1]], [[3 + [[{1, 2, 2}=?{Weapon Skill}]] + {?{Weapon Skill} - 3, 0}kh1]], [[11 - 2 * {2, 2, 3, 3, 4}=?{Weapon Skill}]], [[11 - {-1, 3}=?{Weapon Skill}]]}<?{Defender's Weapon Skill|1|2|3|4|5|6|7|8|9|10} ]]