NPC Battles and Message Window
I spent quite a lot of time today working on NPC battles and combat balancing. But first, a peek at a new UI feature I added to help with larger battles.
Expandable Message Window
Since combat with multiple opponents was starting to produce a large number of messages each turn, I decided the current 5-line message window wouldn't cut it any longer. So I set about making it possible to see further into the message history without disrupting the UI too much.
What I came up with was an expandable message area, that grows to 22 lines when the mouse is over it, and retracts again when the mouse leaves the area. This way, a quick flick of the mouse to the bottom center of the screen expands the message history.
You'll probably also notice the occasional "** End Turn **" message. I added that to help differentiate one turn from the next, as they tend to blend together in the log.
NPC Battles and Combat Balancing
The rest of the day was spent getting creatures to fight nicely and combat to be more balanced.
I managed to catch a few creature fights during testing today, though it needs more testing to be sure it's working. When they do fight, it seems pretty realistic. But sometimes only one of the creatures acts, or they do illogical things (like desperately retreating from allies), so I need to figure out what's causing that.
I also made quite a few tweaks to retreating today, after failing when trying to use it a number of times against multiple opponents. Retreating is fairly straightforward against one, but against multiple opponents, I want it to vary depending on the opposition.
I want escape to be affected by the number of opponents actually engaging the escapee, not just total opponents. So if everybody is trying to escape, they should all succeed. But if one is escaping and everyone is pursuing him, it should be almost impossible.
One time today, I actually had a devilish grin on my face as I futilely tried to escape a gang of bandits. I would barely back off from one when the other caught up to me. And at times, I'd be ready to run for it and one would tackle me. It was a bit frustrating, but that may not be a bad thing, since one's chances of escaping a nearby gang should be hard. The rule of the wasteland is avoid combat, especially when outnumbered, and this illustrated that nicely. Still, it exposed a few situations where escaping seems like it should work and didn't.
It's getting better, but still needs work. More tweaking and bug-fixing tomorrow!