Wednesday, May 29, 2024

Inventory Screen Updates

 

So today was a rather ordinary day at work. There's some downsizing/right-sizing whatever-you-want-to-call-it going on, and that means some folks have been let go. I have avoided that axe, but it's still folks that I know, and they're going to be struggling for a while, mentally and potentially financially. The good news is that there's really low unemployment here currently, so perhaps they'll be able to walk into nice jobs quickly, but right now that feels a long shot at best.

So, with that at the forefront of my thoughts, I wasn't in a mood to go hammer and tongs at it, so I took it pretty easy in terms of work this evening, did some tweaking of the screens following on from yesterday. The inventory screen now looks much nicer after I got rid of that paperdoll image that I've had for ages and replaced it with the character portrait and so on. I did the same for the trade screen (trading items between characters) so that there's a better connection with who has what. There's a lot of test data visible in the image - various IDs and database records which obviously won't be there in the future, so ignore those, but the rest is starting to look more and more usable. I'm sure there will be plenty more tweaks and flourishes later, but right now, it's starting to look less box-unit-test which is great.

Tuesday, May 28, 2024

Bugfixes and Gaps

So yeah, been a bit of a tough one today. I did get some early wins with a few fixes and layout changes, but the third thing I was getting stuck into is only half fixed at best.

First up, when clicking on a character ability slot, when the view opens showing all their available skills, there's now a "Cancel" button, meaning you can just click it to revert back to the previous view - without setting a new ability. I should also put in a "Clear ability" button there too. Maybe tomorrow. So that's done, working as needed. Chalk up a W.

Next up, I fixed the layout for the Protection Tree to have a viable Portrait and Landscape mode. That basically meant a lot of changes to the XML for the landscape mode. Takes a while, but easy enough. Chalk up another W.

Finally, when testing the new landscape mode, I discovered a bug where changing the orientation led to ummmm.... "dumb stuff(tm)" happening. So that started a decent sized journey to try to resolve that. Normally it's not a issue, but the skill trees are in fragments, and I don't really truly understand what's going on there, or with state changes, so it's been a bit of a muddling journey to try to get it working. I'd like to think I am mainly there, but it's still not quite, quite right. So a job for tomorrow. Put that L on the chalkboard.

Anyhow, progress. And I was always going to have to work through this, so I've got a good few hours done in what was always going to take this long.

Edit: So, as I was having a shower before bed last night, I thought I might have cracked the problem of what was going wrong, and a few minutes of code this morning, did indeed confirm that. Orientation changes are working properly in the Character Skill Tree views, and I learned a bit more about how Android functions in the process. Or better understood what I'd read at some point. Anyhow. Shower Programming Thoughts - great as always.

Friday, May 24, 2024

Teleports & Location-Swaps working

A rather productive Friday evening it has been. I've managed to expand the code that deals with special combat events, and successfully set up the code to handle both abilities that will teleport the user to a specific location, as well as the similar functionality for an intercept/protect ability that will swap two characters in locations.

There was a hiccup as I was testing, and sometimes things were working, and sometimes they weren't - and I could not for the life of me work out why that was the case for a while - until I looked into the database and saw that there was a column there that wasn't part of my editor interface, and I'd manually populated it, and my app code was already using it - a friend-or-foe percentage (which is rather cool really) but for my test ability, I'd already set it to 25%. Meaning that it would only hit an ally 25% of the time... so yeah, explains why it was sometimes working in testing, but mainly not...

Anyways.... the important part is that the RIGHT part of the code is functioning, which is rather cool indeed. Another two special case combat events handled nicely.

No code expectations tomorrow, but over the rest of the weekend, I'd love to tweak a few app layouts. I need a "cancel" button/thing on the menu that pops up to add a new ability to a hotkey, and there's a few similar and annoying things that I've been noticing as I test things that I should fix, and they are pretty discrete from other larger bits of code, so make for good candidates in a busy weekend.

Wednesday, May 22, 2024

Special Effects Work

Over the last two evenings, I've been focussed on getting Special Abilities working. Those are things that happen over and above a normal effect or ability during a combat sequence.

I might start with what's NOT a Special Ability. An ability that does some amount of damage to health, action or mana is not special. An ability that applies a certain effect to a creature or character is not special. What I'm treating as special is all the skill and abilities that will have some sort of outcome that is more interesting than simply a normal action taking place.

