A system-agnostic Foundry module for the simultaneous choice of cards between all the players and the GM!
- Install the module
- Add some tokens on the scene
- In the token tools, click the
Simultaneous Cards
button, or create a macro (see below) - Configure the participants
- Choose your cards and reveal them!
Instead of using the control button, you can create your own macro with one of the following lines of code:
// Create a new instance.
game.simoc.app.create();
// Add the ID or name of a cards stack to filter out the others.
game.simoc.app.create('abcd1234');
// You can add more than one ID or name.
game.simoc.app.create(['abcd1234', 'efgh5678']);
// Get the instance and use its methods.
game.simoc.instance;
/** @type {Collection} */
const participants = game.simoc.instance?.participants
You can trigger post-reveal macros by listening to this hook:
Hooks.on('simultaneousCardsReveal', id => {
const participant = game.simoc.instance.participants.get(id);
const card = participant.card;
console.log(participant);
// Your code...
});
# Install the Node packages
npm install
# Build the distribution
npm run dev
# Then link the project
# Unix
ln -s dist/* /absolute/path/to/foundry/data/module-name
# Windows
mklink /J /absolute/path/to/link /absolute/path/to/this/repo/dist
GPLv3
This module contains parts of the SWADE game system licensed under the Apache 2.0 license.