Dev Journal: Skills? Buffs? States? Statuses?
Added 2024-07-09 02:00:03 +0000 UTCSomething I'm trying to nail down this update is how exactly I want my buff/debuff/status effect system to work. It's a part of the game that seemed like it would be very simple early on, but which has proven to be deceptively complex. To explain why, though, let me first dive into a bit of how VT works behind the scenes.
Before I started this project, the vast majority of my game dev experience was from working in RPG Maker. When it came to making a full-sized project in Unity, I had no idea where to even begin, so I just went with what I knew and began recreating the work environment I was used to. Skills, in particular, are actually theoretically very similarly to Common Events from a development standpoint and are responsible for far more than what you see on the surface, handling most of the different background processes in battle such as hunger or units being KO'd at 0 HP. Each Skill has its own Flags that determine when it is run and can be assigned to any number of units, making it very simple add in unique events for each character.
So, easy enough, right? In addition to each unit's stat values, I keep track of a separate set of "buff" values that are called together with their counterparts. Then, I can add Skills with a special Buff flag that modify these buff values which run each time a unit's stats are calculated in order to give me an accurate value. For other things like damage over time, I can add Skills that run at the start of each turn and decrease the corresponding unit's HP. Weaknesses, immunities, etc. can just be handled by Flags. Problem solved!
Except it wasn't, at all. Skills have a single, massive flaw, and that is that they all exist out in the ether, untouchable by anything else in the game. They can take information in and pass information out, but because they must exist unchangeably for each unit to use they cannot store any information themselves.
Why is this a problem? Well, basically every single status effect needs to have a removal criteria. A set number of turns passing, a certain amount of damage being taken, etc. Skills have no way of retaining this information, so therefore no way of being removed when needed.
To fix that, I made a new system almost identical to its predecessor, the Status system. The key difference was that, while Skills are stored on each unit as an ID reference to some ethereal plane of existence, Statuses are newly created each time they are added and stored directly within the unit's code, solving my previous issues by allowing me to store the number of turns passed, damage taken, etc. within the Status itself. So hey, that was simple enough, problem solved for real now, right?
Nope, of course not. What about unique buffs? Stackable buffs? Additive buffs versus multiplicative buffs? What about buff priority? Buffs that change in value each turn? In the current build, every single buff and debuff is being funneled down and stored within the unit as a single integer value per stat. A clunky, clumsy, error-prone system.
To get around that I'm... creating a new Buff system, on top of my existing Skill and Status systems? Or maybe I'm modifying my Status system to integrate better buff tracking? Perhaps something else entirely? Only time will tell as I keep exploring the different options.
All that said, I'm sure I'll have it solved soon and development as a whole is going well! I will admit that it did take a brief hiatus last week as I performed some important market research, but the good news is VT's odds of getting a shark girl at some point in the future have shot up considerably due to my findings. As always, thank you for your support and taking the time to read this week's update!
Comments
I think a limited use skill would be interesting to encourage more tactical thinking
Geanderson silva
2024-07-14 00:41:09 +0000 UTCYo gettin to hear about to developmental journey is alot of fun always lookin forward to em!
Hunner
2024-07-12 04:08:27 +0000 UTCShark girl!! I will quietly await her arrival.
Arka
2024-07-09 12:37:03 +0000 UTCNo worries, thanks for the suggestion! Yep, that is partially how I handled certain things like whether or not the Skill would be visible in the menu before I added in the Flag system, though that information was stored within the Skill itself. That 0/1 switch is actually something used a lot in coding called a boolean value.
Cyrk Petrovich
2024-07-09 06:11:12 +0000 UTCshark girls are legit my fav preds
Squish
2024-07-09 06:07:01 +0000 UTCLooking forward to seeing the strategy come together even more. Getting closer to a proper gatcha game.
no2ironman1100
2024-07-09 04:21:14 +0000 UTCMan sounds like something you’d have to look over for multiple weeks. Good hunting on how to find how to get the buffs to work properly
AguynamedLowgarr
2024-07-09 04:04:15 +0000 UTCshark girl? heck yeah!
BridgeCross
2024-07-09 03:15:53 +0000 UTCI'm currious and I prefer being honest I never code beside some simple calculation on my calculator. I still have an idea. What if you make every effect that you want on all character withe the rule that you choose and making them by default incative with 0 and making them active with 1 by a skill using enabeling the status that you whant and making debuff byu passing them angain to 0 with a list of buff/defuff link to the skill to change them. And to avoid having to much info on screen don't show the status that have a 0 as activities. I think you already tryed somthing that basic but you never know XD.
Virgile Lefranc
2024-07-09 02:40:12 +0000 UTCIt sounds complicated but this is what I expected, the issue of advantages/disadvantages, with that you could regulate the units that are already broken in power, a shark girl... sounds pretty good n.n
anon1411
2024-07-09 02:38:48 +0000 UTC