I'll talk to the special ability that I was working this evening, though most of my time was spent in getting the fundamentals working, adding more specials will be (hopefully) a bit easier - maybe. Today I was working on the Warcry in the Protection fighter tree. It's a skill that grants an ability to use in combat (also called Warcry) which is there to help manage threat. It's applied with a melee attack. If successful, it adds an additional 100 threat to all enemies in a smallish radius of where it happened. (I'm certainly going to tweak the 100 value in the future, but for now, it works).

So, a character makes an attack, if it hits, it does whatever normal damage is supposed to happen (which generates a bit of threat for that character) but additionally it also does the special part, which is adding the threat outside of a normal damage event. Ergo. Special.

I've found the right place to slot it into the combat turn sequence, it seems to be resolving nicely, and tomorrow I'm going to try to start working on more of these special effects.

What else is going to be considered a Special? Well, there's another Protection Tree skill called Intercept, where I'd like to have the fighter character basically push his way past an ally to put himself into the line of danger in front of another party member. That's again going to need the app to handle some things that are outside the normal scope of a combat turn sequence (ie, moving characters out of order). An ability that teleports the character would probably fall into a similar bucket. Perhaps some sort of Fear effect, though that might be able to be done directly in an effect being applied (I honestly can't recall the code for that at the moment). Summons would be another Special ability certainly - bringing in some completely new thing into the combat. Spell-casting interrupts again, might be able to be handled via the normal code, but might also need a Special to make them work. The sky is the limit and I think it's going to be great getting all these weird things happening.

One more thing that made me laugh this evening. I was testing this code, and got one of my characters to pop some threat out with a Warcry, then basically high-tail it away from all the creatures, to make sure they were all going to then chase him as they should. He did so nicely, and two of the small spiders I was fighting against chased him between my other party members and attacked, exactly as they should do. Then it came time for the large spider to activate, and it was not able to squeeze between the party members due to it's size - so it started a longer walk around some rocky obstacles on the map. It got as far as it had movement to get, then suddenly I saw webs on my fighter... I thought something had gone wrong, quickly checked the ability... and breathed a sigh of relief. It does in fact have a range on it. Spiders have just always used it as part of a melee action. This one moved as close as it's movement would allow it, then threw the debuff at the right threat character - and later in it's next activation, closed the distance and went to town as normal. 

Utterly brilliant to see things starting to just work spot on.

Monday, May 20, 2024

Character Skills and Pre-Requisites

I'm only halfway through the code this evening, with an hour or two left still, but I'm tweaked the character skills code to correctly understand skill pre-requisites, so that the trees work nicely as they should. 

 I have some more work to do in the data itself, as I've only really started creating the skill trees, and I know a lot of the views will change, but this is also a great excuse to show off what the Fighter Protection tree is likely to look like - probably, about, maybe.

Obviously there will be some skills based on threat management for this character, but also a mix of Activated and Passive skills that increase the survivability of this class. I'm yet to code up the functionality, but there's also an intercept skill I'd like to throw in there, letting this character charge-in-front-of and/or yank-out-of-the-way a companion to protect them.

The work I'll be focusing on over the next little bit will be to get the code working for these funky abilities that have some sort of special behaviour, over and above the basic functionality that I have written up already. I'd like to, but probably won't work out how to have the game understand all these at the same time, so that if the player turns a character to be game-controlled it'll do all the right things as needed. Again, love to, probably won't get it done in stride straight off the bat.

More on skill trees, and a deeper look into individual abilities in the future.

Wednesday, May 15, 2024

Character and Item Stats

It feels like I've renamed a thousand thousand properties in classes, updated a myriad of methods across the database, the editor and the app itself today, but although it was hideously mind-numbing, it went by pretty quickly and without too many hassles. A few typos that were quickly resolved proved about the most challenging.

Anyways, enough whining, the awesome news is that character stats finally update nicely, along all the places that they should. I know there's a few more small things to add, but the lions share is there, and working exactly as it should be.

As you can see, the character screen for my intrepid fighter character, Melee and Ranged stats are there, as is his armor, defence and saves - and as I spent this evening adding fields for the affinity schools, there's not really items with those stats in the game yet, so I added the buff to his sword to test that the code functioned. It did.

Huzzah.
 

Tuesday, May 14, 2024

Items, Stats and Buffs

