Tower Defense Starter Kit

Hi [USER=“145111”]One Mode Only[/USER] , thanks a lot for all your feedback and suggestions. I took some time to think about them and here are the current plans regarding each of the suggestions:

  • Muzzle Flash Emitters can definitely be added. From a blueprint implementation standpoint, it’s quite easy. However, creating emitters might take more time. In any case, I’ll try to include it in the v4.24 lifecycle, but since the plans for next couple of updates are already mapped out, it would be available only after them.
    As you’ve already done, adding the logic in parent class would be a good way to handle it, since the Boost Tower is the only default tower that wouldn’t use it.
    As an alternative, a component driven approach can also be used to specifically handle weapon FX like muzzle flashes, bullet trails, fire sounds, etc.
  • Damage/Armor types, I imagine would require the most work among all of the suggested features. And it would actually be an awesome feature to have, but I will have to do more research on different types of implementations before I can confirm when it can be made available.
  • So something that fires a volley of rockets one after the other & then waits for a duration before firing the next volley?
  • Turret thumbnails are already on the way. If all goes as planned, it will be focus of the the first update after the upcoming 4.24 compatibility update.
    And it will, of course be customizable through the Tower Data table. There won’t be any need to make changes to the HUD elements.
  • I like the spawn point randomization idea. It will also be added alongside the Turret thumbnails.

The first 4.24 update has already been submitted. It’s more of a compatibility update. The only major change is the removal of Projectile Spawn Controller which had a role earlier during the toolkit life cycle, but has since been an unnecessary complexity. The more interesting updates will be on the way soon after that. :slight_smile:

Hi @Stormrage256, thanks for the well thought responses.

I agree, I think damage and armor types would be the bulk of the work. I can send over what I come up with if it’s of any use. I’m sure I’d do things a little differently than you, but my current goal is to create two components. One for armor, one for damage. Then in the damage calculation, drop in one more function that just checks the table for a multiplier right at the end of the calculation (after crit).

As for the volley of rockets, that’s exactly the idea. That’d unlock a vast array of possibilities, for example a turret that was fairly overpowered stat-wise (extremely rapid fire rate, high damage) but was limited by n (ammo pool for rocket turret, overheating for a machine gun, recharge for a laser, etc). That said, multiple variations would be super cool too. The rocket turret might always fire 8 and then require a reload period. However, maybe the machine gun would overheat if it fired for 2.5 seconds consistently. In all cases, the end of the round would reset these counters. Food for thought, I know this is added complexity which may not have huge gains.

As for the muzzle flashes, I just changed the way I was doing it. I’ve got a looping muzzle flash particle on the tower BP which is hidden by default. It’s shown when we’re told to fire, and hidden when the target is lost. Seems to work perfectly. I overcomplicated it at first, but this seems to do exactly what I’m looking for. The only exception is that my higher tier MG towers add barrels. MGI has one barrel, MGII has two, and MGIII has three. The fire rate stays the same, and the additional barrels fire (rechargeTime * 0.25) seconds later in the sequence. So, a looping muzzle flash does not do me a tremendous amount of good in this niche scenario. I’ll likely keep it how it is, and just set a timer to hide the muzzle flash in these cases. It’s already fairly custom, since the projectiles fire from each barrel and that required changing the spawning of the projectile a bit so it aimed on the target properly.

Anyway, I’m really looking forward to the coming updates. This project is very well done, and I appreciate all the hard work you’ve put into it.

Happy holidays, hope all is well!

Hey, I’ve been mostly away from work during the holidays. So didn’t get a chance to go through the solution in detail. Anyways, back to work now & I’ve submitted a new update to the Marketplace & it will add support for Spawn Point Randomization. I went ahead with your idea of assigning an “index of -1” as the cue for randomizing spawn points for an AI batch. So now you can have a mix of both fixed & randomized spawn point systems across different batches of AI units. You can find more info about it in the change log which will be posted once the update goes live.

The next update will focus on the Turret Thumbnails, and the rocket volley after that. As for the damage/armor types, I’ll have to first figure out how to go about with the implementation. I’ll hit you up before starting work on it.

The v2.12 update has gone live on the Marketplace.

New Features:

  • Added support for Spawn Point Randomization in Batched Wave Spawn System. Previously the feature was available only when using the Weighted Wave Spawn System, but can now also be used in the former scenario by setting the Spawn Point Index of an AI Batch to ‘-1’.

By setting the index to -1 (as opposed to the index of a particular spawn point), individual units within the specified AI Batch will be spawned at random spawn points.

