Author Topic: Quest Writing  (Read 4278 times)

Tom

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8031
    • View Profile
    • BattleMaster
Quest Writing
« Topic Start: June 09, 2015, 05:54:47 PM »
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

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8031
    • View Profile
    • BattleMaster
Re: Quest Writing
« Reply #1: 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 »

Tom

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8031
    • View Profile
    • BattleMaster
Re: Quest Writing
« Reply #2: June 09, 2015, 06:16:02 PM »
The actual quest file for the same quest, this is a lot more tricky:

Code: [Select]
# Quest: Rats in the Basement
# written by Tom Vogt <[email protected]>

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]

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 failure
The 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.
« Last Edit: June 22, 2015, 08:12:01 AM by Tom »

James

  • BM Dev Team
  • Mighty Duke
  • *
  • Posts: 827
  • WARNING: Outer Tilog is different...
    • View Profile
Re: Quest Writing
« Reply #3: June 09, 2015, 06:19:05 PM »
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.
WARNING: Outer Tilog is different...

Tom

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8031
    • View Profile
    • BattleMaster
Re: Quest Writing
« Reply #4: June 09, 2015, 08:27:42 PM »
It will be on their "unread postings" list anyway.

Tom

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8031
    • View Profile
    • BattleMaster
Re: Quest Writing
« Reply #5: June 10, 2015, 08:06:30 AM »
There is a new parameter called "break", optional for both the success and failure sections. It defaults to 1 (so you should set it explicitly to 0 for some challenges) and is the percent chance that items get lost or break during this challenge. It should be low, because it is tested for all items, so a 5% setting (the max I recommend) means the group loses 5% of its items, statistically speaking, not a 5% chance of losing one item.

James

  • BM Dev Team
  • Mighty Duke
  • *
  • Posts: 827
  • WARNING: Outer Tilog is different...
    • View Profile
Re: Quest Writing
« Reply #6: June 21, 2015, 01:34:09 AM »
I've done a couple of outlines for quests now, just need to get the in the format you need. Hopefully they'll be ok and work... :)
WARNING: Outer Tilog is different...

Zakilevo

  • Guest
Re: Quest Writing
« Reply #7: June 21, 2015, 03:01:23 AM »
I can try to write a few after sunday but yeah I will need you to double check them because I've never written one ever ;)

Tom

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8031
    • View Profile
    • BattleMaster
Re: Quest Writing
« Reply #8: June 21, 2015, 10:22:23 AM »
I will, of course, check everything carefully. Don't worry.

Zakilevo

  • Guest
Re: Quest Writing
« Reply #9: June 22, 2015, 05:39:54 AM »
title:     Ogre in the Forest
summary:     Woodsman Ralph needs someone to deal with an ogre he found in the eastern forest. The ogre has already claimed two of his co-workers.
intro: >
  The party arrives at the woodsman Ralph's house where Ralph greeted them with open arms.
  He quickly led the party to the place where he first met the ogre. The party could found tracks and traces of the ogre leading back to its cave.
  The party advances to fight the ogre.
challenge:
 pack:
  intro: > // A) Test intelligence and strength to build a bridge to get across / B) Test dexterity to connect a rope to get across but requires a theif to do this
    Before entering the cave, the party is stopped by a large swamp.
    A) The party quickly cuts a nearby tree to make a log bridge to get across.
    B) (THEIF-NAME) crosses the swamp by jumping from one tree to another. Then he throws a rope back to his party to help them get across.
success: The party quickly crosses the swamp and enters the cave.
failure: The party has no way to cross the swamp. Ashamed and frustrated, the party leaves the area and heads back to their town.
 big:
  intro: > //Test for strength + dexterity (high) or strength + magic (medium - due to magic being more effective against the ogre)
    As they reach the end of the cave, they finally encounter the ogre. It is tall and large. Taller than any creature the party has seen so far. Angered by the sight of intruders, the ogre grabs a nearby club and lets out a battlecry.
  success: >
    After a fierce battle, the ogre is finally silenced. Drenched in their foe's blood, the party beheads the ogre to keep its head as a trophy.
  failure: >
    After a fierce battle, the only one is left standing and it is the ogre. The creature is proven to be too strong for even these veterans.
 room:
  intro: >
    As they enter deeper into the cave, they find an space big enough even for a giant. It is filled with hostile bats, hungry enough to eat anything they can get.
  success: >
    As the party draw their weapons, bats swarm them as they fall from the ceiling of the cave. The sound of battle soon dies down, leaving only the party behind. Piles of dead bats are the only thing filling the empty space beside the party.
  failure: >
    As the party draw their weapons, they are swarmed by the bats. They are quickly overwhelmed, forcing them to leave the area.
 treasures found (rare):
  intro: >
    After slaying the ogre, the party finds a pile of stuff gathered by the ogre. Mostly coming from its slayed foes, the party digs through the pile to see if anything is worth any value.
  success: >
    The party finds bags of gold and gems. They finds many other valuable stuff but they are too much to carry so they grab the most valuable things out of the pile then leaves the area in joy.
  failure: >
    The pile is mostly made of ogre dungs and broken equipment. There is nothing useful. The disappointed party leaves the area.
