Friday, September 8, 2017

QND-Quest, a game fragment for Twine/ SugarCube

QND-Quest, the Quick-aNd-Dirty Quest Framework


INTRODUCTION
    I didn't want to do this.
    I had decided that I wasn't going to try to develop my own rules system, that I was just going to go ahead and work on something else.  I had decided that.  My brain apparently had other ideas (heh heh) since that night I could not get to sleep because of everything running around noisily inside my cranium.
    So this is going to be ugly, hence the name, and incomplete (so DIY-required), but here is a simple almost-system that you can use for creating your own adventures.

-d100mechanic.blogspot.com


OVERVIEW
    The basic rules are going to be simple.  We're going to have a few elements that define a character - these are going to map to the kinds of challenges that the character can face in the story.  To determine success or failure we are going to add the value of the appropriate elements and use them as a simple 1-100 percentage.  Sounds easy?  Don't worry, I'm sure I'll complicate it plenty for you :)


GOALS - EVERY GAME NEEDS A SCORE
    I believe in being up-front with the player, showing them what all they can strive for.  So we need some variables we can display to show the player all the possible things they can do in the game.  This is, of course, going to vary wildly with each story - so which of these you want to use, and what numbers to set them at, is something you'll have to decide:

Locations - where all can the player go, what new locations are there to find?
<<set $LocationsVisited = 0>>
<<set $LocationsMax = ??>>

Secrets - what all can the player learn, what mysteries to unravel or puzzels to solve?
<<set $SecretsFound = 0 >>
<<set $SecretsMax = ?? >>

Collections - how many objects are there to pick up, or maybe interact with; or maybe even create?
<<set $CollectionsComplete = 0>>
<<set $CollectionsMax = ??>>

Interactions - how many NPCs are there to talk to, to interact with;  either to get something from or to change their minds or to learn about?
<<set $NPCSMet = 0>>
<<set $NPCSMax = ??>>

Enemies - how many foes are there to defeat, villains to vanquish?
<<set $EnemiesDefeated = 0>>
<<set $EnemiesMax = ??>>

    You can either have these as a simple counter, increasing with each one the player does - or you can have them as a counter and a maximum, to show the player how many of how many they have accomplished (my personal recommendation - a player who reaches the end and sees they missed 2 secrets may feel like playing again to find them).

    By going through this list you can write a good chunk of your story already in the form of all the things the player can strive to overcome and accomplish.  And you can track anything this way; "songs/ ballads heard", "limericks read", "puns made," all could be variables and things your players can know exist to be found/ won/ done in the story.


TIME - THE UNIVERSAL RESOURCE
    To have drama we need cost, and the greatest and most ubiquitous resource is Time.  This we are going to present to the player as "Pace."  Doing things slowly (ie, choosing the slowest option) will decrease Pace, while being quick will increase it.  A high Pace is good, it means you are getting to your destination before your enemies, or discovering the secret before someone else, or getting in the first (and hopefully last) blow (or, like a surprise or ambush attack).  Conversely being slow, having a low Pace, is bad since it means people are getting away from you, you're learning information too late, or you're on the defensive.
    Pace gives us a great way to tempt the player into doing something stupid, or harder or more risky - for the fun of drama :)  By that I mean we can provide an option that's fast (increases Pace) but has a higher difficulty and/or higher penalties for failure - and add an option that's slower (decreases Pace) but is easier and less risky.  This makes that decision take the context of the greater story: do we do something safe now and hope the penalty to Pace doesn't bite us later; or go risky now to hopefully make things easier later?  This is something that takes some work to convey to the player, but adds a great depth to the choices you present.

    We'll set the Pace at 5, and assume a 0-10 scale, which we can test for to create different encounters in the story.
<<set $Pace = 5>>

     In each encounter code (adjust the numbers as you see fit of course) you could put something like this:
<<if $Pace < = 3>>
  do something to make the challenge/ encounter worse
<<eslse if $Pace > = 8>>
  do something to make things better
<<else>>
  put the base encounter here
<</if>>