Other Changes:

  • Optimizations to the AI Visual Perception logic through the use of Math Expressions for linear/angular range checks.

Additional Notes:

  • Search for Version2_12 in the blueprint editor to identify all the major changes in this update.

I’ve uploaded an updated tutorial for adding new Enemy Types in Tower Defense Starter Kit. It’s based on the 2.12 version of the toolkit but will work fine on newer versions as well.

The final step of the tutorial involves defining stats for the new Enemy Type in the DT_EnemyAIStats data table. I believe most of the stats provided are self-explanatory except the last one: “PlayerScoreModifier”. This stat basically enables you to specify how much the player score must be reduced if the enemy unit manages to reach the Exit Point (like in Kingdom Rush, but with the ability to set higher score decrements for tougher enemies).

The v2.13 update has gone live on the Marketplace.

New Features:

  • Added a new Data Table driven workflow for setting Tower UI Thumbnails. Compared to the previous setup which involved using text abbreviations for representing Towers in the HUD, you can now directly specify what image to display for each type of Tower through the UIImage parameter in DT_TowerData.

No additional HUD/Widget logic required, just set your custom image and you're good to go. Here is an example of the Loadout menu using the new Tower images from the data table.

And the following screenshot shows the Tower Constructor UI reflecting the image data specified in the data table:

Free sample images have been provided for each Tower as well as their upgraded versions:

Additional Notes:

  • Search for Version2_13 in the blueprint editor to identify all the major changes in this update.

Also for those of you who were planning to purchase the Tower Defense Starter Kit, I’d suggest waiting till Monday so that you can avail a 30% discount on the toolkit as part of an independent sale starting on the 30th of March. But then again, if you’re feeling particularly generous and want to support my work during these trying times, feel free to purchase it at full price during this weekend. :slight_smile:

The v2.14 update has gone live on the Marketplace.

New Features:

  • Added a new Data Table driven workflow for setting Tower Functions UI Thumbnails. Compared to the previous setup which involved using text abbreviations for representing Tower Functions in the HUD, you can now directly specify what image to display for each type of Tower Function through the UIImage parameter in DT_TowerFunctions. For a video tutorial, check out:]

No additional HUD/Widget logic required, just set your custom image and you're good to go. Here is an example of the Tower Constructor UI using the new images from the data table.

The same applies to the small Active Ability icons for Towers as shown below:

Additional Notes:

  • Search for Version2_14 in the blueprint editor to identify all the major changes in this update.

The v2.15 update has been submitted to the Marketplace.

Change Log:

  • Modified the workflow for accessing Tower Data by creating a local copy of the information specified in the data table DT_TowerData. The new TowerData map in BP_TowerManager will enable you to make changes to your Tower stats, which was not possible before due to all data being retrieved directly from the data table. This can be useful if you’re using a Global Skill Tree (similar to Kingdom Rush) and want Towers stats to be modified based on new upgrades acquired by the player.
  • Enabled activation of Global Abilities on a level-by-level basis. The Global Abilities Manager now has an exposed **AvailableGlobalAbilities **variabe that will allow more control over player progression by specifying which abilities are available to the player in each level. So essentially you can slowly introduce new Global Abilities to the players as they learn how to play the game, instead of providing access to all abilities from get-go.

  • Added Unreal Engine 4.25 compatibility.

Additional Notes:

  • Search for Version2_15 in the blueprint editor to identify all the major changes in this update.

The v2.16 update has gone live on the Marketplace.

Change Log:

  • Added new Game Mode & HUD classes to handle the Main Menu & Tower Defense Gameplay sections separately. The HUD transition logic now allows you to add unique customizations for each game state apart from just replacing the HUD widgets. [Note: New changes can be identified by searching for “Version2_16” keyword]
  • Moved the Damage Calculation logic from dedicated component to a blueprint function library. Instead of spawning an additional component for entities (all Towers & AI units) that can take damage, you can now just call the new Calculate Damage function from any blueprint.

Additional Notes:

The v2.17 update has been submitted to the Marketplace.

New Features:

  • Added Boss wave support to Weighted Wave Spawn Controller. The Weighted Wave Spawn Controller now allows bosses to be spawned every set number of waves. You can also specify the list of Bosses that can appear for each level and a Boss will be selected at random and spawned at the end of the Boss wave. I believe this should add more variation to the difficulty spikes when using the Endless mode with the Weighted Spawning Model.

Additional Notes:

  • Search for Version2_17 in the blueprint editor to identify all the major changes in this update.

