Monday, December 25, 2023

Combat Usable Items Fundamentally Done

I updated what felt like a hundred places in the code and finally managed to get combat-usable items to appear in the list when setting a particular Ability Hot Button, and then all the connected code to save them to the server, to connect the image to the item type you'd like to use - and finally to connect the click on the button to actually using the item (and giving the right effect to the player, de-incrementing the item from your inventory and so on).

I've got some holiday time up me sleeve, so hope to get a bunch more stuff coded up over the near future. I think it's going to be finally circling back to abilities, and picking up where I left off a few weeks ago (thinking I would come back in a day or two) and continue that aspect.

Saturday, December 23, 2023

Cooldowns Now Working

I have added in some code that allows cooldowns to nicely function in combat (and technically outside it) that will allow limits to how frequently some actions can be done. I've only connected the cooldowns to abilities currently, though I will connect them through to certain items as well in the future when I write up the code to have items connected to combat actions. 

At some point, I'll need to write up some editor interfaces for these as well, but having the functionality in the app is enough for now. So, with that done, there's some more tinkering to do with abilities, but it's starting to feel like it's the downhill section in terms of functionality getting done for them.

Hopefully with the seasonal holiday time off work it'll make for some nice functional coding time to get a good bit of the remaining things wrapped up.

Tuesday, December 19, 2023

Abilities Transforming Attacks Finally

I finally managed to get the functionality into place to allow an ability to properly transform an attack and then repurpose that outcome! 

I've been at this for hours now, so let me translate into something more human.

You can now use an ability, that will target the enemy's Action or Mana pools rather than just their health, and when you do this, the code actually handles everything properly. If it's an AOE, the modified stats will be applied, and at the end of that, if there's still the original attack to use (that'll depend on the ability you're using) then it gets thrown out to be dealt with as well.

It still feels like I am trudging through basic RPG interactions here, and it really feels like at times, that's taking much longer than it should, but with every bit of functionality done, it's closer and closer.

I'll take that for a win tonight.

Friday, December 15, 2023

Abilites Development Continues

I've been making great progress on getting abilities to work to the level of where I want them to be, and it starting to get nice and close. The main change I've made was a bit of an oversight earlier and a slight change in how I want things to work. I had been thinking that abilities entirely sit on Effects (Damage-Over-Time, or Debuffs) but have sort of changed my thoughts on that. I also want some abilities to be tied to the attack made by the player, so, if a fighter has an ability like "Sweep Attack" which might hit targets to the left and right of their main foe, it would apply a ratio of the attack damage of their weapon instead of a static arbitrary value. Make that attack with a bendy stick, and it's not going to do a lot, but if you make it with a mighty weapon, it's going to do a lot more. And those changes needed some changes in the code to allow those things to happen.

So, the good news is that I've made the main changes and gotten it to the point where it at least sorta-kinda works. There are some bugs that I need to track down, like sometimes the creatures don't collapse, and although they're taken out, they stand in "idle" mode - but nothing too serious. While I'm chasing that down, I'll also finish up the code that will potentially transform the original attack into something else by the ability - so that'll let abilities target action points, or mana - or even more exotic things like interactions with threat for example.

Saturday, December 9, 2023

Usable Items, Abilities and General Bug Fixes

I've been working this week on really trying to round out all the interactions with items in the character's inventories, as well as trying to clean up random bugs that are nearby to those actions - and it's been really successful!

The code now works nicely for items that are used and provide an effect, so healing potions, elixirs and such things, and I was up really early this morning working through the last bits of code I didn't get finished last night on items that teach a character an ability - so basically, spell scrolls. I do need to still insert some checks so that players don't waste scrolls on characters that will never be able to use them, and I've not really thought through what's going to happen around potential skill resets and how that works with learned spells.... but that's another day.

And bugs. Wow. Bugs bugs bugs. I've been generally ignoring bugs that have been show-stoppers in terms of crashing the game, but I've been going through and fixing a whole bunch of bugs while I've been working on this, so a lot of stuff is less broken... no, less dented and beat up. There's still certainly some bugs that I know of and I'll get to fixing them when I think the time is right, but for now, I can continue and develop some more functionality again, which just feels great. 

I should fix up my editor interfaces to really contain all these changes, as I patched at best to get the functionality I needed, but it means that I can't create a new item without manually changing a few things in the database after it's made. It'll work from there, but that might be my task for today.

Saturday, December 2, 2023

Inventory, Loot and User Interface

So, I've been basically doing another side-quest with the code over the past few evenings and Saturday, writing up all the code for the most banal user-interaction that it's boggling how much code went into it - views and stacking items.

As the server needs to be aware, and is the source of truth for all the data in the app, picking up loot (or buying items from a vendor) needs to check if you already have the item, create a new one if you don't, or stack it on top of what you've got if it is stackable. That needs to happen in the app first, then fire off a bit of info to the server, wait till that's processed, get the reply confirmation, then finalize the process in the app with the new ID keys for the items, and the update the views in the app to show what's happened.

While I was doing that, I also wrote up some code and created a user-interface that lets you do stuff with items in your inventory - like combining all items of one type into a single stack, or splitting a stack up into two. Again, such a simple action, but one that requires more server calls, items to be deleted or created with new keys, quantities updated and again, finally all confirmed back in the app and the views updated to show what's happened.

Anyhow, that's all working nicely enough right now, so I guess the next bit to focus on is "using" items such as potions, and the code to support items that have permanent effects (like teaching a spell for example). As I make those amendments to the items tables and editor interfaces, I should also fix up a few gaps that I have to fix on the back-burner for items.

Sometimes it seems never-ending, but with each section, the app starts to feel more and more like a fully fledged game - and that's a pretty stunning feeling.

New Abilities, Ability Functionality and Spells

It's been a few days since I posted, but I have been super busy working on iterative builds here to run through my own testing, and that...