Thursday, July 4, 2024

Money Continued and Party Organisation

So, the first part of the update is fantastic - I've gotten money working. I've fixed all the bugs that I know of with inventory, vendors and loot user-interfaces not being quite right. That means when you buy something, it appears properly. When you sell something it goes away correctly. When you combined items (like multiple stacks of the same potions) it does all that correctly. If you're trading with a vendor, it now updates your party funds correctly. I've also finally added coins to possible loot - which was a very amusing head-scratcher for a while, as I'd completely set up the code to only handle items - and it really, really wasn't set up for anything else. Currently, it will simple automatically pick up any coins and simply increment your tally without interaction when you click on a loot drop. I might change that in some way later, but for now, it works. I might even keep it that way.

I also spent a bit of coin the other day on fiverr and got some icons made up for inventory interactions, and then tidied up the code so that only the right interaction buttons show up when you try to do something with them. They're just above the Trade & More buttons in this screen and from left to right will "Split an Item Stack", "Combine items of this type on the character", "Combine items of this type in the party", "Use the Item", "Drop/Destroy the Item" and a "Cancel" button. So, as the first interaction I've had on fiverr, it was a mixed bag. On one hand, the art is much better than I could have done - and it was pretty cheap. On the other hand, I didn't really get what I wanted from the chap, and I think he didn't speak much english as he completely missed/ignored quite a few things I'd asked for in the work. Anyhow, it's in the "good enough" section for now. Certainly better than I could have "artisted" up.

The next part of the update is great too, and it was super super quick to implement. Currently my basic menu has a button to organize the party in it, as I didn't know where the heck to put it. It's a dumb spot, but it worked for me while testing. The plan was always to set up some NPCs through the world that let you modify your party - perhaps in an inn or guild hall. So, I added an interactivity type into the world that has the purpose of opening up that feature in the app. As I already had the code there to (ahem... poorly) handle the moving of characters about in the party, it ended up being under an hour of code all up, from tweaking my editor in a few places, to tweaking a few bits of SQL that loads the world into the app or editor proper, and finally an extra case in a few switch statements and bingo-bango-bongo it's suddenly working. That'll let me tweak up the front menu nicely so that it guides you through setting up the party at the start and then to get going.


No comments:

Post a Comment

Sometimes you do the same thing really well. Twice.

And each time, you do it for the first time. So, lets start with some back story here. While I was doing all the recent changes to the code ...