RESOLVE - THE INTERSECTION OF THE WORLD AND THE CHARACTER
    Let's make another resource we can try to tempt the player into doing stupid, I mean dramatic, things with.  "Resolve" is going to be the first of the character stats - but it's also going to be a resource that gets changed globally.
    In the story, we'll use Resolve as a carrot and or stick, increasing and decreasing it as the character feels bold, succeeds at actions or at taking risks.  We'll reduce it for failures and mistakes and plain old bad luck.  This has to be done carefully, and the player has to know before making a decision if Resolve could be effected (again, player knowledge good - you can only make good decisions if you have good knowledge (of course, we may want to simulate making bad decisions off little or incorrect knowledge; but that needs to be a deliberate plan and carefully telegraphed and executed).
    For the player, Resolve is the first stat, and it gets added to EVERYTHING.  Every roll for failure or success uses Resolve, so it is the constant bedrock of their performance (which is how we can make it tempting to gain or scary to lose).

We'll set it at 5, from 0 - 10 (a pattern I'm going to repeat a lot).
<<set $Resolve = 5>>

    Theoretically we could test Resolve the same way we do Pace, in an encounter/ challenge and have it modify that challenge.  Whatever works for you - I'll be honest that Resolve is the single idea I like the most but also the one I have the least idea how to use well.


DEFINING CHALLENGES
    Every challenge is going to have a chance of success based on the character.  There are 6 things that are going to combine to make that chance:

1) Base Difficulty - this is the starting point, we'll say 50 for something Easy, 35 for something Hard and 20 for something Incredible.  Theoretically we could also use Pace as a part of the base difficulty, but that seems kind of weird, so I'd stick to using Pace to change the outcomes, not the difficulties.

2) Resolve - this is the first character element, and it will apply everywhere/when, adding to the Base Difficulty.

3) Attributes - each character will have 5 attributes, but only one will apply to a single challenge roll.  The attributes are: Physical, Emotional, Mental, Spiritual, and Relational (I'll discuss all this stuff later in more detail).

4) Trait - each attribute has 3 traits, and only one will be added to the total.  For example, the Physical attribute has the traits of Power, Speed and Toughness.  So breaking down a door might be Physical + Power.

5) Skill - like attributes there are 5 skills and only one for each roll.  The skills are Exploring, Investigating, Manipulating, Talking and Fighting.  Exploring covers everything related to movement and travel and dealing with the environment - so our door-breaking example might use Physical +Power +Exploring.

6) Focus - each skill has multiple specializations (focus/foci) and again one will apply.  The Exploring foci are: Movement, Stealth, and Bypass.  Which means our full door-breaking challenge, against a simple wooden door, might be: Easy +Resolve +Physical +Power +Exploring +Bypass.

    Now, every character element goes from 0 to 10, so combining the 5 character elements with the base difficulty gives anywhere from a 20 to 100 percent chance of success.  I think 20 is fine at the low end, it means the player will always have some sort of chance, but your mileage may vary - so adjust the numbers (in general or for a specific challenge) as needed.


CHARACTERS (poor fools, they make us laugh, ha ha ha ha ha :)
    So let's actually define a character, maybe even make one.  We have 3 core parts that every character has:

Resolve - our main element, and it starts at 5 for everybody.

Attributes and Traits - attributes deal with the basic nature of the character herself.  Here are the attributes and their traits in more detail...

1) Physical - everything to do with the body
    Power: strength, raw force, He-Man and She-Ra stuff :)
    Speed: quickness, agility, nimbleness, deftness
    Toughness: endurance, resistance (of physical issues)

2) Emotional - everything to do with feelings
    Passion: intensity, drive, related to Resolve but not quite the same (while Resolve is global, Passion is local; the character has something they feel passionate about, which you could explicitly define somewhere (like in an Array) or just imply from the character's background or setting).
    Empathy: awareness of how others are feeling (and maybe how to manipulate or take advantage of that?)
    Control: the ability to use one's emotions instead of being used by them, to resist outside emotional influence

3) Mental - the mind is mostly about truth
    Reasoning: the ability to 'fill in' incomplete information, test intuitions, 'think outside the box.'
    Memory: the ability to pull from past experiences (of things one's done and seen and heard).
    Fortitude: your ability to resist and adapt to emotional shocks

4) Spiritual - emotions are brought about by the moment, but the spirit comes from decisions made in the past and a desired future outcome or actions.
    Conviction: the measure of how "right" you think your world-view is (so this could be applied to some actions/ choices but not others, depending on how they matched up to the character's internal outlook)
    Sensitivity: read people and places/ events. This lets you read someone's inner nature - combined with Insight it gives you a complete blueprint of another person socailly (what they want and how they're trying to get it).
    Forgiveness: how well you can adapt to lapses of judgment and failures, both yours and others

