gurps icon indicating copy to clipboard operation
gurps copied to clipboard

Possibility to change the default dices, instead of 3d6, with a special d16 gurps with labels min : 3 max : 18 in dice so nice

Open Tango7777 opened this issue 3 years ago • 0 comments

Hello,

It is interesting to use a d16 with modified labels configured in dice so nice in order to have a flat probability curve in order to change the mood of the game. In conjunction with the configuration of a special gurps d16 made with Dice So Nice it would be nice to choose another dice for the gurps checks in the parameters, the special gurps d16. The gurps d16 has labels starting at 3 and finishing at 18.

This is the code that could be used in Dice so Nice, but it could be used in the gurps project only if it is possible to have it understood in the hard code.

Adding a custom DicePreset (dice faces) A custom DicePreset will override a default dice type when its system is selected in the "Dice So Nice" settings. Note: the texture files size have to be 256*256 pixels /**

  • Register a new dice preset
  • @param {Object} data: The informations on the new dice preset (see below)
  • @param {String} (Optional) shape: should be explicit when using a custom die term.
  •                               Supported shapes are d2,d4,d6,d8,d10,d12,d14,d16,d20,d24,d30
    

*/

/*dice3d.addDicePreset(data, shape=null) The data parameter has the following attributes: • type should be a registered dice term • labels contains either string (Unicode) or a path to a texture (png, gif, jpg, webp) • system should be a system ID previously registered • (Optional) colorset is the name of a colorset (either a custom one or from the DsN colorset list) • (Optional) font is the name of the font family. This can be a Webfont too. (ex: Arial, monospace, etc). This setting overwrites the colorset font setting • (Optional) fontScale is the scale of the font size (default: 1). This setting overwrite the colorset fontScale setting • (Optional) bumpMaps is an array of bumpMap textures that should follow the exact same order as labels • (Optional) values is an object with the min and max value on the die • (Optional) emissiveMaps is an array of emissive textures that should follow the exact same order as labels • (Optional) emissive is the color of the light (hexa code) emited by the dice. Default: 0x000000 (no light) / / The special Gurps d16 implementation for Dice So Nice */

dice3d.addDicePreset({ type: 'd16g', labels: ['3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18'], values: {min:3,max:18}, system: 'gurps' }, "d16");

dice3d.addSystem({id: "gurps", name: "gurps d16"}, "default"); /* Default will add the system as a choice left to each user.*/ https://gitlab.com/riccisi/foundryvtt-dice-so-nice/-/wikis/API/Customization#adding-a-custom-model-system-aka-dice-face-preset

Tango7777 avatar Feb 06 '22 15:02 Tango7777