ralpha / DF-Storyteller-Narrativization

Collection of JS files for use with DF-StoryTeller to narrativize events

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DF-Storyteller-Narrativization

Collection of JS files for use with DF Storyteller to narrativize events

How To See

  1. Download DF Storyteller
  2. Download this repo (I assume all files are in a folder named "DF-Storyteller-Narrativization") and stick it in DF Storyteller's "serve-paintings" folder
  3. Generate a Legends file using DFHack (or unzip the one I put in the repo and use that one)
  4. Follow all the instructions for DF Storyteller to get the server started (processing legends file, etc)
  5. Point yer browser to http://127.0.0.1:20350/paintings/DF-StoryTeller-Narrativization

How To Make (For Contributors)

  1. Check out the Progress Spreadsheet
  2. Pick an event type / event types you wanna do
  3. Put your name in the "Who's Working On It?" column
  4. If it's not one of the already-made files, make a new file (either grouped by theme somehow, or put your initials and a number, like jg-1.js)
  5. Write your description! If you have general utility functions (name formatting, etc) add them to description-utils.js so everyone can find them!
  6. Function example:
async function hf_attacked_site_desc(length) {
  var site = await load_ref_data(`sites/${he.site_id}`);           //this is how you load data for the event's site (he.site_id)
  site.name = formatName(site.name)                             //this is how you call a formatter (in description-utils.js)
  eventDesc = `Some jerk attacked ${site.name}.`;
  return eventDesc;
}
  1. Add your new function call to the switch case in descriptions-main.js:historical_event_desc(). Example:
switch(historicalEvent.type) {
    ...buncha cases in here....
    case "change_hf_job":       //your cool new event
      eventDesc += await hf_attacked_site_desc(historicalEvent);
      break;
    default:                    //the end of the cases
      eventDesc += `Unknown Event: ${historicalEvent.type}`;
      break;
  1. If you are adding a new file, make sure you add it to the "pattern libraries" section at the top of index.html!
  2. Commit after making sure it doesn't break stuff
  3. Mark the spreadsheet green because you did it, thanks!

Requested Style

  • Event descriptions should be relatively self-contained, and shouldn't rely heavily (if at all) on other events.
  • The idea is to first put in a one-event baseline, then build up with more elaborate sifting patterns after that's established.
  • For example: "Thorkron was strangled by Beedle the goblin" is what we're doing now. Later (soon?) we'll do sifting patterns so we can do "Beedle the goblin strangled Thorkon, finally getting revenge for his poor murdered brother."

About

Collection of JS files for use with DF-StoryTeller to narrativize events


Languages

Language:JavaScript 91.7%Language:HTML 5.0%Language:CSS 3.3%