Sunday, 16 April 2017

Distinguishing GM Info from Player Info in Vimwiki

I write up notes for encounters in my campaign within Vimwiki.
Some notes are intended for the Player Characters.  The majority of the text is intended for the Gamemaster's eyes only.
My understanding is that the text intended for players is called Boxed Text. Here's an example of Boxed Text intended for the players:
"You awake in a room. There are two doors. A hidden voice asks, 'What door will you choose: The Lady? Or the Tiger?'"
The following note is intended for the Gamemaster only:
"Behind each door is a female tiger. Bad Gamemaster! Sneaky Gamemaster!"
I found it a challenge to keep each type of note distinct within the Vimwiki file. In the paper modules I bought as a teenager, the notes to the players were set off from the rest of the text. A light shade of grey filled the background of these text blocks, the text was indented a small amount, and a black box surrounded this text.
To recreate this effect in Vimwiki, I tried two things.
The first thing I tried was to set the text off in a Vimwiki table.
| First Announcement      |
| You enter a             |
| place filled with       |
| twisty little passages, |
| all alike.              |
This works okay as long as you are viewing the information within Vimwiki. The problems I had here began when I converted the table to HTML (and from HTML using Pandoc to any other format). Vimwiki treats this table as four separate rows. Each line of text gets its own row.
First Announcement
You enter a
place filled with
twisty little passages,
all alike.

The HTML for that looks as follows:
First Announcement
You enter a
place filled with
twisty little passages,
all alike.
That's not what I wanted.

I made an edit to Vimwiki. I forked the project on Github and added a toggle so that a table with a single column would treat all rows as one single cell.

The end result was that the HTML when converted looked like I wanted:

First Announcement
You enter a place filled with twisty little passages, all alike.

First Announcement
You enter a
place filled with
twisty little passages,
all alike.
My pull request to add this feature was not accepted by the current maintainers. So it goes.

I looked at the existing features of Vimwiki, and I realized I can achieve a similar effect by writing the text in a blockquote. The indentation sets the text off within Vimwiki. The CSS could set the text off when rendered to HTML.

This block of text in Vimwiki:

    You enter a    
    place filled with 
    twisty little passages,
    all alike. 