So, yesterday, I was rather sure that I didn't have code to remove effect stats from player characters - turns out I do, it's tucked away neatly into the same function that adds effect stats to them, which is actually a really good place for it to be. Past coder me was smort. I also didn't think I had a bit of code to recalculate stats for effects and auras as items were equipped and un-equipped. That part was true, but I whipped one up today, and it's now being triggered in all the places it should be. It's rather inefficient, recalculating everything anytime a character puts something on or takes it off, but you know, right now, I can deal with that - and it's not noticeable at all, so that's a "make elegant later" problem.

In bugs that I did find this evening, 'cause, of course there are those, items aren't quite right with Armor vs Defence ratings. Like I did say yesterday, originally there was only going to be one stat, and so I think I need to find a few places to add some extra class property modifications to. Other than that, I'm really nicely surprised, but even after a really long and tiring day at work, this is great progress - and again, although there's bugs here and there, things mainly, for the most part, and I don't want to jinx it - are working.

Monday, May 13, 2024

Stats and Buffs

As it seems to be always of late, I thought I would get onto a simple bit of code this evening. Where I'd left off yesterday was that skills that gave abilities with a passive effect (I'm currently playing with a defensive stance as a skill in the Fighter Protection tree) would give a default buff to the defensive value of that character.

So, picking up, I got into working on skills that grant the ability, and that in turn has a passive effect connected to it. There was a bunch of tweaking code and structures to get that quite the way I wanted it and working. Next issue was that waaaaay back when, when I wrote the editor interface code for Effects, I did it for Armor, and called it defence. Since then, the game has evolved - and I need both a defence and an armor stat. So sleeves up, I got stuck into that and eventually changed all the bits of code where they were needed to handle those nicely. Then changes in the app to handle the new data.

Great, so I can finally see one of my test characters with an extra defence stat.... no. More trouble-shooting and testing. Turns out I mucked up some double and integer calculations in what was supposed to be a simple buff calculation. With that fixed, lets check that statline. Nope. More bug fixing. More checks, more troubleshooting a few more times.

The last bug that I've found is a gem. When the characters are loaded from the server, the buffs are applied before all the item are equipped. So, when my character is loaded up, his defence is 30. The buff should grant him an extra 10%. So it's flagged as having a value of 3. But then, after all his items are equipped, his defence is over a 100. That buff needs to change.

That finally brings me about to my bug. I did write code that APPLIES a new effect to a character, but rather amusingly, I've not needed one to REMOVE an effect. All my test buffs and debuffs simply wear off and vanish. They stop ticking health onto the character, or doing some form of damage and that's that. I will need to write code that remove a buff, recalculates it, and pops it back on with new stats. I think that it's something I'll be calling a lot (like after each item equipped/removed, buffs granted and so on) - but that's a project for tomorrow.

Anyhow, feels like an awful lot of things fixed tonight, so that's great.

Sunday, May 12, 2024

Character Skills, Abilities and Passive Effects

I managed to get some nice coding time in this afternoon and evening and the great news is that I did a lot of work around character advancement today. I've got what seems to be a nice algorithm for characters advancing levels with steadily growing XP requirements and such. That seems to work nicely now, and is connected to how many points that character should have available top spend on both stat points as well as skill points. If you've got available points, it will show up in the relevant screens for you to spend. points that are spent increasing stats or buying skills will then be saved to the server nicely and loaded up properly next time you log in.

I spent some time (but didn't crack) passive skills and how I want them to add buffs to the player automatically as they are loaded in from the server. I'm too tired tonight to see if it's not working as things aren't loaded in the app at the time it is expecting them to be, or if there's something else going wrong. My guess is the latter, and I suspect that I'll need to tweak some structure to get it to where it should be. I sort of think it's mostly there, but glitchy.

Anyhow. Great progress again, and it's putting as smile on my dial as I see stuff coming together and starting to click into place more and more.

Monday, May 6, 2024

Character Advancement and Levels Progress

I took a different leaf from the book today and worked on character levels, namely character advancement. I've already got places to hook the code in when XP is granted, so it was simple enough to pop in some code there to check whether they had gained enough XP to tick them over - and if so, to give them more mod points to spend on traits.

The good news is that it worked amazingly well - and there's not really any bad news. There were a few teeny bugs for a moment as I patched into code that I hadn't touched for well over a year and I had to remember what things did, but that was quickly sorted and to my great relief (and ever so slight smug feeling) things "just worked".

I will see if I can update the Character Screen to open up "Add Mod Points" buttons when Mod Points are available - which will also tie off initial character creation, where I have those, but want to change it - the user interface is very clunky there.

Something something Cloud something

The last few days I've been really focused on getting the cloud setup done right. I've half purposefully set myself up on a clock by...