5) Relational - everything involved in dealing with other people.
    Charisma: impose your will on others, force of personality
    Insight: see what people are trying to do (socially); this helps you read someone's actions (are they lying to you, trying to appeal to an emotion, hiding something...)
    Aplomb: ability to deal with difficult people or awkward situations

    Now, while the Attributes and Traits usually go together, they don't have to.  You could create a scenario like: shooting a gun is Physical + Speed, but closing your eyes and hitting the same target (without moving) is Physical + Memory (for your "muscle memory").
    Exactly how do you combine these for different actions?  I have no idea.  This is just a list I knocked out to have something that seemed comprehensive, I really don't know how to implement everything here; so change these as you need (and also drop or ignore any that you don't need for your story).

Skills and Foci - like attributes and traits there are 5 skills and each has 3 foci.  While Attributes and Traits are innate abilities that are developed by experience, Skills are about what the character has trained in and been exposed to doing...

1) Exploring - everything involved in moving through the world, getting from one place to another despite any obstacles in the way.
    Movement: everything about travel, from acrobatics to survival
    Stealth: not being seen is usually involves working with or blending into your environment (white is stealthy in the arctic, not so in the jungle)
    Bypass: how to get over, around and through obstacles in the environment; from lock-picking (an urban obstacle) to climbing

2) Investigating - everything dealing with gathering and applying information (in particular dealing with missing information)
    Forensics: re-create the past by looking at the present
    Prediction: determine the future by looking at the present
    Discovery: fill in missing pieces of the present

3) Manipulating - everything dealing with objects or things (and people as things, like 'surgery' is dealing with the human body instead of the human person)
    Technician: how to use and repair objects
    Craftsman: how to make and design objects
    Hacker: how to use objects in ways they were not meant to be used

4) Talking - everything involved in dealing with other people/ sentient creatures
    Barter: give something for something, from diplomacy (you scratch my back I'll scratch yours) to bribery
    Exploit: take advantage of something about the other person, from a lie (take adv of fear, for example) to promising something you're not going to give (or, taking advantage of something they want)
    Oratory: try to make the other person feel something different or change a postion they have on something (alter their internal landscape)

5) Fighting
    Unarmed: fighting with only your body. natural weapons
    Melee: fighting at close range
    Ranged: fighting at a distance


    An Idea: These are all meant to be very broad, so they can be as simple as possible to describe while also being useful distinctions (hopefully).  If you need more detail, add an Array of some specific elements.  For example, Exploring could have it's score, and also an Environments = [urban, forest] array to specify where that score applies at (use 1/2 or even 0 for outside environments).

Now, the core 3 are Resolve, Attributes and Skills.
    Resolve always starts at 5 (unless you want to mess with that for some reason...).
    Each character starts with the following 5 scores, one set for Attributes and one set for Skills, and the player decides how to allocate them: 7, 5, 5, 3, 3

So, a player who wants to make a really strong fighter might do the following-
    Attributes: Phys-7   Emot-5   Ment-5   Spir-3   Rltn-3
    Skills: Explr-5   Invest-3   Manip-5   Talk-3   Fight-7

A more detective-like character might be:
    Attributes: Phys-3   Emot-5   Ment-7   Spir-3   Rltn-5
    Skills: Explr-5   Invest-7   Manip-3   Talk-5   Fight-3

An Idea: you can also use descriptive names instead of numbers if you want:
Weak (wk)  0-2
Competent (co)  3-4
Strong (st)  5-6
Exceptional (ex) 7-8
Legendary (lg) 9-10

    The core 3 are "core" because everyone has the same ones and the same pool of starting scores.  The 3 Secondary elements are more flexible.