becomes the following
You enter a place filled with twisty little passages, all alike.
The HTML for that blockquote looks as follows:
You enter a 
place filled with 
twisty little passages,
all alike. 
The file vimwiki/autoload/vimwiki/style.css contains the following line:
blockquote {padding: 0.4em; background-color: #f6f5eb;}
That helps provide the background shading in the HTML.
So, in the future, GM info will be the default Vimwiki text. Text intended to be read to Player Characters, by contrast, will go between <blockquote> tags.

If you like what I've written here and want to help support future posts, please:

Wednesday, 29 March 2017

An Extremely Thin Overview On How I Created And Sold An Electronic Book

In 2016 I created, edited and sold my first electronic book, A PC Guide to County Playground: The Grand Grind. The sales were not astronomical, but they were above zero. I consider that a success. I am enthusiastic about creating and promoting more books.

One of my friends recently asked me: "I was wondering if you can share some wisdom and experience on how to get a book published."

I'm happy to share what I know.

I divide up the work into three categories:

  1. Creating the manuscript: From idea to completed text
  2. Crafting the book: Cover, ISBN, Editor
  3. Promotion of the book: Marketing, finding your audience, making it as easy as possible for people to discover you and to buy your book.

I'm going to go into more depth on all three of those topics in future blog posts.

Until I get my own experience updated here in mind-numbing detail, I will recommend APE: Author, Publisher, Entrepreneur by Guy Kawasaki and Shawn Welch. They have made a thorough, honest and (in my opinion) encouraging overview of what it takes to write a manuscript, turn that manuscript into a book, then promote the book.

Physical and Electronic Books

I'm interested in both paper books and digital books, also called electronic books, ebooks, or iBooks.

Much of what I did, I followed from the examples and recommendations in APE. Some specifics:

Creating the manuscript

  • Set a specific goal for what the finished manuscript should look like. For me, I wanted a book that was 30,000 words. My finished book was 35,000 and change.
    • The reason this is important is: it helps you know when you are done. Sometimes you write and write and write and it never feels like the work is done, complete, good enough. It really helps to have a clear vision of your ending in sight. This helps you reach the ending.
  • Build a routine that helps you to finish the book. For me, this meant finding a time of day that (a) I was most productive and (b) I was not likely to be interrupted.
    • I tend to write between 05:00 and 06:00 each morning. That may not work for everyone, but it works for me.

Crafting the book: Cover, ISBN, Editor

  • I created the cover myself for my first electronic book. I do not recommend this. It costs money to hire a professional graphic designer, and that person is worth it. APE has suggestions on how to find a designer for your book cover
  • I found an editor through the Blue Pencil offerings at the Vancouver Public Library. The editor I found is associated with Editors British Columbia
  • The Canadian Federal Government provides services for a publisher to get an ISBN. This includes self publishers. For other countries, I point you again to APE.

Promotion of the Book

I would say I still have a lot to learn about this area. My initial target audience for my first book was very small, as I was more interested in the mechanics of publishing rather than volume sales.

Here I would turn to The Internet, particularly the Meetup part of the Internet. I know of at least one Group of Writers who have organized a "Self-Publishing and Book Marketing Support Group." Chances are, someone in that group knows someone who can help you find the next step to building an audience for your book.

If you have created a manuscript, turned it into a book, and/or promoted it, I would like to hear about what works and what does not. Please leave a message in the comments or contact me through this blog.

Thanks, and I wish you success on your book journey.

Friday, 16 December 2016

How To Build A County Playground: One Book At A Time

Back in 2005 I started a Role Playing Game campaign with friends that grew into what we call County Playground.

Today, County Playground continues to grow in two directions:

  1. I'm building a campaign setting designed to work with the rules set from the PFRPG, an extended multiverse.
  2. I also have written a series of stories set in that multiverse.

County Playground: The Grand Grind is the name of the latest campaign set in the multiverse of County Playground.

I'm enjoying immensely the process of building a campaign multiverse "One Book At A Time."

The first reference work for County Playground is done and on sale. A PC Guide to County Playground: The Grand Grind is available exclusively through the iBooks store. The guide is intended for players of County Playground: The Grand Grind. It provides both guidelines for building player characters, and an overview of tone and history.

The first adventure story set in the multiverse of County Playground will be on sale in the first half of 2017. I'm working with an editor and an artist to produce an e-book that has both a cohesive tight story and a fine cover. The working title is Battle Stove Spectacular.

Both works will be published by Standard Eyre Digital Services.

For 2016, Standard Eyre Digital Services will donate fifty percent of all profits to the Down Syndrome Research Foundation. The staff and volunteers at the DSRF do incredible work to ensure people with Down Syndrome live full and fulfilling lives.

Friday, 30 September 2016

Just Enough Prep

As a creative person, I like preparing a campaign for a Role-Playing Game. Characters, backgrounds for those characters, motivations and histories behind those backgrounds, maps that detail those histories... I'd happily spend all the time I do not have building those details.

There's only so much time in the day, though.

As a game master who wants to run this campaign one day (and as someone who wants to stay sane), I found it helpful to draw up a Just Enough Prep target list. My intent is that once I had completed everything on this list, I'd be in a position to at least start the campaign.

The campaign is not a static story. It responds to the decisions and actions of the Player Characters. So, a secondary goal here is to have enough prep to be ready for the curve balls that the PCs throw. There's no conceivable way to prepare for every possible PC action.

What made the Preparation List

Some items on the list I found hard to quantify at first. I decided to prepare for these items by creating one or two items per player. I have six players in my gaming group.

  1. A name for the campaign
    • The campaign is called "County Playground: The Grand Grind"
  2. A guide for the campaign setting should be ready for the players
    • Concise details on the campaign, to help the players generate PCs.
    • I have this ready. My ebook is titled A PC Guide to County Playground:The Grand Grind
    • It's on sale now at iBooks
  3. A wiki with ten items per player
    • The players need something to work with.
    • I actually have two wikis: a public one for the players and a private one for Gamemaster Eyes Only. The public one is copied to the County Playground Grand Grind Mediawiki site.
  4. A logo for the campaign
    • The logo ties together all the above items. I put the logo on the ebook PC Guide and the Mediawiki.
  5. A tool to push updates from my player vimwiki local on my computer to the Mediawiki installation accessible on the Internet.
  6. One blog post per player
    • Part of the job of the blog is to keep track of what works. I'm not planning to have to redo something in two years. If I have to, nice to have a record of what I did initially. Ideally, through the comments, someone might suggest a better way of doing things.
  7. A conflict web for the major NPCs
    • For this I found three large pieces of paper, 11 by 17 inches. I mapped out which NPCs are the masters and which are the servants, who is in love and who hates each other. Each NPC gets at least one relationship; some have several.
    • The idea here is that if the PCs suddenly go somewhere I have not thought of and encounter the NPC in a setting I have not expected, I'll at least have a starting point of what will motivate that NPC in that situation.
  8. Sketches for the first several encounters
    • Two encounters per player
    • Rough out what the encounter requires: NPCs and monster names, from the characters, maps, key turning points in the campaign as a whole that the encounter will set up.
    • Some of these are more sketchy than others.

What did not make the Preparation List

  1. Stats for every Non-Player Character (NPC)
    • The NPC Codex has my back here. There are also NPC stats in the Gamemastery Guide. Besides, why spend an hour giving detail to a NPC that the PCs are going to interact with for only two minutes and/or kill off? The ones that stick around will be fleshed out with stats.
  2. Monster stat blocks
    • Exceptions will be lovingly created by hand. I have several books with monster stat blocks already; I can reference those in my notes.

Thursday, 29 September 2016

scripted update from vimwiki to mediawiki

For my upcoming Pathfinder campaign, I have a vimwiki installation with content I want to give to my players, and that vimwiki is configured to use mediawiki syntax.

I also have a mediawiki installation facing the Internet.

I wanted a tool to copy my content from the vimwiki on my laptop to the mediawiki server. I found this blog post tying together mediawiki and the python mwclient module as a start.

I extended the idea behind that blog post and wrote a script, which is up at Github, that covers what I need.

Running that script copies each page from vimwiki to a defined mediawiki server.

Wednesday, 21 September 2016

Mediawiki setup

I have two vimwiki directories, one private and one public. I want to share the public one with the players in my campaign.

In the past I've run a Mediawiki site. I'll do that again. Mediawiki is mature software. I'm trusting that enough other people (including those who run Wikipedia) are running and testing Mediawiki that any security holes will be discovered and found pretty quickly. Hopefully.

I captured a record of the setup steps for my campaign mediawiki site.

Summary of mediawiki setup steps

  1. Subscribe to the mediawiki-announce mailing list and stay up to date.
  2. Create a development environment
  3. Apply all the security stuff.
  4. Put in the mod_rewrite stuff and use short URLs.
  5. Add a logo.
  6. Set up email.
  7. Disable anonymous page view.


Subscribe to the mediawiki-announce mailing list and stay up to date

Announcements of updated versions plug security holes. This is just good sense. Best practices for running your own site involve keep it clean and secure.

Create a development environment

I used XAMPP to test everything locally, first. Once it passed in the development environment I put the same feature out on the Internet.

Apply all the security stuff

Running a mediawiki site means having the best security settings for the host, the apache server running on the host, the PHP installation executing the mediawiki content and the mediawiki site.

My intent is to follow best practices for the security settings.

Put in the mod_rewrite stuff and use short URLs

It's personal preference, but I prefer the URL to say webserver/wiki/Main_Page in place of webserver/wiki/index.php/Main_Page.

Mediawiki provides guidelines on using short URLs

A consistent logo ties together content.

  • create logo
  • upload logo
  • edit LocalSettings.php to reference logo

Mediawiki provides guidelines on using logo

Set up email

Other people will be editing and adding content on the wiki (ideally). They'll have questions and concerns. Configure the mediawiki site to contact you with those questions and concerns, and to email help to your contributors.

Disable anonymous page view

This is personal preference more than anything else. Mediawiki comes with a search function, so it's not like I need Google to index the entire site.

Several pages still need to be whitelisted for anonymous access, including "Main Page", "Special:Userlogin" and "Help:Contents"

Thursday, 11 August 2016

Set up your RPG Campaign details in vimwiki

I found this Getting started with Vimwiki blog post by Chris Mague a good and thorough guide to the installation and use of vimwiki. So, I will shamelessly emulate his approach and put together a similar guide for anyone who seeks to install and use vimwiki for RPG campaign detail management.

The goal of this document is to install vim, configure vim, and set up a pair of vimwiki installations. One vimwiki is labelled vimwiki and contains information for both players and the Gamemaster. The second wiki labelled private contains information intended only for the Gamemaster. The second wiki links to the first. There are no links from the first (public) wiki into the second (private) wiki.

Prerequisite: Install Vim

Everything after this assumes 1) you have already installed vim and 2) you are familiar with using vim.

