Author Topic: Quest Writing  (Read 30355 times)

Tom

  • BM Dev Team
  • Exalted Emperor
  • *
  • Posts: 8228
    • View Profile
    • BattleMaster
Re: Quest Writing
« Topic Start: 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 <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]

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 »