Resources - every character has the same starting Resources...
    Health: what shape your body is in
    Assets: what shape your finances are in, in whatever terms you want (so could be "gold pieces" or "favors owed" or "cows owned" or even a combination of them all)
    Stability: what shape your mind is in, sanity basically (though the Cuthulu games worked over that stat so much)
    Integrity: what shape your soul is in, in terms of how much you've lived your ideals
    Reputation: what shape you fame/ infamy is in, how other people see you

    Every Resource starts at 20.

    Advantages - are special abilities that use the Traits and Foci.  Each player can make up their own advantages, buying points in a Trait or Focus and naming the resulting ability whatever seems appropriate.  Or, if you want to do some extra work, you can make a list of your own the player can choose from.  No trait or focus can go above 10, period.  I'd also say that no starting trait/focus can go above 6, but I'm not sure about that.  In fact, these numbers are all being made up as I type them - so you might want to play-test them yourself and see what you think (if you do, tell me).
    I've been debating weather Advantages (or, you could call them Abilities or Powers, whatever fits) should be limited to Traits and Focus, or if they could increase Attributes and Skills as well.  If you want them to increase anything, I'd say that Attributes and Skills cost twice as much (or x3), since they (in theory) apply to more situations.

    Costs - Advantages are not free, the totals of all the points gained has to be off-set by points lost.  And that cost is paid out of the character's Resources.  No Resource can go below 1 - there needs to be something bad for low resources, which I haven't worked out yet.  Maybe 5 would be a better minimum number, or 3?? Maybe starting at 20 is too high, 10 or 15 could be better??  Again, making up numbers as I go along.

So let's build our fighter from above:
  Attributes:
      Physical-7  Emotional-5  Mental-5  Spiritual-3  Relational-3
  Skills:
      Exploring-5  Investigating-3  Manipulation-5  Talking-3  Fighting-7
  Advantages:
      Trained (and Equipped) Soldier  (+5 Melee, +5 Ranged)
      Veteran of the Front Line  (+5 Power, +5 Toughness)
  Costs:
      Has Done Questionable Things (-5 Integrity, -5 Reputation)
      The Army Doesn't Pay Very Well  (-5 Assets)
      The Old Wound  (-5 Health)
  Resources:
      Health-15  Assets-15  Stability-20  Integrity-15  Reputation-15

