Author Topic: Quest Writing  (Read 30558 times)

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Quest Writing
« Topic Start: June 09, 2015, 06:02:14 PM »
Translation file for the rats quest:


Code: [Select]
title:     Rats in the Basement
summary:     Barkeeper Joe has locked his basement after a rat infestation, and is looking for someone to take care of it so he can serve wine again.
intro: >
  The party arrives at the Three Headed Horse tavern and is greeted by Joe and his wife. They explain that
  there are really big rats down in the cellar, but they cannot afford to leave it like that, it's where
  they store their food and barrels of ale and wine. The heroes agree to help them out for a small sum,
  and enter the dark and dusty basement.
challenge:
 pack:
  intro: >
    Around one corner, the party meets a pack of hungry, aggressive rats.
    After a moment of hesitation on both sides, the rats swarm the group and attack.
  success: There is a short battle with biting and scratching rats, but with their combined efforts, the party defeats the rats and continues.
  failure: Surprisingly, a few rats are more than a match for this group of "heroes", and after a short battle, they flee the basement bleeding and ashamed.
 big:
  intro: >
    As they turn into a dead end, they suddenly spot the giant rat, the size of a dog. Red eyes glow in the darkness and yellow
    teeth shine in the light of torches as the creature approaches, growling.
  success: >
    Drawing their weapons, the group prepares for combat just as the giant rat jumps on them. After a few blows and bites,
    it is over and the beast lies dead and defeated on the ground.
  failure: >
    Drawing their weapons, the group prepares for combat and is immediately attacked. Blows are struck and bites pierce armour
    and the battle rages for some time. Finally, the monster prevails, too strong and too big for the heroes.
 room:
  intro: >
    As they find their way through the basement rooms, suddenly a small draft makes one of the torches flicker and they stop.
    A quick search reveals a hidden door. Carefully, they open it.
  success: >
    Just in time they see the tiny mechanism that is inside the frame and with some swift fingerwork, disarm it. As the door
    opens, a vial of poison gas becomes visible above the door. Inside is a storage room with long forgotten valuables.
  failure: >
    Too late they notice the trigger and the vial that falls from the ceiling and shatters on the ground, releasing a cloud
    of poison gas. Coughing, they run back to the surface, barely reaching the fresh air outside. The poison flows into their
    muscles, drawing their strength.
result:
 tpk: >
   Like this or similar it must have happened, because nobody has seen any of the heroes since, and The Three Headed Horse
   is still not selling any wine. If nobody else can manage to defeat the rats, very soon it will have to close.
 failed: >
   And so they retreat, defeated by a simple basement and its furry inhabitants. A shame to all adventurers, they crawl back
   into the tavern and then the street, where they collapse into a puddle of water from last nights rain.
 success: >
   All the foes vanquished, the party returns victorious, collecting their promised reward and free drinks for the rest of
   the month.

Explanation:
  • First, syntax is important in YAML. The number of spaces in front of every line is not arbitrary, it structures the document.
  • Texts can be in one line, or using the > + 2 indents syntax can span multiple lines
  • There's an intro section containing texts for:
  • ...title - name of the quest
  • ...summary - what you read in the overview, when the party has accepted the quest but not started it
  • ...intro - the first paragraph of the quest log when the party runs the quest
  • Then comes a section containing all the challenges. For every challenge there are three texts:
  • ...intro - always shown, when the challenge is begun
  • ...success - shown when the party successfully completes the challenge
  • ...failure - surprise, surprise, shown when they fail
  • ...trophy - additional(!) text shown when they take a trophy
  • At the end is a results section:
  • ...tpk - everyone died (total party kill)
  • ...failed - they failed the quest
  • ...success - they completed the quest successfully
Challenge names have to be unique within the quest, so you cannot have two challenges of the same name in the same quest (but you don't have to worry about other quests).


This is all very simply and should largely explain itself.
« Last Edit: June 22, 2015, 08:09:53 AM by Tom »