Everything posted by Realitymonster
So I was just in a big quest fight. I had Grieving Mother try to cast an AoE spell on one of my party members. While she was en route, she stopped to take a swing at a pack of enemies that didn't even engage her. Why? Why would she do that? I see that happen all the time. I thought it might have to do with autoattack, but I have autoattack disabled. (This was evidenced by two of my melee characters standing around not attacking two enemies nearby that had briefly been dominated but had recovered.) I don't mind micro-management, but I can't rely on commands I issue to be completed even though there's nothing actually stopping them. In-combat pathfinding is mysteriously worse, too. Characters will walk into the backs of friendly units rather than take a longer, available path around. This isn't isolated to specific maps; I don't think there's a problem with marking the walkable mesh or something. (It literally looks like the A* pathfinding has too limited a reach and it terminates before finding a valid path; is it a tactic to save CPU cycles when the AI is running? Or is it just a mistake? Or is it something else entirely? This is just my experience of what pathfinding algorithms look like when they fail.) I really love the game, but bugs like this make me want to throw my mouse.
Baldur's Gate scripting is a well trod subject; if you search for scripting references there are plenty around. AI is non-trivial in that it relies heavily on support systems. It assumes that there's a pathfinding system so you can find your way to your target. For that matter, it assumes you have a targeting system. But if you've got a way to target other guys, get to them and perform actions on them, you've got a good base. The algorithm you've outlined is simple, and it'll work, but it assumes that you don't need to change your mind in the middle of an action, etc. I suspect as you go you'll find all the pitfalls and edgecases that are annoying. But throwing yourself into it is a good way to go--good luck!
I just got the spell today, and I've used it a couple times to good effect. However, it DEFINITELY hits allies. I've knocked a few of my own party out with it. But from the spell text: The target is hit with a Stuck affliction and becomes an anchor for a frigid ray of energy from the wizard that does Freeze damage to enemies in its path. Is this actually how it's supposed to work? I'm going to remove it from my memorized spells for now--there's no way in the world to avoid hitting your own party with it without leaving the wizard out to hang.