Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻

Rafi Ungar Silvyre

👨‍💻
View GitHub Profile
@Silvyre
Silvyre / ACCio.dat
Last active Dec 8, 2021
🧙🐑 AutoControl for Colonist.io (ACCio): play Colonist.io using your keyboard! Setup instructions in comments below.
View ACCio.dat
{"customEntities":{"script":[["1",{"name":"wall.js","value":{"mdTime":1638883633908,"srcCode":"await ACCio(_ => socketGameSend.buildCityWall());"}}],["2",{"name":"setup.js","value":{"mdTime":1638985755466,"srcCode":"ACCio = new Proxy(ACtl.runInPageCtx, {\n apply: (target, thisArg, argumentsList) => {\n if (['INPUT', 'TEXTAREA'].includes(document.activeElement.tagName)) {\n return;\n }\n try { target(...argumentsList); }\n catch {}\n }\n});\n\nawait ACCio(() => {\n NO_ATTR_ERR = { sent: false, msg: 'ACCio could not find the required Window attribute. If you are running the setup command manually, please make sure to set up the required Window attribute beforehand.' };\n});\n\nawait ACCio(() => {\n if (window.uiGameManager) {\n uiGameManager = window.uiGameManager;\n uiGameTradeInfoController = uiGameManager.eventController.uiGameMechanics[17];\n }\n else if (window.uiGameTradeInfoController) {\n uiGameTradeInfoController = window.uiGameTradeInfoController;\n uiGameManager = u
@Silvyre
Silvyre / [WFRP 1E] Standard Tests v2.3
Last active May 26, 2021
This macro contains HTML entities and therefore must be saved as an Ability. Required setup: 5 Rollable Tables (see comments below) and 10 Attributes (Cl, Dex, Fel, I, Int, Ld, M, S, T and WP). Employment and Gambling tests have been excluded.
View [WFRP 1E] Standard Tests v2.3
&{template:default} {{name=**WFRP Standard Test**}} <v2.3 by Silvyre> {{@{selected|token_name}'s ?{Test|Select one:, attempt to use this macro was [[ 1t[[[d3-3]]] ]] |
Animosity, attempt to resist animosity (@{selected|Cl}) ?{Modifiers&#124;None&#44; &#124;Customize&#44; + [a modifier of] &amp;#63;{Customize&amp;#124;0&amp;#125; &#125; was [[ 1t[[[{[[{[[floor((floor(@{selected|Cl} ?{Modifiers&#125;) - d100)/29.99)+1]]&#44;-2&#125;kh1]]&#44;2&#125;kl1]]] ]] |
Bargain, attempt to bargain (@{selected|Fel}) ?{Modifiers&#124;None&#44; &#124;Charm (+10%)&#44; [using Charm] +10&#124;Haggle (+10%)&#44; [using Haggle] +10&#124;Seduction (+10%)&#44; [using Seduction] +10&#124;Customize&#44; + [a modifier of] &amp;#63;{Customize&amp;#124;0&amp;#125; &#125; was [[ 1t[[[{[[{[[floor((floor(@{selected|Fel} ?{Modifiers&#125;) - d100)/29.99)+1]]&#44;-2&#125;kh1]]&#44;2&#125;kl1]]] ]] |
Bluff, attempt to bluff (@{selected|Fel}) ?{Modifiers&#124;None&#44; &#124;Acting (+15%)&#44; [using Acting] +15&#124;Charm (+10%)&#44; [using
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
@Silvyre
Silvyre / [Pendragon] Degrees of Success
Last active Sep 14, 2018
Please see comments below.
View [Pendragon] Degrees of Success
/em rolls [[ 1d20cs<[[ {?{Stat|10} + ?{Mod|0}, 0}kh1 ]]cf=[[ {?{Stat} + ?{Mod}, 0}kh1 ]]cf>[[ {20 - (?{Stat} + ?{Mod} - 20), 20}kl1 ]] + [[ {?{Stat} + ?{Mod} - 20, 0}kh1 ]] ]] vs. [[ {?{Stat} + ?{Mod}, 20}kl1 ]]+[[ {?{Stat} + ?{Mod} - 20, 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 [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]] ]]
@Silvyre
Silvyre / [MSHRPG] FEAT Roll
Last active Dec 18, 2017
Please see comments below.
View [MSHRPG] FEAT Roll
&{template:default} {{name=FEAT Roll
}} {{=**Rank ?{Rank|0}**
**Column [[ [[{{?{CS|0}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] ]]** *(?{CS}CS)*
}} {{Result:=[[ 1d100cf>[[100 - ({0,3,5,7}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] * ({0,3,5,7}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] + 1) - 2) / 2 - 5 * {9,11,13,15,16,17}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]]]]cf<[[{65 - 5 * [[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] + ({12,13,14}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] * ({12,13,14}<[[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {0,0}>1}kh1, {17} }kl1]] + 1)) / 2, 1+{0,0}>1}kh1]]cs<[[{95 - 5 * ([[{{?{CS}+{1,3,5,8,16,26,36,46,63,88,126,176,351,1e3,3e3,5e3}<?{Rank}, {
View [2d20] Skill Check
/r [[ {{ceil((?{Skill Check|15} - d20cs<?{Skill Check}cf<?{Focus|5}cf>20 + 1e-2) / (?{Skill Check} - ?{Focus})), {2}}kl1, {0}}kh1 ]] + [[ {{ceil((?{Skill Check} - d20cs<?{Skill Check}cf<?{Focus}cf>20 + 1e-2) / (?{Skill Check} - ?{Focus})), {2}}kl1, {0}}kh1 ]] ?{Dice Pool|
2d20, |
3d20, + [[ {{ceil((?{Skill Check&#125; - d20cs<?{Skill Check&#125;cf<?{Focus&#125;cf>20 + 1e-2) / (?{Skill Check&#125; - ?{Focus&#125;))&#44; {2&#125;&#125;kl1&#44; {0&#125;&#125;kh1 ]] |
4d20, + [[ {{ceil((?{Skill Check&#125; - d20cs<?{Skill Check&#125;cf<?{Focus&#125;cf>20 + 1e-2) / (?{Skill Check&#125; - ?{Focus&#125;))&#44; {2&#125;&#125;kl1&#44; {0&#125;&#125;kh1 ]] + [[ {{ceil((?{Skill Check&#125; - d20cs<?{Skill Check&#125;cf<?{Focus&#125;cf>20 + 1e-2) / (?{Skill Check&#125; - ?{Focus&#125;))&#44; {2&#125;&#125;kl1&#44; {0&#125;&#125;kh1 ]] |
5d20, + [[ {{ceil((?{Skill Check&#125; - d20cs<?{Skill Check&#125;cf<?{Focus&#125;cf>20 + 1e-2) / (?{Skill Check&#125; - ?{Focus&#125;))&#44; {2&#125;&#125;kl1&#44; {0&#125;&#
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[[