result:
 tpk: >
   Woodsman Ralph waited outside for days but there was no sign of the party that went in. He still needs someone to defeat the ogre if he were to continue to make a living off of the forest.
 failed: >
   Bruised and broken, the party retreats. The king of the cave was too much for them. They barely made to Ralph's house only to see Ralph shut his door before them.
 success: >
   With the ogre defeated, the party returns proudly with a bag full of gold and a trophy to show off to. They drink and celebrate their victory in the town.
 great success: > Killed the ogre + found treasures
 With the ogre defeated and its treasures in the party's possession, they return proudly and happily with a wagon full of gold, gems and other valuables to show off.
« Last Edit: June 22, 2015, 05:59:55 AM by Lapallanch »

Zakilevo

  • Guest
Re: Quest Writing
« Reply #10: June 22, 2015, 06:00:15 AM »
Feedback would be appreciated.

Tom

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8031
    • View Profile
    • BattleMaster
Re: Quest Writing
« Reply #11: June 22, 2015, 08:08:50 AM »
firstly: please use fixed formating (insert code, # button).

second: use your own challenge names, not pack, big and room. :-)

third: don't reference trophies this way, they have their own syntax (I'll add it soon).


Crayne

  • Knight
  • **
  • Posts: 45
    • View Profile
Re: Quest Writing
« Reply #12: June 22, 2015, 01:37:37 PM »
So, are you looking for something like this?

Code: [Select]
title: Zombies! Assemble!
summary: Local priest Father Simeon has sounded the alarm bell as more and more of his crypts seem to be disgorging their occupants.
intro: >
The party meet a shaken Father Simeon at the local tavern, fearful as he is of staying too close to the cemetery next to his small chapel on the outskirts of town. He tells them of strange barely
audible music coming from the forest near to the cemetery, and of the dead who wake and leave their coffins to find its source. They don't seem to be very interested in traditional living dead activities
such as menacing the living, but he can't tolerate the sanctity of the cemetery violated in such a manner. He pleads with the party to find the source of the music and remove it, so that the dead may
rest again.
challenge:
  gates:
    intro: >
    Approaching the cemetery gates, the party is confronted with several living dead attempting to shamble away from their not so final resting places. They ignore the party, intent on shambling past
    towards the woods.
    success: The party correctly assumes they can safely follow from a distance and follow the dead into the forest.
    failure: >
    Attempting to send the living dead back to their graves backfired in the worst manner possible. The dead, putrid though they may be, are victorious.
  forest:
    intro: >
    The forest is dark and foreboding, but then, it always is. In the distance witchfire leaps from stone to stone in some kind of clearing. However, before they get there, they are confronted by a
    tombstone golem. "I smell the stench of life on you," it grumbles and attacks.
    success: >
    The group hastily grabs its weapons and shield, just in time to stop the murderous blows the golem deals. In a war of attrition, they manage to whittle the stone abomination down to a beligerent
    pebble before dispatching it with a final blow.
    failure: With little time to prepare, the group gets hammered by heavy blows. Soon, they find themselves defeated by this stone abomination.
  clearing:
    intro: >
    In the clearing, a hooded figure sits cross-legged, playing a flute made of a dark wood. The assembled dead, hundreds of them by now, stand swaying around the figure. As the party enter the
    clearing, the music stops and the figure pulls back its hood, revealing a gaunt, yet somehow striking feminine face. The woman stands and bows before barking commands in a language that
    makes the party's ears hurt. The dead fix them with their empty stares and advance.
    success: The party manages to wade through the masses of decomposing flesh to confront the figure at the center of it all.
    failure: Overwhelmed by the hordes of living dead, the party's quest ends most abruptly.
  necromancer:
    intro: >
    Her hordes of living dead defeated, the woman stands tall and snarls. Her fingers form complex arcane signs and she starts muttering strange incantations. The party waste no time and attack
    before she can do any damage.
    success: The woman attempts to wreak dark havoc on the party, but to no avail. As the final blow is struck, her dark magic dies with her.
    failure: >
    Too little, too late. As the party attacks, the necromancer unleashes spells that suck the life from her opponents. The party is horrendously defeated, leaving the woman in the woords to her dark
    schemes.
result:
  tpk: Father Simeon waits and waits, not knowing that the woman in the woods has added another few minions to her flock.
  failed: >
  After reporting back to Father Simeon, the party drowns its sorrows in the tavern. It's not long before another party is approached to solve the Father's problem. Perhaps they can succeed where
  this party has failed.
  success: Having subdued the necromancer's apprentice, the party reports back to Father Simeon and receives a token of his appreciation.

Edit: input linebreak markers and rewrote failure texts.
« Last Edit: June 22, 2015, 04:29:58 PM by Crayne »

Tom

  • Administrator
  • Exalted Emperor
  • *
  • Posts: 8031
    • View Profile
    • BattleMaster
Re: Quest Writing
« Reply #13: June 22, 2015, 04:20:33 PM »
Perfect!

Now all I need is the other .yml with the quest data and I can immediately use it.
In the first posting you used > linebreaks. That was good, you should have kept it.

From the content, my feedback is:

Title could be a little shorter.
In some failure texts, you might want to make them more ambigeous, as they could result in a TPK, so nobody actually flees, for example.

Crayne

  • Knight
  • **
  • Posts: 45
    • View Profile
Re: Quest Writing
« Reply #14: June 22, 2015, 04:22:20 PM »
Actually, the first one was from Lappalanch. ;)

I'll rework and provide the YAML file.