Strangers in the Night

Hey Folks! Hope everyone had a good weekend. It was back to work on NPCs and AI today, trying to get them fitted for non-hostile behaviors.

Last week's work nearly completed ceasefire options, and I spent most of this morning ironing-out some of the wrinkles in that code. There were some issues with creatures consistently following their leader's intentions, as well as some issues showing the creatures correctly in battle (constantly swapping places). I also needed to make sure retreating creatures didn't interrupt ceasefire negotiations, since they don't seem like they should.

Once that was fixed-up, I started looking into ways to obscure the faction names of human NPCs on the map. In order to maximize tension and mystery when encountering another human, it's best if we don't label them "pacifist" or "murderer" or something equally overt.

Instead, humans are now called "stranger" when you first encounter them. Their sprites show what they're really wearing, and with a name like that, you really have no idea what they'll do just by looking at them. It's not until a few turns of watching them that you'll know if they're hostile or not.

This way, when entering battle, players now have to decide if they want to try negotiations or not. Attacking first might ruin your chances of ever reconciling with this bunch. And worse, if they get away and talk to others, your reputation will spread. On the other hand, offering ceasefire wastes a precious turn, especially if you're at melee range or they have ranged weapons.

I'm not sure yet how the name will change from "stranger" to the real name. There are very few situations where I think the player would learn a name, except in conversation. On the other hand, being attacked or ignored by a "stranger" seems like it should warrant some change. This might need to simmer a bit until something obvious comes to mind.

To give the player at least a tiny chance, I've singled out the leader of any group with "leader" in their name. So you'll occasionally see things like "stranger leader" or "dogman leader." Generally, if you're going to try and shift the hostility meter, aim for the leader, as they'll have the most influence on the group. Similarly, the leader sets the tone for where to go on the map, and whether to fight or talk (for creatures who talk).

Speaking of talking, I had a glimmer of hope while working on this alternative to ceasefire. I was able to get a looter to talk (after chasing him around and insisting a few times), and he said "bug off!" Yay! There's still work to do in making this system work, but I was happy to see that battles could end and conversation encounters start seamlessly.

Apart from the above system work, I fixed and added a few other things. Biggest of all, creatures now have population caps. There's a global creature cap in place, which makes sure random spawns don't cause the savegames to get too big to load, and there are local caps.

The local caps check the surrounding hexes when spawning a creature, and if too many creatures of the specified faction exist, it aborts. This should help with situations with large gangs of creatures randomly spawning (e.g. dogmen), and melonheads calling infinite reinforcements.

I also made changes to the campsite items so that clicking them auto-drops them into the right slot, no matter what cursor mode is active. Previously, trying to drag the camp would start working, then fail as soon as the player let go, causing no end of confusion/frustration for new players.

