Foundry: TOR 2e - Lore Table

Tables are from Strider Mode
 avatar
9littlebees
plain_text
2 years ago
826 B
336
Indexable
Never
// MACRO NAME: LORE TABLE
// MACRO TYPE: script

// REQUIRED TABLES: Lore-Action, Lore-Aspect, Lore-Aspect

// copy and paste from below this line:

const table1 = await game.tables.getName("Lore-Action").roll();
const table2 = await game.tables.getName("Lore-Aspect").roll();
const table3 = await game.tables.getName("Lore-Focus").roll();

const result1 = table1.results[0].data.text;
const result2 = table2.results[0].data.text;
const result3 = table3.results[0].data.text;

const content = `<div style="text-align:center">
      <h2 style="font-size:22px;">Lore Table<\h2>
      <p style="color:#941b0c;font-size:14px;">Action: ${result1}<\p>
      <p style="color:#941b0c;font-size:14px;">Aspect: ${result2}<\p>
      <p style="color:#941b0c;font-size:14px;">Focus: ${result3}
      </div>`;
ChatMessage.create({content});