Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
936b41f410 | ||
|
|
c55be962df | ||
|
|
cdf94c9fd0 | ||
|
|
b5f47ea033 | ||
|
|
6b080b7413 | ||
|
|
69d1be9415 |
@@ -12,7 +12,7 @@ jobs:
|
|||||||
uses: https://git.keligrubb.com/actions/checkout@v7
|
uses: https://git.keligrubb.com/actions/checkout@v7
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: https://git.keligrubb.com/actions/setup-node@v6
|
uses: https://git.keligrubb.com/actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
@@ -31,7 +31,7 @@ jobs:
|
|||||||
uses: https://git.keligrubb.com/actions/checkout@v7
|
uses: https://git.keligrubb.com/actions/checkout@v7
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: https://git.keligrubb.com/actions/setup-node@v6
|
uses: https://git.keligrubb.com/actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ jobs:
|
|||||||
uses: https://git.keligrubb.com/actions/checkout@v7
|
uses: https://git.keligrubb.com/actions/checkout@v7
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: https://git.keligrubb.com/actions/setup-node@v6
|
uses: https://git.keligrubb.com/actions/setup-node@v7
|
||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
cache: "npm"
|
cache: "npm"
|
||||||
|
|||||||
Generated
+379
-436
File diff suppressed because it is too large
Load Diff
+103
-134
@@ -117,163 +117,132 @@ Output ONLY the two numbered items, one per line. Use colons (:) to separate roo
|
|||||||
console.log("Climax Room:", climaxRoom);
|
console.log("Climax Room:", climaxRoom);
|
||||||
|
|
||||||
// Step 5: Main Content (Locations, Encounters, NPCs, Treasures, Random Events)
|
// Step 5: Main Content (Locations, Encounters, NPCs, Treasures, Random Events)
|
||||||
// To avoid overloading the AI server with a single huge prompt, we generate
|
const mainContentRaw = await callOllama(
|
||||||
// each section in smaller, focused calls and then stitch them together.
|
`Based on the following dungeon elements and the need for narrative flow:
|
||||||
|
Title: "${title}"
|
||||||
const sharedContext = `Title: "${title}"
|
|
||||||
Description: "${flavor}"
|
Description: "${flavor}"
|
||||||
Core Concepts:
|
Core Concepts:
|
||||||
${coreConcepts}
|
${coreConcepts}
|
||||||
Entrance Room: ${JSON.stringify(entranceRoom)}
|
Entrance Room: ${JSON.stringify(entranceRoom)}
|
||||||
Climax Room: ${JSON.stringify(climaxRoom)}`;
|
Climax Room: ${JSON.stringify(climaxRoom)}
|
||||||
|
|
||||||
const locationsRaw = await callOllama(
|
Generate the rest of the dungeon's content to fill the space between the entrance and the climax. CRITICAL: All content must fit on a single one-page dungeon layout with three columns. Keep descriptions rich and evocative with tactical/environmental details.
|
||||||
`${sharedContext}
|
|
||||||
|
|
||||||
Generate EXACTLY 3 intermediate dungeon locations between the entrance and climax.
|
- **Strictly 3 Locations (EXACTLY 3, no more, no less):** Each with a name (max 6 words) and a description (25-35 words). Each room MUST include:
|
||||||
|
- Rich environmental features that affect gameplay (lighting, sounds, smells, textures, temperature, visibility)
|
||||||
|
- Interactable elements that players can use (levers, objects, portals, mechanisms, environmental hazards)
|
||||||
|
- Multiple approaches or solutions to challenges in the room
|
||||||
|
- Tactical considerations (cover, elevation, movement restrictions, line of sight)
|
||||||
|
- Hidden aspects discoverable through interaction or investigation
|
||||||
|
Format as "Name: description" using colons, NOT em-dashes.
|
||||||
|
|
||||||
Requirements:
|
EXAMPLE LOCATION:
|
||||||
- Each location gets a unique name (max 6 words) and a description (25-35 words).
|
"Whispering Gallery: Dim phosphorescent fungi line the walls, casting an eerie green glow. The air hums with a low-frequency vibration that makes conversation difficult. Two collapsed pillars create natural cover, while a narrow ledge 10 feet up offers a sniper position. A hidden pressure plate near the entrance triggers a portcullis trap."
|
||||||
- Include sensory details and environmental features that affect gameplay (lighting, sounds, smells, textures, temperature, visibility).
|
|
||||||
- Include interactable elements (levers, objects, portals, mechanisms, environmental hazards).
|
|
||||||
- Include tactical considerations (cover, elevation, movement restrictions, line of sight) and at least one hidden aspect per room.
|
|
||||||
|
|
||||||
Format:
|
- **Strictly 6 Encounters:** Numbered 1-6 (for d6 rolling). Name (max 6 words) and details (2 sentences MAX, approximately 25-40 words). Each encounter MUST:
|
||||||
1. Room Name: Description text.
|
- Start with the room/location name followed by a colon, then the details (e.g., "Location Name: Details text")
|
||||||
2. Room Name: Description text.
|
- The location name must match one of the actual room names from this dungeon
|
||||||
3. Room Name: Description text.
|
- Include environmental hazards/opportunities (cover, elevation, traps, interactable objects, terrain features)
|
||||||
|
- Include tactical considerations (positioning, line of sight, escape routes, bottlenecks, high ground)
|
||||||
|
- Offer multiple resolution options (combat, negotiation, stealth, puzzle-solving, environmental manipulation, timing-based solutions)
|
||||||
|
- Include consequences and outcomes tied to player choices
|
||||||
|
- Integrate with the environmental dynamic element from core concepts
|
||||||
|
- At least two encounters must be directly tied to the primary faction
|
||||||
|
Format as "Name: Location Name: details" using colons, NOT em-dashes. CRITICAL: Always start encounter details with the location name and a colon.
|
||||||
|
|
||||||
Plain text only. Do not use em-dashes (—). Absolutely do not use the word "Obsidian" or "obsidian" anywhere in the output.`,
|
EXAMPLE ENCOUNTER:
|
||||||
undefined,
|
"Guardian Golem: Chamber of Echoes: The golem activates when the lever is pulled, blocking the exit. It's vulnerable to water damage from the dripping stalactites. Players can use the pillars for cover or try to disable it by breaking the rune on its back. If defeated peacefully, it reveals a hidden passage."
|
||||||
5,
|
|
||||||
"Step 5a: Locations"
|
|
||||||
);
|
|
||||||
|
|
||||||
const encountersRaw = await callOllama(
|
- **Strictly 4-5 NPCs:** Proper name (max 4 words) and a description (50-65 words). Each NPC MUST include:
|
||||||
`${sharedContext}
|
- Clear motivation or goal
|
||||||
|
- Relationship to primary faction
|
||||||
|
- How they can help or hinder the party
|
||||||
|
- Quirks or memorable traits
|
||||||
|
- Multiple interaction possibilities (negotiation, intimidation, help, betrayal)
|
||||||
|
- One NPC should be a key figure tied to the central conflict
|
||||||
|
- One should be a member of the primary faction, one should be a potential ally, one should be a rival
|
||||||
|
Format as "Name: description" using colons, NOT em-dashes.
|
||||||
|
|
||||||
Existing rooms:
|
EXAMPLE NPC:
|
||||||
- Entrance: ${entranceRoom?.name}
|
"Kaelen the Warden: A former guard who was left behind when the faction retreated. He knows the secret passages but demands the party help him escape. He's paranoid and checks over his shoulder constantly. Can be bribed with food or convinced through shared stories of betrayal. Will turn on the party if he thinks they're working with the faction."
|
||||||
- Climax: ${climaxRoom?.name}
|
|
||||||
You will add 3 more locations (from the locations list) and must reference only real room names.
|
|
||||||
|
|
||||||
Generate EXACTLY 6 encounters, numbered 1-6 for a d6 table.
|
- **Strictly 4-5 Treasures:** Name (max 5 words) and a description (30-40 words). Each treasure MUST:
|
||||||
|
- Include a clear danger or side-effect
|
||||||
|
- Be connected to a specific encounter, NPC, or room
|
||||||
|
- Have story significance beyond just value
|
||||||
|
- Have potential for creative use beyond obvious purpose
|
||||||
|
- Some should be cursed, have activation requirements, or serve dual purposes
|
||||||
|
Format as "Name — Description" using em-dash.
|
||||||
|
|
||||||
Requirements:
|
EXAMPLE TREASURE:
|
||||||
- Name (max 6 words) and details (2 sentences MAX, ~25-40 words).
|
"Whispering Blade — This dagger amplifies the wielder's voice to a deafening roar when drawn. Found in the Guardian Golem's chamber, it was used to command the construct. The blade is cursed: each use permanently reduces the wielder's hearing. Can be used to shatter glass or stun enemies, but the curse cannot be removed."
|
||||||
- Each encounter MUST start with the room/location name followed by a colon, then the details (e.g., "Room Name: details").
|
|
||||||
- The location name must match either the entrance room, climax room, or one of the 3 new locations.
|
|
||||||
- Include environmental hazards/opportunities and tactical considerations (cover, elevation, traps, bottlenecks, escape routes, high ground).
|
|
||||||
- Offer multiple resolution options (combat, negotiation, stealth, puzzle-solving, environmental manipulation, timing, etc.).
|
|
||||||
- At least two encounters must be directly tied to the primary faction from the core concepts.
|
|
||||||
|
|
||||||
Format:
|
- **Strictly 1 Random Events Table:** A d6 table (EXACTLY 6 entries, no more, no less) with random events/wandering encounters. Each entry MUST:
|
||||||
1. Encounter Name: Room Name: Details text.
|
- Have a short, evocative event name (max 4 words)
|
||||||
2. Encounter Name: Room Name: Details text.
|
- Provide interesting complications or opportunities (not just combat)
|
||||||
3. Encounter Name: Room Name: Details text.
|
- Tie to the core concepts and dynamic element
|
||||||
4. Encounter Name: Room Name: Details text.
|
- Add replayability and surprise
|
||||||
5. Encounter Name: Room Name: Details text.
|
- Description should be 15-20 words maximum
|
||||||
6. Encounter Name: Room Name: Details text.
|
- Be UNIQUE and DIFFERENT from each other (no duplicates or generic placeholders)
|
||||||
|
- Be SPECIFIC to this dungeon's theme, conflict, and dynamic element
|
||||||
|
Format as numbered 1-6 list under "Random Events:" label. Each event must be formatted as "Event Name: Description text" using colons, NOT em-dashes.
|
||||||
|
|
||||||
Plain text only. Use colons, NOT em-dashes. Absolutely do not use the word "Obsidian" or "obsidian" anywhere in the output.`,
|
CRITICAL: Each item must be on its own numbered line. DO NOT combine multiple items into a single numbered entry.
|
||||||
undefined,
|
|
||||||
5,
|
|
||||||
"Step 5b: Encounters"
|
|
||||||
);
|
|
||||||
|
|
||||||
const npcsRaw = await callOllama(
|
EXACT FORMAT REQUIRED (DO NOT use placeholder names like "Location Name", "NPC Name", or "Treasure Name" - use actual creative names):
|
||||||
`${sharedContext}
|
Locations:
|
||||||
|
1. Actual Room Name: Description text.
|
||||||
|
2. Actual Room Name: Description text.
|
||||||
|
3. Actual Room Name: Description text.
|
||||||
|
|
||||||
Generate 4-5 important NPCs tied to this dungeon.
|
Encounters:
|
||||||
|
1. Actual Encounter Name: Actual Room Name: Details text.
|
||||||
|
2. Actual Encounter Name: Actual Room Name: Details text.
|
||||||
|
3. Actual Encounter Name: Actual Room Name: Details text.
|
||||||
|
4. Actual Encounter Name: Actual Room Name: Details text.
|
||||||
|
5. Actual Encounter Name: Actual Room Name: Details text.
|
||||||
|
6. Actual Encounter Name: Actual Room Name: Details text.
|
||||||
|
|
||||||
Requirements:
|
NPCs:
|
||||||
- Proper name (max 4 words) and a description (50-65 words).
|
1. Actual Character Name: Description text.
|
||||||
- Each NPC must have: clear motivation, relationship to the primary faction, how they can help or hinder the adventurers, and memorable quirks/traits.
|
2. Actual Character Name: Description text.
|
||||||
- Include multiple interaction possibilities (negotiation, intimidation, help, betrayal).
|
3. Actual Character Name: Description text.
|
||||||
- At least one NPC is a key figure tied to the central conflict.
|
4. Actual Character Name: Description text.
|
||||||
- At least one NPC is a member of the primary faction, one is a potential ally, and one is a rival.
|
|
||||||
|
|
||||||
Format:
|
Treasures:
|
||||||
1. NPC Name: Description text.
|
1. Actual Item Name — Description text.
|
||||||
2. NPC Name: Description text.
|
2. Actual Item Name — Description text.
|
||||||
3. NPC Name: Description text.
|
3. Actual Item Name — Description text.
|
||||||
4. NPC Name: Description text.
|
4. Actual Item Name — Description text.
|
||||||
5. NPC Name: Description text. (omit the 5th if only 4 NPCs)
|
|
||||||
|
|
||||||
Plain text only. Use colons, NOT em-dashes. Absolutely do not use the word "Obsidian" or "obsidian" anywhere in the output.`,
|
|
||||||
undefined,
|
|
||||||
5,
|
|
||||||
"Step 5c: NPCs"
|
|
||||||
);
|
|
||||||
|
|
||||||
const treasuresRaw = await callOllama(
|
|
||||||
`${sharedContext}
|
|
||||||
|
|
||||||
Generate 4-5 unique treasures for this dungeon.
|
|
||||||
|
|
||||||
Requirements:
|
|
||||||
- Each treasure has a name (max 5 words) and a description (30-40 words).
|
|
||||||
- Each treasure includes a clear danger or side-effect.
|
|
||||||
- Each treasure is connected to a specific encounter, NPC, or room.
|
|
||||||
- Each has story significance beyond raw value and potential for creative non-obvious uses.
|
|
||||||
- Some should be cursed, have activation requirements, or serve dual purposes.
|
|
||||||
|
|
||||||
Format:
|
|
||||||
1. Item Name — Description text.
|
|
||||||
2. Item Name — Description text.
|
|
||||||
3. Item Name — Description text.
|
|
||||||
4. Item Name — Description text.
|
|
||||||
5. Item Name — Description text. (omit the 5th if only 4 treasures)
|
|
||||||
|
|
||||||
Plain text only. Use an em-dash (—) between name and description. Absolutely do not use the word "Obsidian" or "obsidian" anywhere in the output.`,
|
|
||||||
undefined,
|
|
||||||
5,
|
|
||||||
"Step 5d: Treasures"
|
|
||||||
);
|
|
||||||
|
|
||||||
const randomEventsRaw = await callOllama(
|
|
||||||
`${sharedContext}
|
|
||||||
|
|
||||||
Generate a d6 Random Events table for this dungeon (EXACTLY 6 entries).
|
|
||||||
|
|
||||||
Requirements:
|
|
||||||
- Short, evocative event name (max 4 words) plus description (15-20 words).
|
|
||||||
- Provide interesting complications or opportunities (not just combat).
|
|
||||||
- Tie directly to the core concepts and the dynamic environmental element.
|
|
||||||
- Each event must be UNIQUE and clearly different from the others.
|
|
||||||
|
|
||||||
Format:
|
|
||||||
Random Events:
|
Random Events:
|
||||||
1. Event Name: Description text.
|
1. Event Name: Event description.
|
||||||
2. Event Name: Description text.
|
2. Event Name: Event description.
|
||||||
3. Event Name: Description text.
|
3. Event Name: Event description.
|
||||||
4. Event Name: Description text.
|
4. Event Name: Event description.
|
||||||
5. Event Name: Description text.
|
5. Event Name: Event description.
|
||||||
6. Event Name: Description text.
|
6. Event Name: Event description.
|
||||||
|
|
||||||
Plain text only. Use colons, NOT em-dashes. Absolutely do not use the word "Obsidian" or "obsidian" anywhere in the output.`,
|
CRITICAL: Every name must be unique and creative. Never use generic placeholders like "Location Name", "NPC Name", "Encounter Name", or "Treasure Name". Use actual descriptive names that fit the dungeon's theme.
|
||||||
undefined,
|
|
||||||
5,
|
CRITICAL: Ensure all spelling is correct. Double-check all words, especially proper nouns, character names, and location names. Verify consistency of names across all sections.
|
||||||
"Step 5e: Random Events"
|
|
||||||
|
CRITICAL: Location name matching - When writing encounters, the location name in the encounter details MUST exactly match one of the room names you've created (Entrance Room, Climax Room, or one of the 3 Locations). Double-check that every encounter location matches an actual room name.
|
||||||
|
|
||||||
|
CRITICAL: Avoid vague language - Do not use words like "some", "various", "several", "many", "few", "things", "stuff", "items", or "objects" without specific details. Be concrete and specific in all descriptions.
|
||||||
|
|
||||||
|
CRITICAL: All names required - Every room, encounter, NPC, and treasure MUST have a name. Do not leave names blank or use placeholders. If you cannot think of a name, create one based on the dungeon's theme.
|
||||||
|
|
||||||
|
CRITICAL: You MUST output exactly five separate sections with these exact labels on their own lines:
|
||||||
|
"Locations:"
|
||||||
|
"Encounters:"
|
||||||
|
"NPCs:"
|
||||||
|
"Treasures:"
|
||||||
|
"Random Events:"
|
||||||
|
|
||||||
|
Each section must start with its label on its own line, followed by numbered items. Do NOT combine sections. Do NOT embed encounters in location descriptions. Each item must be on its own numbered line. Do not use any bolding, preambles, or extra text. Do not use em-dashes (—) in encounters or NPCs, only use colons for those sections. Absolutely do not use the word "Obsidian" or "obsidian" anywhere in the output.`,
|
||||||
|
undefined, 5, "Step 5: Main Content"
|
||||||
);
|
);
|
||||||
|
|
||||||
const mainContentRaw = [
|
|
||||||
"Locations:",
|
|
||||||
locationsRaw.trim(),
|
|
||||||
"",
|
|
||||||
"Encounters:",
|
|
||||||
encountersRaw.trim(),
|
|
||||||
"",
|
|
||||||
"NPCs:",
|
|
||||||
npcsRaw.trim(),
|
|
||||||
"",
|
|
||||||
"Treasures:",
|
|
||||||
treasuresRaw.trim(),
|
|
||||||
"",
|
|
||||||
"Random Events:",
|
|
||||||
randomEventsRaw.replace(/Random Events:\s*/i, "").trim(),
|
|
||||||
].join("\n");
|
|
||||||
|
|
||||||
const { intermediateRoomsSection, encountersSection, npcsSection, treasureSection, randomEventsSection } =
|
const { intermediateRoomsSection, encountersSection, npcsSection, treasureSection, randomEventsSection } =
|
||||||
parseMainContentSections(mainContentRaw);
|
parseMainContentSections(mainContentRaw);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user