Sunday, October 15, 2017

Wallpaper - Computer Games vol 2




You can never have too much Fallout...











Open2 Engine: Bookworm - part 3 - Saving Notes

    Okay, now that I've gotten the core of Bookworm up and running, the ability to load documents, time to start adding features.  The next thing I want is to let the user add notes to the document.  Here are some screenshots:






    So what I've done is add a jQuery UI "Accordion" panel to the bottom of the display area, and buttons to load and save a text file for notes.  The user can also click on the accordion to close it if they don't want to make notes.

Adding the Accordion
    To add the accordion, here's the HTML code...


    Basically, the accordion is just an <h3> header with a <div> for the body.  In there is a <textarea> for the notes and two buttons, one to load a text file and one to save it.  The buttons use this JavaScript...


    This function is almost identical to the one that loads the document, it just puts the contents of the file in a different place.


    Saving the file is the new thing of the day.  It's a little complicated, and is more of the code from the "This Could Be Better" blog I referenced earlier.  Basically there are two parts to saving the file.  First, you create a "blob" or "binary object."  That's basically fancy-speak for a file.  You set the contents of the <textarea> as the contents of the file.  Then you create an "object URL" to make a download link to the file.  And I added a line that sets the filename when you save the file to be the same as the file you loaded, which I thought would be convenient to let you quickly over-write the existing file, but instead you get a "filename (1).txt" because Windows will add a number to keep you from overwriting an existing file.  So that didn't work exactly as I'd hoped.
    The second part, now that the file has been made, is to actually download it.  Here you create a hidden anchor link and add it to the document, then call the "click" event on it (since you can't see it to click on it), and finally destroy the hidden link once it's been used.


    I did notice some spacing issues when adding the accordion.  The buttons were appearing before the textarea instead of after it, so I added the "clear: both" to the textarea and a "clear: left" to the load button to make sure everybody was on separate lines.  The accordion itself was being clipped, so I also added the "min-height" to the tabs to make sure there was enough room to see the accordion (I think the trouble came from the fact that the accordion is under the display area, which is hidden and dynamically populated with the document, so the browser didn't know how much space to reserve for everything).

    So there is one more feature added to my little program, it's slowly but surely growing in power :)


Thursday, October 12, 2017

Narrative and Theme in World-building

    I apologize that this post is going up a day late, and is really going to ramble - I'm having a hard time getting my thoughts together into something useful :(  I'll do my best though...


    So Google has 2 definitions for the word "theme" (as a noun) -
  1. the subject of a talk, a piece of writing, a person's thoughts, or an exhibition; a topic
  2. the stem of a noun or verb; the part to which inflections are added, especially one composed of the root and an added vowel
    It's the second one that hits me, "the part to which inflections are added."  If the narrative is the drive of the story/ experience, then the theme is the 'inflection' the added something that enhances the experience.  Now hold that thought.

    Dungeons & Dragons has always had the idea of alignment.  It's gone thorough a few iterations, but I want to grab the 3.5/Pathfinder and 5e SRDs that use the 9-points on 2 axis system.  You have one axis, Law - Neutral - Chaos and the second axis is Good - Neutral - Evil.  The double use of 'neutral' is one of the biggest flaws in my opinion, but honestly the whole system is a mess.  The first question, as with any mechanic, is "so what?"  So what does having an alignment do?  It is not tied to experience, it's not tied to much actually.  In 3.5 there were a lot of spells, really quite a lot of spells, that targeted alignment, and then some really vague and worthless semi-guidelines on how alignment could change - and later some really bad optional rules about tracking alignment.  So magic cared about alignment, and nothing else did.  The 5e SRD seems to have backed off, my incomplete reading shows that there are far fewer alignment effects then in previous editions.  So if there is no mechanical significance, then what is alignment good for?
    Well, alignment is a part of the party's Theme, the flavor of their story.  An all Lawful-Good party has a different feel than a few Lawful-Good and a few Chaotic-Good mixed together.  And both of those groups feel very different from an all Chaotic-Evil party.  How the party reacts as a group to events, the kinds of choices characters make and how other characters react to those choices, and how the party fits in the game world are all influenced by alignment.  Or, well, should be.  That however really depends on the GM - since the game gives so little mechanical weight and such crappy guidelines, overall alignment tends to get forgotten (until the spells fly) or forgotten then trotted out to justify one player wanting to harass another player ("but my character would act that way" is a sentence followed by many GM headaches).
    Basically, alignment can actually have a positive impact on the narrative, but it tends to not live up to its potential, in my experience.  One big reason for that is also because the alignments axis are so broad that they kind of lose meaning.  "Good" is a pretty vague term, it's open to a lot of interpretation.

    One of the blogs I follow, Mythcreants, had a pair of posts about "Dualities that can replace good and evil." [part one and part two here]  They listed 10 dualities:
  • Freedom vs Safety
  • Success vs Selflessness
  • Progress vs Preservation
  • Individuality vs Community
  • Privacy vs Transparency
  • Resistance vs Adaptation
  • Justice vs Forgiveness
  • Safety vs Hope
  • Loyalty vs Independence
  • Kindness vs Prudence
    I really like the Mythcreants lists because I think they mix well with the idea that the background/ setting exists to give the players something to Support, Change or Oppose.  "Freedom" and "Safety" seem more concrete to define, and link to elements in the setting, and they also seem like clear targets to ask the players if they want to support/ change/ oppose either side.  This sounds more like a useful type of "alignment" to divide the PCs and NPCs that are supporting either side, and how those groups would logically interact.  Add in something for personal motivation, "why did you choose the side you chose?", and I think you have the framework for a nicely robust system that would be practically useful (since it would be in fairly concrete terms) for guiding role-playing.  What kinds of mechanics you would want to hang on such a system is debatable, but as a narrative tool (if nothing else) it should be useful.

    So what all does this have to do with world-building?  I'm not sure :)  The reason for this rambling post is because I've been thinking about other RPG settings I've read.  They typically seem to read like novels, describing the setting.  And that's okay, but I don't think it's the most useful.  An RPG is Interactive Narrative, so just giving me a narrative travelogue of a setting does not really highlight any of the "Interactive" hooks.  Let me use a concrete example, I just finished reading the "Safehold" series by David Weber (awesome books).  There are 2 critical narrative elements in the story's background.  First, the story is science fiction, in the far future humanity colonized other planets and developed advanced technology.  They met an alien race called the Gbaba.  The Gbaba attacked humanity in a genocidal war, with no communication or attempts at diplomacy.  And humanity lost the war.  A small group of humans fled the Gbaba and settled a new planet.  The second part is that on this planet, called Safehold, the human colonists had their memories tampered with, and all knowledge of the Gbaba and Earth was erased.  A single planetary religion was founded, with the purpose of suppressing the development of technology.  Humans had discovered that the Gbaba had attacked other races, and they only did so when those races had achieved a certain level of development.  So the church was created to suppress anything that could draw the Gbaba to the last remaining humans.  A group of the original settlers rebelled, and were killed, and over time the church became corrupt and brutal.
    This is a really quick and basic explanation, but my point is that while the story is nice, since I'm thinking about developing an RPG setting, what in that story can I use as hooks for my players and campaign design?  So how do we take those elements and craft a setting from them?
    Let's take "Technology."  At the start of the game the planet of Safehold is roughly Middle Ages in development.  However, there are remnants of more advanced technology.  One of the main characters of the books is basically a cyborg, but the other characters are limited to the default technology.  So this is what Technology is available for building characters.  But, the concept of Technology also has a broad meaning to the gameplay and narrative development.  "Technology" and "progress" are hated and feared by the church, there is a specific group within the church that monitors and restricts technological development.  The church's equivalent of the devil tempted mankind with technology and knowledge.  So Technology is considered "Evil" by the church.  However, there are some groups in the world who do not view technology as evil, and who are trying to encourage innovation and development, very carefully.  So you have setting groups and characters who Support Technology, and those who Oppose Technology.  In the game you can also have challenges to Investigate lost/hidden Technology, and Working challenges to develop new Technology.  So this one general narrative element, Technology, has many thematic and mechanical hooks for the players and GM.

    The challenge is coming up with some kind of good system for laying out these narrative elements and all their gameplay hooks.  This is where something like the D&D alignment system, applied to specific narrative elements instead of broad concepts, might actually be very useful.  But I honestly don't have any good system to suggest at the moment.  Right now I'm trying to look at this in a new light, and think about how to make it as player-focused as possible.  I don't think the world needs yet another setting, but I do think it is time to take a look at how we describe and define settings and see if we can start writing them better.
    Thus, I'll be back next week with more thoughts :)

Educational YouTube Channels - Traversy Media

    I love this guy, he does a great job of showing and explaining a wide variety of programming concepts, check out a few videos below, and his channel is here.  He gets pretty deep, but there are some gems for a beginning programmer.


I've been using jQuery, but here's a great vid on how to access page elements with plain JavaScript, it's part 1 of 4...



Here's his crash courses for HTML and CSS...







Tuesday, October 10, 2017

The Reverse-Roll (inspired by Lindybeige)

    Okay, so I saw this video a long time ago, and it's always been there in the back of my head.  It's not too long, so watch it (since the rest of this post is going to talk about it)...

    I cannot shake this idea.  I am not a big fan of rolling dice.  I know some players love to roll fist-fulls of dEverythings, but I've never really felt that the act of rolling was all that dramatic or interesting in itself.  And it never made all that much sense to me, given that the traditional d20 is a flat distribution, I never have any idea what I'm going to roll - so I can never rely on my character's performance or predict what I might be able to do except in general terms.  And as GM, I cannot f###ing stand 5 turns of nobody able to hit each other!!!  Which has happened a lot, more than often enough to be noticeable (heck, 13th Age included a mechanic to increase your odds to hit over time, no doubt because they'd noticed this too).  I'm a believer that a novice has wild swings of capability, but an expert has a more consistent output (something I'll talk about in another article).
    So what I love about this idea is that it takes the "randomness" away from saying the player had these huge swings of capability (of course, thinking about it, an single die would still be flat, so there would still be some "swinginess") and that the world is unknown until it's interacted with (a Schrodinger's Cat situation).  I think it would be great to try making all the PCs skills and abilities static numbers, and the roll is only to determine the challenge in the world.  I would like this as a player, because it would give me the feeling that I knew what I was capable of.  And it also has the feeling of discovery, of not knowing what the world is like until you try to change it.
    Two things he mentions in the video that I thought about.  He talks about making a video, that he knows how to make videos - which I think is a perfectly accurate description.  So what is the roll for?  Audience reaction.  The roll says how people in general react to your video (ie, successful means that your video was well-received, failure means that not many people responded positively to it).  Also, he talks about climbing a wall, and maybe re-rolling if the same character had to climb it under pressure - well, then just add a die to the result you already found.  So say you roll a d20 for the wall's "difficulty" and get a 15, which the player can climb.  On the way back the player is being chased by the guards, so add a d6 to the base difficulty (or maybe d10) and see if the player can still climb it.

    Okay, so it's an interesting idea in the abstract, how would it actually work though?
    Well, heck, let me see if I can knock out something.  Since I've been working with the 5th Edition SRD, that's what I'm going to throw out some numbers for.  In that system rolls are made up of 4 parts: d20 roll + attribute modifier + proficiency bonus + any other modifiers.  The d20 roll can be done 3 ways, a single die, 2 dice take best (which the system equates to +5) and 2 dice take worst (or -5).  Attribute modifiers generally run from -1 to +4 for most players, the table absolutely goes from -5 to +10.  Proficiency bonuses go from +2 to +6.  And it's hard to call other modifiers, they seem to be pretty low (I believe most magic items are up to a +3).  Okay, those are the basic numbers used by the system.
    The first thing I think of is using the attribute scores instead of the modifiers.  The 5e's system is screwy, there is a score, like 14, and a modifier, +2 in that case.  You only use the score for perquisites (which really means only feats, which are optional), the modifier is what really gets used regularly.  It seems like it would be better to just use the modifier and tie perquisites to it as well (though, in that case there's not much reason to roll dice for the the score, a point-buy or priority system would be better, so it would be a big change from previous editions).  Anyways, while the basic system does not use the attribute score very often, for a reverse-roll variant it would come in handy.  If the character's ability was Attribute Score + Proficiency (if applicable), you'd be looking at around a 16 for something a beginning character was skilled/ proficient at, going up to 20 as a max at first level (and 10 for somebody unskilled and unexceptional).  So what if "beginning difficulty" was d20 + 5, below the player's score a success ?  According to AnyDice.com that would be an 25% chance of 10 or less, 55% chance of 16 or less, and 75% chance of 20 or less.  That's actually not too bad.  You could even keep Advantage and Disadvantage, just now you want a low number so you reverse them: Advantage rolls 2d20 and takes the lowest, Disadvantage 2d20 and takes highest.  You wouldn't need to change any numbers at all.  Of course, what about combat?  Well, maybe instead of the "+5" to the roll, in combat you add the monster's Armor Class to the d20?  ACs go from 11 to 18, just drop the 10, so from +1 to +8 with +Dex for lighter armors and +2 for a shield.  That should work just fine.  Contested checks could be the same way, instead of d20+5 do d20+NPC Attribute Modifier (or Att Mod x 2 maybe)(or, Att Mod + Proficiency if NPC would have it?).  If you add a "level" to challenges, you could add +1 to the base roll for every level the challenge was above 1st, though with the narrow math that's tricky.  You might want to say it's d20 +3 +Proficiency Mod for Level (which is +2 at 1st level, so that makes the d20+5, and that would then go up as the characters do, or if you want to put in a "super-hard" lock or challenge that would use the next highest Proficiency Modifier).  Not sure about how to scale up challenges, the game is designed with some weird math.

    Since I don't have a group to playtest this with, I can't really come up with a very good idea of how to play this, but I love the concept.  The world is a blank slate, it's revealed when the players interact with it - but the players know exactly what they are capable of (and if the characters fail/ come up short, they know exactly how much they need to make up).  I'm not sure that matters to anybody other than me, but that seems like an awesome mechanic.


