Total lines of code: 2845
More polishing for the concept demo release. The end of the year has been busy for me, as I'm sure it has been for everyone else, but work continues to steadily happen. I've spent a lot of time with debugging which has been an eye-opening experience - I'm sure I've mentioned this before elsewhere, but it's incredible to think of how much time and effort can be saved through mindful, effective design; however, being able to design skillfully requires skill in the first place, which is what this endeavor and each one before it is all about. Practice makes perfect and, without further ado, here's a list of changes.
NEW STUFF:
- Cooked up some instructional screenshots in lieu of an actual tutorial.
Feedback improvements: cooked up an insufficient Mana warning icon that is overlayed on player actions which require mana and for which the player may not have enough mana to cast. Since players recover mana through Downstating, and Downstating can happen if clothing is damaged in battle, the player is technically allowed to queue up actions which they may not have enough mana for at the start of the turn. But if they either queue up a Downstate or once they are hit and they go through a Forced Downstate, they will then have enough mana so I want players to have the chance to queue up whatever they want, but to be aware that their attack may not cast. - Feedback: created and added banners to announce when it's the Planning Phase (picking your attacks), once player is Out of Actions (all action circles used) and during Execution Phase (attacks being carried out).
- Feedback: improvements to text feedback during combat to improve clarity regarding who hit who with what and for how much.
- Auto-Resolve Turn When Out of Actions: after many days of bugfixing the combat_processor mana / action_circle deduction logic, I realized I added a check to determine when the player has used up all their available actions. So a light went off in my head: what else can I use that check for? Opening the Options screen now includes a toggle for Auto-Resolving a turn when all actions are used, which can speed up battles for players who don't feel the need to review their actions (and is just a cool feature to add anyway, hadn't even thought of it until I had this new tool in my hand).
MAJOR BUG FIXES:
- Environmental processor: Huge fixes to processing / loading logic, which were previously incorrectly allowing players to skip certain locked locations without having the appropriate world_flag.
- Buff / debuff effects, which are temporary increases to player or enemy stats, were being calculated correctly (after the infinite buff exploit was fixed) but were being reverted within the turn on certain circumstances. Since they are meant to last for a full turn, redesigned their logic so that they correctly store and modify stats as necessary and only release at the end of the turn. Also, fixed them using the incorrect target when calculating stats (oops).
- Save / load data now correctly works on export versions.
- Mana calculation fixes: definitely a design mistake which took its toll on the amount of hours it took to fix. Long story short: by the time I wanted to add the Insufficient Mana warning icon, I realized that mana calculations were being made in up to 4 separate instances: when running an effect, when releasing an effect, and in two separate calculation scripts at the entity level (check_for_bundle_costs and individual_costs). I consolidated all mana reductions within a single function which runs in the combat_processor and eliminated all other instances. Previously, enemy mana was actually being "invisibly" spent during the Planning Phase because that was the system I used for enemies to choose their next action, based on available mana after using the previous attack. Now, calculations are made separate from the spending which is cleaner, clearer and less prone to fuckups (like enemies ending up with -19 mana because of canceling -> requeueing stuff). Enemies and players also now calculate mana using a unified, planned method instead of haphazardly like I was doing before.
- Effect tweaks: revised code including undoing any extension of effects upon effects (ie, Strong Attack no longer extends Normal Attack) so that cost calculations are clear. Effects now load their costs upon creation instead of upon being added to the tree, which squashes a ton of bugs around invalid properties on 'nil' objects. This, in turn, fixed bugs which were happening when using effects with action_circle_cost > 1.
- Lots of fixes to collision_shape sizes and node positions which, although not critical, caused unexpected behavior with the tooltip code. Most importantly, the fixes are made at the script level which mmeans that all future additions in these cases should align correctly instead of requiring individual tweaking.
- Redundant code: removed a shitton of redundant code including aforementioned mana deduction calls.
- Simple but effective changes to turn logic, especially re: stopping players from processing a turn when the turn hasn't fully started yet.
PLANNED ADDITIONS (AFTER RELEASING CONCEPT):
- An actual tutorial. :P
- Character creator: a separate module which can attach to the DungeonCrawl code and exchange information with it. I plan to have a point-based system which will allow players to allocate them to stats, equipment and skills. It's meant to be the demo / initial phase of a larger game system upon which the DungeonCrawl will function.
Here's a fun fact! While going through my notebook to see what I've been working on since the last devblog, I read the following phrase: "I really want to put the demo out there. Maybe it's time to stop pushing it off and just do it. Can keep working on it in the future."
It's still true and it's still pending, but here's hoping for a December release!