18 June 2017

Breaking habits

Seeking fresh ideas … Hum!
Accomplished creators will sometimes say something to the effect that one needs to master the formal conventions in order to bend them and innovate. (In the arts, I suspect there is some deeper truth about the historical transition from Romanticism to Modernism, but I digress as always).

When I first started making LoSt, the idea was for a small 7DRL shooter with card based mechanics and no hit points (getting hit was game over). That didn't scale well, however, and was gradually transformed into the current combat system.

Wounds UI
Health: Actors have a number of health levels (HLs), each with a number of bruise levels (BLs). If an actor spends a turn not getting hit, they regenerate one BL. Once a HL reaches zero, however, it won't heal naturally, and the player needs to rest at a saloon or hospice.

Initiative: All events have a speed value, with actions performed in a fixed order each turn. Melee precedes missile attacks, which in turn precede movement. If you're next to an enemy, you can back away, but giving your enemy a free attack. Also, actions can be "interrupted" by incoming attacks. The idea was to give melee an edge in close quarters: If you're wielding a knife and facing a shooter, your best bet should be to get up close and stab your foe before they get a chance to shoot you.

Randomness: The system is mostly deterministic. Attacks have fixed damage, and there is no probability "to hit". Instead, melee sometimes deal grazes (half damage) or critical hits (effect depending on weapon). Firearms have a chance of going wild, depending on conditions like cover and skills.

Game changer
This may sound good on paper, but I've been vexed by the fact that melee in particular doesn't work well in practice. There was a problem of getting ganged up on, since taking more than one hit in a single turn almost invariably depletes a whole HL, something that should be avoidable with clever tactics. On the other hand, the rapid bruise regeneration means the player often has to land successive blows to properly wound the enemy, in turn taking as many hits himself. Likewise, it doesn't make any sense for instance to stab once and then spend some turns to wield and cock a gun, since the stab wound will be fully healed by the time you pull the trigger.

There's also been a problem with balancing damage. Comparing a club and a knife, they both deal 2 BLs, but the club spreads the damage over several HLs, whilst the knife puts all of it in a single HL. At the end of the day, the knife is almost unambiguously better, since it has the chance of depleting HLs more quickly.

However unbearable I find the current states of affairs, this system has been in place for years now, and me stumped as to how to fix it. Should I try to make something different altogether? Introduce a standard hit points system? God forbid! I'm giving the current rules another chance, and started by just tweaking the existing values.

Here are some of the changes I'm trying out currently:

Damage output: I made mostly everything deal a little less damage. I figured the lower tier weapons (bowie knives, tools, whips) can deal just a single BL in damage, and still be better than unarmed fighting, since unarmed fighters are unable to score critical hits. Increasing the player's health might also be an option here.

Bruise regeneration: Bruises now regenerate every second turn, and healing the last BL of a HL takes another extra turn.

Interrupted actions: I've disabled this almost completely. If an actor gets hit right before carrying out an attack, that attack is no longer blocked, but rather guaranteed to be a graze/wildshot. At point blank range, a wildshot will hit the target about 50% of the time.

This already works better than before, even if it's basically the same rules. For one thing, a couple of angry animals won't kill you in a single turn, even though it's still bad to get surrounded. The slowed regeneration rate means that there is more time to apply actual tactics, like spending a turn to reposition, without all bruises being reset. The fact that the last bruise in a HL takes an extra turn to heal also gives an advantage to weapons which deal damage over several HLs. A weapon dealing 2 BLs to a single HL still has an edge when it comes to quickly whittling down your enemies HLs, whilst a weapon dealing 1 BL to two separate HLs is less of an immediate threat, but will give an advantage a few game turns down the road.

I may still have to make some more fundamental changes to how combat works, but it's refreshing just to see the game work slightly different from what I've grown accustomed to.

Props unbound

