AI Fixes, Battle Issues

Players are continuing to discover bugs in 0.983, so it looks like it had more problems than initially thought. Fortunately, there are some good repro steps and save games for me to work with!

One of the first issues fixed today was a crash bug when the player escaped a battle with 2 or more NPCs. The leftover NPCs were still targeting the player, causing a null pointer when doing visibility calculations. Similarly, the escaping player would screw up AI in the leftover battle, causing the AI to turn on its allies. These should be fixed in the next build.

There was also a bug where AI would attack targets that it wanted to be passive towards because the target wasn't conscious. Basically, it had no valid passive moves toward unconscious targets. I've set this to fall-back on retreat moves if it happens again.

The "Stranger" moniker was not changing as a result of battle actions, and this was due to a typo on my part. I fixed the typo, and also updated it so that any move which changes faction standings identifies the creature (rather than just attack and talk). It seemed sensible that if the faction standings change, then we know who we're dealing with :)

I adjusted the SBS4/military shotgun artwork to be a bit bigger, so it's in-line with the other guns in the game. It's still shorter than a traditional shotgun, but it should no longer look miniature.

There was a bug in the AI which prevented it from switching to a melee attack mode when at grapple range (range 0). At range 0, ranged attacks are not available due to interference from the target, and AI was still trying to choose it (since it was the most powerful). This resulted in AI randomly choosing moves since no attacks were available. Players who beat on DMC Guards while they offered to talk ran into this issue.

I updated battle to clean up certain moves when done, such as offers to surrender, ceasefire, and talk, so the next battle wouldn't leave those options open during the first turn.

There was a bug in the battle UI that caused creature sprites to get mixed up when one creature left. This might be the cause of the "creatures trade weapons" issue we've been seeing.

Finally, there were two AI bugs that caused it not to consider range when gauging threats, as well as running away from creatures if no faction reputation existed yet. These should also be fixed in the next build.

I got a lot done today, but one of the bigger problems still remains: how to make talking and ceasefire more intuitive. These fixes should make the existing system a bit more intuitive and consistent, but I still need to think about it a bit.

Just so you're aware, I need to run into town tomorrow to return the power supply I didn't need. So I'll be out of the office for a bit. I expect to be back later in the day, though. If I seem quiet tomorrow, that's why!

Have a good night, all!


Malacodor's picture

You could make talking to unconscious targets a valid move and add a chance for waking them up. Or add a wake up move.

Ran around with a clown mask before it was cool

ManJones's picture

What like a slap to the face? Or perhaps to wake up with friendly intent you slap water onto them and for negative intent you kick them in the balls.

Rovlad's picture

"Wake up" as a combat move could work, because it already kinda does. As far as I can tell, "sleeping" AI/PC are just "unconcious / fallen / blind / vulnerable / whatever", with a chance of "waking up" and giving option to stand up and fight with every action their opponents take in the hex (looting) or combat (advancing to your position). I'd imagine DMC guards would wake up the PC and question him, rather than just going on about their business or perforate him with guns (which I know is a bug).

Maybe just trigger a "wake-up-who-the-hell-are-you" dialogue sequence once for DMC guards, and then have them leave you alone (ceasefiring/retreating while you sleep, provided you don't piss them off) for the rest of the game? That would work as a story, make sense and not be a burden of explaining yourself to every DMC cop you meet.

Also, should it be possible to have DMC guards spawn around cryo chamber? Because they totally did in my last game, and they even appeared from the west, not even the direction of "the Glow". Is this working as intended?

Melvarius's picture

Speaking of unconscious targets, does looting someone while he sleeps affect your faction standing?

~The Pirate