|
| 1 | +# "YAML Ain't Markup Language" (YAML) files have a few basic formatting rules. |
| 2 | +# 1. Every character within the file is treated as a character, so quotatons |
| 3 | +# and punctutation are not necessary, but they are allowed. |
| 4 | +# 2. "Octothorpes" or "pound signs" or "hashtags" (#) are always ignored by |
| 5 | +# programs that are reading/parsing YAML files. |
| 6 | +# 3. "Keys" or "Keywords" are always the first thing followed by a colon (:) |
| 7 | +# followed by a space ( ) and then a "Value". |
| 8 | +# 4. You can either have: |
| 9 | +# a) Single values. |
| 10 | +# b) Indented and hyphenated/bulleted lists of values. |
| 11 | +# c) Indented and further expanded keys and values. |
| 12 | +# 5. Indents are made up of 2 or 4 spaces and must be consistent throughout, |
| 13 | +# I prefer 4 spaces for easier readability. |
| 14 | +# |
| 15 | +# In this example History YAML for use with the MakeRPG system's |
| 16 | +# CharacterCreator application, I will demonstrate the rules to follow to build |
| 17 | +# a valid history rolling system specifically for this software. |
| 18 | +# |
| 19 | +# There are more comments throughout, so please read from top to bottom |
| 20 | + |
| 21 | +### vvv IMPORTANT vvv ### |
| 22 | +# A "START" key: value and an "NPC" key: - list are required for |
| 23 | +# CharacterCreator where values are all "history event names", a.k.a. "events" |
| 24 | +### ^^^ IMPORTANT ^^^ ### |
| 25 | + |
| 26 | +# The START key's value MUST match a history event name below |
| 27 | +START: Personal Style # here's a basic key: value usage |
| 28 | +# empty lines are okay throughout between keys and values, but not necessary |
| 29 | + |
| 30 | +# The NPC key's hyphenated list MUST match a history event name below for each |
| 31 | +# bulleted point |
| 32 | +NPC: |
| 33 | + - Personal Style |
| 34 | + - What do you think of people? |
| 35 | + |
| 36 | +# A "history event" is a single event which you would roll to choose in |
| 37 | +# character creation during a regular game. The order that history events |
| 38 | +# appear does not matter as long as every named event has a matching definition. |
| 39 | +# History events MUST have at least a "dice" and a "roll" key. |
| 40 | +# |
| 41 | +# The dice definition can be any dice definition of |
| 42 | +# the form <QUANTITY>d<SIDES> <OPTIONAL + or -> <OPTIONAL OFFSET>, where |
| 43 | +# <QUANTITY> MUST be an integer/whole number value of dice to throw, <SIDES> |
| 44 | +# MUST be an integer/whole number greater than 1 representing the number of |
| 45 | +# sides or possibilities of the dice, <OPTIONAL + or -> is an optional addition |
| 46 | +# or subtraction to be used with <OPTIONAL OFFSET> which MUST also be an |
| 47 | +# integer/whole number. Examples: |
| 48 | +# a) 1d2 |
| 49 | +# b) 5d17 |
| 50 | +# c) 1d8 + 4 |
| 51 | +# d) 3d6 - 2 |
| 52 | +# |
| 53 | +# The roll key's values must themselves be key: values where all the possible |
| 54 | +# dice rolls are represented in the keys. For example, the following history |
| 55 | +# event is a 1d10 dice event, meaning all values between 1 and 10 must have some |
| 56 | +# sort of "outcome" value. In this case the outcomes are a character's |
| 57 | +# preferred personal style. |
| 58 | +Personal Style: # keys can have multiple words and even punctutation |
| 59 | + dice: 1d10 # see the dice rule above |
| 60 | + roll: |
| 61 | + 1: Leather # one word or multiple words are fine |
| 62 | + 2: Pant-suits # hyphenated words are fine |
| 63 | + 3: Suit & tie # special characters and symbols are fine excluding # |
| 64 | + 4: EXERCISE wear # a mix of upper-case and lower-case is fine |
| 65 | + 5: No real pants. Never real pants. # punctutation and spaces are fine |
| 66 | + 6: Trendy/fashionable |
| 67 | + 7: Militaristic, official or casual |
| 68 | + 8: Street clothes |
| 69 | + 9: Nudist |
| 70 | + 10: always Mismatched |
| 71 | + next: What do you think of people? # the "next" key indicates what's next |
| 72 | +What do you think of people?: # even punctuation is allowed in event names |
| 73 | + dice: 1d6 # not all dice need to be the same |
| 74 | + roll: |
| 75 | + 1-3: Love 'em # you can use hyphens like this to represent a roll span |
| 76 | + 4-6: Hate 'em # remember to cover all possible rolls |
| 77 | + next: Age |
| 78 | + |
| 79 | +# This example shows the special "re-roll" capability with the "<ROLL X>" tag. |
| 80 | +# For every <ROLL X> tag there has to be a reroll key down the line |
| 81 | +Age: |
| 82 | + dice: 1d6 + 16 |
| 83 | + roll: |
| 84 | + 17: # the roll numbers have to correspond to the dice roll totals |
| 85 | + next: Life # note how no tag means no re-roll, or just 1 roll |
| 86 | + 18: |
| 87 | + next: <ROLL X2> Life # roll two times total |
| 88 | + 19: |
| 89 | + next: <ROLL X3> Life # roll three times |
| 90 | + 20: |
| 91 | + next: <ROLL X4> Life # you get the idea... |
| 92 | + 21: |
| 93 | + next: <ROLL X5> Life |
| 94 | + 22: |
| 95 | + next: <ROLL X6> Life |
| 96 | + next: Siblings # you can have a next key after the re-rolls if you like |
| 97 | + |
| 98 | +# This example shows how you can mix next keys with outcomes in rolls. |
| 99 | +# Pay special attention to the reroll at the end. |
| 100 | +Life: |
| 101 | + dice: 1d10 |
| 102 | + roll: |
| 103 | + 1-3: |
| 104 | + next: The good and bad |
| 105 | + 4-6: |
| 106 | + next: Friends or enemies? |
| 107 | + 7-8: |
| 108 | + next: Romance! |
| 109 | + 9-10: Nothing eventful |
| 110 | + reroll: Life # "reroll" is really "return to the last <ROLL X> tag" |
| 111 | + |
| 112 | +# In this example we will define a few rolls which lead to a reroll as well as |
| 113 | +# demonstrate the EVEN and ODD roll keywords and the "<NPC type>" tag. Each |
| 114 | +# <NPC type> tag triggers an NPC history events list roll through the NPC: -list |
| 115 | +# defined above and their character name is prepended with the NPC type info. |
| 116 | +# |
| 117 | +# Here we have 7 possible <NPC sibling> rolls and 3 possible only child rolls. |
| 118 | +Siblings: |
| 119 | + dice: 1d10 |
| 120 | + roll: |
| 121 | + 1: |
| 122 | + next: <NPC sibling> Sibling binary gender |
| 123 | + 2: |
| 124 | + next: <ROLL X2> <NPC sibling> Sibling binary gender |
| 125 | + 3: |
| 126 | + next: <ROLL X3> <NPC sibling> Sibling binary gender |
| 127 | + 4: |
| 128 | + next: <ROLL X4> <NPC sibling> Sibling binary gender |
| 129 | + 5: |
| 130 | + next: <ROLL X5> <NPC sibling> Sibling binary gender |
| 131 | + 6: |
| 132 | + next: <ROLL X6> <NPC sibling> Sibling binary gender |
| 133 | + 7: |
| 134 | + next: <ROLL X7> <NPC sibling> Sibling binary gender |
| 135 | + 8-10: Only child |
| 136 | + next: Love affairs # when all the re-rolls are over, next is "Love affairs" |
| 137 | + |
| 138 | +# Here, regardless of the dice, an odd roll of the dice means a "female" outcome |
| 139 | +# and an even roll means a "male" outcome. |
| 140 | +Sibling binary gender: |
| 141 | + dice: 1d12 |
| 142 | + roll: |
| 143 | + ODD: Female |
| 144 | + EVEN: Male |
| 145 | + next: Sibling relative age |
| 146 | +Sibling relative age: |
| 147 | + dice: 1d10 |
| 148 | + roll: |
| 149 | + 1-5: Older |
| 150 | + 6-9: Younger |
| 151 | + 10: Twin |
| 152 | + reroll: Sibling binary gender |
| 153 | + |
| 154 | +# And lastly, you can combine all these things as necessary. This Example |
| 155 | +# triggers four possible different NPC types and two of those are simple |
| 156 | +# outcomes while two of them link off to two more history events (not defined in |
| 157 | +# this file). Since this has no top-level next keyword, the history ends here! |
| 158 | +Love affairs: |
| 159 | + dice: 1d10 |
| 160 | + roll: |
| 161 | + 1-4: <NPC happy love> Happiness |
| 162 | + 5: |
| 163 | + next: <NPC tragic love> Tragedy |
| 164 | + 6-7: |
| 165 | + next: <NPC problematic love> Problems |
| 166 | + 8-10: <NPC date> Dating |
0 commit comments