Controlling Player Progression in FPS Tower Defense Toolkit

Hi, it's been quite a while since I've written anything at all about my products on the Unreal Engine Marketplace. Lately, I've been working on a lot of improvements to the older products, starting with the Tower Defense Starter Kit earlier this year and now the FPS Tower Defense Toolkit as well.

Over the years, FPS Tower Defense Toolkit has received several additional features through updates to make sure that it provides maximum value right out of the box. But with the inclusion of all of those new features also came added complexity. And as a result, I've taken the liberty of having most of the recent updates focus on making the toolkit easier to use and customize based on the community feedback received over the years. 

Even with the project being almost fully commented across all blueprints, with a large foundational framework like FPS Tower Defense Toolkit, things can still get quite intimidating for newcomers. And it is my hope that these articles will help in giving a clearer understanding of the core design of the toolkit.

So in this article, we will focus on the process of controlling player progression in your games, specifically from the standpoint of what towers are available to them in each level. You normally wouldn't want to overwhelm the players with every single tower in your game right from the get-go. More often than not, it would be better to slowly introduce new towers as they learn how to play the game. Plus, doing so also has the added benefit of keeping a steady stream of novelty from a gameplay standpoint since the player is being given new toys to play with overtime.

Before delving into the actual workflow (which is just a one-step process), I'll just give you a brief primer on the towers of FPS Tower Defense Toolkit. The toolkit comes equipped with an assortment of towers like Machine Gun Tower, Laser Tower, Sniper Tower, and so on. But in addition to these standard varieties, you also have access to what's called a Tower Base, which serves the dual purpose of both providing a platform on which Towers can be built, as well as the means to block and control enemy paths. Finally, you also have a Trap class, which can be directly placed on the ground (without Tower Bases) causing all enemies walking over it to take damage. Out of all these towers, the Tower Base is the only entity that must be included in the player's arsenal since they facilitate the construction of towers.

With that out of the way, I'm going to show you how to specify which towers are available to the player in each level. For this purpose, we need to have an instance (actor) of BP_TowerManager placed in the level. If you aren't familiar with the Tower Manager, you can check out this post to get a basic understanding of what it represents. Now if we select the Tower Manager from the level editor, we'll be presented with a list of parameters under the Config section in its details panel, but what we're interested in is the BaseTowerModels array.


The BaseTowerModels parameter is an array of type ETowerModels (ETowerModels is an enumeration for keeping a list of all towers in your game) that determines what towers are available to the player in that particular map of your game. By default, you'll see that it contains a Tower Base, all unupgraded Towers models, and a Trap. With the exception of Tower Base which is mandatory (as a Tower construction platform), all other entries can be modified to suit your game's progression. For example, if you want the player to have access to only the Machine Gun Tower and the Laser Tower during the opening levels of your game, then you can do so by editing the array to have entries only corresponding to the Tower Base and the required Tower Models as shown below:


The next time you start that those levels, you'll find the changes reflected in the Loadout Selection menu (if you have it turned on) or the In-Game HUD (if loadout menu is turned off) as can be seen in the following screenshots:




And that's all there is to it. You should now be able to control the Towers available to the player for tackling each mission on an individual basis. I'll be covering more topics like these for my Marketplace products in the coming months. So feel free to reach out to me through the support email if you have any specific requests along that line. Hoping to get the next post up and running soon.

Comments