Added two tables to draw japanese names (1491 males names / 530 females names) & some Macros.

This commit is contained in:
Vlyan
2021-11-09 20:21:07 +01:00
parent d720b6ebef
commit ab3e900c9e
8 changed files with 50 additions and 6 deletions

View File

@@ -0,0 +1 @@
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><defs><style>.cls-1{fill:#4f4d4c;}.cls-1,.cls-10,.cls-12,.cls-8{stroke:#333;}.cls-1,.cls-10,.cls-8{stroke-linejoin:round;stroke-width:4px;}.cls-2{fill:#e6b790;}.cls-3{fill:#725948;}.cls-4{fill:#674e3d;}.cls-5{fill:#333;}.cls-6{fill:#526b99;}.cls-7{fill:#e1ae89;}.cls-10,.cls-12,.cls-8{fill:none;}.cls-12,.cls-8{stroke-linecap:round;}.cls-9{fill:#efc8a5;}.cls-11{fill:#cbbd95;}.cls-12{stroke-miterlimit:10;stroke-width:2px;}.cls-13{fill:#886b56;}.cls-14{fill:#7f6351;}</style></defs><title>traditiona-japanese-man</title><path class="cls-1" d="M78,14A14.38,14.38,0,0,1,64,28,14.38,14.38,0,0,1,50,14C50,6.59,56.57,4,64,4S78,6.59,78,14Z"/><path class="cls-2" d="M120.44,107.48a13.68,13.68,0,0,0-10.26-10.62c-20.61-5.23-16-3.73-30.18-8.73V74H48V89.1C33.89,92.9,39.13,91.52,17.67,97a14.55,14.55,0,0,0-10.11,11.4L7,112A140.9,140.9,0,0,0,64,124.1a139.49,139.49,0,0,0,57-12Z"/><path class="cls-3" d="M116,96,72,88H56L12,96,6,112A145.12,145.12,0,0,0,64,124.1,145.12,145.12,0,0,0,122,112Z"/><path class="cls-3" d="M116,96,72,88H56L12,96,6,112A145.12,145.12,0,0,0,64,124.1,145.12,145.12,0,0,0,122,112Z"/><path class="cls-4" d="M88,104l29.42-4.21L122,112a142.87,142.87,0,0,1-41.64,11.1Z"/><polygon class="cls-2" points="80 86.03 80 74.03 48 74.03 48 86.03 64 112 80 86.03"/><path class="cls-5" d="M78,18c0,7.42-6.57,10-14,10S50,25.45,50,18s6.57-9.3,14-9.3S78,10.59,78,18Z"/><path class="cls-6" d="M78,20c0,4.41-6.27,8-14,8s-14-3.59-14-8,6.27-9,14-9S78,15.61,78,20Z"/><polygon class="cls-7" points="48 74.03 48 82.03 71.09 102.06 80 88.03 80 74.03 48 74.03"/><polyline class="cls-8" points="48 86.03 48 74.03 80 74.03 80 86.03"/><path class="cls-9" d="M88,46V38c0-11.19-5.93-22-24-22S40,26.84,40,38v8c-3.56-.28-5,3-4,8,.63,3.71,2.51,8.51,6,10C42,69.23,48.6,84.2,64,84,79.46,84.2,86,69.24,86,64c3.47-1.49,5.4-6.29,6-10C93.05,49.05,91.56,45.75,88,46Z"/><path class="cls-2" d="M86,64c3.47-1.49,5.4-6.29,6-10,1-5-.44-8.28-4-8V38c0-11.19-5.93-22-24-22-.5,0-1,0-1.45.06-3.37,11.57-9.1,24.55-8.77,47,0,5.56,0,12.46.46,18.69A20.5,20.5,0,0,0,64,84C79.46,84.2,86,69.24,86,64Z"/><path class="cls-10" d="M88,46V38c0-11.19-5.93-22-24-22S40,26.84,40,38v8c-3.56-.28-5,3-4,8,.63,3.71,2.51,8.51,6,10C42,69.23,48.6,84.2,64,84,79.46,84.2,86,69.24,86,64c3.47-1.49,5.4-6.29,6-10C93.05,49.05,91.56,45.75,88,46Z"/><path class="cls-5" d="M54,50.89c1.38,0,2.5.78,2.5,1.74s-1.12,1.76-2.5,1.76-2.5-.79-2.5-1.76,1.12-1.74,2.5-1.74"/><path class="cls-5" d="M74.06,50.89c1.38,0,2.5.78,2.5,1.74s-1.12,1.76-2.5,1.76-2.5-.79-2.5-1.76,1.12-1.74,2.5-1.74"/><path class="cls-4" d="M40,104,10.58,99.82,6,112a142.87,142.87,0,0,0,41.64,11.1Z"/><path class="cls-11" d="M34.93,112.8l-4.41-2.55a1.34,1.34,0,0,0-1.37,0l-4.42,2.55A1.36,1.36,0,0,0,24,114v5.1l10.89,1.19a1.37,1.37,0,0,0,.69-1.19V114A1.36,1.36,0,0,0,34.93,112.8Z"/><path class="cls-11" d="M93.07,112.8l4.41-2.55a1.34,1.34,0,0,1,1.37,0l4.42,2.55A1.36,1.36,0,0,1,104,114v5.1l-10.89,1.19a1.37,1.37,0,0,1-.69-1.19V114A1.36,1.36,0,0,1,93.07,112.8Z"/><line class="cls-12" x1="60.01" y1="70.03" x2="68.01" y2="70.03"/><path class="cls-12" d="M60,64l2.2.6a5.55,5.55,0,0,0,3.6,0L68,64"/><line class="cls-12" x1="63.01" y1="74.03" x2="65.01" y2="74.03"/><path class="cls-5" d="M89.7,46.26A4,4,0,0,0,88,46V38c0-11.19-5.93-22-24-22S40,26.84,40,38v8a4,4,0,0,0-1.7.23c3.29,2.32,4.17,6.21,4.17,10.58A66.63,66.63,0,0,1,42,64.19a19.57,19.57,0,0,0,2.86,8.44l.35-.13a2.51,2.51,0,0,0,1.85-2.66,6.71,6.71,0,0,0-.11-1.09A46.86,46.86,0,0,1,46,60.16V51.09a18.9,18.9,0,0,1,1-6l.06-.19a18.9,18.9,0,0,0,1-6V36c0-2.31,3.54-4,6-4,4.12,0,5.67,4,10,4s5.88-4,10-4c2.46,0,6,1.69,6,4V39a18.9,18.9,0,0,0,1,6l.06.19a18.9,18.9,0,0,1,1,6v9.07a46.86,46.86,0,0,1-.94,8.59A6.71,6.71,0,0,0,81,69.84,2.51,2.51,0,0,0,82.8,72.5l.35.13A19.57,19.57,0,0,0,86,64.19a66.63,66.63,0,0,1-.48-7.35C85.53,52.47,86.41,48.58,89.7,46.26Z"/><path class="cls-8" d="M92,92l19.45,3.24a8,8,0,0,1,6.17,5.08L122,112A145.12,145.12,0,0,1,64,124.1,145.12,145.12,0,0,1,6,112l4.38-11.68a8,8,0,0,1,6.17-5.08L36,92"/><path class="cls-13" d="M64,124.1a147.16,147.16,0,0,0,16.33-1L92,92,82,82,57.82,123.94C59.89,124,62,124.1,64,124.1Z"/><path class="cls-14" d="M64,124.1a147.16,147.16,0,0,0,16.33-1L92,92l-6-6L63.8,124.09Z"/><path class="cls-8" d="M64,124.1a147.16,147.16,0,0,0,16.33-1L92,92,82,82,57.82,123.94C59.89,124,62,124.1,64,124.1Z"/><path class="cls-13" d="M64,124.1c2,0,4.11-.08,6.18-.16L46,82,36,92l11.67,31.11A147.16,147.16,0,0,0,64,124.1Z"/><path class="cls-14" d="M59.9,124,39.46,88.56,36,92l11.67,31.11C51.75,123.6,55.83,123.87,59.9,124Z"/><path class="cls-8" d="M64,124.1c2,0,4.11-.08,6.18-.16L46,82,36,92l11.67,31.11A147.16,147.16,0,0,0,64,124.1Z"/></svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@@ -0,0 +1,7 @@
{"_id":"6vRx8SlktnoCzQQu","name":"Draw 5 Ivory Kingdoms names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Ivory Kingdoms Names\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
{"_id":"Iz61B4h3iJwOC0Ob","name":"Draw 5 Ujik names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Ujik Names\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
{"_id":"Qm7cokBEhIvelmYt","name":"Draw 5 Qamarist names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Qamarist Names\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
{"_id":"THV4W2eAk96bj1MC","name":"Draw 5 Japanese names (male)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/traditional-japanese-man.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Japanese names Male\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
{"_id":"Yd0HRLOWSKm6YTUS","name":"Draw 5 Rokugani names","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Rokugani Names\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
{"_id":"Yk2naBrDnz8ZAVHR","name":"Draw 5 Japanese names (female)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/traditional-japanese-woman.svg","scope":"global","command":"game.l5r5e.HelpersL5r5e.drawManyFromPack(\"l5r5e.core-name-tables\", \"Japanese names Female\", 5);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}
{"_id":"ypfDGUS48dA2pkUB","name":"Open Character Sheet (linked actor)","type":"script","author":"Rv52pj6itbOX14wX","img":"systems/l5r5e/assets/icons/actors/character.svg","scope":"global","command":"game.user.character?.sheet.render(true);","folder":null,"sort":0,"permission":{"default":0},"flags":{}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -641,4 +641,28 @@ export class HelpersL5r5e {
};
/* eslint-enable no-undef */
}
/**
* Shortcut method to draw names to chat (private) from a table in compendium without importing it
* @param {String} pack Compendium name
* @param {String} tableName Table name in this compendium
* @param {String} retrieve How many draw we do
* @return {Promise<void>}
*/
static async drawManyFromPack(pack, tableName, retrieve = 5) {
const comp = await game.packs.get(pack);
if (!comp) {
console.log(`L5R5E | Pack not found[${pack}]`);
return;
}
if (!comp.indexed) {
await comp.getDocuments();
}
const table = await comp.getName(tableName);
if (!table) {
console.log(`L5R5E | Table not found[${tableName}]`);
return;
}
await table.drawMany(retrieve, { rollMode: "selfroll" });
}
}

View File

@@ -226,11 +226,18 @@
"system": "l5r5e"
},
{
"name": "pow-name-tables",
"name": "core-name-tables",
"label": "Name Tables",
"path": "packs/pow-name-tables.db",
"path": "packs/core-name-tables.db",
"entity": "RollTable",
"system": "l5r5e"
},
{
"name": "core-macros",
"label": "L5R5E Macros",
"path": "packs/core-macros.db",
"entity": "Macro",
"system": "l5r5e"
}
],
"languages": [