├── .github ├── FUNDING.yml └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature-request--generic-.md │ ├── new-edge-hindrance-ability-support.md │ └── new-effect-builder-power.md ├── .gitignore ├── .gitmodules ├── CHANGELOG.md ├── LICENSE ├── README.md ├── deprecated_macros.zip ├── deprecated_macros ├── (Un-)Shake (SWADE).js ├── (Un-)Shake (SWD).js ├── (Un-)Stun.js ├── Ability Converter.js ├── Ammo Management (enhanced).js ├── Ammo Management.js ├── BR2-Ammo_usage.js ├── Boost-Lower_Trait.js ├── Chase_Setup-0.7.10.js ├── Chase_Setup-0.8.9.js ├── Deviation.js ├── Fear Table.js ├── Loot-o-Mat.js ├── Mark Dead.js ├── Personal Health Centre.js ├── Power Point Management.js ├── Radiation Centre.js ├── Raise Calculator Dynamic.js ├── Raise Calculator Simple.js ├── Roll for Loot.js ├── RollTable Importer.js ├── Scale calculator.js ├── Shuffle Action Deck.js ├── Soak Damage.js ├── Spend Benny.js ├── Sprawlrunners - LP Calculator.js ├── Sprawlrunners - Payment Calculator.js ├── Token Vision v9.js ├── Token Vision.js ├── Update Actor owned items.js ├── benny_fixer.js ├── falling_damage.js ├── shape_changer.js └── tbd - Eat and Drink.js ├── documentation ├── API.md ├── Ammo Management Setup.md ├── Better Rolls 2 integration.md ├── Chase Scenes.md └── Sound Effects per actor.md ├── img ├── Active Effects │ └── ae_config.jpg ├── BR2_integration │ └── shooting_additional-stats.jpg ├── cub_setup │ ├── CUBAEs1.jpg │ ├── CUBConditionLab1.jpg │ ├── CUBConditionLab2.jpg │ ├── CUBConditionLab3.jpg │ ├── CUBConditionLab4.jpg │ ├── CUBPuter.jpg │ ├── CUBTriggler1.jpg │ └── CUBTriggler2.jpg ├── macros │ ├── Personal Health Centre.jpg │ ├── Power Point Management.jpg │ ├── Raise Calculator 1.jpg │ ├── Raise Calculator 2.jpg │ ├── Raise Calculator 3.jpg │ ├── Raise Calculator 4.jpg │ ├── Soaking Wounds.jpg │ ├── ammo_mgm │ │ ├── ammo_item.png │ │ ├── ammo_item_config.png │ │ ├── ammo_item_config_effect.png │ │ ├── ammo_mgm_loaded_effect.png │ │ ├── ammo_mgm_reload.png │ │ ├── ammo_mgm_shooting.png │ │ ├── weapon_ammo.png │ │ ├── weapon_config.png │ │ ├── weapon_config_general.png │ │ └── weapon_config_sfx.png │ ├── mighty_summoner.mov │ ├── mighty_summoner_showcase.gif │ ├── power_effect_builder_showcase.gif │ ├── power_effect_builder_showcase.webm │ ├── shape_changer.webm.mov │ └── shape_changer_showcase.gif ├── swim-banner.webp ├── swim-repository-preview.jpg └── swim_config │ └── actor_config.png ├── swim.zip └── swim ├── assets ├── banner.webp ├── chase_layouts │ ├── Chase Layout Attachment.pdf │ ├── backgrounds │ │ ├── car_chase-modern.webp │ │ ├── car_chase.webp │ │ ├── foot_chase-modern.webp │ │ ├── foot_chase.webp │ │ ├── ship_chase-modern.webp │ │ └── ship_chase.webp │ ├── chase_layout-foot_and_riding-modern.webp │ ├── chase_layout-foot_and_riding.webp │ ├── chase_layout-ground_vehicles-modern.webp │ ├── chase_layout-ground_vehicles.webp │ ├── chase_layout-ships-new.webp │ └── chase_layout-ships.webp ├── icons │ ├── effects │ │ ├── 0-summoned.svg │ │ ├── m-arcaneProtection.svg │ │ ├── m-beastFriend.svg │ │ ├── m-blind.svg │ │ ├── m-burden.svg │ │ ├── m-burrow.svg │ │ ├── m-concealArcana.svg │ │ ├── m-confusion.svg │ │ ├── m-damageField.svg │ │ ├── m-darksight.svg │ │ ├── m-deflection.svg │ │ ├── m-detectArcana.svg │ │ ├── m-disguise.svg │ │ ├── m-ease_burden.svg │ │ ├── m-elementalManipulation.svg │ │ ├── m-empathy.svg │ │ ├── m-environmentalProtection.svg │ │ ├── m-farsight.svg │ │ ├── m-growth.svg │ │ ├── m-intangibility.svg │ │ ├── m-mindLink.svg │ │ ├── m-puppet.svg │ │ ├── m-quickness.svg │ │ ├── m-reliefNumb.svg │ │ ├── m-shrink.svg │ │ ├── m-silence.svg │ │ ├── m-sloth.svg │ │ ├── m-slumber.svg │ │ ├── m-speakLanguage.svg │ │ ├── m-speed.svg │ │ ├── m-wallWalker.svg │ │ └── m-warriorsGift.svg │ ├── macros │ │ └── falling_sbed_game-icons.net.png │ └── misc │ │ ├── bullseye.svg │ │ ├── raise_black.svg │ │ ├── raise_green.svg │ │ ├── raise_red.svg │ │ ├── raise_yellow.svg │ │ └── rolling-dices.svg ├── imports │ ├── BR2-shooting-integration.json │ ├── BR2-spellcasting-integration.json │ ├── BR2-world_actions.json │ └── fvtt-JournalEntry-Attribute_Keys_for_Active_Effects.json ├── sfx │ ├── Body-Thud-altered-www.fesliyanstudios.com.ogg │ ├── Bone-Breaking-altered-www.fesliyanstudios.com.ogg │ ├── Campfire-sound-altered-Alexander-www.orangefreesounds.com.ogg.ogg │ ├── Dramatic-drum-hit-orangefreesounds.com.ogg │ ├── Drinking-Water-altered-www.fesliyanstudios.com.ogg │ ├── Fireball-Super-Quick-Whoosh-www.fesliyanstudios.com.ogg │ ├── Hard-Breathing-Medium-Pace-altered-www.fesliyanstudios.com.ogg │ ├── HeartBeat-sound-effect-2-altered-Alexander-www.orangefreesounds.com.ogg │ ├── Huh-converted-Alexander-www.orangefreesounds.com.ogg │ ├── Pain-sound-effect-converted-Alexander-www.orangefreesounds.com.ogg │ ├── Punch-altered-www.fesliyanstudios.com.ogg │ ├── Ripping-Flesh-altered-www.fesliyanstudios.com.ogg │ ├── Suspense_Sound_Effect_altered_-_David_Fesliyan-www.FesliyanStudios.com.ogg │ ├── night_vision_device-off.ogg │ ├── night_vision_device-on.ogg │ └── travel │ │ ├── airplane-sound-www.orangefreesounds.com-edited.ogg │ │ ├── car-engine-starting-a1-www.fesliyanstudios.com-edited.ogg │ │ ├── footsteps-in-grass-slow-b-www.fesliyanstudios.com-edited.ogg │ │ ├── horse-neighing-and-breathing-a-www.fesliyanstudios.com-edited.ogg │ │ ├── large-ship-air-horn-www.orangefreesounds.com-edited.ogg │ │ ├── ocean-waves-crashing-sound-effect-www.orangefreesounds.com-edited.ogg │ │ ├── propeller-plane-flying-www.orangefreesounds.com-edited.ogg │ │ ├── steam-train-whistle-www.orangefreesounds.com-edited.ogg │ │ └── subway-train-leaving-sound-effect-www.orangefreesounds.com-edited.ogg ├── svg │ └── clock.svg ├── token │ ├── sc_illusion_avatar.webp │ └── sc_illusion_token.webp └── travel │ ├── commercialJet.webp │ ├── earlyCar.webp │ ├── foot.webp │ ├── highSpeedFerry.webp │ ├── horse.webp │ ├── modernCar.webp │ ├── modernPassengerTrain.webp │ ├── modernShip.webp │ ├── propPlane.webp │ ├── sailingShip.webp │ ├── steamShip.webp │ └── steamTrain.webp ├── lang ├── de.json ├── en.json ├── pt_BR.json └── zh_Hans.json ├── module.json ├── packs ├── .gitattributes ├── chase-layouts │ ├── 000510.ldb │ ├── 000678.log │ ├── CURRENT │ ├── LOCK │ ├── LOG │ ├── LOG.old │ ├── MANIFEST-000677 │ └── lost │ │ ├── 000079.log │ │ ├── 000116.log │ │ ├── 000130.log │ │ ├── 000238.log │ │ ├── 000396.log │ │ ├── 000429.log │ │ ├── 000438.log │ │ ├── 000491.log │ │ ├── 000504.log │ │ ├── MANIFEST-000016 │ │ ├── MANIFEST-000053 │ │ ├── MANIFEST-000075 │ │ ├── MANIFEST-000128 │ │ ├── MANIFEST-000236 │ │ ├── MANIFEST-000394 │ │ ├── MANIFEST-000427 │ │ ├── MANIFEST-000436 │ │ ├── MANIFEST-000489 │ │ └── MANIFEST-000502 ├── swade-immersive-macros │ ├── 000457.ldb │ ├── 000625.log │ ├── CURRENT │ ├── LOCK │ ├── LOG │ ├── LOG.old │ ├── MANIFEST-000624 │ └── lost │ │ ├── 000183.log │ │ ├── 000341.log │ │ ├── 000376.log │ │ ├── 000385.log │ │ ├── 000451.log │ │ ├── MANIFEST-000181 │ │ ├── MANIFEST-000339 │ │ ├── MANIFEST-000374 │ │ ├── MANIFEST-000383 │ │ └── MANIFEST-000449 ├── swim-actor-folders │ ├── 000461.ldb │ ├── 000629.log │ ├── CURRENT │ ├── LOCK │ ├── LOG │ ├── LOG.old │ ├── MANIFEST-000628 │ └── lost │ │ ├── 000083.log │ │ ├── 000188.log │ │ ├── 000347.log │ │ ├── 000380.log │ │ ├── 000389.log │ │ ├── 000455.log │ │ ├── MANIFEST-000016 │ │ ├── MANIFEST-000055 │ │ ├── MANIFEST-000079 │ │ ├── MANIFEST-000186 │ │ ├── MANIFEST-000345 │ │ ├── MANIFEST-000378 │ │ ├── MANIFEST-000387 │ │ └── MANIFEST-000453 ├── swim-chase-cards │ ├── 000459.ldb │ ├── 000627.log │ ├── CURRENT │ ├── LOCK │ ├── LOG │ ├── LOG.old │ ├── MANIFEST-000626 │ └── lost │ │ ├── 000083.log │ │ ├── 000188.log │ │ ├── 000345.log │ │ ├── 000378.log │ │ ├── 000387.log │ │ ├── 000440.log │ │ ├── 000453.log │ │ ├── MANIFEST-000016 │ │ ├── MANIFEST-000055 │ │ ├── MANIFEST-000079 │ │ ├── MANIFEST-000186 │ │ ├── MANIFEST-000343 │ │ ├── MANIFEST-000376 │ │ ├── MANIFEST-000385 │ │ ├── MANIFEST-000438 │ │ └── MANIFEST-000451 └── swim-roll-tables │ ├── 000454.ldb │ ├── 000622.log │ ├── CURRENT │ ├── LOCK │ ├── LOG │ ├── LOG.old │ ├── MANIFEST-000621 │ └── lost │ ├── 000078.log │ ├── 000183.log │ ├── 000340.log │ ├── 000373.log │ ├── 000382.log │ ├── 000435.log │ ├── 000448.log │ ├── MANIFEST-000016 │ ├── MANIFEST-000052 │ ├── MANIFEST-000074 │ ├── MANIFEST-000181 │ ├── MANIFEST-000338 │ ├── MANIFEST-000371 │ ├── MANIFEST-000380 │ ├── MANIFEST-000433 │ └── MANIFEST-000446 ├── scripts ├── api.js ├── buttons.js ├── constants.js ├── gm_relay.js ├── helpers │ ├── adjust_scene_light.js │ ├── brsw_actions_setup.js │ ├── custom_effect_config.js │ └── raise-calculator.js ├── hooks │ ├── actor_hooks.js │ ├── brsw_hooks.js │ ├── combat_hooks.js │ └── effect_hooks.js ├── init.js ├── migrations.js ├── official_modules.js ├── settings-extender.js ├── settings.js ├── swim_document_config.js └── swim_modules │ ├── ammo_management.js │ ├── backlasher.js │ ├── chase_setup.js │ ├── combat_setup.js │ ├── common_bond.js │ ├── craft_campfire.js │ ├── deviation.js │ ├── dramatic_task_planner.js │ ├── effect_builder.js │ ├── falling_damage.js │ ├── fear_table.js │ ├── loot-o-mat.js │ ├── mark_dead.js │ ├── mighty-summoner.js │ ├── personal_health_centre.js │ ├── power_point_management.js │ ├── radiation_centre.js │ ├── scale_calculator.js │ ├── shape_changer.js │ ├── soak_damage.js │ ├── tester.js │ ├── token_vision.js │ ├── travel_calculator.js │ ├── unshake.js │ └── unstun.js └── templates ├── customConfig.hbs └── swim_document_config.hbs /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: SalieriC 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "[BUG] " 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. Windows 10] 28 | - Browser: [e.g. chrome, firefox] 29 | - FVTT Version: [e.g. 9.255] 30 | - SWADE System Version: [e.g. 1.0] 31 | - SWIM Version: [e.g. 0.17.0] 32 | - Other Modules enabled?: [yes/no, please provide a list, no need to list the dependencies of SWIM though] 33 | 34 | **Additional context** 35 | Add any other context about the problem here. 36 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request--generic-.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request (generic) 3 | about: Suggest a general idea for this project 4 | title: "[FEATURE] " 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-edge-hindrance-ability-support.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Edge/Hindrance/Ability Support 3 | about: Suggest the inclusion of an Edge/Hindrance/Ability. 4 | title: "[ABILITY SUPORT] " 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Edge/Hindrance/Ability** 11 | Please describe the edge/hindrance/ability in your own words. Do _not_ copy and paste its description here, that would be a copyright infringement for which I (SalieriC) can not be held accountable. 12 | Please only request edges/hindrances/abilities that SWIMs functionality currently handles (e.g. those that alter rolls to unshake, soak, etc.). 13 | 14 | **Setting** 15 | Please name the setting or source in which the edge/hindrance/ability is included. 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/new-effect-builder-power.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: New Effect Builder Power 3 | about: Suggest a new power to add to the Effect Builder 4 | title: "[NEW POWER] " 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Power** 11 | Please describe the power in your own words. Do _not_ copy and paste the powers description here, that would be a copyright infringement for which I (SalieriC) can not be held accountable. 12 | Please note that there is no need to list powers wit instant duration as those are not in the scope of the effect builder. 13 | 14 | **Modifiers** 15 | Please list the modifiers this power has if any. 16 | 17 | **Setting** 18 | Please name the setting or source in which the power is included. 19 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | template_code/dialogue_template.js 2 | planned 3 | img/swim-banner.psd 4 | swim/.vscode/launch.json 5 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/.gitmodules -------------------------------------------------------------------------------- /deprecated_macros.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/deprecated_macros.zip -------------------------------------------------------------------------------- /deprecated_macros/Ability Converter.js: -------------------------------------------------------------------------------- 1 | const updateItems = async function (folderName) { 2 | 3 | let abilityFolder = await game.folders.find(folder => folder.name === folderName && folder.type === 'Item') 4 | 5 | for (const item of abilityFolder.content) { 6 | await item.update({ type: 'ability', subtype: 'special' }) 7 | } 8 | 9 | for (const actor of game.actors) { 10 | for (const item of actor.items) { 11 | if (item.type === 'edge' || item.type === 'hindrance') { 12 | let specialAbility = await abilityFolder.content.find(ability => ability.name === item.name) 13 | 14 | if (typeof specialAbility !== 'undefined') { 15 | await item.update(specialAbility.data) 16 | } 17 | } 18 | } 19 | } 20 | await ui.notifications.info("Converting finished."); 21 | } 22 | 23 | new Dialog ({ 24 | title: 'Ability Converter', 25 | content: `

This will convert all Edges and Hindrances in a single folder to the new Ability type of SWADE 0.7.x and thus requires that version of the system.

26 |

Below you'll need to enter the name of the folder you wish to process. It must not contain any real Edges or Hindrances, only those you wish to become Special Abilities. It also must not contain sub-folders. Make a Backup before you continue!

27 |

After converting, the macro will convert all Edges and Hindrances on all actors with any of the names, the macro found in the given folder.

28 |
29 | 30 | 31 |
32 |
`, 33 | buttons: { 34 | one: { 35 | label: "Process.", 36 | callback: (html) => { 37 | let folderName = String(html.find("#folderName")[0].value); 38 | updateItems(`${folderName}`) 39 | } 40 | }, 41 | two: { 42 | label: "On second thought...", 43 | callback: (html) => {} 44 | } 45 | } 46 | // v.2.0.1 by 'Kristian Serrano#5077', dialogue by SalieriC#8263 47 | }).render(true); -------------------------------------------------------------------------------- /deprecated_macros/Chase_Setup-0.7.10.js: -------------------------------------------------------------------------------- 1 | //To be used with the included chase layouts. 2 | 3 | getRequirements(); 4 | 5 | function getRequirements() { 6 | let cardsList = ""; 7 | let defaultDeck = game.settings.get( 8 | 'swim', 'chaseDeck'); 9 | if (defaultDeck) { 10 | let defaultOption = game.tables.getName(`${defaultDeck}`) 11 | if (defaultOption) { 12 | cardsList += ``; 13 | } 14 | } 15 | //Filter tables to only include those likely to be set up. 16 | const options = game.tables.filter(t => 17 | t.name !== `${defaultDeck}` && ( 18 | t.name.includes(`Chase`) || 19 | t.name.includes(`Deck`) || 20 | t.name.includes(`Cards`)) 21 | ); 22 | Array.from(options).map((el) => { 23 | cardsList += `` 24 | }); 25 | 26 | let template = ` 27 |

Table to Draw From:

28 |

Number of Cards to Draw:

29 | `/*` 30 |

31 | Height: 32 | Width: 33 |

34 | `*/; 35 | new Dialog({ 36 | title: "Chase Layout Manager", 37 | content: template, 38 | buttons: { 39 | ok: { 40 | label: ` Draw`, 41 | callback: async (html) => { 42 | makeChase(html); 43 | }, 44 | }, 45 | reset: { 46 | label: ` Reset`, 47 | callback: async (html) => { 48 | resetChase(html); 49 | } 50 | }, 51 | cancel: { 52 | label: ` Cancel`, 53 | }, 54 | }, 55 | }).render(true); 56 | } 57 | 58 | async function makeChase(html) { 59 | let tableName = html.find("#tableName")[0].value; 60 | let cardsToDraw = html.find("#drawAmt")[0].value; 61 | let _height = 300; 62 | let _width = 200; 63 | if (cardsToDraw > 18) { 64 | ui.notifications.error("You can't set up more than 18 cards on this layout.") 65 | ui.notifications.notify("Setting up 18 cards instead.") 66 | cardsToDraw = 18; 67 | } 68 | 69 | let cardDraws = ( 70 | await game.tables 71 | .find((el) => el.data.name == tableName) 72 | .drawMany(cardsToDraw, { displayChat: false }) 73 | ).results; 74 | 75 | AudioHelper.play({ src: `systems/swade/assets/card-flip.wav` }, true); 76 | 77 | for (let i = 0; i < cardsToDraw; i++) { 78 | let xPosition = 500 + i % 9 * 200; 79 | let yPosition = (i > 8) ? 1500 : 1200; 80 | /*if (i > 8) { 81 | yStart = 1500; 82 | }*/ 83 | await Tile.create({ 84 | img: cardDraws[i].img, 85 | width: _width, 86 | height: _height, 87 | x: xPosition, 88 | y: yPosition, 89 | 'flags.swim.isChaseCard': true 90 | }); 91 | } 92 | } 93 | 94 | async function resetChase(html) { 95 | let tableName = html.find("#tableName")[0].value; 96 | const table = await game.tables.find((t) => t.data.name === tableName); 97 | table.reset(); 98 | AudioHelper.play({ src: `systems/swade/assets/card-flip.wav` }, true); 99 | /*const chaseCards = await canvas.scene.data.tiles.filter(t => t.flags?.swim?.isChaseCard === true); 100 | if (chaseCards.length) { 101 | for await (const card of chaseCards) { 102 | await card.delete(); 103 | }*/ 104 | const delete_ids = canvas.scene.data.tiles 105 | .filter(t => !!t.flags?.swim?.isChaseCard) 106 | .map(t => t._id); 107 | 108 | await canvas.scene.deleteEmbeddedEntity("Tile", delete_ids); 109 | ui.notifications.info(`All tiles from ${tableName} have been shuffled into the deck.`) 110 | //v.1.0.0 by SalieriC#8263, mildly inspired by a macro from brunocalado#1650, assisted by Kekilla#7036 111 | } 112 | -------------------------------------------------------------------------------- /deprecated_macros/Deviation.js: -------------------------------------------------------------------------------- 1 | const chatimage = "https://raw.githubusercontent.com/brunocalado/mestre-digital/master/Foundry%20VTT/Macros/Savage%20Worlds/icons/clock.webp"; 2 | 3 | /* 4 | (c): brunocalado; altered by SalieriC. 5 | icon: icons/weapons/artillery/cannon-engraved-gold.webp 6 | */ 7 | 8 | let coreRules = false; 9 | if (game.modules.get("swade-core-rules")?.active) {coreRules = true;} 10 | 11 | getRequirements(); 12 | 13 | function getRequirements() { 14 | let template = ` 15 |

Weapon Type

16 | 17 | 18 | 19 | 20 | 21 |
Projectile
22 |

Range

23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
Short
31 | `; 32 | new Dialog({ 33 | title: "Deviation", 34 | content: template, 35 | buttons: { 36 | ok: { 37 | label: "Go!", 38 | callback: async (html) => { 39 | rollForIt(html); 40 | }, 41 | } 42 | }, 43 | }).render(true); 44 | } 45 | 46 | function rollForIt(html) { 47 | const weapontype=html.find('input[name="weapontype"]:checked').val(); 48 | const range=html.find('input[name="range"]:checked').val(); 49 | let deviation; 50 | 51 | if (weapontype=='thrown') { 52 | deviation = diceRoll('1d6', range); 53 | } else { 54 | deviation = diceRoll('2d6', range); 55 | } 56 | } 57 | 58 | async function diceRoll(die, range) { 59 | const rangeMultiplier = rangeCheck(range); 60 | let direction = await new Roll('1d12').roll(); 61 | let roll = await new Roll(die).roll(); 62 | let message = `

Deviation

`; 63 | if (coreRules === true) {message = `

@Compendium[swade-core-rules.swade-rules.xxEcWExtn36PPxg0]{Deviation}

`;} 64 | message += `

Move the blast ${roll.total*rangeMultiplier}" to ${direction.total} O'Clock.

`; 65 | if (directionCheck(direction.total)) { 66 | message += `

A weapon can never deviate more than half the distance to the original target (that keeps it from going behind the thrower).

`; 67 | } 68 | message += `

`; 69 | if (coreRules === true) {message += `

`} 70 | 71 | let tempChatData = { 72 | //type: CHAT_MESSAGE_TYPES.ROLL, 73 | roll: roll, 74 | rollMode: game.settings.get("core", "rollMode"), 75 | content: message 76 | }; 77 | ChatMessage.create(tempChatData); 78 | return roll.total; 79 | } 80 | 81 | function rangeCheck(range) { 82 | if (range=='short') { 83 | return 1; 84 | } else if (range=='medium') { 85 | return 2; 86 | } else if (range=='long') { 87 | return 3; 88 | } else if (range=='extreme') { 89 | return 4; 90 | } 91 | } 92 | 93 | function directionCheck(direction) { 94 | console.log(direction); 95 | if (direction==4 || direction==5 || direction==6 || direction==7 || direction==8) { 96 | return true 97 | } else { 98 | return false 99 | } 100 | // v. 1.1.0 - Original code by brunocalado, modified by SalieriC#8263. 101 | // Image source: https://freesvg.org/analogue-clock-vector-graphics 102 | } -------------------------------------------------------------------------------- /deprecated_macros/Fear Table.js: -------------------------------------------------------------------------------- 1 | const dialog = new Dialog({ 2 | title: 'Fear', 3 | content: '
', 4 | default: 'roll', 5 | buttons: { 6 | roll: { 7 | label: 'Roll', 8 | callback: (html) => { 9 | let modifier = html.find('.fearTable input[name="fearModifier"]')[0].value; 10 | 11 | if (modifier === '') { 12 | modifier = 0; 13 | } 14 | 15 | modifier = parseInt(modifier); 16 | const roll = new Roll('1d20 + @mod', { mod: modifier }); 17 | let fearTableName = game.settings.get( 18 | 'swim', 'fearTable'); 19 | if (fearTableName) { 20 | game.tables.getName(`${fearTableName}`).draw({ roll }); 21 | } 22 | else { 23 | ui.notifications.error("Please set a Fear table name in the SWIM settings."); 24 | return; 25 | } 26 | let fearSFX = game.settings.get( 27 | 'swim', 'fearSFX'); 28 | if (fearSFX) { 29 | AudioHelper.play({ src: `${fearSFX}` }, true); 30 | } 31 | } 32 | } 33 | }, 34 | render: ([dialogContent]) => { 35 | dialogContent.querySelector(`input[name="fearModifier"`).focus(); 36 | }, 37 | default: "roll" 38 | // v.1.1.1 39 | }); 40 | dialog.render(true); -------------------------------------------------------------------------------- /deprecated_macros/Mark Dead.js: -------------------------------------------------------------------------------- 1 | /** 2 | * This macro will mark the selected token as dead. 3 | * If the selected token is dead, it will be marked 4 | as alive instead. 5 | * It requires CUB to be set up and Health Estimate. 6 | * Originally from Health Estimate, altered by SalieriC. 7 | */ 8 | 9 | //Set up 10 | let incapSFX = game.settings.get( 11 | 'swim', 'incapSFX'); 12 | if (token.actor.data.data.additionalStats.sfx) { 13 | let sfxSequence = token.actor.data.data.additionalStats.sfx.value.split("|"); 14 | incapSFX = sfxSequence[1]; 15 | } 16 | 17 | main(); 18 | 19 | async function main() { 20 | if (canvas.tokens.controlled.length === 0) { 21 | ui.notifications.error("Please select a token first"); 22 | return; 23 | } 24 | 25 | for (let e of canvas.tokens.controlled) { 26 | let hasAlive = !e.document.getFlag("healthEstimate", "dead") 27 | e.document.setFlag("healthEstimate", "dead", hasAlive) 28 | await succ.toggle_status(e, 'incapacitated', true) 29 | } 30 | ui.notifications.info("Marked as dead/alive."); 31 | AudioHelper.play({ src: `${incapSFX}` }, true); 32 | 33 | // v.3.1.0 34 | } -------------------------------------------------------------------------------- /deprecated_macros/Raise Calculator Dynamic.js: -------------------------------------------------------------------------------- 1 | let text = ` Your Raises will show here once you leave the Result field.`; 2 | 3 | new Dialog({ 4 | title: 'Raise Calculator', 5 | content: ` 6 |
7 |
8 | 9 | 10 |
11 |
12 | 13 | 14 |
15 |

${text}

16 |
`, 17 | buttons: {}, 18 | render: ([dialogContent]) => { 19 | dialogContent.querySelector(`input[name="target"`).focus(); 20 | dialogContent.querySelector(`input[name="result"`).addEventListener("input", (event) => { 21 | const textInput = event.target; 22 | const form = textInput.closest("form") 23 | const calcResult = form.querySelector(".calculation"); 24 | const target = form.querySelector('input[name="target"]').value; 25 | const result = form.querySelector('input[name="result"]').value; 26 | let raises = Math.floor((parseInt(result) - parseInt(target)) / 4); 27 | if (parseInt(target) > parseInt(result)) { 28 | calcResult.innerHTML = ` Failure`; 29 | } 30 | else if (parseInt(target) <= parseInt(result) && raises < 1) { 31 | calcResult.innerHTML = ` Success`; 32 | } 33 | else { 34 | calcResult.innerHTML = ` ${raises} Raise(s)`; 35 | } 36 | }); 37 | }, 38 | // v.1.2.1 By SalieriC#8263, with help from Rawny#2166. 39 | }).render(true); -------------------------------------------------------------------------------- /deprecated_macros/Raise Calculator Simple.js: -------------------------------------------------------------------------------- 1 | const template = ` 2 |
3 |
4 | 5 | 6 |
7 |
8 | 9 | 10 |
11 |
`; 12 | new Dialog({ 13 | title: 'Raise Calculator', 14 | content: template, 15 | buttons: { 16 | one: { 17 | label: 'Submit', 18 | callback: html => { 19 | let target = html.find('input[name="target"]').val(); 20 | let result = html.find('input[name="result"]').val(); 21 | const raises = Math.floor((parseInt(result) - parseInt(target)) / 4) 22 | if (parseInt(target) > parseInt(result)) { 23 | ui.notifications.notify(`Failure`); 24 | } 25 | else if (parseInt(target) <= parseInt(result) && raises < 1) { 26 | ui.notifications.notify(`Success`); 27 | } 28 | else { 29 | ui.notifications.notify(`${raises} Raise(s)`); 30 | } 31 | }, 32 | }, 33 | }, 34 | default: "one", 35 | render: ([dialogContent]) => { 36 | dialogContent.querySelector(`input[name="target"`).focus(); 37 | } 38 | // v.1.1.1 By SalieriC#8263, with help from Rawny#2166. 39 | }).render(true); -------------------------------------------------------------------------------- /deprecated_macros/Roll for Loot.js: -------------------------------------------------------------------------------- 1 | const tableID = `Enter_Loot_Table_Name_or_ID_here`; 2 | 3 | new Dialog({ 4 | title: 'Roll for loot', 5 | content: ` 6 |
7 |
8 | 9 | 10 |
11 |
`, 12 | buttons: { 13 | one: { 14 | label: `Roll for loot`, 15 | callback: (html) => { 16 | console.log(`start getting stuff`); 17 | let amount = Number(html.find("#amount")[0].value); 18 | game.tables.get(`${tableID}`).drawMany(amount); 19 | } 20 | }, 21 | }, 22 | render: ([dialogContent]) => { 23 | dialogContent.querySelector(`input[name="amount"`).focus(); 24 | dialogContent.querySelector(`input[name="amount"`).select(); 25 | }, 26 | default: "one" 27 | // v.1.0.1 by SalieriC#8263. 28 | }).render(true) -------------------------------------------------------------------------------- /deprecated_macros/RollTable Importer.js: -------------------------------------------------------------------------------- 1 | let tableName; 2 | 3 | async function main() { 4 | const contentFromClipboard = await navigator.clipboard.readText(); 5 | let allNames = contentFromClipboard.split("\n"); 6 | let allNamesDeduplicated = Array.from(new Set(allNames)) 7 | let number = allNamesDeduplicated.length 8 | let data = { name: `${tableName}`, formula: `1d${number}` }; 9 | var table = await RollTable.create(data); 10 | let tableData = [] 11 | 12 | for (let i = 0; i < allNamesDeduplicated.length; ++i) { 13 | let result = {}; 14 | result.type = 0; 15 | result.text = allNamesDeduplicated[i]; 16 | result.weight = 1; 17 | result.range = [i + 1, i + 1]; 18 | tableData.push(result) 19 | } 20 | await table.createEmbeddedDocuments("TableResult", tableData); 21 | 22 | await ui.notifications.notify(`RollTable with ${number} entries created as "${tableName}".`); 23 | } 24 | 25 | new Dialog({ 26 | title: "RollTable importer", 27 | content: `
28 |

This macro will import your current clipboard as a RollTable. Each result of your table must be a single line in your clipboard without leading numbers (1.; 2); 3:; etc).

29 |

The amount of lines will determine the dice formula with a weight of 1.

30 |

Example: If you have 100 lines in your table the formula will be 1d100.

31 |
32 | 33 | 34 |
35 |
`, 36 | buttons: { 37 | one: { 38 | icon: "", 39 | label: "Import", 40 | callback: (html) => { 41 | tableName = String(html.find("#name_of_table")[0].value); 42 | main(); 43 | } 44 | } 45 | }, 46 | default: "one", 47 | render: ([dialogContent]) => { 48 | dialogContent.querySelector(`input[name="name_of_table"`).focus(); 49 | dialogContent.querySelector(`input[name="name_of_table"`).select(); 50 | }, 51 | // v.2.0.1 Original by Tommycore#2125, v.2 by SalieriC#8263, with a little help from FloRad#2142. 52 | }).render(true) 53 | -------------------------------------------------------------------------------- /deprecated_macros/Scale calculator.js: -------------------------------------------------------------------------------- 1 | const chatimage = "icons/tools/hand/scale-balances-merchant-brown.webp"; 2 | 3 | /* Size Scale p106 SWADE 4 | 5 | source: https://raw.githubusercontent.com/brunocalado/mestre-digital/master/Foundry%20VTT/Macros/Savage%20Worlds/SizeScaleCalculator.js 6 | icon: icons/tools/hand/scale-balances-merchant-brown.webp 7 | */ 8 | 9 | let tokenActor = canvas.tokens.controlled[0]; 10 | let tokenTarget = Array.from(game.user.targets)[0]; 11 | let coreRules = false; 12 | if (game.modules.get("swade-core-rules")?.active) { coreRules = true; } 13 | 14 | if (tokenActor === undefined || tokenTarget === undefined) { 15 | ui.notifications.warn("You must select a token and target another one!"); 16 | } else { 17 | const actorSwat = token.actor.data.items.find(function (item) { 18 | return ((item.name.toLowerCase() === "swat") && item.type === "ability"); 19 | }); 20 | const targetSwat = tokenTarget.actor.data.items.find(function (item) { 21 | return ((item.name.toLowerCase() === "swat") && item.type === "ability"); 22 | }); 23 | rollForIt(); 24 | 25 | 26 | function rollForIt() { 27 | let actorSize = tokenActor.actor.data.data.stats.size; 28 | let targetSize = tokenTarget.actor.data.data.stats.size; 29 | let actorModifier = sizeToModifier(actorSize); 30 | let targetModifier = sizeToModifier(targetSize); 31 | let modifier = calc(actorModifier, targetModifier); 32 | 33 | let message = `

Size & Scale Calculator

`; 34 | if (coreRules === true) { 35 | message = `

@Compendium[swade-core-rules.swade-rules.mbP0fwcquD98QtwX]{Size & Scale} Calculator

`; 36 | } 37 | message += ``; 39 | message += `

Result:

`; 40 | if (modifier != 0) { 41 | message += ``; 48 | } else { message += `.` } 49 | if ((actorSwat && targetSwat) || (actorSwat || targetSwat)) { 50 | if (coreRules === true) { 51 | message += `

*@Compendium[swade-core-rules.swade-rules.q5sk5hEw6TED0FOU]{Swat}: Ignore up to 4 points of penalties from Scale for the specified action(s).

`; 52 | } else { 53 | message += `

*Swat: Ignore up to 4 points of penalties from Scale for the specified action(s).

`; 54 | } 55 | if (coreRules === true) { 56 | message += `
`; 57 | } 58 | } 59 | } else { 60 | message += `

There is no modifier. They have the same Scale.

`; 61 | } 62 | 63 | // send message 64 | let chatData = { 65 | user: game.user._id, 66 | content: message 67 | }; 68 | ChatMessage.create(chatData, {}); 69 | } 70 | 71 | function calc(actorModifier, targetModifier) { 72 | let diff; 73 | if (actorModifier == targetModifier) { 74 | return 0; 75 | } else { 76 | if (actorModifier < targetModifier) { 77 | diff = Math.abs(actorModifier) + Math.abs(targetModifier); 78 | return diff; 79 | } else { 80 | diff = Math.abs(actorModifier) + Math.abs(targetModifier); 81 | return -diff; 82 | } 83 | } 84 | } 85 | 86 | function sizeToModifier(size) { //p179 swade core 87 | if (size == -4) { 88 | return -6; 89 | } else if (size == -3) { 90 | return -4; 91 | } else if (size == -2) { 92 | return -2; 93 | } else if (size >= -1 && size <= 3) { 94 | return 0; 95 | } else if (size >= 4 && size <= 7) { 96 | return 2; 97 | } else if (size >= 8 && size <= 11) { 98 | return 4; 99 | } else if (size >= 12 && size <= 20) { 100 | return 6; 101 | } 102 | } 103 | // v. 1.0.0 - Original code by brunocalado, modified by SalieriC#8263. 104 | } -------------------------------------------------------------------------------- /deprecated_macros/Shuffle Action Deck.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Deprecated in favour of the systems native reshuffle button in the combat tracker. 3 | */ 4 | 5 | const table = game.tables.getName("Action Cards"); 6 | table.reset(); 7 | ui.notifications.info("Action Deck shuffled."); 8 | AudioHelper.play({ src: `systems/swade/assets/card-flip.wav` }, true); -------------------------------------------------------------------------------- /deprecated_macros/Spend Benny.js: -------------------------------------------------------------------------------- 1 | /* This macro will spend a benny for the selected token and gives an error message if there are none left. 2 | If the user is a GM, it will also spend GM bennies if he has some left but the token does not. 3 | If Dice So Nice is installed, it will also trigger the benny roll animation. */ 4 | 5 | main(); 6 | 7 | async function main() { 8 | // No Token is Selected 9 | if (!token || canvas.tokens.controlled.length > 1) { 10 | ui.notifications.error("Please select a single token first."); 11 | return; 12 | } 13 | 14 | // Checking for SWADE Spices & Flavours and setting up the Benny image. 15 | let bennyImage = "icons/commodities/currency/coin-embossed-octopus-gold.webp"; 16 | let benny_Back = game.settings.get('swade', 'bennyImage3DBack'); 17 | if (benny_Back) { 18 | bennyImage = benny_Back; 19 | } 20 | 21 | let bennies = token.actor.data.data.bennies.value; 22 | //Check for actor status and adjust bennies based on edges. 23 | let actorLuck = token.actor.data.items.find(function (item) { return (item.name.toLowerCase() === "luck") }); 24 | let actorGreatLuck = token.actor.data.items.find(function (item) { return (item.name.toLowerCase() === "great luck") }); 25 | if ((token.actor.data.data.wildcard === false) && (actorGreatLuck === undefined)) { 26 | if ((!(actorLuck === undefined)) && (bennies > 1) && ((actorGreatLuck === undefined))) { bennies = 1; } 27 | else { bennies = 0; } 28 | } 29 | 30 | // Non GM token has <1 bennie OR GM user AND selected token has <1 benny 31 | if ((!game.user.isGM && bennies < 1) || (game.user.isGM && bennies < 1 && game.user.getFlag("swade", "bennies") < 1)) { 32 | ui.notifications.error("You have no more bennies left.") 33 | return; 34 | } 35 | 36 | //Subtract the spend, use GM benny if user is GM and token has no more bennies left or spend token benny if user is player and/or token has bennies left. 37 | if (game.user.isGM && bennies < 1) { 38 | game.user.setFlag("swade", "bennies", game.user.getFlag("swade", "bennies") - 1) 39 | } else { 40 | token.actor.update({ 41 | "data.bennies.value": bennies - 1, 42 | }) 43 | } 44 | 45 | //Show the Benny Flip 46 | if (game.dice3d) { 47 | game.dice3d.showForRoll(new Roll("1dB").evaluate({ async: false }), game.user, true, null, false); 48 | } 49 | 50 | //Chat Message to let the everyone know a benny was spent 51 | ChatMessage.create({ 52 | user: game.user.id, 53 | content: `

${game.user.name} spent a Benny for ${token.name}.

`, 54 | }); 55 | // Code by Spacemandev#6256, idea and fixing the code by SalieriC#8263, Dice So Nice benny roll by javierrivera#4813. 56 | } -------------------------------------------------------------------------------- /deprecated_macros/Sprawlrunners - Payment Calculator.js: -------------------------------------------------------------------------------- 1 | let pcActorFolderID; 2 | let cryptos; 3 | let karma; 4 | let icons = [``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``, ``]; 5 | 6 | function numberWithCommas(cryptosSplit) { 7 | return cryptosSplit.toString().replace(/\B(?${randomIcon} Your payment has arrived!

Total Cryptos earned: ¢" + totalCryptosSplit + "

" 56 | + "

Total Karma earned: ☯" + karmaTotal + "

"; 57 | 58 | ChatMessage.create(chatData, {}); 59 | } 60 | new Dialog({ 61 | title: 'Mission Rewards', 62 | content: `

Here you can reward player characters with their mission rewards.

63 |

Please provide the folder names where the current Group of PCs are located.

64 |

Make sure the folder name is unique to work properly.

65 |

The Cryptos will be split evenly amongst all players.

66 |
67 |
68 | 69 | 70 |
71 |
72 | 73 | 74 |
75 |
76 | 77 | 78 |
79 |
`, 80 | buttons: { 81 | one: { 82 | label: `Submit`, 83 | callback: (html) => { 84 | let pcActorFolder = String(html.find("#name_of_pc_folder")[0].value); 85 | cryptos = Number(html.find("#cryptos")[0].value); 86 | karma = Number(html.find("#karma")[0].value); 87 | pcActorFolderID = game.folders.getName(`${pcActorFolder}`).data.id; 88 | calc(); 89 | } 90 | }, 91 | }, 92 | default: "one" 93 | }).render(true) -------------------------------------------------------------------------------- /deprecated_macros/Update Actor owned items.js: -------------------------------------------------------------------------------- 1 | //Created by 🌈Kandashi (He/Him)🌈#6698; minor addition by SalieriC#8263 2 | 3 | //dialog to ask for compendium 4 | 5 | //dialog to ask for item from compendium 6 | 7 | //confirmation dialog - make sure make sure 8 | 9 | //search items directory for same item & update 10 | //search actors directory for same item on actors & update 11 | //search each canvas for tokens whose actors have same items on actors & update 12 | 13 | compendium_dialog(); 14 | 15 | 16 | function compendium_dialog() { 17 | let confirmed = false; 18 | let packs = game.packs.filter(p => (game.user.isGM || !p.private) && p.entity === "Item"); 19 | let dialog_content = ` 20 |

Choose Compendium

21 |
22 | 23 |
`; 28 | 29 | new Dialog({ 30 | title: ``, 31 | content: dialog_content, 32 | buttons: 33 | { 34 | one: 35 | { 36 | icon: ``, 37 | lable: "Continue", 38 | callback: () => confirmed = true 39 | }, 40 | two: 41 | { 42 | icon: ``, 43 | lable: "Cancel", 44 | callback: () => confirmed = false 45 | } 46 | }, 47 | default: "Cancel", 48 | close: html => { 49 | if (confirmed) { 50 | let selection_id = html.find(`[name=comp]`)[0].value; 51 | item_dialog(selection_id); 52 | } 53 | } 54 | }).render(true); 55 | } 56 | 57 | async function item_dialog(selection_id = "") { 58 | let pack = game.packs.get(selection_id); 59 | let packContent = await pack.getContent(); 60 | 61 | for (let item of packContent){ 62 | 63 | update_ItemDirectory(item); 64 | update_ItemActors(item); 65 | update_ItemScenes(item); 66 | } 67 | await ui.notifications.notify(`All Actors have been updated. Please refresh now.`); 68 | } 69 | 70 | async function update_ItemDirectory(item) { 71 | let items = game.items.filter(i => i.name === item.name); 72 | for (let i of items) { 73 | await i.update(item.data); 74 | } 75 | } 76 | 77 | async function update_ItemActors(item) { 78 | for (let a of game.actors) { 79 | for (let i of a.items) { 80 | if (item.name === i.name) { 81 | await i.update(item.data); 82 | } 83 | } 84 | } 85 | } 86 | 87 | async function update_ItemScenes(item) { 88 | for (let s of game.scenes) { 89 | for (let t of s.data.tokens) { 90 | if (!t.actorLink) { 91 | for (let i of t.actorData.items) { 92 | if (i.name === item.name) { 93 | await i.update(item.data); 94 | } 95 | } 96 | } 97 | } 98 | } 99 | } -------------------------------------------------------------------------------- /deprecated_macros/benny_fixer.js: -------------------------------------------------------------------------------- 1 | /* 2 | V.1.0.0 3 | This macro will check all actors in your current world and set all non wild card actors' 4 | max and current Bennies to 0 unless they have edges that may alter this. The macro comes 5 | with a list of edges in english but can be extended with edges from other languages or 6 | other settings in Line 16 of this macro. 7 | The max and current Bennies will be set to the amount of edges found on that actor. 8 | Please note that it looks for Special Abilities as well, so you can populate the 9 | `const edgeNames` with Special Abilities as well. 10 | This macro WILL fail if requirements are not present on the actor. So if it finds Great Luck but 11 | not Luck for example, it will only set the Bennies to 1. 12 | */ 13 | 14 | let actors = game.actors; 15 | for (let actor of actors) { 16 | const edgeNames = ['luck', 'great luck', 'luck, great', 'luck (imp)']; 17 | const edges = actor.data.items.filter(function (item) { 18 | return edgeNames.includes(item.name.toLowerCase()) && (item.type === "edge" || item.type === "ability"); 19 | }); 20 | if (actor.data.data.wildcard === false && edges.length === 0) { 21 | await actor.update({"data.bennies.max": 0}); 22 | await actor.update({"data.bennies.value": 0}); 23 | } 24 | else if (actor.data.data.wildcard === false && edges.length > 0) { 25 | let amount = edges.length; 26 | await actor.update({"data.bennies.max": amount}); 27 | await actor.update({"data.bennies.value": amount}); 28 | } 29 | } -------------------------------------------------------------------------------- /deprecated_macros/tbd - Eat and Drink.js: -------------------------------------------------------------------------------- 1 | main() 2 | 3 | async function main() { 4 | console.log("Tokens: ", canvas.tokens.controlled) 5 | if (canvas.tokens.controlled.length == 0) { 6 | ui.notifications.error("Selecione um token"); 7 | return; 8 | } 9 | let actor = canvas.tokens.controlled[0].actor 10 | 11 | //are there any ration? 12 | for (const i of actor) { 13 | console.log("Actor: ", actor); 14 | let racao = i.items.find(item => item.data.name == "Rações") 15 | if (racao == null || racao == undefined) { 16 | ChatMessage.create({ content: i.name + " não possui rações suficientes" }); 17 | return; 18 | } 19 | else { 20 | //subtracting the ration 21 | for (const i of racao) { 22 | await i.update({ "data.quantity": racao.data.data.quantity - 1 }) 23 | if (i.data.data.quantity < 1) { 24 | i.delete(); 25 | return; 26 | } 27 | } 28 | await ChatMessage.create({ content: token.name + " consumiu uma ração." }); 29 | } 30 | } 31 | } -------------------------------------------------------------------------------- /documentation/API.md: -------------------------------------------------------------------------------- 1 | # SWIM API 2 | As of version 0.15.0 SWIM features an ever expanding API which allows users to make use of some of its functions. Especially worth mentioning being all the (former) macros SWIM had. These are now backed into the module directly and their functions are exposed, meaning you can access them in macros and your own module directly. 3 | All functions are asynchronous. 4 | 5 | ## Helper Functions 6 | Especially useful for macro and module devs may be the following helper functions: 7 | 8 | ### Get Macro Variables 9 | Macros get a number of variables from FVTT core directly, namely `speaker`, `character`, `actor` and `token`. These are usually not available in other contexts however which is why SWIM offers a simple way to get them: 10 | `swim.get_macro_variables()` 11 | Returns the four variables available in script macros. Best used like this: 12 | `const { speaker, character, actor, token } = await swim.get_macro_variables()` 13 | 14 | ### Critfail Check 15 | Checks if a roll made was a critical failure. 16 | `swim.critFail_check(wildcard, roll)` 17 | - `wildcard` {boolean}: Wild Card status of the character that made the roll. If `false` it will make another roll `1d6x` according to the SWADE core rules, if `true` the script will just compare the both dice. 18 | - `roll` {object}: The roll that was made and needs to be checked for a critfail. 19 | It returns `true` in case of a critfail or `false` if not. 20 | **Warning:** Currently doesn't support rolls with multiple trait dice. Feeling advantures? Make a Pull Request to fix it. =) 21 | 22 | ### Get Benny Image 23 | Returns the file path of the *back side* of the benny configured in the SWADE core settings. 24 | `swim.get_benny_image()` 25 | 26 | ### Check Bennies 27 | Checks the passed token for available Bennies. 28 | `swim.check_bennies(token)` 29 | - `token` {object}: The token you want to check for Bennies. 30 | Returns `{ tokenBennies, gmBennies, totalBennies }`. 31 | - `tokenBennies` {number}: The amount of Bennies the *token* has. 32 | - `gmBennies` {number}: The amount of Bennies the *GM* has, *if* the function is executed from a GMs account. 33 | - `totalBennies` {number}: The amount of Bennies the *player* has for that specific token (token Bennies + GM Bennies if executed by a GM). 34 | It assumes that non Wild Cards have 0 Bennies and checks for `Luck` and `Great Luck` set up as Edges to apply additional Bennies. You have more Edges/Special Abilities that add Bennies? Create an issue and I'll include them. 35 | 36 | ### Spend Benny 37 | Checks for avvailable Bennies first (see above) and spends one if available. If the token has none and the player is a GM, it spends a GM Benny. 38 | `swim.spend_benny(token, message)` 39 | - `token` {object}: The token for which a Benny shall be spent. 40 | - `message` {boolean}: If `true` a chat message will be created that notifies about the spent Benny. 41 | Note that the game will show the benny flip if DiceSoNice! is active. 42 | 43 | ### Is First GM 44 | Checks whether or not the player in question is the first GM that is logged in and returns `true` if that is the case. 45 | `swim.is_first_gm()` 46 | This is especially useful for developers who want to relay some code to GMs to execute code that cannot be executed by player accounts (i.e. to alter actors the player does not own). The function effectively prevents execution of the code multiple times if more than one GM is logged in. 47 | 48 | ### Wait 49 | Wait a specified amount of *mili*seconds before executing the rest of the script. Especially useful for sound and video effects to not play at the same time. It *needs* to be awaited. 50 | `swim.wait(ms)` 51 | - `ms` {number}: The amount of time to pause script execution in miliseconds. 52 | This is basically a planned delay in script execution. Use it responsibly, too large numbers can make one think your script is laggy. 53 | 54 | ### Get official class 55 | This returns the proper html div tag for the installed an active rules compendium module. 56 | `swim.get_official_class()` 57 | It currently supports the Savage Worlds Pathfinder, Deadlands, Sprawlrunners and SWADE Core modules in this priority order. This means that the divider will be used whichever is first in the aformentioned list if multiple are activated. So if you were to use Deadlands and SWADE Core in your world, the function would return the Deadlands class. 58 | 59 | ### Get Actor SFX 60 | Gets and returns all the SFX file paths from an actor. Will return the default ones if the paths are not found or labeled `NULL` (*case sensitive*). (There currently only is a default one for becoming shaken, thus the other will returned as `undefined`.) 61 | `swim.get_actor_sfx(actor)` 62 | - `actor` {object}: The actor on which to search the sfx file paths. 63 | Returns the four sfx file paths. Best used like this: 64 | `const { shakenSFX, deathSFX, unshakeSFX, soakSFX } = await swim.get_actor_sfx(actor)` 65 | 66 | ### Play SFX 67 | This just plays the sfx with the provided settings for everyone. 68 | `swim.play_sfx(sfx, volume, playForAll)` 69 | - `sfx` {string}: The file path to the audio file. 70 | - `volume` {number}: The volume level on which to play the audio between 0 and 1. Will use default settings of SWIM if undefined. 71 | - `playForAll` {boolean}: Determines whether or not the SFX should be played for everyone (true) or just the current user (false). It defaults to true. 72 | 73 | ## Feature Functions 74 | The following functions present the core features of SWIM. They are probably less useful for macro and module devs but presented here anyway in case you want to utilise them. 75 | Note that all of them except the BR2 ones get the macro variables (see above) first, so they really only work on selected token(s). The BR2 ones need the BR2 variables passed to function. 76 | 77 | TBD. -------------------------------------------------------------------------------- /documentation/Chase Scenes.md: -------------------------------------------------------------------------------- 1 | # Chase Layouts 2 | In SWIM included is a set of scenes for use with the Chase Setup macro. The macro will automatically place the cards on the correct position of the chase layout and can also shuffle them back in your card deck. Setting up a chase thus becomes a matter of seconds with only the click on a button inside the macro. 3 | As with the Rest of the module these layouts are licensed under the [Savage Worlds Fan License](https://www.peginc.com/licensing/). But these scenes contain detailed information about specific rulings, thus I asked Shane Lacy Hensley for permission to publish these. I was given permission to do so under the Fan License. Please note that this permission may be revoked by PEG at any time. Should this happen I will remove these layouts from this module and replace them with generic ones that do not contain any rulings. 4 | In the module settings you can set up a default deck of cards to draw from but you can still choose another deck if you like. The roll table must have the images of cards as Journal Entries in it. If you're now sure, just duplicate the action deck from the system and rename it to "Chase Deck". 5 | 6 | ## Custom Fonts 7 | The layouts use the following fonts: 8 | - Arial (included in Windows 10) 9 | - Myriad Pro (included in Windows 10) 10 | - [Good Times](https://www.dafont.com/good-times.font) 11 | - [Rumburak](https://www.dafont.com/rumburak.font) 12 | These fonts are used with permission and mentioned here for credit and reference. I am not responsible for any contents of the websites behind those links above. At the time of writing this (2021-07-05) I couldn't find any illegal contents of these sites. The EULA of the relevant fonts can be found in their respective download. 13 | 14 | ## Setting up a custom background 15 | You can set up a custom background for these layouts by simply editing the scenes background image. By doing this however, the scenes properties may change. **It is of utmost importancy to keep the original properties.** These are as follows: 16 | ### Scene Dimensions 17 | - **Width:** 1956 pixels 18 | - **Height:** 1415 pixels 19 | ### Grid Configuration 20 | - **Grid Type:** Square 21 | - **Grid Size:** 100 pixels 22 | - **Offset Background:** 78 horizontal and 10 vertical 23 | You *must not* change these properties, otherwise the macro will be unable to place your cards in the correct position. Foundry VTT may change your Scene Dimensions on setting up another background image, so double check that the original values keep in place. 24 | 25 | ## Editing the layouts 26 | You can edit these layouts manually by opening them in an image editor like GIMP or PhotoPea. I can not and will not provide the original files but by adding your own background image in such an editor will avoid conflicts with changing scene dimensions. 27 | 28 | ## License information 29 | You may *not* - under any circumstances - redistribute these layouts, especially not in another module. I may decide to allow this on a case decision, please ask before. The layouts are thus not covered by the GPL-3.0 license the rest of the module falls under. -------------------------------------------------------------------------------- /documentation/Sound Effects per actor.md: -------------------------------------------------------------------------------- 1 | # Sound Efects per actor 2 | SWIM enables you to have different sound effects (SFX) for each actor in your game. Utilising this you can make a dying goblin sound different than a dying dragon for example. 3 | 4 | ## Setting up actor SFX 5 | Setting sound effects up is easy: 6 | 1. Navigate to the SWADE system settings and open the Setting Configuration Options. 7 | 2. Click on the Additional Stats tab. 8 | 3. Create a new additional stat for actors. 9 | 4. The Stat Key *must* be "sfx" (without quotation marks, and all lower case). Name may be anything, Data Type *must* be "Text". 10 | 5. Save your changes. 11 | 12 | Now, you can enable this additional stat on any actor in your game world. In the resulting text field paste the SFX file paths modified like so: 13 | `path/to/injuredSFX.ogg|path/to/deathSFX.mp3|path/to/unshakeSFX.ogg|path/to/soakSFX.mp3` 14 | File extension can be anything a sound file can be, `.mp3` and `.ogg` are just examples. File paths need to be relative to your data folder (when in doubt use a new playlist file to find the file path). The file paths *must* be seperated by the pipe symbol `|`. 15 | I hope to find a way to set up the sounds in a more user friendly way in the future, if I do, I'll write a migration script so non of your set up now will be in vain. 16 | 17 | ## Using actor SFX 18 | The SFX will be found automatically when using the macros (i.e. the Unshake macro) and played accordingly. If the SFX for a specific actor is set up, it will overwrite the standard settings in the SWIM configuration. If you don't set the file paths up, SWIM will use its default values. 19 | 20 | ## Where do I get so many SFX? 21 | That's the difficult part here. I suggest looking at mods for various games. You're often free to use these which come with the mod, for private purposes at least. But please check if you are allowed to do so first. I cannot be held responsible for your failure to check permissions that may or may not be granted to you. -------------------------------------------------------------------------------- /img/Active Effects/ae_config.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/Active Effects/ae_config.jpg -------------------------------------------------------------------------------- /img/BR2_integration/shooting_additional-stats.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/BR2_integration/shooting_additional-stats.jpg -------------------------------------------------------------------------------- /img/cub_setup/CUBAEs1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/cub_setup/CUBAEs1.jpg -------------------------------------------------------------------------------- /img/cub_setup/CUBConditionLab1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/cub_setup/CUBConditionLab1.jpg -------------------------------------------------------------------------------- /img/cub_setup/CUBConditionLab2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/cub_setup/CUBConditionLab2.jpg -------------------------------------------------------------------------------- /img/cub_setup/CUBConditionLab3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/cub_setup/CUBConditionLab3.jpg -------------------------------------------------------------------------------- /img/cub_setup/CUBConditionLab4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/cub_setup/CUBConditionLab4.jpg -------------------------------------------------------------------------------- /img/cub_setup/CUBPuter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/cub_setup/CUBPuter.jpg -------------------------------------------------------------------------------- /img/cub_setup/CUBTriggler1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/cub_setup/CUBTriggler1.jpg -------------------------------------------------------------------------------- /img/cub_setup/CUBTriggler2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/cub_setup/CUBTriggler2.jpg -------------------------------------------------------------------------------- /img/macros/Personal Health Centre.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/Personal Health Centre.jpg -------------------------------------------------------------------------------- /img/macros/Power Point Management.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/Power Point Management.jpg -------------------------------------------------------------------------------- /img/macros/Raise Calculator 1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/Raise Calculator 1.jpg -------------------------------------------------------------------------------- /img/macros/Raise Calculator 2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/Raise Calculator 2.jpg -------------------------------------------------------------------------------- /img/macros/Raise Calculator 3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/Raise Calculator 3.jpg -------------------------------------------------------------------------------- /img/macros/Raise Calculator 4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/Raise Calculator 4.jpg -------------------------------------------------------------------------------- /img/macros/Soaking Wounds.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/Soaking Wounds.jpg -------------------------------------------------------------------------------- /img/macros/ammo_mgm/ammo_item.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/ammo_item.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/ammo_item_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/ammo_item_config.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/ammo_item_config_effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/ammo_item_config_effect.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/ammo_mgm_loaded_effect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/ammo_mgm_loaded_effect.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/ammo_mgm_reload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/ammo_mgm_reload.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/ammo_mgm_shooting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/ammo_mgm_shooting.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/weapon_ammo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/weapon_ammo.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/weapon_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/weapon_config.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/weapon_config_general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/weapon_config_general.png -------------------------------------------------------------------------------- /img/macros/ammo_mgm/weapon_config_sfx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/ammo_mgm/weapon_config_sfx.png -------------------------------------------------------------------------------- /img/macros/mighty_summoner.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/mighty_summoner.mov -------------------------------------------------------------------------------- /img/macros/mighty_summoner_showcase.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/mighty_summoner_showcase.gif -------------------------------------------------------------------------------- /img/macros/power_effect_builder_showcase.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/power_effect_builder_showcase.gif -------------------------------------------------------------------------------- /img/macros/power_effect_builder_showcase.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/power_effect_builder_showcase.webm -------------------------------------------------------------------------------- /img/macros/shape_changer.webm.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/shape_changer.webm.mov -------------------------------------------------------------------------------- /img/macros/shape_changer_showcase.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/macros/shape_changer_showcase.gif -------------------------------------------------------------------------------- /img/swim-banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/swim-banner.webp -------------------------------------------------------------------------------- /img/swim-repository-preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/swim-repository-preview.jpg -------------------------------------------------------------------------------- /img/swim_config/actor_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/img/swim_config/actor_config.png -------------------------------------------------------------------------------- /swim.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim.zip -------------------------------------------------------------------------------- /swim/assets/banner.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/banner.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/Chase Layout Attachment.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/Chase Layout Attachment.pdf -------------------------------------------------------------------------------- /swim/assets/chase_layouts/backgrounds/car_chase-modern.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/backgrounds/car_chase-modern.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/backgrounds/car_chase.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/backgrounds/car_chase.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/backgrounds/foot_chase-modern.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/backgrounds/foot_chase-modern.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/backgrounds/foot_chase.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/backgrounds/foot_chase.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/backgrounds/ship_chase-modern.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/backgrounds/ship_chase-modern.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/backgrounds/ship_chase.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/backgrounds/ship_chase.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/chase_layout-foot_and_riding-modern.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/chase_layout-foot_and_riding-modern.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/chase_layout-foot_and_riding.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/chase_layout-foot_and_riding.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/chase_layout-ground_vehicles-modern.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/chase_layout-ground_vehicles-modern.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/chase_layout-ground_vehicles.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/chase_layout-ground_vehicles.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/chase_layout-ships-new.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/chase_layout-ships-new.webp -------------------------------------------------------------------------------- /swim/assets/chase_layouts/chase_layout-ships.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/chase_layouts/chase_layout-ships.webp -------------------------------------------------------------------------------- /swim/assets/icons/effects/m-blind.svg: -------------------------------------------------------------------------------- 1 | 2 | m-arcaneProtection-svg 3 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /swim/assets/icons/effects/m-concealArcana.svg: -------------------------------------------------------------------------------- 1 | 2 | m-arcane_protection-svg 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /swim/assets/icons/effects/m-disguise.svg: -------------------------------------------------------------------------------- 1 | 2 | m-arcane_protection-svg 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /swim/assets/icons/effects/m-growth.svg: -------------------------------------------------------------------------------- 1 | 2 | 0-summoned-svg 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /swim/assets/icons/effects/m-shrink.svg: -------------------------------------------------------------------------------- 1 | 2 | 0-summoned-svg 3 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /swim/assets/icons/effects/m-speakLanguage.svg: -------------------------------------------------------------------------------- 1 | 2 | m-arcane_protection-svg 3 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /swim/assets/icons/effects/m-wallWalker.svg: -------------------------------------------------------------------------------- 1 | 2 | m-arcane_protection-svg 3 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /swim/assets/icons/macros/falling_sbed_game-icons.net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/icons/macros/falling_sbed_game-icons.net.png -------------------------------------------------------------------------------- /swim/assets/icons/misc/bullseye.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swim/assets/icons/misc/raise_black.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swim/assets/icons/misc/raise_green.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swim/assets/icons/misc/raise_red.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swim/assets/icons/misc/raise_yellow.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swim/assets/icons/misc/rolling-dices.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /swim/assets/imports/BR2-shooting-integration.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "swim.swade-immersive-macros.49TiCaAgArpHsAhz", 3 | "name": "SWIM: Ammo usage", 4 | "button_name": "SWIM: Ammo usage", 5 | "runSkillMacro": "SWIM: Ammo usage", 6 | "selector_type": "item_type", 7 | "selector_value": "weapon", 8 | "defaultChecked": "on" 9 | } -------------------------------------------------------------------------------- /swim/assets/imports/BR2-spellcasting-integration.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "swim.swade-immersive-macros.BiWnZrh3aitxEM4a", 3 | "name": "SWIM: Power SFX", 4 | "button_name": "SWIM: Powers SFX", 5 | "runSkillMacro": "SWIM: Powers SFX", 6 | "selector_type": "item_type", 7 | "selector_value": "power", 8 | "defaultChecked": "on" 9 | } -------------------------------------------------------------------------------- /swim/assets/imports/fvtt-JournalEntry-Attribute_Keys_for_Active_Effects.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Attribute Keys for Active Effects", 3 | "sort": 500000, 4 | "flags": { 5 | "core": { 6 | "sourceId": "JournalEntry.3IwY4jhyCJtms0NH" 7 | }, 8 | "exportSource": { 9 | "world": "savage-worlds-hellfrost", 10 | "system": "swade", 11 | "coreVersion": "0.7.9", 12 | "systemVersion": "0.17.2" 13 | } 14 | }, 15 | "content": "

General

\n\n

Initiative

\n\n

Attributes

\n\n

Skills (Requires SWADE Toolkit)

\n\n

Derived Stats

\n", 16 | "_id": "CmXxdnJ5uzutVZNZ" 17 | } -------------------------------------------------------------------------------- /swim/assets/sfx/Body-Thud-altered-www.fesliyanstudios.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Body-Thud-altered-www.fesliyanstudios.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Bone-Breaking-altered-www.fesliyanstudios.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Bone-Breaking-altered-www.fesliyanstudios.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Campfire-sound-altered-Alexander-www.orangefreesounds.com.ogg.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Campfire-sound-altered-Alexander-www.orangefreesounds.com.ogg.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Dramatic-drum-hit-orangefreesounds.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Dramatic-drum-hit-orangefreesounds.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Drinking-Water-altered-www.fesliyanstudios.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Drinking-Water-altered-www.fesliyanstudios.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Fireball-Super-Quick-Whoosh-www.fesliyanstudios.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Fireball-Super-Quick-Whoosh-www.fesliyanstudios.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Hard-Breathing-Medium-Pace-altered-www.fesliyanstudios.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Hard-Breathing-Medium-Pace-altered-www.fesliyanstudios.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/HeartBeat-sound-effect-2-altered-Alexander-www.orangefreesounds.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/HeartBeat-sound-effect-2-altered-Alexander-www.orangefreesounds.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Huh-converted-Alexander-www.orangefreesounds.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Huh-converted-Alexander-www.orangefreesounds.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Pain-sound-effect-converted-Alexander-www.orangefreesounds.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Pain-sound-effect-converted-Alexander-www.orangefreesounds.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Punch-altered-www.fesliyanstudios.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Punch-altered-www.fesliyanstudios.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Ripping-Flesh-altered-www.fesliyanstudios.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Ripping-Flesh-altered-www.fesliyanstudios.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/Suspense_Sound_Effect_altered_-_David_Fesliyan-www.FesliyanStudios.com.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/Suspense_Sound_Effect_altered_-_David_Fesliyan-www.FesliyanStudios.com.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/night_vision_device-off.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/night_vision_device-off.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/night_vision_device-on.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/night_vision_device-on.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/airplane-sound-www.orangefreesounds.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/airplane-sound-www.orangefreesounds.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/car-engine-starting-a1-www.fesliyanstudios.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/car-engine-starting-a1-www.fesliyanstudios.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/footsteps-in-grass-slow-b-www.fesliyanstudios.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/footsteps-in-grass-slow-b-www.fesliyanstudios.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/horse-neighing-and-breathing-a-www.fesliyanstudios.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/horse-neighing-and-breathing-a-www.fesliyanstudios.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/large-ship-air-horn-www.orangefreesounds.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/large-ship-air-horn-www.orangefreesounds.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/ocean-waves-crashing-sound-effect-www.orangefreesounds.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/ocean-waves-crashing-sound-effect-www.orangefreesounds.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/propeller-plane-flying-www.orangefreesounds.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/propeller-plane-flying-www.orangefreesounds.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/steam-train-whistle-www.orangefreesounds.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/steam-train-whistle-www.orangefreesounds.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/sfx/travel/subway-train-leaving-sound-effect-www.orangefreesounds.com-edited.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/sfx/travel/subway-train-leaving-sound-effect-www.orangefreesounds.com-edited.ogg -------------------------------------------------------------------------------- /swim/assets/token/sc_illusion_avatar.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/token/sc_illusion_avatar.webp -------------------------------------------------------------------------------- /swim/assets/token/sc_illusion_token.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/token/sc_illusion_token.webp -------------------------------------------------------------------------------- /swim/assets/travel/commercialJet.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/commercialJet.webp -------------------------------------------------------------------------------- /swim/assets/travel/earlyCar.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/earlyCar.webp -------------------------------------------------------------------------------- /swim/assets/travel/foot.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/foot.webp -------------------------------------------------------------------------------- /swim/assets/travel/highSpeedFerry.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/highSpeedFerry.webp -------------------------------------------------------------------------------- /swim/assets/travel/horse.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/horse.webp -------------------------------------------------------------------------------- /swim/assets/travel/modernCar.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/modernCar.webp -------------------------------------------------------------------------------- /swim/assets/travel/modernPassengerTrain.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/modernPassengerTrain.webp -------------------------------------------------------------------------------- /swim/assets/travel/modernShip.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/modernShip.webp -------------------------------------------------------------------------------- /swim/assets/travel/propPlane.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/propPlane.webp -------------------------------------------------------------------------------- /swim/assets/travel/sailingShip.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/sailingShip.webp -------------------------------------------------------------------------------- /swim/assets/travel/steamShip.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/steamShip.webp -------------------------------------------------------------------------------- /swim/assets/travel/steamTrain.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/assets/travel/steamTrain.webp -------------------------------------------------------------------------------- /swim/module.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "swim", 3 | "title": "SWADE Immersion Module", 4 | "description": "

A module providing immersion friendly macros and functionalities to enhance the gameplay experience of the SWADE System on Foundry VTT and automate some things in a non-intrusive way. Please consider donating.

", 5 | "compatibility": { 6 | "minimum": 11, 7 | "verified": "11.315" 8 | }, 9 | "version": "2.6.1", 10 | "authors": [ 11 | { 12 | "name": "SalieriC", 13 | "url": "https://ko-fi.com/salieric", 14 | "discord": "SalieriC", 15 | "ko-fi": "SalieriC" 16 | }, 17 | { 18 | "name": "Emanuel May", 19 | "url": "https://github.com/loofou", 20 | "discord": "Loofou#7406" 21 | } 22 | ], 23 | "relationships": { 24 | "systems": [ 25 | { 26 | "id": "swade", 27 | "type": "system", 28 | "manifest": "https://gitlab.com/api/v4/projects/16269883/packages/generic/swade/latest/system.json", 29 | "compatibility": { 30 | "minimum": "3.3.8", 31 | "verified": "3.3.8" 32 | } 33 | } 34 | ], 35 | "requires": [ 36 | { 37 | "id": "lib-wrapper", 38 | "type": "module", 39 | "manifest": "https://github.com/ruipin/fvtt-lib-wrapper/releases/download/v1.13.2.0/module.json", 40 | "compatibility": { 41 | "minimum": "1.13.2.0", 42 | "verified": "1.13.2.0" 43 | } 44 | }, 45 | { 46 | "id": "settings-extender", 47 | "type": "module", 48 | "manifest": "https://gitlab.com/foundry-azzurite/settings-extender/-/jobs/artifacts/master/raw/dist/settings-extender/module.json?job=build", 49 | "compatibility": { 50 | "minimum": "1.2.3", 51 | "verified": "1.2.3" 52 | } 53 | }, 54 | { 55 | "id": "succ", 56 | "type": "module", 57 | "manifest": "https://raw.githubusercontent.com/SalieriC/SUCC/main/succ/module.json", 58 | "compatibility": { 59 | "minimum": "4.1.0", 60 | "verified": "4.1.0" 61 | } 62 | }, 63 | { 64 | "id": "socketlib", 65 | "type": "module", 66 | "manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-socketlib/v1.1.0/module.json", 67 | "compatibility": { 68 | "minimum": "1.1.0", 69 | "verified": "1.1.0" 70 | } 71 | }, 72 | { 73 | "id": "portal-lib", 74 | "type": "module", 75 | "manifest": "https://github.com/theripper93/portal-lib/releases/download/2.2.12/module.json", 76 | "compatibility": { 77 | "minimum": "2.2.12", 78 | "verified": "2.2.12" 79 | } 80 | } 81 | ] 82 | }, 83 | "languages": [ 84 | { 85 | "lang": "en", 86 | "name": "English", 87 | "path": "lang/en.json" 88 | }, 89 | { 90 | "lang": "de", 91 | "name": "Deutsch", 92 | "path": "lang/de.json" 93 | }, 94 | { 95 | "lang": "zh-Hans", 96 | "name": "中文(简体)", 97 | "path": "lang/zh_Hans.json" 98 | }, 99 | { 100 | "lang": "pt-BR", 101 | "name": "Português (Brasil)", 102 | "path": "lang/pt_BR.json" 103 | } 104 | ], 105 | "esmodules": [ 106 | "./scripts/init.js" 107 | ], 108 | "socket": true, 109 | "packs": [ 110 | { 111 | "name": "swade-immersive-macros", 112 | "label": "SWADE Immersive Macros", 113 | "system": "swade", 114 | "path": "packs/swade-immersive-macros.db", 115 | "module": "swim", 116 | "type": "Macro", 117 | "ownership": { 118 | "PLAYER": "LIMITED", 119 | "ASSISTANT": "OWNER" 120 | }, 121 | "banner": "modules/swim/assets/banner.webp" 122 | }, 123 | { 124 | "name": "chase-layouts", 125 | "label": "Chase Layouts", 126 | "system": "swade", 127 | "path": "packs/chase-layouts.db", 128 | "module": "swim", 129 | "type": "Scene", 130 | "ownership": { 131 | "PLAYER": "NONE", 132 | "ASSISTANT": "OWNER" 133 | }, 134 | "banner": "modules/swim/assets/banner.webp" 135 | }, 136 | { 137 | "label": "SWIM Actor Folders", 138 | "name": "swim-actor-folders", 139 | "path": "packs/swim-actor-folders.db", 140 | "system": "swade", 141 | "module": "swim", 142 | "type": "Actor", 143 | "ownership": { 144 | "PLAYER": "NONE", 145 | "ASSISTANT": "OWNER" 146 | }, 147 | "banner": "modules/swim/assets/banner.webp" 148 | }, 149 | { 150 | "label": "SWIM Chase Cards", 151 | "name": "swim-chase-cards", 152 | "path": "packs/swim-chase-cards.db", 153 | "system": "swade", 154 | "module": "swim", 155 | "type": "JournalEntry", 156 | "ownership": { 157 | "PLAYER": "NONE", 158 | "ASSISTANT": "OWNER" 159 | }, 160 | "banner": "modules/swim/assets/banner.webp" 161 | }, 162 | { 163 | "label": "SWIM Roll Tables", 164 | "name": "swim-roll-tables", 165 | "path": "packs/swim-roll-tables.db", 166 | "system": "swade", 167 | "module": "swim", 168 | "type": "RollTable", 169 | "ownership": { 170 | "PLAYER": "NONE", 171 | "ASSISTANT": "OWNER" 172 | }, 173 | "banner": "modules/swim/assets/banner.webp" 174 | } 175 | ], 176 | "packFolders": [ 177 | { 178 | "name": "SWIM", 179 | "sorting": "a", 180 | "color": "#0BA0BA", 181 | "packs": [ 182 | "swade-immersive-macros", 183 | "chase-layouts", 184 | "swim-actor-folders", 185 | "swim-chase-cards", 186 | "swim-roll-tables" 187 | ] 188 | } 189 | ], 190 | "url": "https://github.com/SalieriC/SWADE-Immersive-Macros", 191 | "manifest": "https://raw.githubusercontent.com/SalieriC/SWADE-Immersive-Macros/main/swim/module.json", 192 | "download": "https://github.com/SalieriC/SWADE-Immersive-Macros/blob/main/swim.zip?raw=true" 193 | } -------------------------------------------------------------------------------- /swim/packs/.gitattributes: -------------------------------------------------------------------------------- 1 | /** binary -------------------------------------------------------------------------------- /swim/packs/chase-layouts/000510.ldb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/000510.ldb -------------------------------------------------------------------------------- /swim/packs/chase-layouts/000678.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/000678.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/CURRENT: -------------------------------------------------------------------------------- 1 | MANIFEST-000677 2 | -------------------------------------------------------------------------------- /swim/packs/chase-layouts/LOCK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/LOCK -------------------------------------------------------------------------------- /swim/packs/chase-layouts/LOG: -------------------------------------------------------------------------------- 1 | 2024/10/19-10:14:14.813616 7e6c07f0c0 Recovering log #675 2 | 2024/10/19-10:14:14.968788 7e6c07f0c0 Delete type=0 #675 3 | 2024/10/19-10:14:14.968946 7e6c07f0c0 Delete type=3 #673 4 | -------------------------------------------------------------------------------- /swim/packs/chase-layouts/LOG.old: -------------------------------------------------------------------------------- 1 | 2024/09/22-10:21:13.907404 7e6c07f0c0 Recovering log #671 2 | 2024/09/22-10:21:14.017851 7e6c07f0c0 Delete type=0 #671 3 | 2024/09/22-10:21:14.017986 7e6c07f0c0 Delete type=3 #669 4 | 2024/10/15-09:43:45.731015 7e58bff0c0 Level-0 table #676: started 5 | 2024/10/15-09:43:45.731245 7e58bff0c0 Level-0 table #676: 0 bytes OK 6 | 2024/10/15-09:43:45.766113 7e58bff0c0 Delete type=0 #674 7 | 2024/10/15-09:43:45.802020 7e58bff0c0 Manual compaction at level-0 from '!scenes!3zIeYCljM6HwVcEw' @ 72057594037927935 : 1 .. '!scenes.tiles!rI9k1RndMWa7F5pj.eophqc7ONKOlLinv' @ 0 : 0; will stop at (end) 8 | -------------------------------------------------------------------------------- /swim/packs/chase-layouts/MANIFEST-000677: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/MANIFEST-000677 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000079.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000079.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000116.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000116.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000130.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000130.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000238.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000238.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000396.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000396.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000429.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000429.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000438.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000438.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000491.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000491.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/000504.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/000504.log -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000016: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000016 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000053: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000053 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000075: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000075 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000128: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000128 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000236: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000236 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000394: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000394 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000427: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000427 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000436: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000436 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000489: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000489 -------------------------------------------------------------------------------- /swim/packs/chase-layouts/lost/MANIFEST-000502: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/chase-layouts/lost/MANIFEST-000502 -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/000457.ldb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/000457.ldb -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/000625.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/000625.log -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/CURRENT: -------------------------------------------------------------------------------- 1 | MANIFEST-000624 2 | -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/LOCK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/LOCK -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/LOG: -------------------------------------------------------------------------------- 1 | 2024/10/19-10:14:14.617214 7e6b86f0c0 Recovering log #622 2 | 2024/10/19-10:14:14.795963 7e6b86f0c0 Delete type=0 #622 3 | 2024/10/19-10:14:14.796106 7e6b86f0c0 Delete type=3 #620 4 | -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/LOG.old: -------------------------------------------------------------------------------- 1 | 2024/09/22-10:21:13.725678 7e6a84f0c0 Recovering log #618 2 | 2024/09/22-10:21:13.890109 7e6a84f0c0 Delete type=0 #618 3 | 2024/09/22-10:21:13.890287 7e6a84f0c0 Delete type=3 #616 4 | 2024/10/15-09:43:45.652896 7e58bff0c0 Level-0 table #623: started 5 | 2024/10/15-09:43:45.655635 7e58bff0c0 Level-0 table #623: 0 bytes OK 6 | 2024/10/15-09:43:45.697191 7e58bff0c0 Delete type=0 #621 7 | 2024/10/15-09:43:45.801837 7e58bff0c0 Manual compaction at level-0 from '!folders!AXdNVMiAPlITiU88' @ 72057594037927935 : 1 .. '!macros!yu0weHeD5tg1XssD' @ 0 : 0; will stop at (end) 8 | -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/MANIFEST-000624: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/MANIFEST-000624 -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/000183.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/000183.log -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/000341.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/000341.log -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/000376.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/000376.log -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/000385.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/000385.log -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/000451.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/000451.log -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/MANIFEST-000181: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/MANIFEST-000181 -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/MANIFEST-000339: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/MANIFEST-000339 -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/MANIFEST-000374: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/MANIFEST-000374 -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/MANIFEST-000383: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/MANIFEST-000383 -------------------------------------------------------------------------------- /swim/packs/swade-immersive-macros/lost/MANIFEST-000449: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swade-immersive-macros/lost/MANIFEST-000449 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/000461.ldb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/000461.ldb -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/000629.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/000629.log -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/CURRENT: -------------------------------------------------------------------------------- 1 | MANIFEST-000628 2 | -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/LOCK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/LOCK -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/LOG: -------------------------------------------------------------------------------- 1 | 2024/10/19-10:14:14.997578 7e6b86f0c0 Recovering log #626 2 | 2024/10/19-10:14:15.131687 7e6b86f0c0 Delete type=0 #626 3 | 2024/10/19-10:14:15.131801 7e6b86f0c0 Delete type=3 #624 4 | -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/LOG.old: -------------------------------------------------------------------------------- 1 | 2024/09/22-10:21:14.039417 7e6a84f0c0 Recovering log #622 2 | 2024/09/22-10:21:14.171006 7e6a84f0c0 Delete type=0 #622 3 | 2024/09/22-10:21:14.171223 7e6a84f0c0 Delete type=3 #620 4 | 2024/10/15-09:43:45.766282 7e58bff0c0 Level-0 table #627: started 5 | 2024/10/15-09:43:45.766450 7e58bff0c0 Level-0 table #627: 0 bytes OK 6 | 2024/10/15-09:43:45.801653 7e58bff0c0 Delete type=0 #625 7 | 2024/10/15-09:43:45.802125 7e58bff0c0 Manual compaction at level-0 from '!actors!VHpGt0QnGBajt9AH' @ 72057594037927935 : 1 .. '!folders!uqU1YvouKOpmPduC' @ 0 : 0; will stop at (end) 8 | -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/MANIFEST-000628: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/MANIFEST-000628 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/000083.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/000083.log -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/000188.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/000188.log -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/000347.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/000347.log -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/000380.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/000380.log -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/000389.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/000389.log -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/000455.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/000455.log -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/MANIFEST-000016: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/MANIFEST-000016 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/MANIFEST-000055: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/MANIFEST-000055 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/MANIFEST-000079: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/MANIFEST-000079 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/MANIFEST-000186: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/MANIFEST-000186 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/MANIFEST-000345: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/MANIFEST-000345 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/MANIFEST-000378: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/MANIFEST-000378 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/MANIFEST-000387: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/MANIFEST-000387 -------------------------------------------------------------------------------- /swim/packs/swim-actor-folders/lost/MANIFEST-000453: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-actor-folders/lost/MANIFEST-000453 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/000459.ldb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/000459.ldb -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/000627.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/000627.log -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/CURRENT: -------------------------------------------------------------------------------- 1 | MANIFEST-000626 2 | -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/LOCK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/LOCK -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/LOG: -------------------------------------------------------------------------------- 1 | 2024/10/19-10:14:15.147040 7e6c07f0c0 Recovering log #624 2 | 2024/10/19-10:14:15.273021 7e6c07f0c0 Delete type=0 #624 3 | 2024/10/19-10:14:15.273167 7e6c07f0c0 Delete type=3 #622 4 | -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/LOG.old: -------------------------------------------------------------------------------- 1 | 2024/09/22-10:21:14.188767 7e6c07f0c0 Recovering log #620 2 | 2024/09/22-10:21:14.313213 7e6c07f0c0 Delete type=0 #620 3 | 2024/09/22-10:21:14.313352 7e6c07f0c0 Delete type=3 #618 4 | 2024/10/15-09:43:45.803698 7e58bff0c0 Level-0 table #625: started 5 | 2024/10/15-09:43:45.807863 7e58bff0c0 Level-0 table #625: 0 bytes OK 6 | 2024/10/15-09:43:45.847912 7e58bff0c0 Delete type=0 #623 7 | 2024/10/15-09:43:45.965782 7e58bff0c0 Manual compaction at level-0 from '!journal!0GWr4ByJqIhOqERL' @ 72057594037927935 : 1 .. '!journal.pages!xXgmt61L5Xg1z4Fd.juwSLs55G4V6HEQt' @ 0 : 0; will stop at (end) 8 | -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/MANIFEST-000626: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/MANIFEST-000626 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/000083.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/000083.log -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/000188.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/000188.log -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/000345.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/000345.log -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/000378.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/000378.log -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/000387.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/000387.log -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/000440.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/000440.log -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/000453.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/000453.log -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000016: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000016 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000055: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000055 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000079: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000079 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000186: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000186 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000343: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000343 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000376: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000376 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000385: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000385 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000438: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000438 -------------------------------------------------------------------------------- /swim/packs/swim-chase-cards/lost/MANIFEST-000451: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-chase-cards/lost/MANIFEST-000451 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/000454.ldb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/000454.ldb -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/000622.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/000622.log -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/CURRENT: -------------------------------------------------------------------------------- 1 | MANIFEST-000621 2 | -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/LOCK: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/LOCK -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/LOG: -------------------------------------------------------------------------------- 1 | 2024/10/19-10:14:15.312867 7e6b05f0c0 Recovering log #619 2 | 2024/10/19-10:14:15.447121 7e6b05f0c0 Delete type=0 #619 3 | 2024/10/19-10:14:15.447311 7e6b05f0c0 Delete type=3 #617 4 | -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/LOG.old: -------------------------------------------------------------------------------- 1 | 2024/09/22-10:21:14.330248 7e6b05f0c0 Recovering log #615 2 | 2024/09/22-10:21:14.452967 7e6b05f0c0 Delete type=0 #615 3 | 2024/09/22-10:21:14.453107 7e6b05f0c0 Delete type=3 #613 4 | 2024/10/15-09:43:45.848094 7e58bff0c0 Level-0 table #620: started 5 | 2024/10/15-09:43:45.848265 7e58bff0c0 Level-0 table #620: 0 bytes OK 6 | 2024/10/15-09:43:45.882878 7e58bff0c0 Delete type=0 #618 7 | 2024/10/15-09:43:45.965844 7e58bff0c0 Manual compaction at level-0 from '!folders!DlXsMXWvuOZJrU64' @ 72057594037927935 : 1 .. '!tables.results!qwTQa92uv7RnwJLZ.zogKGG24ijsGSv2T' @ 0 : 0; will stop at (end) 8 | -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/MANIFEST-000621: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/MANIFEST-000621 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/000078.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/000078.log -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/000183.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/000183.log -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/000340.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/000340.log -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/000373.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/000373.log -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/000382.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/000382.log -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/000435.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/000435.log -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/000448.log: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/000448.log -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000016: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000016 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000052: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000052 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000074: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000074 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000181: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000181 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000338: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000338 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000371: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000371 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000380: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000380 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000433: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000433 -------------------------------------------------------------------------------- /swim/packs/swim-roll-tables/lost/MANIFEST-000446: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SalieriC/SWIM/775b2979dafb233f9d26a8c654adf1f567731d48/swim/packs/swim-roll-tables/lost/MANIFEST-000446 -------------------------------------------------------------------------------- /swim/scripts/buttons.js: -------------------------------------------------------------------------------- 1 | //import { combat_setup } from "./swim_modules/combat_setup.js"; 2 | import { adjust_scene_light } from "./helpers/adjust_scene_light.js"; 3 | import { raise_calculator } from "./helpers/raise-calculator.js"; 4 | 5 | export function swim_buttons(hudButtons) { 6 | // Add Raise Calculator Button 7 | let hud = hudButtons.find(val => { return val.name == "token"; }) 8 | if (hud) { 9 | hud.tools.push({ 10 | name: "SWIM.openRaiseCalculatorName", 11 | title: "SWIM.openRaiseCalculatorHint", 12 | icon: "fas fa-plus-square", 13 | button: true, 14 | onClick: async () => raise_calculator() 15 | }); 16 | /* Currently a little buggy so taking that out for now. 17 | if (game.user.isGM) { 18 | hud.tools.push({ 19 | name: "SWIM.combatSetupName", 20 | title: "SWIM.combatSetupHint", 21 | icon: "fas fa-fist-raised", 22 | button: true, 23 | onClick: async () => { combat_setup() } 24 | }) 25 | } 26 | */ 27 | } 28 | 29 | // Hijack the systems chase setup: 30 | let tilesButton = hudButtons.find(val => { return val.name == "tiles"; }) 31 | let chaseButtonIndex = tilesButton.tools.findIndex(object => { return object.name === "clear-chase-cards" }) 32 | if (chaseButtonIndex !== -1) { 33 | tilesButton.tools.splice(chaseButtonIndex, 1) 34 | } 35 | tilesButton.tools.push({ 36 | name: 'chase-setup', 37 | title: game.i18n.localize("SWIM.ChaseSetup"), 38 | icon: "fas fa-shipping-fast", 39 | button: true, 40 | onClick: async () => { swim.chase_setup() } 41 | }) 42 | 43 | let lightHud = hudButtons.find(val => { return val.name == "lighting"; }) 44 | if (lightHud) { 45 | if (game.user.isGM) { 46 | lightHud.tools.push({ 47 | name: "SWIM.sceneIlluminationName", 48 | title: "SWIM.sceneIlluminationName", 49 | icon: "far fa-adjust", 50 | button: true, 51 | onClick: async () => { adjust_scene_light() } 52 | }) 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /swim/scripts/gm_relay.js: -------------------------------------------------------------------------------- 1 | export class gm_relay { 2 | static async gmDeleteActor(actorID) { 3 | let actor = game.actors.get(actorID) 4 | await actor.delete() 5 | } 6 | static async combat_previousTurn(data) { 7 | let combatID = data.combatID 8 | if (!combatID) { 9 | combatID = game.combat.id 10 | } 11 | const combat = game.combats.get(combatID) 12 | const currentTurn = combat.turn 13 | await swim.wait('200') 14 | if (currentTurn > 0) { 15 | await game.combat.update({ "turn": currentTurn - 1 }) 16 | } 17 | } 18 | static async combat_nextTurn(data) { 19 | let combatID = data.combatID 20 | if (!combatID) { 21 | combatID = game.combat.id 22 | } 23 | const combat = game.combats.get(combatID) 24 | const currentTurn = combat.turn 25 | await swim.wait('200') 26 | if (currentTurn > 0) { 27 | await game.combat.update({ "turn": currentTurn + 1 }) 28 | } 29 | } 30 | static async combat_currentTurn(data) { 31 | let combatID = data.combatID 32 | if (!combatID) { 33 | combatID = game.combat.id 34 | } 35 | const combat = game.combats.get(combatID) 36 | const currentTurn = data.currTurn 37 | await swim.wait('200') 38 | if (currentTurn > 0) { 39 | await combat.update({ "turn": currentTurn }) 40 | } 41 | } 42 | } -------------------------------------------------------------------------------- /swim/scripts/helpers/adjust_scene_light.js: -------------------------------------------------------------------------------- 1 | export async function adjust_scene_light() { 2 | const scene = game.scenes.current 3 | let sceneDarkness = scene.darkness 4 | let selectFull = "" 5 | let selectDim = "" 6 | let selectDark = "" 7 | let selectPitch = "" 8 | if (scene.flags?.swim?.config?.illuminationLevel) { 9 | if (scene.flags?.swim?.config?.illuminationLevel === "none") { sceneDarkness = 0 } 10 | else if (scene.flags?.swim?.config?.illuminationLevel === "dim") { sceneDarkness = 0.5 } 11 | else if (scene.flags?.swim?.config?.illuminationLevel === "dark") { sceneDarkness = 0.75 } 12 | else if (scene.flags?.swim?.config?.illuminationLevel === "pitch") { sceneDarkness = 1 } 13 | } 14 | if (sceneDarkness <= 0.1) { selectFull = "selected" } 15 | else if (sceneDarkness <= 0.5) { selectDim = "selected" } 16 | else if (sceneDarkness <= 0.75) { selectDark = "selected" } 17 | else if (sceneDarkness <= 1) { selectPitch = "selected" } 18 | 19 | const illuminationTypes = ` 20 | 21 | 22 | 23 | 24 | ` 25 | 26 | let dialogue_content = ` 27 |

${game.i18n.localize("SWIM.sceneIlluminationHint")}

28 |
29 | 30 | 33 |
34 | ` 35 | 36 | let dialogueButtons = { 37 | yes: { 38 | label: game.i18n.localize("SWIM.dialogue-accept"), 39 | callback: async (html) => { 40 | let illuminationType = html.find('[name="illumination-type"]')[0].value 41 | const updateData = { 42 | flags: { 43 | swim: { 44 | config: { 45 | illuminationLevel: illuminationType 46 | } 47 | } 48 | } 49 | } 50 | await scene.update(updateData) 51 | ui.notifications.notify(game.i18n.format("SWIM.sceneIlluminationNotification")) 52 | console.log("SWIM | Flags set on scene.", scene) 53 | } 54 | }, 55 | no: { 56 | label: game.i18n.localize("SWIM.dialogue-cancel") 57 | } 58 | } 59 | 60 | // Main Dialogue 61 | new Dialog({ 62 | title: game.i18n.localize("SWIM.sceneIlluminationName"), 63 | content: dialogue_content, 64 | buttons: dialogueButtons, 65 | default: "yes", 66 | }).render(true); 67 | } -------------------------------------------------------------------------------- /swim/scripts/helpers/custom_effect_config.js: -------------------------------------------------------------------------------- 1 | export default class SWIMEffectConfig extends ActiveEffectConfig { 2 | 3 | constructor(object, options, callback) { 4 | super(object, options); 5 | this.callback = callback; 6 | } 7 | 8 | async _updateObject(event, formData) { 9 | await super._updateObject(event, formData); 10 | this.callback(this.object); 11 | } 12 | } -------------------------------------------------------------------------------- /swim/scripts/helpers/raise-calculator.js: -------------------------------------------------------------------------------- 1 | export async function raise_calculator() { 2 | new Dialog({ 3 | title: game.i18n.localize("SWIM.raiseCalculator-label"), 4 | content: ` 5 |
6 |
7 |
8 | 9 | 10 |
11 | 12 |
13 |
14 |
15 | 16 | 17 |
18 | 19 |
20 |
21 | 22 |

${game.i18n.localize("SWIM.raiseCalculator-result")}

23 |
24 |
`, 25 | buttons: {}, 26 | render: ([dialogContent]) => { 27 | dialogContent.querySelector(`input[name="target"]`).focus(); 28 | ["target", "result"].forEach((input) => { 29 | ["input", "change"].forEach((evt) => { 30 | dialogContent.querySelector(`input[name="${input}"]`).addEventListener(evt, (event) => { 31 | const textInput = event.target; 32 | const form = textInput.closest("form"); 33 | const calcImage = form.querySelector(`img[name="calculation"]`); 34 | const calcResult = form.querySelector(`p[name="calculation"]`); 35 | const target = form.querySelector('input[name="target"]').value; 36 | const result = form.querySelector('input[name="result"]').value; 37 | if (target === "" || result === "") return; 38 | const raises = Math.floor((parseInt(result) - parseInt(target)) / 4); 39 | if (parseInt(target) > parseInt(result)) { 40 | calcImage.src = "modules/swim/assets/icons/misc/raise_red.svg"; 41 | calcResult.innerHTML = `${game.i18n.localize("SWIM.raiseCalculator-failure")}`; 42 | } else if (parseInt(target) <= parseInt(result) && raises < 1) { 43 | calcImage.src = "modules/swim/assets/icons/misc/raise_yellow.svg"; 44 | calcResult.innerHTML = `${game.i18n.localize("SWIM.raiseCalculator-success")}`; 45 | } else { 46 | calcImage.src = "modules/swim/assets/icons/misc/raise_green.svg"; 47 | if (raises < 2) { 48 | calcResult.innerHTML = `${game.i18n.format("SWIM.raiseCalculator-raises-singular", { 49 | raises, 50 | })}`; 51 | } else { 52 | calcResult.innerHTML = `${game.i18n.format("SWIM.raiseCalculator-raises-plural", { 53 | raises, 54 | })}`; 55 | } 56 | } 57 | }); 58 | }); 59 | }); 60 | }, 61 | }).render(true); 62 | } 63 | -------------------------------------------------------------------------------- /swim/scripts/hooks/actor_hooks.js: -------------------------------------------------------------------------------- 1 | export async function actor_hooks() { 2 | /* 3 | Hooks.on("createActiveEffect", async (effect, _, userID) => { 4 | if (swim.is_first_gm() === false) { return } //Play SFX for all from GM account only. 5 | const actor = effect.parent 6 | const id = condition.flags?.succ?.conditionId ? condition.flags?.succ?.conditionId : effect.label.toLowerCase() 7 | await audio_player(actor, id) 8 | }); 9 | Hooks.on("deleteActiveEffect", async (effect, _, userID) => { 10 | if (swim.is_first_gm() === false) { return } //Play SFX for all from GM account only. 11 | const actor = effect.parent 12 | const id = condition.flags?.succ?.conditionId ? "undo" + condition.flags?.succ?.conditionId : "undo" + effect.label.toLowerCase() 13 | await audio_player(actor, id) 14 | }); 15 | */ 16 | } 17 | 18 | async function audio_player(actor, id, playForAll = true) { 19 | const { shakenSFX, deathSFX, unshakeSFX, stunnedSFX, soakSFX, fatiguedSFX, looseFatigueSFX } = await swim.get_actor_sfx(actor) 20 | const volume = Number(game.settings.get("swim", "defaultVolume")) 21 | switch (id) { 22 | case 1: "shaken" 23 | swim.play_sfx(shakenSFX, volume, playForAll) 24 | break; 25 | case 2: "incapacitated" 26 | swim.play_sfx(deathSFX, volume, playForAll) 27 | break; 28 | case 3: "stunned" 29 | swim.play_sfx(stunnedSFX, volume, playForAll) 30 | break; 31 | case 4: "fatigued" 32 | swim.play_sfx(fatiguedSFX, volume, playForAll) 33 | break; 34 | case 5: "undoshaken" 35 | swim.play_sfx(unshakeSFX, volume, playForAll) 36 | break; 37 | case 6: "soak" 38 | swim.play_sfx(soakSFX, volume, playForAll) 39 | break; 40 | case 7: "undofatigued" 41 | swim.play_sfx(looseFatigueSFX, volume, playForAll) 42 | break; 43 | //default: 44 | // code block for default case - not needed here 45 | } 46 | } -------------------------------------------------------------------------------- /swim/scripts/hooks/combat_hooks.js: -------------------------------------------------------------------------------- 1 | export async function combat_hooks() { 2 | // Combat setup playlist handling 3 | Hooks.on("preUpdateCombat", async (combat, update, options, userId) => { 4 | if (game.settings.get("swim", "combatPlaylistManagement") === true && combat.round === 0 && update.round === 1) { 5 | if (swim.is_first_gm() === false) { return } 6 | const combatPlaylistName = game.settings.get("swim", "combatPlaylist") 7 | const combatPlaylist = game.playlists.getName(combatPlaylistName) 8 | const protectedFolder = game.settings.get("swim", "noStopFolder") 9 | for (let playlist of game.playlists.playing) { 10 | if (playlist.folder?.name.toLowerCase() != protectedFolder.toLowerCase()) { 11 | playlist.setFlag('swim', 'resumeAfterCombat', true) 12 | playlist.stopAll() 13 | } 14 | } 15 | if (combatPlaylist) { 16 | combatPlaylist.playAll() 17 | } 18 | } 19 | }) 20 | 21 | Hooks.on("deleteCombat", async (combat, options, userId) => { 22 | if (game.settings.get("swim", "combatPlaylistManagement") === true) { 23 | if (swim.is_first_gm() === false) { return } 24 | for (let playlist of game.playlists) { 25 | if (playlist.flags?.swim?.resumeAfterCombat === true) { 26 | await playlist.playAll() 27 | playlist.unsetFlag('swim', 'resumeAfterCombat') 28 | } 29 | } 30 | const combatPlaylist = game.playlists.find(p => p.name.toLowerCase() === "combat") //needs setting 31 | if (combatPlaylist && combatPlaylist.playing === true) { 32 | await combatPlaylist.stopAll() 33 | } 34 | } 35 | if (game.settings.get("swim", "deleteEffectsAfterCombat") === true) { 36 | if (swim.is_first_gm() === false) { return } 37 | const sceneId = combat.scene.id 38 | if (sceneId) { 39 | game.succ.removeTemporaryEffects(sceneId, false) 40 | } 41 | } 42 | }) 43 | 44 | Hooks.on("updateCombat", async (combat, updates, context, userId) => { 45 | //Ask users for maintaining their Conviction 46 | if (context.diff === false) { //`context.direction` is only false if a new round starts, thus making sure it only executes at the start of a new round. 47 | const combatants = combat.combatants 48 | for (let combatant of combatants) { 49 | const actor = combatant.actor 50 | const token = combatant.token 51 | if (await game.succ.hasCondition('conviction', actor) === true) { 52 | const convEffect = await game.succ.getConditionFrom('conviction', token) 53 | const initiatorId = convEffect.flags.succ.userId 54 | if (game.user.id === initiatorId) { //Only show dialogue to the player who activated conviction. 55 | let { tokenBennies, gmBennies, totalBennies } = await swim.check_bennies(token, false) 56 | if (totalBennies >= 1) { 57 | const officialClass = await swim.get_official_class() 58 | new Dialog({ 59 | title: game.i18n.localize("SWIM.dialogue-convictionMaintenance"), 60 | content: game.i18n.format("SWIM.dialogue-convictionMaintenanceContent", { officialClass: officialClass, currBennies: totalBennies }), 61 | buttons: { 62 | one: { 63 | label: ` ${game.i18n.localize("SWIM.dialogue-yes")}`, 64 | callback: async (html) => { 65 | await swim.spend_benny(token, true) 66 | } 67 | }, 68 | two: { 69 | label: ` ${game.i18n.localize("SWIM.dialogue-no")}`, 70 | callback: async (html) => { 71 | await game.succ.removeCondition('conviction', actor); 72 | } 73 | } 74 | }, 75 | default: "one" 76 | }).render(true); 77 | } else { 78 | ui.notifications.warn(game.i18n.localize("SWIM.notification-noBenniesForConviction")) 79 | await game.succ.removeCondition('conviction', actor); 80 | } 81 | } 82 | } 83 | } 84 | } 85 | }) 86 | } -------------------------------------------------------------------------------- /swim/scripts/swim_modules/backlasher.js: -------------------------------------------------------------------------------- 1 | export async function backlasher(card, backlashSetting) { 2 | if (backlashSetting === 'dynamic') { 3 | await dynamic_backlash(card) 4 | return 5 | } 6 | let actor = card.actor 7 | 8 | // If shape changed, terminate active powers and revert form first: 9 | if (card.actor.getFlag('swim', 'scOwner') && card.token) { 10 | let powersToTerminate = [] 11 | for (let eff of actor.effects) { 12 | if ((eff.flags?.swim) && (eff.flags.swim.maintainedPower || eff.flags.swim.maintainedSummon)) { 13 | powersToTerminate.push(eff._id) 14 | } 15 | } 16 | if (powersToTerminate.length > 0) { 17 | await actor.deleteEmbeddedDocuments('ActiveEffect', powersToTerminate) 18 | } 19 | actor = game.actors.get(card.actor.getFlag('swim', 'scOwner')) 20 | await swim.wait('500') // Give the deletion some time to complete. 21 | await swim.revert_shape_change(card.token) 22 | await swim.wait('2000') // Give the revert some time to complete. 23 | } 24 | 25 | const currFatigue = actor.system.fatigue.value 26 | const maxFatigue = actor.system.fatigue.max 27 | const officialClass = await swim.get_official_class() 28 | const backlashLink = await swim.get_official_journal_link("activation") 29 | //let message = `${officialClass}

${backlashLink}{Backlash!}

${actor.name} rolled a Critical Failure when trying to invoke a power and ` 30 | let message = game.i18n.format("SWIM.Backlasher.Message-1", {officialClass, backlashLink: `${backlashLink}{${game.i18n.localize("SWIM.Backlasher.Backlash")}!}`, name: actor.name}) 31 | // Setting up SFX paths: 32 | const { 33 | shakenSFX, 34 | deathSFX, 35 | unshakeSFX, 36 | stunnedSFX, 37 | soakSFX, 38 | fatiguedSFX, 39 | looseFatigueSFX 40 | } = await swim.get_actor_sfx(actor) 41 | const volume = game.settings.get('swim', 'defaultVolume') 42 | // Making Changes: 43 | if (currFatigue + 1 <= maxFatigue) { 44 | await actor.update({"system.fatigue.value": currFatigue + 1}) 45 | await swim.play_sfx(fatiguedSFX, volume, true) 46 | //message += `gained a level of Fatigue!
` 47 | message += game.i18n.localize("SWIM.Backlasher.Message-2") 48 | } else if (currFatigue + 1 > maxFatigue) { 49 | await game.succ.addCondition('incapacitated', actor, {forceOverlay: true}) 50 | await swim.play_sfx(deathSFX, volume, true) 51 | //message += `collapses from exhaustion!
` 52 | message += game.i18n.localize("SWIM.Backlasher.Message-3") 53 | } 54 | // Also terminate all active powers: 55 | //message += `All active powers immediately terminate` 56 | message += game.i18n.localize("SWIM.Backlasher.Message-4") 57 | let powersToTerminate = [] 58 | for (let eff of actor.effects) { 59 | if ((eff.flags?.swim) && (eff.flags.swim.maintainedPower || eff.flags.swim.maintainedSummon)) { 60 | powersToTerminate.push(eff._id) 61 | } 62 | } 63 | if (powersToTerminate.length > 0) { 64 | await actor.deleteEmbeddedDocuments('ActiveEffect', powersToTerminate) 65 | //message += ` (powers set up using SWIM functions have been automatically terminated)` 66 | message += game.i18n.localize("SWIM.Backlasher.Message-5") 67 | } 68 | //message += `.

` 69 | message += game.i18n.localize("SWIM.Backlasher.Message-6") 70 | let chatData = { 71 | content: await TextEditor.enrichHTML(message) 72 | }; 73 | ChatMessage.create(chatData, {}); 74 | } 75 | 76 | async function dynamic_backlash(card) { 77 | const actor = card.actor 78 | const officialClass = await swim.get_official_class() 79 | const backlashLink = await swim.get_official_journal_link("activation") 80 | const dynamicBacklashLink = await swim.get_official_journal_link("dynamic_backlash") 81 | //let message = `${officialClass}

${backlashLink}{Backlash!}

${actor.name} rolled a Critical Failure when trying to invoke a power and ` 82 | let message = game.i18n.format("SWIM.Backlasher.Message-1", {officialClass, backlashLink: `${backlashLink}{${game.i18n.localize("SWIM.Backlasher.Backlash")}!}`, name: actor.name}) 83 | //message += 'suffers {backlashLink}:

' 84 | message += game.i18n.format("SWIM.Backlasher.Message-7", {backlashLink: `${dynamicBacklashLink}{${game.i18n.localize("SWIM.Backlasher.DynamicBacklash")}}`}) 85 | const tableName = game.settings.get('swim', 'backlashTable') 86 | const table = game.tables.getName(tableName) 87 | if (!table) { return ui.notifications.error(game.i18n.localize("SWIM.warn-noBacklashTable")) } 88 | const tableDraw = await table.draw({ displayChat: false }, { }); 89 | const resultImg = tableDraw.results[0].img 90 | const resultText = tableDraw.results[0].text 91 | message += resultText 92 | let chatData = { 93 | content: await TextEditor.enrichHTML(message) 94 | }; 95 | ChatMessage.create(chatData, {}); 96 | } -------------------------------------------------------------------------------- /swim/scripts/swim_modules/combat_setup.js: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | * Combat Setup 3 | * Sends all tokens on the current scene to combat and 4 | * - Tries to group them depending on 5 | * - Disposition 6 | * - Wild Card Status 7 | * - Proximity 8 | * - Starts the combat [X], drawing initiative [X] 9 | * - Sets turn to 0 (so that the first in list has its turn) 10 | * - Starts a defined combat playlist [X] 11 | * - Pauses other playlists not in a folder called "Ambient" [X] 12 | * - Resumes all Playlists on combat end [X] 13 | * 14 | * v. 1.0.2 15 | * By SalieriC, original groundwork by brunocalado#1650 16 | ******************************************************/ 17 | export async function combat_setup() { 18 | const tokensUnfiltered = game.scenes.current.tokens 19 | if (tokensUnfiltered.size <= 0) { 20 | ui.notifications.error(game.i18n.localize("SWIM.notification-noTokens")) 21 | return 22 | } 23 | // Filter tokens out that are not capable of fighting 24 | let tokens = [] 25 | for (let token of tokensUnfiltered) { 26 | if (token.actor.type === "npc" && await game.succ.hasCondition('incapacitated', token) === false) { 27 | if (token.actor.flags?.healthEstimate?.dead === false || !token.actor.flags?.healthEstimate?.dead) { 28 | tokens.push(token) 29 | } 30 | } else if (token.actor.type === "character" || token.actor.type === "vehicle") { 31 | tokens.push(token) 32 | } 33 | } 34 | // Adding the rest to the combat tracker: 35 | let tokensToAdd = [] 36 | let hostileWC = [] 37 | for (let token of tokens) { 38 | if (token.inCombat) continue 39 | /* 40 | // Process hostile NPCs 41 | if (token.type === "npc" && token.disposition === -1) { 42 | // Make wildcards to group leaders 43 | if (token.actor.system.wildcard === true) { 44 | // 45 | } 46 | } 47 | */ 48 | tokensToAdd.push({ tokenId: token.id, hidden: token.document.hidden }) 49 | } 50 | const combat = !game.combat ? await Combat.create({ scene: canvas.scene.id, active: true }) : game.combat 51 | const combatants = await combat.createEmbeddedDocuments("Combatant", tokensToAdd) 52 | 53 | // Start the combat, setting turn to 0 if it is not. 54 | // The Dialogue is a temporary solution until automatic grouping is possible. 55 | 56 | const officialClass = await swim.get_official_class() 57 | new Dialog({ 58 | title: 'Manage group initiative', 59 | content: `${officialClass} 60 |

Now you can group tokens as desired. Once you're finished, click "Start Combat".

61 | `, 62 | buttons: { 63 | one: { 64 | label: ` Start Combat`, 65 | callback: async (_) => { 66 | //Get actor based on provided ID: 67 | await combat.startCombat() 68 | //console.log(combat) 69 | Hooks.once("updateCombat", async (combat, update, _, userId) => { 70 | await swim.wait('200') 71 | if (update.turn != 0) { 72 | await combat.update({ "turn": 0 }) 73 | } 74 | }) 75 | } 76 | } 77 | }, 78 | default: "one", 79 | }).render(true); 80 | } 81 | -------------------------------------------------------------------------------- /swim/scripts/swim_modules/common_bond.js: -------------------------------------------------------------------------------- 1 | /******************************************************* 2 | * Common Bond 3 | * Transfers a Benny from a selected to a targeted tokens 4 | * actor. 5 | * 6 | * v. 2.0.0 7 | * By SalieriC 8 | ******************************************************/ 9 | import {socket} from "../init.js" 10 | 11 | export async function common_bond_script() { 12 | const { speaker, _, __, token } = await swim.get_macro_variables() 13 | //Set div class based on enabled official module: 14 | const officialClass = await swim.get_official_class() 15 | const targets = game.user.targets 16 | if (!token || canvas.tokens.controlled.length > 1) { 17 | ui.notifications.error(game.i18n.localize("SWIM.notification-selectSingleToken")) 18 | return; 19 | } 20 | if (targets.size > 1 || targets.size < 1) { 21 | ui.notifications.warn(game.i18n.localize("SWIM.notification-targetSingleToken")) 22 | return 23 | } 24 | const target = Array.from(game.user.targets)[0] 25 | const commonBond = token.actor.items.find(function (item) { 26 | return ((item.name.toLowerCase() === game.i18n.localize("SWIM.edge-commonBond").toLowerCase()) && item.type === "edge"); 27 | }); 28 | if (!commonBond) { 29 | ui.notifications.error(game.i18n.localize("SWIM.notification-noCommonBond")) 30 | return 31 | } 32 | 33 | const { tokenBennies, gmBennies, totalBennies } = await swim.check_bennies(token) 34 | if (tokenBennies <= 0) { 35 | ui.notifications.error(game.i18n.localize("SWIM.notification-noBenniesLeft")) 36 | return 37 | } 38 | 39 | new Dialog({ 40 | title: game.i18n.format("SWIM.edge-commonBond"), 41 | content: game.i18n.format("SWIM.dialogue-commonBond", {officialClass: officialClass, tokenName: token.name, targetName: target.name}), 42 | buttons: { 43 | one: { 44 | label: game.i18n.localize("SWIM.dialogue-accept"), 45 | callback: async (_) => { 46 | let message = false 47 | await swim.spend_benny(token, message) 48 | const data = { 49 | tokenID: token.id, 50 | targetID: target.id 51 | } 52 | await socket.executeAsGM(common_bond_gm, data) 53 | } 54 | }, 55 | two: { 56 | label: game.i18n.localize("SWIM.dialogue-cancel"), 57 | callback: async () => { 58 | return 59 | } 60 | } 61 | }, 62 | default: "one", 63 | }).render(true); 64 | } 65 | 66 | export async function common_bond_gm(data) { 67 | const tokenID = data.tokenID 68 | const token = canvas.tokens.get(tokenID) 69 | const targetID = data.targetID 70 | const target = canvas.tokens.get(targetID) 71 | const officialClass = await swim.get_official_class() 72 | const bennyImage = await swim.get_benny_image() 73 | const bennyHTML = `` 74 | 75 | await target.actor.update({"system.bennies.value": target.actor.system.bennies.value + 1}) 76 | ChatMessage.create({ 77 | user: game.user.id, 78 | content: game.i18n.format("SWIM.chatMessage-commonBond", {officialClass: officialClass ,bennyHTML: bennyHTML ,tokenName: token.name, targetName: target.name}), 79 | }); 80 | } -------------------------------------------------------------------------------- /swim/scripts/swim_modules/deviation.js: -------------------------------------------------------------------------------- 1 | /******************************************* 2 | * Unshake macro for SWD 3 | * version 2.2.0 4 | * (c): brunocalado; altered by SalieriC. 5 | ******************************************/ 6 | 7 | export async function deviation_script(weapontype = false, range = false) { 8 | const chatimage = "modules/swim/assets/svg/clock.svg"; 9 | 10 | const officialClass = await swim.get_official_class() 11 | const deviationLink = await swim.get_official_journal_link("deviation") 12 | 13 | if (weapontype && range) { 14 | rollForIt() 15 | } else { 16 | getRequirements(); 17 | } 18 | 19 | function getRequirements() { 20 | let template = `${officialClass} 21 |

${game.i18n.localize("SWIM.word-weaponType")}

22 | 23 | 24 | 25 | 26 | 27 |
${game.i18n.localize("SWIM.word-Projectile")}
28 |

${game.i18n.localize("SWIM.gameTerm-range")}

29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 |
${game.i18n.localize("SWIM.gameTerm-range-short")}
37 | 38 | `; 39 | new Dialog({ 40 | title: game.i18n.localize("SWIM.dialogue-DeviationTile"), 41 | content: template, 42 | buttons: { 43 | ok: { 44 | label: game.i18n.localize("SWIM.button-proceed"), 45 | callback: async (html) => { 46 | weapontype = html.find('input[name="weapontype"]:checked').val(); 47 | range = html.find('input[name="range"]:checked').val(); 48 | rollForIt(); 49 | }, 50 | } 51 | }, 52 | }).render(true); 53 | } 54 | 55 | function rollForIt() { 56 | let deviation; 57 | 58 | if (weapontype == 'thrown') { 59 | deviation = diceRoll('1d6', range); 60 | } else { 61 | deviation = diceRoll('2d6', range); 62 | } 63 | } 64 | 65 | async function diceRoll(die, range) { 66 | const rangeMultiplier = rangeCheck(range); 67 | let direction = await new Roll('1d12').roll(); 68 | let roll = await new Roll(die).roll(); 69 | let message = `${officialClass}

${game.i18n.localize("SWIM.dialogue-DeviationTile")}

`; 70 | if (deviationLink) { message = `${officialClass}

${deviationLink}{${game.i18n.localize("SWIM.dialogue-DeviationTile")}}

`; } 71 | message += game.i18n.format("SWIM.dialogue-DeviationMessage1", {modifiedTotal: roll.total * rangeMultiplier, direction: direction.total}); 72 | if (directionCheck(direction.total)) { 73 | message += game.i18n.localize("SWIM.dialogue-DeviationMessage2"); 74 | } 75 | message += game.i18n.format("SWIM.dialogue-DeviationMessage3", {chatimage}); 76 | message += `` 77 | 78 | let tempChatData = { 79 | //type: CHAT_MESSAGE_TYPES.ROLL, 80 | roll: roll, 81 | rollMode: game.settings.get("core", "rollMode"), 82 | content: message 83 | }; 84 | ChatMessage.create(tempChatData); 85 | return roll.total; 86 | } 87 | 88 | function rangeCheck(range) { 89 | if (range == 'short') { 90 | return 1; 91 | } else if (range == 'medium') { 92 | return 2; 93 | } else if (range == 'long') { 94 | return 3; 95 | } else if (range == 'extreme') { 96 | return 4; 97 | } 98 | } 99 | 100 | function directionCheck(direction) { 101 | //console.log(direction); 102 | if (direction == 4 || direction == 5 || direction == 6 || direction == 7 || direction == 8) { 103 | return true 104 | } else { 105 | return false 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /swim/scripts/swim_modules/mark_dead.js: -------------------------------------------------------------------------------- 1 | /******************************************* 2 | * Mark Dead 3 | * This Macro works best with Health Estimate installed. 4 | * It will mark the selected tokens as dead. 5 | * If the selected token is dead, it will be marked as alive instead. 6 | * v. 5.0.0 by SalieriC. 7 | *******************************************/ 8 | export async function mark_dead_script() { 9 | const { _, __, ___, token } = await swim.get_macro_variables() 10 | 11 | //Set up 12 | if (canvas.tokens.controlled.length === 0) { 13 | ui.notifications.error(game.i18n.localize("SWIM.notification-selectOneOrMoreTokens")); 14 | return; 15 | } 16 | const { shakenSFX, deathSFX, unshakeSFX, stunnedSFX, soakSFX, fatiguedSFX, looseFatigueSFX } = await swim.get_actor_sfx(token.actor) 17 | 18 | main(); 19 | 20 | async function main() { 21 | for (let e of canvas.tokens.controlled) { 22 | if (e.actor.type === 'npc' || e.actor.type === 'vehicle') { 23 | const isInc = await game.succ.hasCondition('dead', e) 24 | const apply = !isInc //invert the result to remove if applied and vice versa. 25 | //await succ.toggle_status(e, 'dead', apply, true) 26 | if (apply) { await game.succ.addCondition('dead', e, {forceOverlay: true}) } 27 | else if (!apply) { 28 | await game.succ.removeCondition('dead', e) 29 | //Remove INC as well if the token has it: 30 | if (await game.succ.hasCondition('incapacitated', e)) { await game.succ.removeCondition('incapacitated', e) } 31 | } 32 | } else if (e.actor.type === 'character') { 33 | const isInc = await game.succ.hasCondition('incapacitated', e) 34 | const apply = !isInc //invert the result to remove if applied and vice versa. 35 | //await succ.toggle_status(e, 'incapacitated', apply, true) 36 | if (apply) { await game.succ.addCondition('incapacitated', e, {forceOverlay: true}) } 37 | else if (!apply) { 38 | await game.succ.removeCondition('incapacitated', e) 39 | //Remove Defeated as well if the token has it: 40 | if (await game.succ.hasCondition('dead', e)) { await game.succ.removeCondition('dead', e) } 41 | } 42 | } 43 | } 44 | ui.notifications.info(game.i18n.localize("SWIM.notification.markDeadAlive")); 45 | AudioHelper.play({ src: `${deathSFX}` }, true); 46 | } 47 | } -------------------------------------------------------------------------------- /swim/scripts/swim_modules/power_point_management.js: -------------------------------------------------------------------------------- 1 | /******************************************* 2 | * Power Point Management (remaster) 3 | * // v.0.0.1 4 | * By SalieriC#8263 5 | ******************************************/ 6 | export async function power_point_management_script(options) { 7 | /** 8 | * General Path: actor.system.powerPoints.general 9 | * Specific Paths: actor.system.powerPoints["AB Name"] 10 | * Properties in the object: 11 | * - actor.system.powerPoints.general.max 12 | * - actor.system.powerPoints.general.value 13 | * - actor.system.powerPoints["AB Name"].max 14 | * - actor.system.powerPoints["AB Name"].value 15 | * 16 | * ABs that never got PP entered in their pool do NOT appear in the properties. Those which had them once but do no longer are set to `null`. 17 | * 18 | * Roadmap: 19 | * [] Always prefer changing specific PP pool. 20 | * [] But use general if general has pp and specific one is empty. 21 | * [] Add flag settings for Powers to further configure them? 22 | * [] Cover Arcane Devices and such by using additional stats on powers rather than the systems real ones. (Automatically add/remove pp additional stat on flag change?) 23 | */ 24 | let options = { 25 | type: "someString", //"add" or "subtract" 26 | acorID: "someString", 27 | tokenID: "someString", 28 | powerID: "someString", 29 | sceneID: "someString", 30 | degree: "someNumber", //success = 1, failure = 0, critFail = -1, raise = 2 31 | extraCost: `someNumber`, //A number only available if coming from the dialogue, not BRSW. 32 | activeActions: [ 33 | "actionID1", 34 | "actionID2" 35 | ], //Need to get that from BRSW as well as the dialogue. It should be the alphanumeric part of the property string to the action so we can get it. 36 | //Example: "2JPUbfiW" if the property path is `power.system.actions.additional["2JPUbfiW"]` 37 | arcaneBackground: "someString", //Must be exakt name. Only needed if recharging and no power is given 38 | } 39 | 40 | // Central hub: 41 | const scene = game.scenes.get(options.sceneID) 42 | const token = scene.tokens.get(options.tokenID) 43 | const actor = token._actor 44 | const power = actor.items.find(p => p.id === options.powerID && p.type === "power") 45 | const arcaneBackground = power ? power.system.arcane : options.arcaneBackground //Use ab from options if no power is provided through the dialogue. 46 | // Get curr and max PP: 47 | let currPP = actor.system.powerPoints.general.value 48 | let maxPP = actor.system.powerPoints.general.max 49 | let useGeneralPool = true 50 | let isDevice = false 51 | if (power && power.flags.swim?.config?.isDevice === true || power.system.additionalStats.devicePP?.value) { //power is a device 52 | currPP = power.system.additionalStats.devicePP?.value 53 | maxPP = power.system.additionalStats.devicePP?.max 54 | isDevice = true 55 | } else if (actor.system.powerPoints[`${arcaneBackground}`]?.max != null && actor.system.powerPoints[`${arcaneBackground}`]?.value != null) { //power has AB with own PP pool 56 | currPP = actor.system.powerPoints[`${arcaneBackground}`]?.value 57 | maxPP = actor.system.powerPoints[`${arcaneBackground}`]?.max 58 | useGeneralPool = true 59 | } 60 | 61 | async function subtract_power_points() { 62 | //Calculate power cost: 63 | const costBasic = power.system.pp 64 | const costExtra = options.extraCost ? options.extraCost : 0 65 | let costsActions = [] 66 | let costsAllActions = 0 67 | for (let actionID of options.activeActions) { 68 | let actionName = power.system.actions.additional[`${actionID}`].name 69 | let actionCost = power.system.actions.additional[`${actionID}`].shotsUsed 70 | costsActions.push({ name: actionName, cost: actionCost }) 71 | } for (let each of costsActions) { 72 | costsAllActions = costsAllActions + each.cost 73 | } 74 | let costTotal = options.degree >= 1 ? costBasic + costExtra + costsAllActions : 1 //Powers cost only 1 PP on a failure. 75 | if (costTotal > currPP) { //Not enough PP. 76 | ui.notification.error(game.i18n.localize("SWIM.notification-notEnoughPP")) 77 | return 78 | } else { 79 | let remainingPP = currPP - costTotal 80 | let pathCurr = useGeneralPool ? `system.powerPoints.general.value` : `system.powerPoints[${arcaneBackground}].value` 81 | if (isDevice) { pathCurr = `system.additionalStats.devicePP.value` } 82 | let changes = {pathCurr: remainingPP} 83 | if (!isDevice) { 84 | await actor.update(changes) 85 | } else { 86 | await power.update(changes) 87 | } 88 | } 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /swim/templates/customConfig.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{ localize "SWIM.ConfigMenuName" }}

3 | 8 |
9 |
10 | {{#each tabs}} 11 |
12 | {{# each this }} 13 |
14 | 15 |
16 | {{#if this.is_boolean}} 17 | 18 | {{else if this.options}} 19 | 32 | {{else}} 33 | 34 | {{# if this.use_audio_picker }}{{ filePicker type="audio" target=this.id }}{{/if}} 35 | {{# if this.use_video_picker }}{{ filePicker type="video" target=this.id }}{{/if}} 36 | {{/if}} 37 |
38 |

{{ this.hint }}

39 |
40 | {{/each}} 41 |
42 | {{/each}} 43 |
44 |
45 |

Like SWIM? Please consider donating, it would mean the world to me. =)

46 |

47 | 50 |
-------------------------------------------------------------------------------- /swim/templates/swim_document_config.hbs: -------------------------------------------------------------------------------- 1 |
2 |

{{ localize "SWIM.DocumentConfigMenu" }}

3 |
4 |
5 | {{#each options}} 6 |
7 | {{#if this.isSectionTitle }} 8 |

{{ localize this.label }}

9 | {{else}} 10 | 11 |
12 | {{#if this.isBoolean}} 13 | 14 | {{/if}} 15 | {{#if this.isAE}} 16 | 17 | 20 | 23 | {{/if}} 24 | 25 | {{#if this.isText}} 26 | 27 | {{# if this.useFilePicker }}{{ filePicker type=this.filePickerData target=this.id }}{{/if}} 28 | {{/if}} 29 | 30 | {{#if this.isNumber}} 31 | 33 | {{/if}} 34 |
35 |

{{ localize this.hint }}

36 | {{/if}} 37 |
38 | {{/each}} 39 |
40 | 45 |
--------------------------------------------------------------------------------