And the completed detective:
  Attributes:
      Physical-3  Emotional-5  Mental-7  Spiritual-3  Relational-5
  Skills:
      Exploring-5  Investigating-7  Manipulation-3  Talking-5  Fighting-3
  Advantages:
      Commune With Spirits  (+3 Forensics, +3 Prediction)
      Hex Magick  (+5 Physical)[note: his magic works by decreasing it's target, which in this case mechanically means increasing his own stats, uses the optional rule above, at x2 cost]
      Outlaw Scholar  (+2 Stealth, +2 Bypass)
  Costs:
      Indoors Too Much, Reading By Bad Light  (-5 Health)
      Seen Things Man Was Not Meant To See  (-5 Stability)
      Shunned As A Sorcerer  (-5 Reputation)
      "Leased" His Soul  (-5 Integrity)
  Resources:
      Health-15  Assets-20  Stability-15  Integrity-15  Reputation-15

And there we have a simple, yet hopefully not simplistic, way to create a character.  Note, in this system 'equipment' isn't really a thing.  Having gear just means a bonus to a Trait or Focus, we're not counting pounds or arrows.  This is deliberate, my idea was to make something simple to use as a base.  If you want to do equipment I'd just make an Array and have specific challenges/ situations check for an item.  So, the locked door could check if you have the key (hey, great place for a +Pace, right?) - presenting the challenges (break, pick, etc) if you don't.  Or at the end of every fight you could check if the character has a health potion (Equipment.contains("Health Potion") should work) and let them drink it to regain health.


THAT'S PRETTY MUCH IT, RIGHT?
    Yeah.  Now you just need a story.  What do you want to tie to the Resources?(any members of a religious group or other order that would respond well/poorly to Integrity?  Is the character dead or has to resurrect (for cost?) at 0 Health?) How do you want to modify challenges or even the story for Pace?(at Pace 1 does the spy your chasing get away?)  Each challenge just needs to be defined by what elements go into it, and then add up those elements that the character has.  You can then either keep the numbers secret, give a vague hint as to the odds, or just explicitly state them.  It's not the odds so much, it's the consequences.  Maybe that long-shot chance gives a nice bonus to Pace or Resolve?  Maybe that easy-to-do option will mean losing out on a Secret?  The true craftiness in writing Interactive Narratives is to make the stuff before and after the roll/ decision the really interesting and captivating part - the mechanics are meant to be simple so they don't really have a lot of impact by themselves.

    So, let's throw out some more variables (to save you a touch of typing), and a widget for how to add the necessary numbers, and we'll be just about ready to start seriously working on a story!

    I'm going to assume that only characters have stats, this system was not designed for head-to-head (or "opposed") rolls between two characters.  A resisting NPC just means changing the Base Difficulty (so fighting the Guards might be Easy, the Lieutenant Hard and the Captain Incredible).  Thus, I'm defining all the player's stats as straight variables/ arrays.  If you really want to work out your own PCvNPC system, you could make an Object that holds all these together as properties.  So, our character stats:

Let's put the Attributes in an Array...
<<set $Attributes = [0, 0, 0, 0, 0]>>
Then, instead of memorizing index numbers, let's make some constants (typing out the name is longer, but it might be easier to remember and read, whatever works for you)...
<<set $Physical = 0>>
<<set $Emotional = 1>>
<<set $Mental = 2>>
<<set $Spiritual = 3>>
<<set $Relational = 4>>
Using the variables for the indexes just let's you write something like:
$Attribute[$Emotional]
to access that variable, though you could also just use the variable itself.  I don't know, I'm just going to throw this out there. (though, if you did want to have multiple characters as Objects this would let you do:)
$Player1.$Attribute[$Emotional]

We'll do the same for Skills...
<<set $Skills = [0, 0, 0, 0, 0]>>
<<set $Exploring = 0>>
<<set $Investigating = 1>>
<<set $Manipulating = 2>>
<<set $Talking = 3>>
<<set $Fighting = 4>>

And Traits...
<<set $Traits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]>>
<<set $Power = 0>>
<<set $Speed = 1>>
<<set $Toughness = 2>>
<<set $Passion = 3>>
<<set $Empathy = 4>>
<<set $Control = 5>>
<<set $Reasoning = 6>>
<<set $Memory = 7>>
<<set $Fortitude = 8>>
<<set $Conviction = 9>>
<<set $Sensitivity = 10>>
<<set $Forgiveness = 11>>
<<set $Charisma = 12>>
<<set $Insight = 13>>
<<set $Aplomb = 14>>

And Foci...
<<set $Focus = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]>>
<<set $Movement = 0>>
<<set $Stealth = 1>>
<<set $Bypass = 2>>
<<set $Forensics = 3>>
<<set $Prediction = 4>>
<<set $Discovery = 5>>
<<set $Technician = 6>>
<<set $Craftsman = 7>>
<<set $Hacker = 8>>
<<set $Barter = 9>>
<<set $Exploit = 10>>
<<set $Oratory= 11>>
<<set $Unarmed = 12>>
<<set $Melee = 13>>
<<set $Ranged = 14>>

And Resources...
<<set $Resources = [0, 0, 0, 0, 0]>>
<<set $Health = 0>>
<<set $Assets = 1>>
<<set $Stability = 2>>
<<set $Integrity= 3>>
<<set $Reputation = 4>>

Let's make some constants for the Base Difficulty too, that'll make it easy to play with the numbers and see what works...
<<set $Easy = 50>>
<<set $Hard = 35>>
<<set $Incredible = 20>>