If you run Mac OS X, you will probably prefer to use MacVim rather than fire up Terminal (or iTerm2) and work with vim inside the Command Line Interface (CLI).

If you run Linux yet the gvim command does not work, you probably want to install vim-gtk or vim-gnome or a similar variant to get a vim GUI.

If you have vim, but you would appreciate a tutorial, try vimtutor. On Linux, you can install vimtutor with yum install vim-enhanced (RedHat) or apt-get install vim-runtime (Ubuntu)

If you have questions, one place to find answers is the vi and vim site on the Stack Exchange collection of sites.

Install Vimwiki

  1. First, add these lines to your ~/.vimrc file
    set nocompatible
    filetype plugin on
    syntax on

Without them Vimwiki will not work properly.

  1. There's at least three different ways to install vimwiki. Arguably the easiest way to get the most current copy is described on the vimwiki github page which I will reproduce here:

    • download the zip archive and extract it in ~/.vim/bundle/
    • Then launch Vim, run :Helptags and then :help vimwiki to verify it was installed.

The git archive does not work

If the git archive does not work, there's a vimball from 2013 on Download this, and unpack it as says on that page:

  1. Open vimwiki-N-N.vba.gz with Vim. (N-N is version number i.e. 2-1)
  2. Source it with the command :so %
  3. Run :help vimwiki to confirm that the plug-in loaded correctly.