The turret lock on system uses the rate of fire (or recharge time) to delay the lock on to their target… I found that this can cause issues such as the turret never once attacking during the entire wave since the AI would run out of the turret range and it would reset the turret lock on delay for the next target.

I was trying to find a way to make the turret lock on instantly but for the delay to happen after a shot is fired (So a fire rate instead of a lock on timer), but I can’t seem to be able to implement it without breaking stuff!
Any tips on how to solve this?

Hi @steebx , I believe the default behavior of lock on timer was used to ensure that turrets aim at an enemy for a specified period of time before it fires the first shot. But yea that can have the aforementioned issue where slow firing towers like Snipers can end up getting not enough time to lock on to fast moving enemies if they’re all near the outer range of the tower.

I tried out a different implementation that can override this behavior. With this implementation, the towers should fire at a new enemy based on the time since last shot instead of waiting for the lock on time. It seems functional at the moment, but I have to run more tests to confirm it. Meanwhile if you want, you can try it out in your project using these modifications:

If all goes well, I’m thinking of pushing these changes into the official build. So you might get the updated version during the coming week.

Edit: After doing further tests, I’ve found that there is one more change needed.

This will ensure that if the Tower gets disabled at runtime by an enemy Tower Disabler, the Lock On system gets completely deactivated as per the new logic.

Apart from that, everything looks fine. The update has been submitted to the Marketplace team and should be available from the launcher in the coming days.

The v2.17.1 update has gone live on the Marketplace.

Change Log:

  • Removed the lock-on time delay for towers when acquiring new targets. The delay sometimes led to scenarios where slow firing towers like the Sniper ended up not getting enough time to lock on to fast moving enemies if they’re all near the outer range of the tower. With it gone, the towers now attack enemies at regular intervals strictly based on their rate of fire.
  • Removed the need to recompile the Tower Manager after updating the DT_TowerData data table. You can now make changes to data table and directly see the results of said changes during gameplay without the need for any unnecessary additional steps.

Additional Notes:

I am currently trying to add some new Tower Functions (additional functions to the repair and overdrive). I have the button showing up, with the image etc. and everything is as expected. However I am having an issue where when the button is clicked, it wont execute anything. After much troubleshooting I am still scratching my head. The button is registering clicks but is not executing the “BPC_X” component. I also tried substituting in the repair BPC however that one isn’t being executed either. So it appears to be a breakdown between the button being clicked, and executing the BPC. Any ideas?

I have scoured the thread but didn’t see anything on the subject. Also the video of setting up new Tower Functions is technically just a video of changing an existing tower functions button image and icon. So essentially a video of adding a new Tower Function from scratch for additional functionality beyond the existing repair and overdrive would be AWESOME and provide entirely all the info I am in need of.

**Edit: **After one more idea I had to troubleshoot further I now realize the “DT_TowerFunctions” > “Function Component Class” is not telling the button what component to execute, or if it is it is malfunctioning on mine currently. I checked this by replacing the Function Component Class of my current repair button with anoth “BPC_X” and it is still just performing the repair.

**Solution: **Okay figured it out kinda simple really, needed to call the events on the “BP_Tower_Parent” I will leave this here for others, also I think a video of adding an entirely new Tower Function as I stated before is still pretty valid.

Hi there, glad to hear that you got it working. I had accidentally typed the wrong tutorial name here (which has been corrected now) instead of the one on Youtube which was specifically about changing the UI thumbnails. So thanks for providing your feedback on the matter. I’ll be posting a new tutorial on Tower Functions later this week.

I am using version 4.24, adding custom levels as you said has no effect Ask for help!!!

Hi, I’m guessing you were following this tutorial for creating custom levels: https://unrealpossibilities.blogspot…orial-how.html

Parts of Step 9 listed there were based on an older version and have now been updated. But otherwise all of the remaining steps should work fine in 4.24. So I’d suggest going through the new Step 9.

If the issue still persists after that, could you share more info on the same? For example, are the enemies not spawning, or is the player interaction with the grid/towers not working, etc. That should help us figure out what’s causing the problem

A new level was added according to the tutorial, but it didn’t work

A new level is added to the main menu, but it is not displayed

Oh alright, I misinterpreted your earlier post as the gameplay not working in a new level.

Ok so if the level is not displaying in the level selection menu, just make sure to first close the project, delete the Saved folder and restart it. This will ensure that any previously saved level data will not override the new information that you added. Usually this turns out to be the problem, but if not could you share a screenshot of the new element that you added in the Level Data Array?