this might seem a little nitpicky, but I find that this makes for a cleaner check result, without giving away levels of skill in chat for everyone to see (some players like to keep a hidden ace up their figurative sleeve, and as a DM I know I prefer to not let the players know the skill level of my npcs), which would change all your roll button values to match the example below: <button type="roll" value="/em rolls for @{character_name}'s dodge check\n/w gm [[3d6]] vs. [[@{dodge} + @{modifier}]]" name="roll_vsDodge" /> which looks like this in practice: (yes I know, that's two separate skills I've used in the same example, three, if you include the snippet above with the example code for a roll output but it would still look the same, honest) This way players do not see that actual numbers rolled, only the GM does, (as well as the player whispering the content to him) and everyone else only gets to know the relative success level of the roll. It also adds a nice little extra so that you know WHICH character is performing the skill or stat check, which I personally find useful. This method also allows a further addition to let the GM roll hidden checks, and still benefit from the script. With only a few minor changes, ( as detailed in bold below) the output for a secret roll is more like this, for total secrecy, with a macro as follows: (I have one for each stat on my hotbar, it makes for a much easier game experience if you can just click and point for a few secret checks.) /w gm rolls a ST check for @{target|character_name} /w gm [[3d6]] vs. [[@{target|ST}+?{modifier?|0}]] --w This is done by using the tag "--w" (yes, completely stolen formatting from powercards, another very useful and awesome script for gurps) which means the script will output its results as a whisper. Changes to script to work as above: var ENABLE_ROLL_PARSER = true; var COMMANDS = true; //["roll", "r"]; var rollCompWhisper = true; if (ENABLE_ROLL_PARSER) { on("chat:message", function(message) { if (message.content.indexOf("vs.") == -1) { // The GURPS will include the keyword "vs." in all rolls that should use roll comparison. // If the message doesn't include that word, we aren't interested. return; } if (message.inlinerolls.length < 2) { // We need at least two numbers to make a comparison. return; } if (message.content.indexOf("--w") == -1) { rollCompWhisper = false } // We'll take the first number to be the user's roll. var roll = message.inlinerolls[0].results.total; // We'll take the second number to be the target value. var target = message.inlinerolls[1].results.total; roll_comparison(roll, target) }); } if (COMMANDS && COMMANDS.length > 0) { on("chat:message", function(message) { if (message.type != "api") { // This function is only interested in API calls. return; }; log("ROLLCOMP/ Received "+message); var command; for (var i in COMMANDS) { if (message.content.indexOf("!"+COMMANDS[i]) == 0) { command = COMMANDS[i]; break; }; } if (command == undefined) { // No recognized command was found. return; } var content = message.content.substring(command.length+1); content = content.trim(); log(content); //var test = eval("3d6"); // We'll take the first number to be the user's roll. var roll = 2;//eval("3d6").results.total; // We'll take the second number to be the target value. var target = 5;//eval(content).results.total; roll_comparison(roll, target); }); } function roll_comparison(roll, target) { log("ROLLCOMP/ Compare "+roll+" vs "+target); // Calculate the difference between the rolls. var difference = target - roll; var result; if (roll == 3 || roll == 4 || (roll == 5 && target >= 15) || (roll == 6 && target >= 16)) { // CRITICAL SUCCESS! // 3 and 4 are always critical success. // 5 is a critical success if your effective skill is 15 or higher. // 6 is a critical success if your effective skill is 16 or higher. result = "Critical Success!"; } else if (roll == 18 || (target < 16 && roll == 17) || difference <= -10) { // CRITICAL FAILURE // 18 is always a critical failure. // 17 is a critical failure when your skill is 15 or less. // A roll of 10 over your effective skill is a critical failure. result = "Critical Failure!"; } else if (roll == 17 || difference < 0) { // FAILURE // 17 is always a failure. // A roll that exceeds your skill is a failure. result = "Failure by "+Math.abs(difference); } else if (difference >= 0) { // A roll that is equal to or lower than your skill is a success. result = "Success by "+difference; } log("ROLLCOMP/ "+result); if (rollCompWhisper) { sendChat("System", "/direct "+result); } else { sendChat("System", "/w GM "+result); rollCompWhisper = true } }