Inspired by the moderate success with switching around combat rules, I'm also trying some changes to the inventory system. Again, some pretty arbitrary principles had grown out of the original game (some of them outlined in an earlier post). For instance, I felt that limiting actors to carry only six items at any time was pretty neat, since dead dudes would just drop all their loot in a nice circle around themselves.

Now, I've upped the inventory cap to 12 items, which really just lets the player carry more trash around (although balance issues may arise later). Secondly, props are now dropped and picked up from adjacent hexes rather than the one you're currently occupying.

The effect on gameplay is minimal, but I may keep it this way, just because it offers a solution to a problem I've been having: how to give props to NPCs? I didn't want a separate "give" command, so instead I implementing a heavy-handed system for offering NPCs stuff by dropping it in their field of vision. This is how you currently collect bounties from judges, by plopping the severed head of a goon in their vicinity. God only knows if a single player has yet picked up on the fact that this is a thing, as it's only vaguely hinted at in the dialogue. But if props are dropped onto the hex right in front of to you, the system pretty much gives itself: Simply invoking the "drop" command when facing an NPC should make for a pretty intuitive and smooth interface.

Current shop layout, and more spacious mockup
D=door, s=shopkeep, c=counter, p=props
I'm slightly concerned that some veteran RL players may find this counterintuitive. It's still possible to pick up items you're standing on, but that has the disadvantage of not properly teaching how it "should" be done. Players who fall into the habit of walking on stuff to pick it up, will in effect be wasting a turn as opposed to players who fall naturally into using the new system. There are some possible ways to fix that, either by making it a free action to pick something up, or even let props on the ground block movement. This last solution would mean some pretty drastic changes to tactics, but might even work when I start making everything a bit more spacious, which is something I've planned in any case.

Come what may, it's always good to break habitual thinking by changing the rules around a bit. Every dead end explored is a step in the right direction.

As always,

17 June 2017

LoSt this week (2 steps ahead, 1 step back)

It's been a while since I found the time to anything substantial with LoSt, but this week I managed to put in a few coding sessions and implemented some features that I've long been wanting to have. 

So I fired up old trusty byzanz to make a gif, which came
out slightly discolored, but I kind of liked that crusty feel. 
First, I got in a basic function to zoom in and out of the map. This will provide the framework for waypoints/travel, a logbook, etc. later on. Even in its current bare-bone condition, it provides me with a nice tool to examine my maps. It is an example of something which it is perfectly lovely to make. Since it'll help me as a developer, I'll of course be furnishing that map with icons to represent waypoints and other points of interest. And I probably won't be able to resist adding some ornament, like a compass rose or a smooth transition animation. All of this will only enhance the play experience.

Coming soon to a GUI near you?
Today I sat down and wrote the outline of an editor for place themes/blueprints. It's been cumbersome to use a text editor to make these, and the simple little application I hobbled together this afternoon is already more comfortable. It just makes the blueprints, so I still have to write the map legend by hand (rules like eg. fill hexes marked "E" with walls, put 1-3 shooters at "s", pick and put features/loot at "a", "b", and/or "c"). But it might make sense to add the function to set those parameters straight from the blueprint editor. It would have to be able to write blueprints as well as regular kits, which are the data syntax I use to store almost everything in the game. A few releases down the road, the actual game might even ship with a full fledged content editor that can be used to add/mod places, critters, props, bounties, skills, etc. :)

I hope to use these tools to do a rather extensive overhaul of the world building routines, that I've been dreading on the horizon for quite a while. The thing is that the current Python class used to build places is very all over the place. So I want to go through it and remove crud, as well as adding some tweaks and variables that I'm going to need to implement the next big thing in LoSt, namely bounties (random quest lines). Let's hope I manage to be clever about it, not leaving too many traps for myself later on. There are details I would like to get right sooner rather than later. For instance, I've been feeling that the game world is a bit too constrained. To amend this, I must above all make some inspired changes to the combat system, but I want to try to tailor them to fit a world with more space. Ideally, a house should have room for a table with some chairs that several people can comfortably walk around. For this alone, I only need some minor tweaks to the code, but when the time comes to remake all the old blueprints, I'm pretty hopeful that my little editor will be a nice tool to have. I've been digging up some maps of Western towns, thinking it should be possible to generate something similar, using map chunks. Typing out big map segments in a text editor was a great hassle, though, and is going to be much easier now.

