Sunday, December 10, 2017

Consoling

Part twenty-four in a weekly(α) devlog.

Standard development disclaimers apply. This is alpha content, everything is subject to change, features may not be present in the final version, there's a chance none of this will ever be released, etc. etc.

There shouldn't be any plot spoilers in these posts, but there will be occasional discussions related to characters, locations, mechanics, and other aspects of my potential upcoming Shadowrun campaign (tentatively titled "CalFree in Chains"). You may wish to skip them if you'd like to be completely surprised.

First things first: CalFree in Chains has officially entered alpha testing. If you're interested in participating, send me a friend request on Steam if we aren't already connected, and then head on over to the workshop page to subscribe.

My tentative plan is to run the private alpha for about two weeks. I'm not expecting to catch and fix all remaining bugs during this phase: the goal is to find major show-stopping issues, some of which may only manifest as the result of certain branching choices.

I'm still not committed to it, but if things go smoothly I'm hoping to release the public beta on December 22nd (the same day Bright releases on Netflix). As with my previous campaigns, I'll be actively maintaining and updating the campaign as reports come in, but this time around I wanted a clearer demarcation between "This likely has many bugs!" and "I don't think this has many bugs!"

In the run-up to this, HadesScorn has been doing a very detailed playtest (thanks!) complete with tons of helpful notes and feedback. I'm acting a bit like the sweeper at the end of a parade, cleaning everything up behind as the progress continues. The most painful fix so far has been a character rename. As you might have seen in some earlier dialogue snippets, one of your crewmates is named Isas. It wasn't until HadesScorn pointed it out that I realized this is uncomfortably close to the name ISIS, which is not at all the association I wanted him to have.

The reason this was so painful was that a crew member's name shows up in a LOT of places: not just the text you see in dialogues, but also in variable names, data files, and so on. There's a huge potential for bugs.

In most of these posts I've shown the work I do inside the Shadowrun editor, but I also do a fair amount of work in raw text files. Sometimes it's easier (or necessary) to open up a file in VIM and manually edit stuff in there instead of going through the editor. Something like the Isas -> Isao rename absolutely requires this sort of approach. There were well over a thousand references to update, and there's no way I could do all that manually.

Here's a handy command that will take care of the bulk of the work for me:


This one only updates the lower-case version of the name, which I need to be careful about - otherwise, it will update works like "disaster" to "disaoter".  The capitalized version turned out to be safe to run everywhere; this version had to be restricted to only run on certain folders, excluding "convo".

Anyways - what this command does is look under my project folder for all text files, and globally renames "isas" to "isao" in all of them. Pretty easy! This blows through hundreds of files in less than a second.

(I have a bit of a history with stuff like this. I've mentioned before how Rafik was named Destin for almost the entire time I was working on The Caldecott Caper; I made that change very late, but before entering testing, so it wasn't quite as painful. Also, about a month ago I renamed the primary villain in CalFree in Chains after I became concerned that it was too close to the name of a real-life political figure. I'm not necessarily opposed to players drawing parallels to real-world events, but I've tried to avoid making any one-to-one correspondences between fictional and real people, preferring instead to focus on movements and ideologies. Anyways, that one wasn't as bad since it mostly just affected the content of dialogues, not game data files.)

Oh... while we're talking about names, this might be a good time to mention the name of this game. My initial working title for it was "Saito's Shadow". I thought that it would immediately signal to prior players that this was a continuation of my previous games, and it also has a sinister sound to it that matches the game content.

The title lost its appeal, though. First, I was worried that players would jump to the conclusion that you get to actually fight Saito in the game. (Spoiler: You don't, at least not directly.) The word "Shadow" is also massively overused in Shadowrun games, in both fan-made and official content. "Saito's Shadow" is also hard and annoying to say out loud, with multiple sibilant S's stacked side by side. Finally, it isn't super-Googleable.

I (surprise!) started another Google Doc for brainstorming names. I ran through several dozen, each with their own pros and cons. I got excited once I thought about "Welcome to the Occupation", which is the title of an R.E.M. song that I love and a great thematic match for this campaign; unfortunately, as an existing song title it would be even less Googleable. But that started my mind down another path, and I ended up settling on CalFree in Chains. It has a certain insistent rhythm to it that I like, a nice li'l acronym (CFiC), is decently Googleable, and announces its ties to the previous games.

I have an even longer list of parody titles that I would never use but I can't get out of my head, including:
Uncle Saito's Smile-Time Family Variety Hour
My Dunkelzahns Are Dead And My Saitos Are In Power
I Feel Sad: Surprise! Now You Feel Sad Too
So Much For The Tolerant Left

Back to the command line: there are tons of commands I use during development, most of which only get used once or twice but all of which save an insane amount of time. Here are a few random examples:


This one was handy when I was experimenting with options for targeting enemies and allies while creating new spells and abilities. I'm running it on the official Hong Kong source so I can see all of the available options; there's no official reference for this, so I'm essentially building one myself. "grep" is the standard text-searching command. -h will hide the filenames of matches so the output only contains the matching lines. "toHitFunction" is the string I'm looking for. "sort" will organize all of the results into alphabetical order, and then "uniq" will remove any duplicates. So, I end up with a nice, alphabetized list of all valid hit functions that Hong Kong supports. (Longer than what's shown here.) It's way better than opening hundreds of files by hand and writing my own list!

Or, here's an example of editing every file in the project that includes the string TODO. I often leave this as a comment to myself while working. It might be a placeholder for something that I need to hook up later, or a reminder about a bug that I spotted but didn't have time to fix, or a note that I need to do additional research on some dialogue.


This one line will crawl through the project and open up all the matches for editing in VIM. For text-based stuff I can just make any necessary edits directly in the buffer; otherwise, I can quickly find the corresponding content in the editor (the map or dialogue or whatever) and take care of it there.

Okay... I feel like I'm massively overdue for showing some actual gameplay. Next week might be a good occasion for that, I'll try to grab some screenshots or even a video snippet. I'll be pretty busy now that the wider alpha is underway, following up on bug reports and swiftly fixing stuff, but that's a good thing! I have a full work queue now, and it's exciting to see the game get better and better every day.

4 comments:

  1. VIM sounds like a really useful tool, if perhaps a steep of a learning curve for non-coders like myself.

    I tried a couple text replacing tools before (the SRR editor almost demands one), but never "fell in love" with one. Have to give this a try, thanks.

    ReplyDelete
    Replies
    1. VIM's learning curve is BRUTAL. I love it, but don't know if I'd recommend it to anyone. If you haven't already tried it, something like Notepad++ or Atom might work better.
      (And good to hear from you again, hope you're doing well!)

      Delete
  2. That does look like it'll be useful... And here I've been editing things with the Pinnacle of text editors... "Notepad."

    ReplyDelete
    Replies
    1. Notepad works fine! Definitely useful for when you want to go in and change one thing. Programs like Notepad++ can be fantastic for complex operations, though.

      Delete