Random Thought: this came to me later, from another blogger I read long ago (and of course can't remember who).  I call it the "Combat Grind" variant, for tables who want more vicious fights.  Use the reverse-roll, PC Attribute Score + Proficiency vs d20 + NPC AC(-10), which sets who has the Edge.  Since Hit Points are an abstraction of physical wounds, vitality, skill and luck, then one could argue that it should be impossible to fight and not lose HP.  After all, at the minimum you have to spend physical effort, swinging your sword, and using up luck to not get wounded.  So, for each round of combat, the Edge stays the same (unless someone can come up with some kind of fancy maneuver, like a disarm or trip), instead both sides roll their damage, whomever has the edge adds it to their damage roll.  So, two fighters with d8 longswords.  PC fighter has 14 Str + 2 for being proficient at level 1, NPC fighter is wearing Chain Mail (AC 16) - so a d20+6 is rolled, getting a 21 total.  Okay, that makes me face-palm, in combat I'm totally forgetting about the PCs armor.  Okay, let's add the PCs Att score, AC (-10), and Proficiency Bonus (if applicable), against that we'll roll d20 + NPC AC (-10) + NPC Proficiency Bonus (if applicable).  So let's say 14 Str +2 Prof + 6 chain mail AC or 22 vs d20 + 6 (we'll give them the same armor) + 2 (and assume both proficient) [the NPCs attribute will be the d20, did you find the really string bandit or the weak one?].  So, that way, let's roll again: and get a 17 this time.  Okay, the PCs total is 22, so 17 is 5 points lower, low is a success, so the PC has a 5-point Edge.  Now, the fight actually starts, each turn the PC rolls his d8 damage + 5 for the Edge, but he takes the NPCs d8 damage as well (oh, and both add Str mod, if you want to make it meaner - might get a little too lethal though).  So each turn the PC is losing HP, he's getting tired, wounded, un-lucky - but since he has the edge he's wearing down the other guy a lot faster.  Since characters heal with every rest, the PC can heal himself back up, but he's going to need rest a lot more since every round of every fight he's guaranteed to get hurt.  Hence my calling it the "Combat Grind."  It might be something to try to those GMs and PCs who think 5th Ed.s combat is too easy (since healing is much more plentiful than previous editions); or for those tables that just want combat to feel scary.  It also might be a total mess, I don't know :)  The idea came to me so I figured while I was throwing out random, un-tested mechanics I might as well add one more ;)


