Exult Ultima 7 Turn-Based Combat: More Progress
Slashing Dragon has been hard at work trying to figure out how to implement turn-based combat — or a reasonable simulacrum of same — in Ultima 7. To that end, he has set up a git repo (which you can find here) to host and track his work on the Exult codebase.
And he has also made some progress on actually coding the new combat system:
As expected, detecting the event when the avatar is walking proved to be a bit complex to find. In the ended I managed to intercept most of the code I think I’ll need for an initial approach.
Next up was the creation of the Turn Based Combat module. So I created a .h and a .cc files based on other files, included the header file in gamewin.cc and prayed for success. After some small tweaks (and learning quite a bit of C++) it worked 😛
So it’s now calling the functions on the new module. I started adding some of the real effects (like pausing the game) and found out there will be an issue since the pausing function doesn’t let the player move, so I must look for another way of pausing the game (or somehow overriding the way the time queue works for the Avatar to break the boundaries of time)
More recently, Slash has been focusing on getting the flow of combat right:
Been working on the actual Turn Based Combat flow, I’m now using some of the “time_stop” support for the actual battle turns (That is, the way the engine handles the “Stop Time” spell).
The game now stops when in combat mode and I’m also counting the player steps and ending his turn when it hits a limit. Also, using a timer I’m reenabling the player after 2 seconds.
It would appear that the biggest issue Slash has to deal with right now is that the Avatar’s combat AI doesn’t properly disengage. So that will, presumably, be the main focus of Slash’s efforts for the next little while.