beholdsa
February 27, 2023 17:49:26
Tom B
Are there any updates to this? PDFoundry does not show as an available module. Are Monarch and Simple Worldbuilding Plus recommended for Shadows Over Sol? Or just Age of Ambition?
What modules do people currently use?
PDFoundry was discontinued with Foundry 10. PDF Character Sheet is its successor.
For Shadows Over Sol, there should be full system support, so you don't need any other modules. For our other games, I use Monarch, PDF Character Sheet and Card Hand Mini Toolbar. I don't technically use Simple Worldbuilding, as I have a work-in-progress system plugin that I'm slowly putting together. But it's not functional yet.
If you're interested, however, here's a script macro that will handle card flips for Age of Ambition. With a bit of tweaking it might be applicable to our other games as well. Note that you will need to change the text in the first few lines to match whatever you've named the player's deck, the table, the discard pile and the character's Luck.
// Set variables
const deck = game.cards.getName("Thorin's Deck");
const table = game.cards.getName("Table");
const discard = game.cards.getName("Discard Pile");
const luck = 5;
// Clear the table
table.pass(discard, table.cards.keys(), {chatNotification: false});
// Draw the cards and calculate the results
let cards = null;
try { cards = await table.draw(deck, 2, {chatNotification: false}); }
catch (error) { ChatMessage.create({ content: `<b>No cards to draw! Shuffle deck!</b>` }); throw new Error(); }
let values = [];
cards.forEach(c => values.push(c.value <= 10 ? c.value : luck));
let value = Math.max(...values);
let flushes = {'spades': [], 'hearts': [], 'diamonds': [], 'clubs': []};
for (let i = 0; i < cards.length; i++) {
if (Object.keys(flushes).includes(cards[i].suit))
flushes[cards[i].suit].push(values[i])
}
let flush = false;
Object.keys(flushes).forEach(key => {
const sum = flushes[key].reduce((a, b) => a + b, 0);
if (sum > value) {
value = sum;
flush = true;
}
});
// Show the results in chat
let card_faces = '';
cards.forEach(c => card_faces += `<img class=\"card-face\" src=\"${c.img}\" title=\"${c.name}\"/>`);
const flush_msg = flush ? 'Flush!<br/>' : '';
const cfail_msg = values.includes(0) ? 'Critical Failure?<br/>' : '';
const message = `<h4 class=\"card-name\">${flush_msg}${cfail_msg}Card Total: ${value}</h4>`;
ChatMessage.create({ content: `<div class=\"card-draw flexrow\">${card_faces}${message}</div>` });
I plan to make a blog post with this macro at some point, but honestly it's still a little rough around the edges and the code could use some cleaning up. It was thrown together as a quick-and-dirty solution for my home game.