It's been a few years since the last major update to Tower Defense Starter Kit. I've been busy with freelance projects for quite some time, but lately I've been carving out time for personal projects as well, including the upcoming v3.0 update for the toolkit. This is the first in a series of posts covering the major changes in this update.
One of the bigger structural changes in v3.0 is how stats are handled across the entire toolkit. The previous approach used hard-coded variables on blueprints. It worked at a small scale, but it didn't hold up in terms of flexibility and ease of use across different systems. A support tower needs completely different stats from an offensive tower, and even within offensive towers there's enough variation that a unified approach wasn't possible with that solution. Every new mechanic meant new variables in new places with no consistent way to read or modify them across the board.
The new unified stats system replaces all of that with a gameplay tags driven workflow. Stats are now defined as gameplay tags and stored in a stats data table, as shown in the screenshot below.
The tags are structured hierarchically in a manner that allows them to be used across multiple systems without needing separate implementations for each. Damage is Stat.Damage.Base regardless of whether it's a tower, a battle unit, or an ability that requires it. Similarly, cooldown is Stat.Cooldown and AoE radius is Stat.AoE.Radius. Any system that needs to read or modify a stat just references the tag.
While the gameplay tags define how the stats are organized across systems, the StatContainer component is what handles them at runtime. Every component that owns or processes stats derives from it, spanning both towers and battle units, from attack modules and hitpoints to XP progression and more. It all works the same way across the board.
And finally, the new stats system has been integrated directly into the existing data tables for towers, battle units, and global abilities. Each has its own data table, and the stats are configured as part of the row alongside the rest of its setup, keeping everything in one place to configure and balance.
Together with the tag system and the StatContainer component, that's a high level look at how stats flow through the entire toolkit in the v3.0 edition of Tower Defense Starter Kit.
The next post in this series will cover the tower core architecture and how the different tower types are organized across the system.



Comments
Post a Comment