Debugging the Battle System

Well, as I touched on in my last update, I’m quite nearly finished with my game. I’ve spent about the last week or so (no work until school starts up again, so lots of free time) completely debugging my battle system. I wrote the code for it about 6 months ago and I got it to work on a pretty basic level, but there were a number of flaws that needed to be fixed. I guess I’ll touch on some of the changes I’ve made to the system and the bug fixing I’ve been doing.

First off, I guess I’ll mention the different areas I worked on, in list form:
-Added in reflecting damage abilities like Parry and Mirror
-Fixed the targeting by enemy party members. Numerous iterations, so many things had to be fixed here. deaths, shroud, wrong code for altering who got targeted and whatnot, etc. It was pretty messy.
-Allowed for revival of party members/enemies using the skill Revive and Revive potions
-Added in items (potions) to battle so players could heal/revive while in battle
-Re-worked a lot of code to make it more clear and usable
-Adjusted how dead characters were interpreted by the system (basically can’t make a move and can’t be targeted)
-Fixed the application of multiple statuses. Essentially would add multiple copies of statuses, like ‘Bloat’ or ‘Taunt’ to a character. This was problematic as it would result in receiving the benefit of something multiple times or causing the character to target multiple different people
-Fixed the application of Talent Areas in the system (so Thorman’s Ability Duration skill actually increased the length of time a status would stay on a character, for instance)
-Re-worked the system so attackers missed abilities correctly. For instance, if a targeted skill is dodged it shouldn’t do anything to the ‘defender’, or the attacker were stunned
-Adjusted targeting mid-fight. Essentially, a character shouldn’t attack someone that can’t be targeted (for instance, a dead character)
-Fixed life slash/strike healing more than maximum health to characters
-Fixed turn duration abilities (like Parry, Indestructible, Defend, etc.). Defensive stance actually lasts entire length each round of moves
-Added in a ‘randomness’ factor to speeds and damage dealt. Essentially the game felt overly black and white dealing the exact same damage each turn with a specific ability, or moving in the same slot. To solve this, I applied a small randomness factor that adjusted the value somewhere between 90-110% of the actual value. This allowed certain characters to actually go earlier in the turn order, instead of always being the same (Lela -> Thorman -> Cez -> Toma) could change to (Thorman -> Lela -> Toma -> Cez) or (Lela -> Cez -> Toma -> Thorman), for instance.

Anyway, that probably covers most of the stuff I’ve done. I don’t really remember and I’m thinking to myself I should actually record the changes as I make them, just so I can go back if necessary (although I do extensive testing to make sure when I change something it works how it should, otherwise I just revert back to before I start adjusting it).

As for the future, I think I’m going to spend some more time play testing and putting it together. I still need to look into some issues with Thorman’s targeting system, add in the Regeneration talent to the battle at the end of each round and probably do some more testing on each ability to make sure each ability is functioning correctly. After that, I need to find a way to actually display the various statuses on characters. When Toma uses ‘Shield Bash’ to stun a target, for instance, the player has no clue whether or not the stun has actually gone through. In addition, when that character’s turn rolls around, it doesn’t make any mention of the character missing their turn due to being stunned. Making this significantly more clear is a huge goal for me and something I’m going to have to spend some time thinking about, in order to apply it in such a way that doesn’t overshadow the battle, but gives the player more clarity in the goings on of the battle. Once that’s finished, I wanted to do a little adjustment to the menu inventory page, add in arrows to places that require scrolling beyond the currently visible items, build the boss skill sets (and any requisite abilities they might have) and potentially adjust the frequency of battles (as I talked about in my last update). With all of that, I think the game would be pretty playable. I doubt it will actually be finished because every time I say this is the last set of things I need to do, I always end up adding more things to do. But I’m getting pretty close at this point, and I’m excited to be able to spend my time finding someone to do my graphics/artistic work soon. Should be a blast. Til the next update!