Toms Other Games > Shopkeeper

Quest Writing

(1/11) > >>

Tom:
As mentioned by James, there's some interest in writing quests, and I would certainly welcome it a lot if I didn't have to write them all by myself.

At this time, I can offer what's below and it is very, very rough. But maybe you can puzzle it out and make a quest or two, and if not at least let me know what exactly needs more details.


The basics is that every quest comes in two data files. They are both in YAML format. One contains all the texts (and can theoretically be translated, to provide quests in multiple languages) while the other contains all the technical information.

I will post an example quest below to demonstrate how it all works.

Tom:
Translation file for the rats quest:



--- Code: ---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.

--- End code ---

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 successfullyChallenge 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.

Tom:
The actual quest file for the same quest, this is a lot more tricky:


--- Code: ---# Quest: Rats in the Basement
# written by Tom Vogt <tom@lemuria.org>

min_level:     1
max_level:    2
challenges:
 pack:
  level:        [0,2]
  progress:    1
  test:        [damage, 15]
  success:
   damage:            6
   xp:                100
   gold:                10
  failure:
   damage:            10
 big:
  level:        [2,3]
  progress:    1
  test:        [damage, 20]
  success:
   damage:            8
   xp:                200
   gold:                20
   trophy:    ["Giant Rat Tail", 3, 1]
  failure:
   damage:            20
 room:
  level:        [3,4]
  endboss:    true
  test:        [dexterity, 15]
  success:
   xp:                    100
   gold:                    60
  failure:
   group_damage:        5
   attribute_damage:    [strength, 2]

--- End code ---

Ok, what's going on here?

Firstly, it also has a generic section, that spells out the minimum and maximum character levels for this quest.
Secondly, one by one all the challenges are listed.

Every challenge has a generic, a success and a failure part.
In the generic part, you have these elements:

* level - array of "dungeon levels", min and max. this is used by the progress tree, see below
* progress - by how much to increment the progress counter if they succeed. This is missing on the endboss(es)
* endboss - is this an endboss? An endboss is always needed, it ends the quest. A quest is successful if and only if the party succeeds at a challenge marked endboss.
* test - which attribute to test and what the target value is. This determines success or failureThe success section is used only if they succeed (i.e. reach or beat the target value on the challenged attribute). It contains the xp and gold that they gain on success. It also has optional damage sections (see below), used for combat and other encounters where even upon success, the heroes will take some damage. There is also a trophy section. If you use it, your translation MUST have a trophy line. The trophy section has a name, a chance (in %) that the trophy will drop and how much reputation it gives. Note that if the trophy name is not unique, the reputation value will be shared between all of them (i.e. all Giant Rat Tails will give the same reputation, no matter which quest they are from).

The failure section is used only if the challenge fails. It contains several fields, all of which are optional:

* damage - the total damage that is applied in marching order to the party
* group_damage - damage that each party member suffers
* attribute_damage - attribute and points it gets reduced, again for all party members
* continue - if they can continue the quest after failing this challenge, or if failure means the quest is over (and failed)The section itself has to be there, if nothing happens on failure (no damage, continue false) you can specify "failure: ~" which is the YAML shortcut for "use default values for everything"

To keep in mind about damage is that group_damage is applied to everyone, while normal damage is distributed. So damage: 20 is, for a four-character group, about equivalent to group_damage: 5. Also keep in mind that damage is applied in marching order, and the first characters (usually fighters, then priests) will take more damage than the softer thieves and wizards, while group_damage applies to everyone equally.


Progress
This is where all the magic with branching and alternate endings is. The system is simple and powerful:

* After each challenge, select the next challenge randomly from among all that your current progress level falls into (their min-max levels)
* Complete the challenge successfully, and you get the progress value added to your progress
* Fail and you get +1
* If the random selector picks the challenge you just completed, add +1 and select again (no challenge is ever repeated immediately).This gives you lots of power. Here are just some things that you can do with it:
* Random encounters - simply have a bunch of challenges all within the same range and with low progress numbers. Group will tackle these challenges in random order until it has accumulated enough progress to trigger the first challenge outside that range.
* Branching - make a high progress value (+10 or +20), make sure only one quest falls into that target range, and have another quest ready at +1. On success, it will continue with the high-value challenge, on fail the next one.
* Alternate endings - have two or more endboss challenges with identical or similar levels.There's a lot more you can do with this progress thing.

James:
Worth posting the link to this thread elsewhere on the forum? There may be people who aren't fussed about playing the game for now, but would enjoy writing a quest or two.

Tom:
It will be on their "unread postings" list anyway.

Navigation

[0] Message Index

[#] Next page

Go to full version