Skip to content

Commit

Permalink
Start adding custom damage types in for Dice-So-Nice to match PF2e da…
Browse files Browse the repository at this point in the history
…mage types.

Adds Electricity, Positive, Good

TODO: bleed, sonic, mental, negative, evil, chaotic, lawful
  • Loading branch information
JamzTheMan committed Jan 15, 2023
1 parent 9d5a5b0 commit d711a8c
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 1 deletion.
Binary file added images/dice/textures/bump/good.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dice/textures/bump/lightning.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dice/textures/good.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dice/textures/lightning.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/dice/textures/textures.psd
Binary file not shown.
3 changes: 2 additions & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"version": "4.0.3",
"esmodules": [
"/scripts/nerps-for-foundry.js",
"/scripts/hooks-for-nerps.js"
"/scripts/hooks-for-nerps.js",
"/scripts/damage-dice.js"
],
"styles": [
"/styles/nerps-for-foundry.css"
Expand Down
91 changes: 91 additions & 0 deletions scripts/damage-dice.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
Hooks.on('diceSoNiceReady', (dice3d) => {
// dice3d.addSystem({id: "PF2e Damage Dice", name: "PF2e Damage Dice"}, "default");

// /r 3d12[electricity], 3d6[electricity], 3d4[electricity]
dice3d.addTexture("Electricity", {
name: "Electricity",
composite: "multiply",
source: "modules/Nerps-For-Foundry/images/dice/textures/lightning.jpg",
bump: "modules/Nerps-For-Foundry/images/dice/textures/lightning.jpg"
}).then(() => {
dice3d.addColorset({
name: 'electricity',
description: "Electricity",
category: "Damage Types",
texture: 'Electricity',
foreground: '#FFFFFF',
background: "#e6e6e6",
outline: '#3b56ba',
edge: '#3b56ba',
material: 'metal',
font: '📱 Iceberg',
visibility: 'visible'
}, "default");
});

// /r 3d6[positive]
dice3d.addColorset({
name: "positive",
description: "Positive",
category: "Damage Types",
texture: "cloudy",
foreground: "#ffffff",
background: ["#d0e5ea", "#c3dee5", "#a4ccd6", "#8dafb7", "#80a4ad"],
outline: "black",
visibility: 'visible'
}, "default");

dice3d.addTexture("Good", {
name: "Good",
composite: "multiply",
source: "modules/Nerps-For-Foundry/images/dice/textures/good.jpg",
bump: "modules/Nerps-For-Foundry/images/dice/textures/good.jpg"
}).then(() => {
dice3d.addColorset({
name: 'good',
description: "Good",
category: "Damage Types",
texture: 'Good',
foreground: '#0e0434',
background: "#f7f497",
outline: '#62569f',
edge: '#ffffff',
material: 'metal',
font: 'Eczar',
visibility: 'visible'
}, "default");
});

// dice3d.addColorset({
// name: "good",
// description: "Good",
// category: "Damage Types",
// texture: "stone",
// foreground: "#FFD800",
// background: "#f6f6f3",
// outline: "#000000",
// visibility: 'visible'
// }, "default");

// dice3d.addTexture("icy", {
// name: "🐸 Streaks",
// composite: "overlay",
// source: "modules/lordudice/graphics/dice/icy.webp",
// bump: "modules/lordudice/graphics/dice/icy-bump.webp"
// })
// .then(() => {
// dice3d.addColorset({
// name: 'LCD - Streaks colors',
// description: "🐸 Streaks",
// category: "LCD - Forbidden Knowledge",
// background: "#033529",
// foreground: '#ffffff',
// outline: '#1f3322',
// edge: '#8c8c8c',
// texture: 'icy',
// material: 'metal',
// font: "Metal Mania"
// }, "default");
// });

});

0 comments on commit d711a8c

Please sign in to comment.