A sleepy settlement

Nail Soup

I mentioned that bounties are the next major feature to show up. They introduce a whole new feature to design, and it's a feature that touches on practically every other part of the game. From the world map, to dialogue, to props, to combat, to the skill system, everything seems to come together around bounties. It's also a point where the setting is bound to become much more defined, which is a Good Thing™. Although I've always liked that early stage of creative development where everything is still lying quite open, I'm also looking forward to getting some meat on the bones with a starting settlement to provide the player with plot hooks, a place to rest, important NPCs, etc. 

Long term readers will note that I've already touted the coming of bounties as a feature for quite a while already. But it feels now as if I have to deliver at least a rudimentary fun game within the next few releases, or I might as well abandon the whole thing. Not said in a pessimistic note, rather hopeful that I might manage to reach the next stage of development in not too long a time.

Bounties will provide some sense of purpose and direction to the game, by stating explicit goals and pacing healing and advancement of skills/reputation between missions. But as I mentioned earlier, I also have to fix the combat system somehow, to make melee a more interesting option. As is, fighting happens too fast and is too deadly. There is usually no time to do any fancy footwork before you're dead, even if the game points in that direction with "fancy footwork" skills like Tumble and Feint. I may test "slowing down" combat a bit, giving everyone (at least the player) a tick more health, and making most weapons deal a bit less damage. Maybe even natural regeneration of bruises should be slowed, as long as the system stays transparent. The player should be able to take a hit or two as he spends a turn repositioning, switching weapons or using a skill. If I start with gentle tweaks of what I have, it's hard to say in advance if I will stumble upon something that works, or get some completely other idea for how to do it.

And really, it's not just a question of rebalancing the actual combat system. Other planned features will have an effect. For instance, there will be more ways to gather posses to aid you in battle (currently doable with the Populist shtick), and I am planning AI templates that will allow non-lethal battle, in particular surrendering (by dropping your weapon) and capturing (using rope or chain). And so maybe it will be okay for the combat system to be on the lethal side, if the player can (un)reliably hope to solicit the aid of NPCs or let himself be captured by the bad kids rather than outright killed (leading to possible interesting escape scenarios).

It feels a bit like I would want to do all the changes at once, just to be able to see how they interact. But I guess it's more like cooking. You start by frying the garlic and then the onions before getting on to the saucy parts. And a good saucier can predict how a sauce will turn out in advance, when it still only tastes like flour and salt. Me, not so much. I have this floury soupy slop, for sure, but no inkling of how it's going to turn out in the end.

As always,

PS. The current working title of LoSt is "Nail Soup", which is obviously an allusion to Dungeon Crawl: Stone Soup, although the allusion itself may be less obvious: "Stone Soup" is (so I've heard) a Portuguese fairytale about a vagrant who fools some villagers into believing that he can teach them how to make soup out of nothing but stones and water. They gather round, and the vagrant starts cooking, after a while remarking how the soup would be even better if they added a few carrots, perhaps. One of villagers happens be in possession of that precise vegetable, and so they add a few. After a while, the vagrant says this is gonna be good, but it would be even better if they added some chopped potatoes, and so it goes. In the end, the soup turns out pretty awesome of course, since everyone chipped in, which is the morale of the story. "Nail Soup", on the other hand, is the Norwegian variety of that same fairytale. Here, the protagonist vagrant meets with a single old crone in a house, asking to spend the night if he promises to teach her how to make soup just from nails. The story proceeds more or less as its Continental cousin, except here the hero is just ripping off a single person, so that the productive/social morale of the story is flipped. When a Norwegian speaker talks about making nail soup, that means rather to make something with no or meager resources.
And there was much rejoicing