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!