Use vundle

Vundle is a plug-in manager for vim. The Getting started with Vimwiki blog has details about how to add both vimwiki and the Calendar plug-ins. The short summary:

  1. Install vundle
  2. Add Calendar and vimwiki to the vundle file. My vundle configuration is done from my ~/.vimrc
    Bundle 'mattn/calendar-vim'
    Bundle 'vimwiki'
  1. Run :help vimwiki to confirm that the plug-in loaded correctly.

Configure Vimwiki

  1. Many of the commands used by vimwiki start with the leader key. If you have not changed it, your leader key is most likely the backslash ("\"). You can find what it is, and remap it if you choose.
  2. Put these lines in your .vimrc to set up the public and private wikis
    " vimwiki 
    let wiki_1 = {}
    let wiki_1.path = '~/vimwiki/'
    let wiki_1.path_html = '~/vimwiki_html/'
    let wiki_2 = {}
    let wiki_2.path = '~/private/'
    let wiki_2.path_html = '~/private_html/'
    let g:vimwiki_list = [wiki_1, wiki_2]

You now have two wiki installations, the first labelled vimwiki and the second labelled private

Use Vimwiki

  1. Start up vim.
    • In the examples below, I use gvim. You can use vim from a terminal instead.
  2. You can use the Vimwiki menu to look at the links to the index pages. However, there's no data there yet, and the directories are not created yet. The commands in the next steps will build the directories and data.

Figure One: Vim with vimwiki menu links and an otherwise empty screen

  1. Type \ws to show the list of two wikis. Choose the first one, the public one named vimwiki

Figure Two: Show vimwiki command line links

  1. The directory vimwiki does not exist. Vim can tell this, and prompts you to create it. Click 'Y'

Figure Three: Create vimwiki directory

  1. Enter the text of the index page. Be sure to add the search term Foobar for this page. We're going to want to search on a unique string in some but not all of the pages. That's what Foobar provides, here.

Figure Four: Create index page. Now With Foobar.

  1. To turn text into links, surround the text with a pair of square brackets [[ and ]]

Figure Five: Create a link from the text 'Capital City'.

  1. Save the file.
  2. Move the cursor on to the link text. Press <S + CR> (Hold down the Shift key and press Return).

    • This opens the target of the link in a horizontal split window.
  3. Add content to the new page in the split.

    • I've added some population information to Capital City as an example.

Figure Six: Open link target in split.

  1. We want a second, Gamemaster only, wiki. To create this second wiki in a new tab, type 2\wt You are prompted to create the second directory (named private here)

Figure Seven: Create new directory.

  1. Add content to the second private wiki index page.

    • In the image below, the private wiki is in a new tab.

Figure Eight: Add content.

  1. Add a link to the first wiki by prefacing the link with the wiki number.

    • The first wiki in the link list (the public wiki) is wiki0. This means the link starts with wiki0.
    • There's no problem with a space in the wiki text name between Capital and City

Figure Nine: Add interwiki link from private wiki back to first (public) wiki.

  1. Save the file. Put the cursor on the interwiki link and press Return. This follows the link from the private wiki and takes you to the public wiki target.
  2. Press Backspace to go back a link. You return to the private Gamemaster page.
  3. You can search one wiki with :VWS /term/ but that search does not extend across multiple wikis. It only searches one wiki at a time.

Figure Ten: Vim Wiki Search

Build a Chronicle using vimwiki diary function

The assumption here is that your <leader> key is set to ("\")

  1. \ws lets you select 1 to open the public wiki.
  2. press \w\w to create a new chronicle entry.
    • This uses the vimwiki diary function and shows up in the subdirectory vimwiki/diary
    • The file name of the wiki chronicle entry is derived from the current date.

Figure Eleven: Create a wiki chronicle entry

  1. press \wi to go to the index of all chronicle entries.
  2. press \w\i to update the links to of all chronicle entries.
    • You must be on the index page to run \w\i

Figure Twelve: Update the links to all chronicle entries