-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lots of lmop work in template & in family and sean worlds. Mostly cha…
…racter creations.
- Loading branch information
1 parent
7496725
commit e97cb1c
Showing
26 changed files
with
207 additions
and
236 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{"_id":"BSUjXhAm5kSuQtuJ","name":"Pause Game","type":"script","author":"ODY1ZmU3OWIzNzY2","img":"icons/svg/dice-target.svg","scope":"global","command":"game.togglePause(true, true)","folder":null,"sort":0,"permission":{"default":0,"ODY1ZmU3OWIzNzY2":3},"flags":{"combat-utility-belt":{"macroTrigger":""}}} | ||
{"_id":"MTU3YWIxNGEwNWY5","name":"Initiative","permission":{"default":2,"ODY1ZmU3OWIzNzY2":3},"type":"chat","sort":0,"flags":{},"scope":"global","command":"Initiative: @{selected|npcd_name}\n/roll 1d20 + @{selected|npcd_dex_mod} &{tracker}","author":"ODY1ZmU3OWIzNzY2","img":"modules/lmop-shared/macros/roll20_macro.png","actorIds":[]} | ||
{"_id":"Scy7Of1fQMxf6Vga","name":"Skeletons Appear","permission":{"default":0,"ODY1ZmU3OWIzNzY2":3},"type":"script","sort":100001,"flags":{},"scope":"global","command":"game.togglePause()\nlet tile = canvas.tiles.get(\"YjE1YTgwNTcyMjA4\")\ntile.update({\"hidden\" : false})","author":"ODY1ZmU3OWIzNzY2","img":"icons/svg/dice-target.svg","actorIds":[]} | ||
{"_id":"UI9bbgICtaaeSivX","name":"turn_defeated_into_loot","permission":{"default":0,"ODY1ZmU3OWIzNzY2":3},"type":"script","sort":100001,"flags":{"combat-utility-belt":{"macroTrigger":"o3vye983ffphivnf"},"exportSource":{"world":"lmop-kids","system":"dnd5e","coreVersion":"0.7.9","systemVersion":"1.2.0"}},"scope":"global","command":"(async () => {\n let defeated = canvas.tokens.placeables.filter(t => {\n return t.data.disposition === -1 && t.data.actorData.data?.attributes?.hp?.value <= 0\n });\n\n for (let token of defeated) {\n if (token.actor.data.type != 'npc')\n continue;\n\n let invalid = await token.getFlag(`world`,`lootyfied`) ? await token.getFlag(`world`,`lootyfied`) : false;\n if (invalid)\n continue;\n\n let newItems = token.actor.data.items.filter(item => {\n // Weapons are fine, unless they're natural.\n if (item.type == 'weapon') {\n return item.data.weaponType != 'natural';\n }\n // Equipment's fine, unless it's natural armor.\n if (item.type == 'equipment') {\n if (!item.data.armor)\n return true;\n return item.data.armor.type != 'natural';\n }\n // Item type blocklist.\n // Less intuitive than an allowlist,\n // but permits unknown module items.\n return !(['class', 'spell', 'feat'].includes(item.type));\n });\n\n // Change sheet to lootable, and give players permissions.\n let newActorData = {\n 'flags': {\n 'core': {\n 'sheetClass': 'dnd5e.LootSheet5eNPC'\n },\n 'lootsheetnpc5e': {\n 'lootsheettype': 'Loot'\n }\n },\n 'items': newItems,\n [`permission.default`]: 2\n };\n // Add proper currency info to the new data, if the actor needs it.\n if (undefined == token.actor.data.data.currency || token.actor.data.data.currency.cp == 0 ) // should be an object, not a number\n {\n newActorData['data.currency'] = {\n 'cp': { 'value': null },\n 'ep': { 'value': null },\n 'gp': { 'value': null },\n 'pp': { 'value': null },\n 'sp': { 'value': null }\n };\n }\n await token.actor.update(newActorData);\n await token.setFlag(`world`,`lootyfied`,true);\n }\n})();","author":"ODY1ZmU3OWIzNzY2","img":"icons/svg/dice-target.svg","actorIds":[]} | ||
{"_id":"Scy7Of1fQMxf6Vga","name":"Skeletons Appear","type":"script","author":"ODY1ZmU3OWIzNzY2","img":"icons/svg/dice-target.svg","scope":"global","command":"const update = game.actors.getName(\"Skeleton\").getActiveTokens().map(t => ({_id: t.id, hidden: false}));\ncanvas.scene.updateEmbeddedDocuments(\"Token\", update);","folder":null,"sort":100001,"permission":{"default":0,"ODY1ZmU3OWIzNzY2":3},"flags":{"combat-utility-belt":{"macroTrigger":""}}} | ||
{"_id":"TkTj0SiNr5ZIYADs","name":"!custom","type":"script","author":"ODY1ZmU3OWIzNzY2","img":"icons/svg/dice-target.svg","scope":"global","command":"(async ()=>{\n console.log(\"starting\");\n let processed = [];\n for(let iToken of canvas.tokens.placeables)\n {\n if (!iToken.data)\n {\n console.log(\"error: no token.data\");\n continue;\n }\n if (!iToken.data.name)\n {\n console.log(\"error: no token.data.name\");\n continue;\n }\n if (processed.indexOf(iToken.name) >= 0)\n {\n console.log(\"skipping \" + iToken.name);\n continue;\n }\n processed.push(iToken.name)\n console.log(\"token = \" + iToken.data.name);\n a = game.actors.getName(iToken.name);\n if (a == null)\n {\n console.log(\"no game actor found for \" + iToken.name);\n continue;\n }\n updateTokensForActorByName(iToken.name);\n }\n console.log(\"ending\");\n})();\n\nfunction updateTokensForActorByName(actorName)\n{\n a = game.actors.getName(actorName);\n const update = a.getActiveTokens().map(t => {\n if (t.name == a.data.token.name)\n {\n result = Object.assign({}, a.data.token);\n result._id = t.id;\n }\n else\n {\n result = {_id : t.id};\n }\n return result;\n });\n canvas.scene.updateEmbeddedDocuments(\"Token\", update);\n}","folder":null,"sort":0,"permission":{"default":0,"ODY1ZmU3OWIzNzY2":3},"flags":{"combat-utility-belt":{"macroTrigger":""}}} | ||
{"_id":"Z1PVcJrfjEqwC5zZ","name":"Remove Top Bar","permission":{"default":0,"ZjdmMWEyMmE2NzVk":3},"type":"script","folder":null,"sort":100000,"flags":{"combat-utility-belt":{"macroTrigger":""}},"scope":"global","command":"(async ()=>{\r\n console.log(\"starting\");\r\n for(let token of canvas.tokens.placeables)\r\n {\r\n if (!token.data)\r\n {\r\n console.log(\"error: no token.data\");\r\n continue;\r\n }\r\n if (!token.data.name)\r\n {\r\n console.log(\"error: no token.data.name\");\r\n continue;\r\n }\r\n console.log(\"token = \" + token.data.name);\r\n await token.update({ 'bar2.attribute' : 'None' });\r\n await token.update({ 'bar1.attribute' : 'attributes.hp' });\r\n }\r\n console.log(\"ending\");\r\n})();\r\n\r\n","author":"ZjdmMWEyMmE2NzVk","img":"icons/svg/dice-target.svg","actorIds":[]} | ||
{"_id":"Zkyhd4OHoorlpqks","name":"Redbrand Trapped Hallway","permission":{"default":0,"ODY1ZmU3OWIzNzY2":3},"type":"script","sort":100001,"flags":{},"scope":"global","command":"game.togglePause()\nlet tile = canvas.tiles.get(\"qM38okJKIFR3bcPB\")\ntile.update({\"hidden\" : false})","author":"ODY1ZmU3OWIzNzY2","img":"icons/svg/dice-target.svg","actorIds":[]} | ||
{"_id":"Zkyhd4OHoorlpqks","name":"Redbrand Trapped Hallway","type":"script","author":"ODY1ZmU3OWIzNzY2","img":"icons/svg/dice-target.svg","scope":"global","command":"game.togglePause(true, true)\nlet tile = canvas.scene.data.tiles.get(\"ZTE0NDkyNjlmYWQ1\")\ntile.update({\"hidden\" : false})","folder":null,"sort":100001,"permission":{"default":0,"ODY1ZmU3OWIzNzY2":3},"flags":{"combat-utility-belt":{"macroTrigger":""}}} | ||
{"_id":"ugYsDBEsytMqZZKH","name":"Goblin Ambush","type":"script","author":"ODY1ZmU3OWIzNzY2","img":"icons/svg/dice-target.svg","scope":"global","command":"(async ()=>{\n console.log(\"starting\");\n let found = false;\n let update = [];\n for(let iToken of canvas.tokens.placeables)\n {\n if (!iToken.data)\n {\n console.log(\"error: no token.data\");\n continue;\n }\n if (!iToken.data.name)\n {\n console.log(\"error: no token.data.name\");\n continue;\n }\n if (iToken.data.name != \"Goblin\")\n {\n continue;\n }\n if (!iToken.data.hidden)\n {\n continue;\n }\n console.log(\"token = \" + iToken.data.name);\n found = true;\n update.push(iToken);\n }\n if (found)\n {\n game.togglePause(true, true)\n canvas.scene.updateEmbeddedDocuments(\"Token\", update.map(t => ({_id: t.id, hidden: false})));\n }\n console.log(\"ending\");\n})();","folder":null,"sort":0,"permission":{"default":0,"ODY1ZmU3OWIzNzY2":3},"flags":{"combat-utility-belt":{"macroTrigger":""}}} |
Oops, something went wrong.