Monday, October 9, 2017

Looking at the 5th Edition SRD - part 4 - Class Basics

    There seem to be 4 pillars that define a character in the 5e SRD: Race, Background, Class and Equipment.  Spells are a big deal as well, but only to those classes that have them.  Those four seem to be universal to how a character is created and played.  So let's move on to looking at Class and see what we can find as a skeleton to build off of.  Unlike Backgrounds, we have a lot of classes to look at: Barbarian, Bard, Cleric, Druid, Fighter, Monk, Paladin, Ranger, Rogue, Sorcerer, Warlock, and Wizard - for 12 total; a good spread (compared to 9 Races and 1 Background, this is the most detailed category).  From those, let's see what universal features apply to classes...

Hit Dice
    Every class gives a Hit Die between d6 - d12.  That is maximized at first level and added (rolled or take middle) each level thereafter; everybody adds Constitution modifier.
    Let's check out the distribution:
   
d6 - Sorcerer, Wizard
d8 - Bard, Cleric, Druid, Monk, Rogue, Warlock
d10 - Fighter, Paladin, Ranger
d12 - Barbarian

    Huh.  A lot of d8s (twice as many as any other type).  Little surprised at the Monk being d8, I would have said d10 (Monks being "fighter-types"), and the Barbarian is the only d12.  Not a perfectly even distribution (quite arguable if it should even be so), but in general those who rely on spells are near d6, those who rely on fighting d10, and the rest in the middle.  Okay, it's a starting point.