Okay, this is not going to be a fully-working widget, just something you can work on (again, I'm throwing this out as I type it, I've got another project that's eating up my code/test time):
/********
**  In the stylesheet put:
**    .warning {
**      color: white;
**      background-color: red;
**    }
********/

/********
** Using an object allows you to create the parameters for a challenge 

**  in one place and re-use them later; don't forget to delete the comments :)
********/
<<set ChallengeObject = {
    Name: "the short name for the challenge/action",
    Description: "a longer description of the challenge/action",
    Base: ###,      /* ie, $Easy or a custom number */
    Attribute: $AttIndex,     /* ie, $Physical or $Mental */
    Trait: $TraitIndex,     /* ie, $Power or $Memory */
    Skill: $SkillIndex,     /* ie, $Exploring or $Fighting */
    Focus: $FocusIndex     /* ie, $Stealth or $Melee */
}>>


/********
** <<ChallengeOption ChallengeObject>>
** This widget shows the option to the player
**  $args[0] = ChallengeObject - pass the base object
********/
<<widget "ChallengeOption">> <</nobr>>
$args[0].Description
<br> You have <<ChallengeOdds $args[0] print>>
<br> <<linkreplace $args[0].Name>>
<<ChallengeOdds $args[0]>>
/* I added the Pace to the results below, modify that as you want */
<<if $Success == true && $Pace >= 8>>
  /* write code for results */
<<elseif $Success == true>>
  /* write code for results */
<<elseif $Success == false && $Pace <= 2>>
  /* write code for results */
<<elseif $Success == false>>
  /* write code for results */
<<else>>
  <span class="warning">ERROR: unable to determine results</span>
<</linkreplace>>
<</nobr>> <</widget>>

/********
** <<ChallengeOdds ChallengeObject "print">>
** This widget actually calculates the odds and determins success
**  $args[0] = ChallengeObject - pass the base object
**  $args[1] = print - widget will print odds in-line but not roll
**      for success [optional]
********/
<<widget "ChallengeOdds">> <<nobr>>
<<set _Odds = 0>>
<<set $Success>>
  <<set _Odds += $args[0].Base>>
  <<set _Odds += $Resolve>>
  <<set _Odds += $Attributes[$args[0].Attribute]>>
  <<set _Odds += $Traits[$args[0].Trait]>>
  <<set _Odds += $Skills[$args[0].Skill]>>
  <<set _Odds += $Focus[$args[0].Focus]>>
<<if _Odds < 1 || typeof _Odds !== 'number'>>
  <span class="warning">ERROR: unable to determine odds</span>
<</if>>
<<if %args[1] == "print">>
  _Odds% of success.
<<else>>
  <<set _Roll = random(1, 100)>>
  <<if _Roll <= _Odds>>
    <<set $Success = true>>
  <<else>>
    <<set $Success = false>>
  <</if>>
<</if>>
<</nobr>> <</widget>>

 Let me know if, by some miracle, that works - or if it doesn't, should anybody out there really want to use this system, I'll try to develop it some more.


RANDOM THOUGHTS ON MAKING CHALLENGES
You can always force a Focus.  Maybe combat in the castle courtyard begins at long range, so the first challenge is a Fighting+Ranged attack.  A character who can make ranged attacks can sit there and trade shots, a melee-only character needs to roll to not get hit, then can close and do melee combat instead.

There's always more than one way to do something.  The locked door seems like a possible:
Physical +Speed +Exploring +Bypass to pick the lock.  Could also be a:
Physical +Power +Exploring +Bypass to break down the door.  Or even a:
Physical +Power +Fighting +Unarmed to break down the door (you could even test for both and give the player the best if you were feeling generous).  Having a few different options for each challenge will keep the player from feeling useless.

What's the risk, what's the reward?  this is the critical part of a challenge, what's at stake and what can the player get out of it?  For some real fun though, mix those up with each way to approach the challenge.  For our example above, the locked door.  Maybe picking it will increase Pace, while bashing it will reduce Resolve (hey, hitting a door does not sound like fun after all)?  How else can you play with different approaches to an obstacle?  I firmly believe the more creative you can get here the better your story will be.


OKAY, THERE YOU GO
Yeah, I know it isn't much.  Like I said at the beginning, I didn't plan on doing this - it's all been a spur-of-the-moment creation.  I realize that you'll have to do plenty of work of your own to turn this into a story, but I hope that something here will help; by offering some inspiration if nothing else.


LICENSING
I'm releasing this system under a Creative Commons Attribution 4.0 International license, so you can use and expand on the system as much as you want, for personal or commercial projects, as long as you include a line like: "Uses the QND-Quest Framework by d100mechanic.blogspot.com" in your project.



No comments:

Post a Comment