There's a new move in the game for revealing oneself in battle, for cases where the target can't see you and you want to talk to them (otherwise, you'd have to wait for them to search). And finally, I changed the Merga Wraith to be immune to hunger and dehydration (sorry!).

Another day of big changes! I'm looking forward to tomorrow, as the talking with NPCs might be a lot of fun if I can get it to work. It'll be nice to have a new way of delivering setting info and story to players!

Have a good night, all!


Rovlad's picture

Looks like it's coming up nicely. It always felt weird that human beings on the area map only attack or flee on sight, while people in encounters are more than willing to communicate. First time I played, I just supposed everyone turned batshit crazy and was surprised that people actually speak and are organized (outside of "the Glow") when I reached ZZ.

Any chance on giving us an estimated release date on a new build?

Kaaven's picture

Dan, can you change it a little and make it so that Dogmen and other non-intelligent creatures have their "commanders" called Alpha (like Dogman Alpha, Enfield Horror Alpha) instead of a Leader? Word "leader" sounds and hints that the creature is intelligent, I feel. Also, it will simply be silly to meet a Deer Leader :D

EDIT: A custom names for each creature (Stag for Deer, Alpha for Dogmen, Ringleader for Bandit-types, Officer for DMC Guards, etc.) would be even more awesome, but that might be more work than gain... Just an idea though.

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites

dcfedor's picture

@Rovlad, yeah, it'll be nice to have some non-homicidal NPCs here and there!

As for next build estimate, I'm thinking at least a couple weeks. I could probably do one sooner (i.e. just with the NPC updates), but I want to see if I can add an encounter in there. Encounters typically take a week or so to make and then test. There's a slight chance of going with a few smaller encounters instead of the one big one, which might take less time.

I'm waiting to see how tidy these current changes turn out.

@Kaaven, that's an interesting idea. And especially for creatures vs. humans, the custom leader nomenclature makes sense.

Adding custom leader names per-race isn't too hard. Just one more field. The tricky bit, I think, will be dealing with known vs. unknown factions. E.g. If you don't know the approaching NPC's faction, you won't know whether to call it an "officer" or "ringleader."

This is something I'm still thinking about, in fact. If a person is wearing DMC police clothes, should I call them something other than "stranger?" Does equipment determine the label? In real life, we'd give different names as we learn different things about a person.

Worse yet, what if there are more than one identifying mark on a person? Officer clothes and a gang sign? In real life, we'd be smart enough to assume that the guy was not official, since police don't wear gang signs. But the game code wouldn't be that smart without more effort.

Maybe the simplest compromise is to give monsters special nomenclature, and all humans the same nomenclature. Then, certain items can add conditions to creatures that show up in tooltips when "spying" on them. E.g. "Stranger Leader: Bleeding, In severe pain, DMC officer clothes"

And, as mentioned above, I still need to figure out when to stop calling them "stranger" and start calling them something else. And what that something else is :)

Dan Fedor - Founder, Blue Bottle Games

Kaaven's picture

Maybe something like that:

Creatures - no problem here, they are always presented as: Name (optional leader status) - Dogman (alpha), Deer (stag).

People - appear in 3 stages:
1. Unknown - always named Stranger, player does not identify the leader;

2. Known by actions -
- if the initial encounter with the NPC ended peacefully, he renames to Traveller;
- if the NPC starts a fight, he renames to Bandit (alternatively Thug/Robber),

In both cases leader simply named "(leader)". Note that this name can change one way, so Traveller who became aggressive will be later recognized as Bandit. Those recognized as Bandits will stay that way, even if they decide to talk later on - one has only a single chance to make a good impression :D Also, faction-less guys should stay with either of those names.

3. Known by faction - the NPC is recognized by his correct faction name and rank (if applies), for example: Alvin's Butchers Slaver (taskmaster) or SkyCorps Patrol-man (officer).

How the identification from stage 2 to 3 happens? Depends, some identify themselves with their first combat move, unless attacked (guards, enclavers), others are wearing insignia/committing actions that allow them to be identified by Spy move (that is only available if player already heard of that faction in encounter/talk with other NPC; cannibals, cultists, luddites, etc.).

Player walks out of the Cryo Facility and sees a group of two Strangers. They meet and decide to talk gossip and walk away peacefully. Strangers changes into the Traveller and the Traveller (leader).
Player continues to walk and sees another Stranger. Spies on him, but that uncovers nothing. Stranger don't want to talk and attacks. He imminently turns into a Bandit. Player runs.
Player walks on and meats yet another Stranger. That one approaches and starts by "identify yourself" move to become a SkyCorps Patrol-man. Talking ensures. Patrol-man warns the player about Alvin's Butchers then leaves.
Player sees a Bandit (not a Stranger, so he has met this guy before) and Spies on him. Now that he knows about the Butchers he identifies the insignia the Bandit has on him (if he has them) and sees him by his full name, Alvin's Butchers Slaver, from now on.

Does that makes sense?

<--Mighty (mini)Mod of Doom-->
DeviantArt Gallery of MoD Sprites