Sunday, September 24, 2017

Crafty

Part thirteen in a weekly(☣️) devlog.

Standard development disclaimers apply. This is pre-pre-pre-Alpha content, everything is subject to change, features may not be present in the final version, there's a very strong 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.

I finally finished that monster 30-page mission, hurrah! Not only was this probably the longest mission of the campaign (in terms of text, and, depending on your playstyle, possibly clock time as well), but it also marked the half-way point of missions. That doesn't mean I'm halfway done with the game - I haven't even started scripting the hub yet, where about half of the dialogs take place - but it's still a really nice milestone to cross.

I'm currently working on the mission after that, the last one before the next critical-path story mission. This one is a bit more conventional, with a little dialogue, some puzzles, and a fair amount of mandatory combat. But I try to do something unique in every mission, so this one has a few wrinkles, especially in the combat. Another unique thing about this mission is it gives you the chance to craft a unique weapon of your choice. I'd like to chat a bit about the design and implementation of this feature.

My Words Are Poison


My favorite thing about RPGs is the intersection of choice, morality, and gameplay. I think a game is designed well if you choose a mechanically inferior outcome because it leads to a morally superior outcome. Shadowrun tends not to have clear-cut good and evil characters, but absolutely has a wide variety of factions and values to which a player may align themself. A simple example here is supporting Samuel's ork resource center in Dragonfall: there isn't a gameplay advantage to giving him nuyen, and you'd be better off hoarding the cash, but a lot of players gladly become benefactors.

In my current mission, you can come into the possession of a deadly venom. There's an immediate plot-required use of this venom to manufacture an antidote. But you can acquire more than is needed, and then can choose how to use the surplus. There are a variety of options for this. You can make even more of an antidote, which is a benign use and may support your team in the future. You can hoard it for a phat cash payout. Or, if you can locate the required schematics, you can craft one of several unique poison weapons.

This doesn't have huge repercussions, and I don't need to track much beyond the player's initial decision. But it may be a relatively significant decision for the player to make: how badly do I want this cool new toy? Am I willing to take risks to get it? What will my companions think of this decision, and do I care?

Arsenal


I mused over the weapon selection for a little while. I wanted some choice here, both to make things more interesting and to support different playstyles: if the only option was, say, a new throwing weapon, then it wouldn't be tempting for 90% of player builds. But I also didn't want to go overboard. It would be time-consuming to create 9 new unique weapons, and there's an ongoing cost to tune and support all of them.

I ended up with three main weapon selections: a bioweapon grenade launcher, a poisoned axe, and venomous hand razors (a cyberweapon). I'd initially considered doing poison rounds for firearms, but that would have required making different variation for each weapon type (pistol, rifle, etc.). I like the example of the grenade launcher: unlike most weapons, it only uses the Ranged Combat stat, and doesn't have a specialization like Rifle, so many more players can use it. The axe is useful for melee characters; I'd previously created a unique unarmed "weapon" in a previous mission so it felt like that slot was already filled. The hand razors fit into an existing gap between the entry-level and end-game cyberweapons, using poison damage instead of the customary bleeding type.

In terms of power level, these weapons are all "Tier 2", which is about the level that players will likely be using, so the weapons should be useful but won't be essential top-tier gear. They also have some unique mechanics, so even if a player already has Tier 2 gear they can be situationally useful. Heck, even after upgrading to Tier 3 they might keep them around if they have a spare slot. The axe and the launcher can be used by other crew members, so if you personally outgrow their usefulness, they could become hand-me-downs.

The hand razors can't be transferred and are only useful if your PC has the appropriate skill, so I gate its creation behind the Cyber Affinity skill. I also gave options to pick up Acid Bolt or Acid Stream, which are existing spells that can be useful to casters.

Copy That


So: You can absolutely make complete Shadowrun campaigns using only the official editor. However, as my campaigns have become more ambitious and polished, I've started dabbling in creating unique things that can't be directly made within the editor: new gear, weapons, spells, crew advancement, etc. This requires manually editing text files, so it's a different skill set than standard mission creation.

I always start off by finding an existing file to copy and modify. You can locate these in the official content pack. In my case, I'll use the existing Grenade Launcher as my template, which is located in data/items/ex 1\ m203.item.txt.  Here it is!


I rename this and place it into my own content pack, with the new name data/items/ex 1\ poison.item.txt. Here's the updated version:


The modified properties have been marked up with violet lines. Here's a quick run-down of what I changed and why:

  • ID: This must match the filename, minus the .txt extension, but the capitalization can vary. I try to follow their existing conventions for naming items. Here it's similar to the existing grenade launcher.
  • Icon: Just noting here that I did not modify the icon. Icons are baked into the game itself. You can switch to another icon, but can't create new icons. The existing launcher one is fine so I stuck with that.
  • Name: Obviously, giving this a new name. This is player-visible.
  • Description: More detailed flavor text about the item. Some weapons also include stats here, others don't. Note that there is limited space in the UI to show descriptions, so don't make this too long.
  • Base HP damage: To differentiate this from the existing grenade launcher, I lowered the initial damage but added a new damage-over-time effect. The total damage per shot can end up being greater, but takes longer to be fully applied. This has the nice side-effect of reducing the cyberarm auto-reloaded exploit: you can still fire off multiple rounds in one turn, but since the DOT effects don't stack, it isn't quite as overpowered as the vanilla launcher.
  • Modeless Ability: Not shown here, but I copied and modified the existing ability. The new one has updated text and will show poison FX on enemies instead of the default explosion one.
  • Effect Duration: I added a new DOT effect. I copy-pasted this and the following lines from another weapon with a similar effect (I think the incendiary grenade, though it doesn't really matter) and edited them to match this weapon's concept.
  • ActivationStatusEffects: I'll tune this based on my testing, but the idea here is applying 8 HP damage per round for 2 more rounds. This particular weapon does not bypass armor, but the axe and razors do.
  • Store cost: I artificially lowered the cost of this so it isn't too valuable for players to sell. If they want the cash, then they should choose one of the other outcomes for this mini-quest. As noted above, due to the unique mechanics of this weapon it could still be useful to your party in the end-game, since multiple crew members have a spare equipment slot and have the Ranged Combat skill required to wield it.
  • Sorting group: This defines where the weapon will appear within the Shadowrun editor. You can use anything you like here, but I generally cluster my items into categories like "Unique" or "crewWeapons" to make them easier to find later.

Inaction


After it's been added, I exit and restart the Shadowrun editor. The item will now show up, just like all the built-in items do.

 
I've done this enough now that I pretty much always get it right on the first try, but when I first started making items I'd often screw stuff up. This will generally cause problems with the editor: often you'll see errors while the content pack loads, or sometimes you'll get errors when launching a scene that references it. You can always back this out by deleting the newly added items, or just keep modifying until it's working.


I use my existing combat test scene to test and experiment with the item. This one worked off the bat, since it uses pretty common and simple mechanics. Crew weapons tend to be a bit more complicated and require more trial and error to work properly. Anyways, here's a screenshot of the successful test:


The correct item name and attack name show in the UI, an appropriate status message is shown on the enemy's hover window, and they're showing the green "poisoned" effect animation. Test passed!

Sunday, September 17, 2017

Cast of Characters

Part twelve in a weekly(👫) devlog.

Standard development disclaimers apply. This is pre-pre-pre-Alpha content, everything is subject to change, features may not be present in the final version, there's a very strong 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.

I've started chipping away at that massive 30-page scene that I was complaining about earlier. It's big, but I'm now feeling slightly reassured that it isn't too big... it would almost certainly be tedious if every mission in the game was this talky, but as a single semi-optional outing I think it works OK. It helps that it's divided across a bunch of different characters/terminals, so no single section is too long-winded, and each person has a pretty different tone/outlook, so hopefully it doesn't feel too repetitive.

Make It Special


This is also one of a couple of scenes where I'm re-using an existing map. Like in Caldecott, I'm taking some low-effort steps to help make it feel a little different: using new lighting and weather effects. After making Caldecott, though, I realized that I could view this as an opportunity for additional reactivity rather than as an obstacle to minimize. So, certain physical elements of the map can change based on the decisions you made during the previous mission in this location. And furthermore, you can re-encounter some of the same NPCs from your first visit. This gives yet another opportunity for reactivity, as they can comment on your prior actions, and may contribute to the sense that this is a persistent, coherent world. I hope that the end result of this is that players will go "Oh, cool, I'm back in Y, that means I can check in on X again and see how he/she is doing!" rather than "Ugh, nice map re-use lazy developer person."

Because players have flexibility in how they choose to run missions, between two and five scenes may have elapsed between their first and their second visit here. The longer it's been, the greater the risk that they will forget the characters from their first visit. I can help mitigate this through my writing, by giving them unique voices and roles. But I think it's even more helpful to give them unique appearances, striking portraits that players will recognize at a glance.

For the remainder of this post, I'd like to chat about NPC creation. This won't cover crew members, who are a lot more complex, but the majority of non-Shadowrunners who you will encounter over the game. I mentally classify these into two major groups, civilians and combatants. Civilians are quest-givers and other NPCs with whom you converse, combatants are dudes and dudettes whom you can shoot. Some characters will be both: it gives more weight to the combat if you've previously spoken with them and learned their objectives.

Civilians


I usually start by dragging out the Civilian spawner from the Asset Library, which sets some initial AI settings and stuff that are helpful. You can also use the standard Actor Spawner; especially on a non-combat map, there won't be much difference between the two.

A civilian NPC will need three things: a name, a face, and a body.

What's In A Name?


I try to come up with "real" names for characters when I can: "Bob", "Twiddlywinks the Fierce", "Rutherford Wilson Nantucket III", etc. If I want to signal that this character is unimportant or meant to be attacked, then I'll use a role as their name: "Security Guard" or "Wallet Inspector" or something.

In this particular scene, I am using civilian job names for characters: "Plumber" and "Exterminator" and the like. This is mostly because I think players are more likely to remember their jobs than their names: just reading the name gives them some immediate context for who this person is.

Game Face


Honestly, the character portraits are a huge part of why I'm writing another mod for Shadowrun instead of striking out on another platform. There are a huge amount of great-looking, diverse, interesting character portraits in there, free for the taking.

If I already know the sort of character I'm looking for, I'll typically browse through the portraits in the content pack on disk. You can also use the in-game portrait browser, but I personally prefer the external approach which makes it easier to resize and view multiple images. I also have a personal stash of portraits that I like, and will scan through those to see if one fits the role/personality I'm envisioning.


More talented developers are able to draw their own new character portraits, a skill I greatly envy. Using the built-in portraits does have the advantage of a unified and familiar art style, but comes with its own challenges: in particular, virtually every portrait has already been used in one or more of the official campaigns, and it can be jarring to see a doppelganger suddenly appear in my campaign. So I try to avoid reusing the portraits of major NPCs, like Monika or Sam Watts or Gobbet.

Minor NPCs is a little risky, but in my opinion acceptable. If a character showed up once in a particular scene in a previous game, then I don't feel too bad about grabbing that image for my own game: for example, the minor villain Wren in Dragonfall was reused as the ally Tabitha in Antumbra Saga. My personal rule of thumb is that if I don't have a vivid memory of the character, it probably won't be too jarring to re-use it.

Using PC portraits raises different issues. There are tons of them and they're a great resource, and the majority of players won't have ever seen any one particular portraits. But, someone has played with it before, leading to the doppelganger problem again. I mitigate this somewhat by blocking players from selecting those particular portraits within my campaign (a technical process I won't address in this post). They still might be familiar from a previous campaign, which is mildly unfortunate but (in my opinion) not a huge problem... I've used my own character portraits in previous campaigns as an NPC and it didn't really bother me.

One nice cache of new portraits for CFiC has been previous campaigns. You can copy over portraits from Seattle, Dead Man's Switch, Berlin and Dragonfall that didn't make it into the new Hong Kong art pack. My preferred source here are the hireable runners (like the Nephilim Network): they never had a speaking role, and most players won't have recruited them anyways, so my use of them won't clash with existing play experiences. But NPC portraits and other backer images are fair game, too.

Some Body


Much like portraits, there's a really nice variety of 3D character models available for NPCs. These take two major forms: prefabricated models, which are simple to select and use but can't be customized, and "core" models, which allow you to select from a range of skin tones, hair colors and styles, and a few other modifiers (beards for males, horns for trolls). If you go the "core" route, you will also need to add an outfit for the NPC to wear, unless you want them in their underwear.


You can't preview these within the editor, and it's tedious to re-launch the game each time you want to verify something. Fortunately, folks have taken the time to create a model browser that lets you quickly view all of the available options within your web browser. A version of it is currently hosted on Dave of Death's site, though I prefer downloading to use offline.

 

One challenge: many of the portraits don't line up nicely with any of the available models. I try to get close, but, honestly, even the official portraits and models don't perfectly match, and I don't think players get that worked up about it. They'll notice if you match a portrait of a huge bald troll with the model of a svelte elven businesswoman, but they won't care too much if, say, she's wearing a jacket on her model and a tank top in her portrait.

If you go the "core" route and are using a PC portrait, you can also choose to look up the portrait code directly from hongkong.pcode.txt file. You'll still need to pick out an outfit, though.


Sidebar: one of the more annoying aspects of working in the Hong Kong engine is that, while HBS redid the ork and troll body models for the new game (which is great, they look a ton better now), they did not update the legacy outfits to match. You can still use them, but the characters' skin will clip through the clothing or otherwise look ridiculous. Bottom line: Hong Kong outfits work for all characters. Outfits from DFDC and earlier will work on humans, elves, and dwarves, but not on orks or trolls.

Combatants


So, cool, that's how we create NPCs. What about people whom we want to shoot? We can skip the face portrait for most of these, since we'll never see them in the conversation interface. Most other elements of NPC creation still apply, and in addition we need to select the appropriate stats for them.

Statistics


I usually start off by searching the Asset Library for "errant", which produces some great pre-generated enemy characters. These come with appropriate stats, equipment, and AI settings. They also come with default names and models, which I'll almost always want to override.


One side note: there isn't a melee enemy type in the Errant group, so I search for "triad" to find the "melee" characters. (Unfortunately, Triads do not include some other types like Shaman and Grenadier, so you need to mix and match between the two groups). If you want enemies to use swords instead of baseball bats, one easy approach is to use the melee character but manually replace its Thug_Melee gear with Adept_Melee gear.


I always use the lv1 versions of these characters. They are already set up to scale their character sheets, so when the player actually encounters them they will be advanced to the appropriate power level. If you were creating a linear campaign, you could manually select the level you wanted to use; but personally I would still use lv1 for this and scale them. That way, even if you later change your mind about the order of missions or power curve, you just need to update the CharacterScaleAmount variable rather than update dozens of character instances.

What about tougher enemies? I'm not really talking about bosses here, but I will note in passing that the "redsamurai" enemies from Gaichu's loyalty mission are nice, beefy opponents that also support level scaling. (Though the curve is a bit rough - they're way too powerful at lv1, and are more appropriate for mid- and end-game). 

Naming


I tend to follow HBS's convention here: each enemy has a 2-part name, with the first indicating their faction and the second indicating their combat role. Examples include "Lonestar Sniper", "Fuchi Mage", "Humanis Thug", etc. Faction isn't strictly necessary, but it contributes to the player's understanding of the encounter. The second part of the name is important since it has a strong impact on the player's strategy and decisions: if there's a mage on the battlefield, they need to know so they can deal with it now and not get surprised by a fireball next turn. (You can and should reinforce their identity by picking a corresponding character model, but, again, the Shadowrun engine is not very detailed and you can't expect players to pick up on the fact that one character is wearing a hood and another has a long gun.)

Boss-type enemies will usually have a distinctive name, like "Thomas" or "The Spirit Of Despair", which reinforces their uniqueness.

Bodies


As with NPCs, we can browse for appropriate character models. I almost never bother with customized core models; there are great sets of existing enemy factions that you can draw from. What's really nice about this is that the opponents will be visually unified (similar color scheme and armor design) while individually distinct (varied skin tones, metatypes, genders, etc.). That helps make a fight feel coherent and also like you aren't fighting a bunch of clones.

When you're facing the same faction as in one of the existing games, that's great! You can make use of Aztechnology or Lonestar or Knight-Errant or whatever. When I need to use a faction that's unique to my games, I'll try and pick an existing faction that doesn't appear and co-opt it. For example, I used the Humanis faction to represent the Native Californians in Antumbra and Caldecott: they have a similar ideology and racial makeup. I initially used the Tsang Security to represent Shiawase, though I was able to update to proper Shiawase models after HBS added them to the expanded edition (thanks, HBS!).



So, yeah, that's about it! Compared to a lot of the other stuff I work on for the mod, personalizing NPCs is relatively quick and straightforward. I feel like you get a lot of bang for your buck: leveraging all the time and effort HBS has invested into making good-looking characters, who you can then recast into original roles in your own story.

Video games are a highly visual medium, and characters, along with maps, are the thing players will spend the most time looking at. Having them make sense and look good is a key element to engaging players. And, honestly, engaging myself as well: I love seeing those characters from my pages coming to life on my screen.

Sunday, September 10, 2017

Cut It Out!

Part eleven in a weekly(🎬) devlog.

Standard development disclaimers apply. This is pre-pre-pre-Alpha content, everything is subject to change, features may not be present in the final version, there's a very strong 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.


Last week I hit a bit of a wall. I'd been banging on that Sacramento scene for what felt like ages, trying to get all the pacifist routes implemented and working properly, on top of the combat stuff I mentioned in last week's post. I finally knocked it down, though, and got to move on to a crucial scene that I've been looking forward to for quite a while. This is the first of... probably three or four significant moments in the campaign, with potentially high emotional impacts, which have been my main driving force to keep me going on this dumb project.

Over the long Labor Day weekend I spent most of the time building out the cut-scenes that occur around the climax of this mission. I got scared off of writing cut scenes after my earlier experiences with the Antumbra games: almost every time that a new update of the Shadowrun Returns engine came out, it would break one or more of my cut-scenes. If I was lucky it would just turn ugly, but more often it would actually freeze the game, breaking progress for all of my subscribers until I could carve out time to reproduce, debug, patch and update the campaign. Stressful! As a result, I dialed back on cut-scenes for Caldecott. But one big bright spot of the lack of updates for Hong Kong is that I no longer need to worry about future updates breaking things, so I'm feeling more confident now about writing them again.

They do still take quite a while, though. It takes a lot of iteration to get them down right. Even something that might seem simple, like having one character attack another in a cut-scene, ends up being pretty complex. For it to feel right, you need to initiate the attack animation, then wait a fraction of a second, then start the attack sound, wait a slightly longer fraction of a second, then show the impact on the victim. You can't really know in advance how long each of those pauses need to be, so it takes a lot of tweaking and testing to make it seem realistic.

Backing up a bit: when I say "cut scene", I mean a scripted sequence that takes place within the game engine but is not under the control of the player character. They were a staple of JRPGs in the 1990s, and I think they work quite well in isometric RPGs like Shadowrun. They are a great alternate vector for storytelling, beyond just the conversation interface: you can show movements and actions and ambient (floating) dialogue. Because they take so long to make, I don't do all that many, but I think their rareness makes them seem all the more special when they do happen.

Because this sequence is so spoilery, I can't show the actual scene, but I did want to share a sample trigger for the first part of this cut-scene. Spoilery bits redacted.


Breaking this down:
  • Like a lot of my triggers, this is initially disabled, and will be enabled during the conversation that precedes it. This makes it a bit easier to track what's happening in the debug console, and also allows me to directly invoke the script during testing.
  • The "kill" command here is used to make a character disappear ("Death Method: Vanish"). I could also warp the actor if I preferred, but it's simpler to just make them vanish. By playing the animation on them at the same time, it looks like they're teleporting out.
  • I subtly adjust the lighting. The new value is actually really close to the current one, so it'll probably have an almost subconscious effect on the player. You could also, say, turn it bright red if an alarm is going off or from dark to light if someone turns on the light.
  • Make actors passive so multiple characters can move at the same time. Set their run speed to walk so they, uh, walk, which looks better in this scene.
  • Here I disable the Shadowrunner team. This is a trade-off. Players can feel frustrated when they can't move or interact, so when possible it's better to keep them enabled. But there's a lot more that can go wrong in that case: the player might wander off and miss the cut-scene, or stand in the way of other actors and block them from hitting their marks. In order to minimize bugs in this scene, I'm locking down the player's movement for the duration.
  • Displaying text over actors looks good during cut-scenes. But all these lines should be really short. If anything is longer, go ahead and use the standard dialogue interface.
  • Next is the really important part, the pair of "Send out game event after delay" and "Wait for game event". This just pauses execution of the script for the timed amount. Pauses can be very short, as for animations; this particular one is longer to give the player time to read the dialogue, and to capture the characters' confusion.
  • Characters turn to face the person who's talking. This looks more natural, otherwise they might be staring at a wall or something odd.
  • Order actors to move. Because they're in passive mode, multiple people can be moving simultaneously. They'll still route around furniture and other obstacles.
  • End current team round is still important to make sure people actually move; even if they're in passive mode, they still can't move until their team (in this case Civilians) comes around. I think you can also use "Isolated team move" for this.
  • Et cetera, et cetera. This continues with more dialogue and movement and animations, but you get the idea.
So, that's it! It feels really good to have this scene in the game. It's always a thrilling, almost euphoric feeling to get this thing that's just been an idea trapped in my brain for months, and to see it actually realized and out in the world, where I can see it outside of myself and treat it as its own thing.

Sunday, September 03, 2017

War! What Is It Good For? Several Hours Of Gameplay.

Part ten in a weekly(🔫) devlog.

Standard development disclaimers apply. This is pre-pre-pre-Alpha content, everything is subject to change, features may not be present in the final version, there's a very strong 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.

So, status update: I've "finished" my first scripting pass through the first three scenes of the game. This includes the introductory/tutorial-ish scene, which is the shortest in the game. It also includes one that's... I don't know if it's necessarily the longest or the biggest, but it's the most sprawling, with lots of different elements kind of mushed up together. I still have (cough, cough, mumble, mumble) scenes left to do, so I'm still a ways off.

What I'm Doing


"Finished" is a very relative term here. I'd estimate that I'm about 90% to "feature complete" on each of those three. I've identified a few things that I'll need to circle back to later: plugging in some side-quests, updating some general mechanics (stuff like banters and failure conditions) and making a few creative updates. In terms of total work, these scenes are... I dunno, maybe around 60% of the way to where they need to be for my initial beta testing. I've run through the scenes multiple times and confirmed that they are beat-able, but I have no doubt that more bugs will continue to pop up with each additional run-through, so more polish will be needed. That said, it does feel really good to be making steady progress on them, and having this sort of early/interim signoff process allows me to feel a bit of momentum, and get a sense for how these things will chain together.

The specific mission I'm working on now is the Sacramento one that I've mentioned in my earlier posts on dialogue. This is the first of a couple of scenes that have potential pacifist routes: you can complete the entire mission without firing a shot or killing anybody.

That said, even though there is a pacifist option, there still is optional combat as well. Most players should have a pacifist route available, but in some unusual situations (like, say, a player who dumps all of their Karma into Body and doesn't bring along any other teammates) might be forced to fight. Others may just grow impatient with the puzzles, or decide that it's more in character for them to go in hot and heavy.

So: optional combat in this one, and non-optional combat in most scenes. Fighting makes up a significant part - heck, I'll go ahead and say the primary part - of my Shadowrun campaigns' gameplay. This post will look at how fights work.

Old-School Fighting


In the prehistoric era of the 1.0.4 Shadowrun Returns engine, I absolutely loved fights because they were the one part of game-creation that took longer to play than they did to build. Making a map might take ten hours and result in sixty seconds of movement. A dialogue might take an hour to write and two minutes to read. A puzzle could take two hours to create and between thirty seconds and five minutes to solve. But a fight? Maybe just around two minutes to set up, and between two and five minutes of gameplay to beat.

Over the whole course of Shadowrun modding, though, combat has been hit harder than probably anything else. One of the early updates (probably around the time of the shift to the 1.1.x engine) revamped how turns were handled. The main side-effect was that enemies now always went first in combat. Suddenly, among the hundreds of mods published for Shadowrun Returns, fights that used to be easy became impossibly difficult, allowing foes to one-shot your primary character before they even had a chance to respond.

Solving this required reworking a lot of those fights, adding specialized triggers to manage hostility and positioning and stuff to keep that dreaded ganking from occurring. That worked for a while... but then came Gumbo AI, and everything changed again.

Fortunately, stuff has ended up in a good place: the end result of all these changes is that combat is a lot more challenging and fun than in the 1.0.4 days. Fights used to mostly revolve around buffing and overwatch. Now, fights feel much more fluid, transitioning between turn-based and freemove; they're more tactical, with positioning and cover being really important; and they're much more varied, with a wider variety of weapons and spells and tactics to use.

The flip side, though, is that fights are no longer quick and easy to set up. Making a fun fight requires a bit of planning and a fair amount of scripting. I'll be examining the most common types of fights in this post; boss fights are unique one-off affairs that aren't necessarily useful to consider, so I may or may not cover those in the future.

Rules of Engagement


In the Hong Kong engine, fights might initiate in a few different ways. (Note: I'll be using the term "Lonestar" to describe a generic hostile team, in keeping with the editor's default teams.)

From the Environment


The most common setup is that Shadowrunners and Lonestar are mutually hostile, and Lonestar's backs are turned to Shadowrunners. You will see the pistol icon light up once you spot them, but will remain in free-move mode until the enemy detects you or you manually enter turn-based mode by clicking on the pistol.

This is the most forgiving type of fight to start. Since you control your positioning AND can buff in advance AND all four of your people get to move before the enemy does anything, you can inflict significant damage from the start. You'll almost certainly take out at least one enemy before they can react. Players also really like being in control so they can set the stage as they want.

That does mean that these types of fights can be a bit too easy and boring, though. And, if you try to make it more challenging by bumping of the number of opponents, then it might be too difficult in the other direction if players wander into their sights prior to initiating combat.

There are also only minimal storytelling opportunities with this setup. You don't always need storytelling: maybe you're in a cave, and there are a whole bunch of hellhounds in there too, it isn't surprising that you would open fire. But players might feel uneasy about launching an ambush on a group of people if they don't know who they are, what they're doing, and why they might be considered enemies.

Talky Shooty


This might be the most common setup for a combat encounter in my campaigns. You chat with someone, and at the end of the conversation, a fight breaks out. This might be based on a decision your character makes, or might be a pre-ordained result

I've been following Harebrained Schemes' design for this sort of fight, which works well. The basic structure is:
  • Within the conversation, enable a trigger to mark that the fight will begin.
  • That trigger fires when the conversation ends.
  • Issue orders to all of the opponents, generally telling each one to move to a specific spot on the map (probably behind cover).
  • Isolate Lonestar as the only active team for 1 round.
What this means is that the enemy moves first, but they won't attack.  In practice, this tends to lead to a challenging but non-frustrating fight. You can still plan out your strategy, can protect your main character, and, because the enemy is in a defensive position, won't immediately wipe them out.

The one slightly annoying thing about this is that enemy mages, in particular, can move and attack on the same round. I haven't been able to figure out why or how to stop it; it's probably deep Gumbo voodoo.

In general, though, this is a really good overall design for most fights. It gives the player story and context for what's going on, sets clear motivation and objectives, and presents a challenge without seeming unfair. The flip side is that you do need to write a trigger and do some additional tuning to make sure that people are moving to good locations. So, the days of creating fights in two minutes are over, but we're getting better fights as a result.

Ambush!


This is sort of a combination of the first two encounter types. A fight starts from the environment, but the enemies make the first move instead of you. But, we still want to avoid the "ganking" problem, so we need to ensure that the enemies don't actually hit you before you get a chance to react.

The script for this type of fight looks almost identical to the Talky Shooty one. The difference is how it is triggered: generally it's the result of your player character entering a particular region, which I tend to refer to as a "tripwire". I also generally stop the Shadowrunner teams' movement at the start of the trigger; otherwise, characters might have expended some AP in finishing their moves from before the start of the fight, and as a result will start with just 1 AP in the first round of combat.

Complexity and Victory


Trash fights are pretty boring. They aren't necessarily bad. I have a few trash fights in my early scenes, when players are still evaluating their builds and combat strategies: it gives a chance to try things and make mistakes without getting punished too badly. And it can sometimes work well thematically or for gameplay reasons. If your character did something clever to set up an ambush, then it isn't unreasonable for them to have a very easy fight as a result.

In general, though, the game is more interesting if the fights are more challenging. One of my game design shifts in CalFree in Chains has been to have fewer fights but make each one bigger and harder. I think there are a few advantages to this. In Caldecott, for example, most missions had about six fights; if you kept getting dinged up for each of the first five, then you might be entering the final fight with no consumables and low health, which could make it very frustrating and require a lot of reloading and/or lucky rolls to beat. So I was weirdly incentivized to make early fights harder (while your party is at full strength) and later fights easier (so you could still complete them with a damaged team), which is the opposite of the sort of power progression you would like to see.

Do The Wave 


The most straightforward way to add complexity and difficulty to a fight is to use multiple waves of opponents. In one example, an enemy might start with five foes on the field. After you have downed three of them, then another four rush in to reinforce them, bringing their numbers back up to six. And once only three of those are remaining, two more join the fight. This has a bunch of implications:
  • It limits the "free heal" effect that is granted at the end of each fight. Instead of three free heals for three separate fights (against 5, 4, and 3 enemies), you just get one free heal (across a total of 12 enemies).
  • Buffing is more useful. If you are just facing 3 enemies, there isn't as much point in casting spells like Aim or Armor: you're better served by just cutting down the enemies ASAP. But if the fight lasts for longer, then you'll get the full use out of those abilities.
  • The fight becomes less predictable and more interesting. In particular, you might have established a line against your foe, only to have some strikers threaten your flank or rear, forcing you to reposition.
  • Along the same lines, having foreknowledge of the fight becomes more useful. If you do lose the fight because a second team hit you from behind, then when you reload, you might be able to set up a shaman's barrier or leave a character on Overwatch, which could turn the tide and lead to a resounding victory.
I used the wave approach in Caldecott, but usually only for major boss-level fights, since I had so many smaller combat encounters; for CFiC, I'm planning to use it much more often, especially in later scenes. I'm also taking what I think is a much better approach to actually introducing new waves. In Caldecott, I would just teleport the new set of enemies onto the map. This was easy to program, but would generally leave the new enemies as sitting ducks that the player could hit hard before they had a chance to move; conversely, if they spawned at the end of a player's turn, they could strike hard before you had any chance to respond.

In CFiC, I'm using waves more like HBS does. In general, the idea here is to teleport the enemy in behind a closed and locked door - so, they're in the scene, but not yet visible or active. I issue orders for them to move to a specific location, similar to the Talky Shooty / Ambush triggers. And, that's it. When Lonestar's turn comes around, they'll charge through the door, take position behind cover, and then it will be up to the player to decide how to react. Again, more work than before, but I think it leads to a better result.

All Skate


Fights can be a lot more fun and interesting with multiple teams on the field at a time. The stereotypical approach is a three-way firefight between cops, gangers, and Shadowrunners. You can dive into the middle of the conflict, or try to fall back and let the others whale on each other for a while to soften up. But alliances are cool too: if you're facing a powerful foe, it feels good to have some friends on your side who you don't directly control but who aid you against a common enemy.

For the most part, this "just works". The Gumbo AI is pretty smart about how allies operate; you'll occasionally get hit by friendly fire, but they'll also buff you when they can.

Measuring Progress


You don't necessarily need to do anything to mark the end of a fight. The engine will automatically transition back into freeemove mode once there are no more hostiles visible, and you can continue on your way. But sometimes you'll want to do something special: start a conversation or drop a key or update a goal or whatever.

The most useful element to track fight progress is the integer function "Get count of alive actors". I tend to assign tags to enemies to track them. For example, some enemies might get "isHumanis" and "isHumanisWave1", while others might get "isHumanis" and "isHumanisWave2". When an actor dies, I can count to see if it's time to bring in the second wave yet, or if the entire fight is over.

Adjusting fights is a bit more time-consuming now than before: I can't just drag in or delete an actor spawner, I need to also update the triggers and regions associated with their initial moves. BUT, by using these counting triggers, I can track the logic of the fight independently of the specific actors involved in it, so at least that part of the scene won't need to be updated when I later adjust the opposing forces.

A Sample Fight


Let's look at some stuff! It's been way too long since I showed any video, so for this section, let's look at a fight's triggers and the results.

Code It Up


This is one of the very first fights in the game. It actually combines the Environmental and the Talky Shooty approaches, with the player able to determine their approach. You'll encounter a group of people who are threatening someone and acting menacing. You can choose to ambush them for an advantage; or you can try to talk, which will still ultimately lead to combat but will give more information about what's going on. This is a mildly important roleplaying decision for the character: are they impulsive and violent, or cautious and diplomatic? Other party members will make note of your behavior and comment accordingly.

First, here's the trigger that fires if you hit your opponents first.


  • As we'll see later, this trigger will be disabled if your opponents spot you, so this only fires if you attack first.
  • We skip the opening conversation in this flow, but show a little big of ambient dialogue. This helps establish one character as a friendly, and makes it a bit more interesting and fun.
  • We disable the other talk-related trigger to make sure that one doesn't fire when your opponents detect you.
That's pretty much it. Gumbo AI will ensure that the enemies behave smartly once it's finally their turn to move.

The Talky/Shooty flow has two parts. First, when you approach the foes while they're in place, we disable the ambush, start the conversation, and enable the actual fight trigger.


The real fight-related stuff is in the "FightAfterTalk" trigger. Note that this one is not active by default, we only set it up when going through the conversation flow.


Nothing too complex in here. After the conversation is done, they all move to their locations before the player can do anything, then wait patiently for the next turn.

And, regardless of how we begin the fight, it will end with this trigger, which starts another conversation once this particular group of enemies has been defeated.


Finally, just for fun, here's what the map looks like in the editor. Note that the actual enemies aren't on screen yet: they get moved in in response to another action that the player takes earlier. You can see a bunch of little 1x1 pink regions in there. Half of them are "TeleportDest" regions where I will place the enemies; the other half are "MoveDest" regions that describe where they should go for the Talky Shooty flow.



In Action


As promised, here are some brief videos. As in most of my debugging, I'm running through this as a Level 6 Lucky Strike, who makes short work of the Level 1 enemies I'm facing. I'll worry about tuning the difficulty of the fight later, in this phase I'm just concerned about the logic of how the fight works.

Here's the impulsive approach, sneaking behind them and attacking.



And here's the cautious approach, where you exchange words prior to opening fire.



That's it for now! Lots more fights to write and fix and tune, but on the whole, at this early stage, I'm fairly pleased by how the combat feels so far.

Saturday, September 02, 2017

After the Quake

I pre-ordered Life Is Strange: Before the Storm approximately thirty seconds after it was announced. That isn’t normal for me - I think the only other games I’ve pre-ordered in the past decade, not counting Kickstarter pledges, are Dragon Age: Origins and Inquisition. But I’ve been really hungry for more LiS goodness since finishing it last year, and I was eager to show my support for this type of game.

I had only fleeting second thoughts afterwards. Before the Storm has a different developer (Deck Nine replacing DONTNOD), and due to the ongoing voice actors’ strike, all of the voice actors have been recast. That second aspect made me briefly consider canceling my pre-order, more out of solidarity with the strikers than any concern with the new actors’ talents. That said, as far as I can tell there hasn’t been a general call to boycott struck games, and I still really wanted to play this one, so I decided to go ahead with it. It definitely helps that the new developers brought on Ashly Burch to help write… it’s good to see at least some form of continuity with the earlier entry.

The first episode just came out. I’ve been looking forward to playing it, and also looking forward to playing it now. One of my few regrets about LiS is only playing it after the whole game was released, so I missed out on a lot of the community development and involvement as the story was evolving. I’m now somewhat plugged into those communities and looking forward to shared reminiscing and speculation.


There can be a temptation when you buy a game at launch to try and rush through it, so you can finish it before any elements are spoiled. But one of the many things I love about Life Is Strange is its deliberate sense of calmness, of slowness: despite its reputation as an emotional game, the majority of it urges you to take it easy, to enjoy your surroundings, to dawdle. So I’ve been savoring every moment with this game: carefully reading through Chloe’s journal, catching up on text messages, exploring every nook and cranny of the environment.



My overall impression of BTS so far is “Same, but different,” which is exactly what I want. Those elements that I loved in the original are here: the stillness, the empathy, the beauty. At the same time, this is emphatically Chloe’s game and not Max’s. Her voice is different, her actions are different, her approach to the world is different. It’s been a perfect mix of “more of what I wanted” and “new delights”.

Before dipping into mini spoilers, a few random notes, mostly as points of comparison:

The game looks GORGEOUS. In particular, the character animations are a lot better and more detailed. Not that the ones in the original were bad, but they seem much more expressive this time. That’s true in the big moments, when tempers are running high, but also striking in the quiet moments, like when you’re pausing on a dialogue response and Chloe is just looking at the other person. This is another area that illuminates the difference between Max and Chloe: Chloe has much more attitude in everything she does, getting into peoples’ faces and being noticed, where Max was more of a wallflower.


Colors and lights look amazing too, very vibrant and pretty. The opening couple of scenes have some great interplay between darkness and light which produce some really striking results.


As a side note, the overall art direction maintains the painterly aesthetic of the original game. This is especially pronounced for printed materials (photographs, magazines, posters), which are very impressionistic. There are a few specific areas, though, where objects look much more realistic and detailed. It isn’t bad, and isn’t especially noticeable, but did seem slightly jarring. And... it's been a while since I played the original, do the mirrors in there work? Because the mirrors in this game look awesome, and I feel like that's a new thing.


They’ve done a phenomenal job at recreating the locations of the original game. I’m actually really curious about the technology behind this: from what I understand, the original was build in Unreal, while the new one is in Unity. I’m not familiar enough with the modeling systems in them to know whether they could just pull the original assets over and modify them, or if they needed to rebuild them from scratch. If the latter, I am very impressed by the result!


Along the same lines, the change in voice actors is somewhat noticeable, but doesn’t really take me out of it. The new actors do a good job at capturing the overall tone and rhythms, and are pretty easy to buy as being the same characters. Some, like Joyce in particular, are dead-on replications. Only a few, like Dana, feel a bit off. Most are in the Chloe range, where you can sort of tell that it’s different, but it’s so close that it doesn’t really matter.

MINI SPOILERS

I do like all the subtle ways that they’ve updated the game mechanics and systems to match the new protagonist. The collection system is a great example. In OG LiS, Max took photographs at certain interesting sites. The overall idea in BtT is the same, but since Chloe is a juvenile delinquent instead of a budding photographer, she tags spots instead of capturing them. One thing that I really like about this is that there’s a choice involved, where you get to decide WHICH of two potential pieces of graffiti to write. I really dig how this can be an opportunity for expression.


Speaking of expression, I like that you can change your outfit. I’ve mentioned this before, but I am WAY more invested in my characters’ appearance in video games than I am in my own appearance in real life, and I spent a lot of time trying on different shirts and mulling various looks. It might seem like a little thing, but I like it a lot: another chance for you as a player to impact the game, and in subtle ways it can change the overall feel of the story. (I thought that I read somewhere that other characters would react to your sartorial choices. If that’s the case, I haven’t noticed it yet. I hope that that isn’t something which is only available for the default outfits - it would be a bummer if everything BUT the deluxe threads had something special associated with them.)


The journal has changed a bit too. The overall idea is the same: when you complete a major area, another page or two are added that describe your actions and your thoughts about them. But in this game, they are letters that Chloe is writing to Max. She never plans to send them, but they’re the things she would want to tell her if they were still speaking. These are great, especially Chloe’s voice in them, but they’re also wonderfully heartbreaking, since each time you are reminded of the multiple gaping holes in Chloe’s life.


One change that I was initially a bit apprehensive about was the addition of “backtalk”. This is sort of a conversation mini-game where you try to persuade someone by arguing with and/or insulting them. It’s totally in character for Chloe, and has a lot of great lines associated with it. I was a bit bummed by the addition of a timer, which feels a bit Telltale Games-y and contradicts the overall mellow play-at-your-own-pace vibe of the rest of the series. That said, in practice I’ve been enjoying it a ton. It’s always very clear when you’re entering Backtalk, so you can mentally prepare yourself for that, as opposed to the QTE-style surprises that bug me in other games. It probably helps that I’ve been doing pretty well at them; I’ve beaten every one in the first episode, and in fact, only had one point of one node where my opponent managed to “land” a single argument.

MEGA SPOILERS

One point of minor controversy in the community leading up to the release of BtS was concern that the new developers were un-gay-ing Chloe. I avoided all pre-release gameplay footage and stuff to avoid spoilers, but apparently there were some comments along the lines of “Oh, you can decide whether Chloe likes Rachel or not” that rubbed people the wrong way. I am please to report that Chloe is, canonically, hella gay: even outside the choices your character makes, you can infer her preferences from her words in the journal, the art on her wall, etc. (One wrinkle is her relationship with Eliot - she makes it clear that she hooked up with him, but equally clear that she doesn’t have any emotional feelings for him. The only people she sounds interested in are women. I think that’s very much in keeping with her portrayal in the original game, where she had condoms in her jacket but 100% of her focus is on other ladies.) Especially considering how low-key the first couple of episodes in LiS were, with lots of subtext and the big movements only happening starting in Episode 3, I feel like they’re running ahead of the curve on this iteration.


To expand on that a bit more... yes, it's true that you can help guide how Chloe responds to Rachel, and can make a big choice near the end where you can confess romantic feelings or simple friendship. But it seems to me like this has more to do with this specific relationship than with Chloe's identity. Deciding that she wants to be friends with Rachel doesn't suddenly turn her het. It might be that her feelings for Max are too strong (and, wow, that journal is intense - "Put your thoughts in me"), or her grief is raw, or you just don't think they're clicking. Anyways! This probably isn't a big deal to most people, but I'm happy with how they seem to be handling and portraying her identity.


The episode feels decently long and covers a lot of ground. It felt a little like going through a compressed version of the entire five-episode arc of the first season. We have the sense of peace and calm that permeated episodes one through three; the intense emotional outburst in the junkyard here rivals the similar scene in episode four, and may even exceed it (I think enlisting the player in this sequence as an actor and not a spectator is brilliant game design and really effective); and the dream in the car is a lot like a short version of the episode five nightmare, especially in the journal and cell phone. So, that was all good on its own - it feels like we got a lot of meaty stuff right off the bat - and also is super-encouraging since it's a good demonstration of their ability to hit all the right notes.

END SPOILERS

So, yeah! It feels like things are off to a really solid start so far. Especially considering my uncertainty around the change in developers and actors, it’s been a pleasure and a relief to have such a satisfying outing. I’m already feeling regretful that we’ll only get three episodes of this story and not the five of the original. But, that’s what all great art does: leave you wanting more. For the most part I'm content to wait and see what they have in store for us next; my one specific hope is that they can bring back Ash and Hannah for the bonus "Farewell" episode. Fingers crossed that the strike is resolved by then; if not, I really hope that they can find a way to involve Hannah similar to how they've enlisted Ashly. Maybe she can perform a song or something?


I took an insane number of screenshots while playing this. Like, seriously, an average of five per minute over the 4+ hours I played, it's probably the most photo-dense game I've played. I'm too wrapped up in my Shadowrun stuff to properly annotate them at the moment, so I'll either edit this post in the future or maybe make a small one-off post with them once they're finally sorted and ready.