Proficiencies (which my spell-checker doesn't seem to think is a word :)
    There are a lot of profs, so we'll have to examine them by category-
   
Armor
    Is rated by the heaviest type you can wear.  If you wear armor of a type you are not proficient with you have Disadvantage on any check that involves Strength or Dexterity and you cannot cast spells.
    Again, let's see how the classes break down:
   
none - Monk, Sorcerer, Wizard
light - Bard, Rogue, Warlock
medium - Barbarian, Cleric, Druid*, Ranger
heavy - Fighter, Paladin
shields - Barbarian, Cleric, Druid*, Fighter, Paladin, Ranger
    *not made of metal

    So we have "heavy fighters" with the Fighter and Paladin, "medium fighters" with the Barbarian and Ranger, and the Monk is more like a spell-caster with no armor prof.  "Semi-fighter" Clerics and Druids are medium, "non-fighter" Bards and Rogues are light.  "Spell-casters" are none, except the Warlock with light.  All main fighter-types can use a shield, and the Cleric and Druids as well.

Weapons
    Get tricky, each Class either lists a group of weapons (simple or martial) or else a specific list of weapons.  There are 10 simple melee weapons, plus 4 simple ranged weapons for a total of 14.  There are 18 martial melee weapons, plus 5 martial ranged weapons, for a total of 23 (almost twice as many as simple).  The older 3.5 SRD had another category called "exotic" which was dropped, but I think some weapons should still belong to; for example the "blowgun" is a martial weapon, but how many Paladins would really have been trained with it?  Oh well, we'll go off what we've got for now.
    So what classes get access to a weapon group?

simple (14) - Bard+, Cleric, Monk+, Rogue+, Warlock
martial (23) - Barbarian, Fighter, Paladin, Ranger

    And what classes have individual weapon lists?
   
+Bard - hand crossbow, longsword, rapier, shortsword - 4 plus the 14 simple for 18 total
Druid - club, dagger, dart, javelin, mace, quarterstaff, scimitar, sickle, sling, spear - 10 total
+Monk - shortsword - 1 plus the 14 simple for 15 total
+Rogue - hand crossbows, longsword, rapier, shortsword - 4 + 14 simple for 18 total
Sorcerer - dagger, dart, sling, quarterstaff, light crossbow - 5 total
Wizard - dagger, dart, sing, quarterstaff, light crossbow - 5 total

    So we have 5, 10, 14, 15, 18 or 23 total weapons between the classes.  Kinda fiddley, I'm not so sure about some of the lists, but whatever, I'll go with it for now.

Tools
    Not many classes give tool proficiencies.

Bard - 3 instruments of choice
Druid - herbalism kit
Monk - choose 1 artisan tool or musical instrument
Rogue - thieves' tools

Languages
    No classes have any language proficiencies.

Saving Throws
    All classes are proficient in 2 saving throws:

Barbarian - Str, Con
Bard - Dex, Cha
Cleric - Wis, Cha
Druid - Int, Wis
Fighter - Str, Con
Monk - Str, Dex
Paladin - Wis, Cha
Ranger - Str, Dex
Rogue - Dex, Int
Sorcerer - Con, Cha
Warlock - Wis, Cha
Wizard - Int, Wis

    or:
Str, Con (2) - Str, Dex (2) - Int, Wis (2) - Wis, Cha (3)
with Dex, Cha and Con, Cha the singletons

    For the heck of it, there is no:
Str, Int
Str, Wis
Str, Cha
Dex, Con
Dex, Int
Dex, Wis
Con, Int
Con, Wis
Int, Cha

    Well, the pattern is at least simple, everybody gets 2.  Generally speaking both are physical (str, dex, con) or both are non-physical (int, wis, cha) and only 2 classes (the Bard and Sorcerer) cross-over.
    The real hard part about saving throws is that their utility entirely rests on how many attacks of each type there are.  If only 1 thing in the entire game forces a Charisma save, then that save is essentially useless.  I haven't gone through the whole SRD to see just how many there are of each type (dear gods, I see a project I'm going to regret in my future...) so it's hard to say specifically how useful a particular save is.  You can say that generally there should be as many physical saves as non-physical saves, and that's why each class focuses on one or the other (it's then debatable if the two cross-type classes are better or worse).

Skills
    There are 18 skills total.
   
Cleric - choose 2 from a list of 5
Barbarian - choose 2 from a list of 6
Monk - choose 2 from a list of 6
Paladin - choose 2 from a list of 6
Sorcerer - choose 2 from a list of 6
Wizard - choose 2 from a list of 6
Warlock - choose 2 from a list of 7
Druid - choose 2 from a list of 8
Fighter - choose 2 from a list of 8

Ranger - choose 3 from a list of 8
Bard - choose 3 from a list of 18

Rogue - choose 4 from a list of 11

    Okay, so 9 classes choose two, 2 classes choose three and 1 class chooses four.  Most classes choose from a list of 5-8, one class from 11 and one from all 18.  Okay, random and all over the place, but okay.

Equipment
    All classes start with a few items, which are chosen from a list.  I'm not even going to break them down, it's basically a weapon, or weapon and armor and a "pack" of related (or semi-related) non-weapon gear.  It might be interesting to calculate the gold piece value, but that would be an exercise in futility.  I like that everybody does start with some stuff and it's themed to each class, so you don't have to spend as much time at the equipment tables counting every coin (which I find to be tedious, and I'd debate just how much better the game is for tracking every penny in the character's pockets - sure money can be a strong motivator, but creating a fictional economy seems to come with as many down-sides as up-).

    And that covers all the things that define each class.  The rest is in the specific class abilities and the levels those abilities are received at.  With this groundwork laid out, I'm going to stop here - next post I'll delve deeper into classes.  Until then!

Sunday, October 8, 2017

Funny Stuff - some funny songs

Because sometimes you need a laugh :)





And my favorite comedy skit ever (hate that the volume is so low on this)...