I have not tested it in v4.23 since it’s still in the preview version. But thanks for letting me know beforehand. I’ll see if I can reproduce the issue at my end. Also by cards, could you be more specific which asset you’re referring to?
Hi @polkovnika , I was able to reproduce the issue in v4.23 preview 7. It’s caused by the spline components being set to null for some reason.
I’m not sure if its an engine bug, but what seems to be happening in 4.23 is that every time the spline construction script runs in the editor, it keeps retaining references to the components created in the past as you can see below:
The print strings within the green border are how it’s supposed to be. Three spline components: the middle one created by the user and parallel splines on each side generated automatically through the script. However, in v4.23, you can see ‘TRASH’ references (within the red border) to additional spline components and more keep getting added every time you compile.
You can fix this by adding the following node at the beginning of BP_SpawnPoint_SplinePathing’s construction script:
I believe that should take care of the issue. Let me know if it works out.
The v2.9 update has been submitted to the Marketplace.
New Features:
- Added support for branching tower upgrade paths: Now you can have tower upgrades branch out along specialized paths in just a single step. Simply add new tower models to the UpgradesTo: array for your tower in the DT_TowerData data table and you should be good to go. [Note: Tower Models required to have entries in the data table.]
The Tower Interaction UI systems will automatically calculate positions for upgrade buttons using the data table information. No script changes required for displaying multiple upgrade options.
Other Changes:
- Tower Upgrades now destroy & spawn new towers instead of modifying the attributes of base towers. Tower XP still carries over to the upgraded towers.
- Unique hardcoded UI Stats for Mining Tower removed. All towers now directly use the stats specified in the data table.
- Toolkit updated to Unreal Engine v4.23.
Bug Fixes:
- Fixed ‘TRASH’ reference issue in 4.23 when using BP_SpawnPoint_SplinePathing. [Solution posted here: https://forums.unrealengine.com/unre…04#post1657104]
Additional Notes:
- Search for Version2_9 in the blueprint editor to identify all the major changes in this update.
The v2.10 update has been submitted to the Marketplace.
New Features:
- Added a new Data Table driven workflow for defining waves when using the Batched Wave Spawning System. Compared to the previous struct array setup, data tables offer far greater ease of use when it comes to defining waves, especially when dealing with large hordes comprising multiple clusters of enemies within each wave.
[Note: Tutorials on how to use the new system will be posted on Youtube once v2.10 hits the Marketplace. You can find them in the Tower Defense Starter Kit playlist: [https://www.youtube.com/playlist?lis...Ky4HRAkYVzIuPg](https://www.youtube.com/playlist?list=PLMrUFryxCzn6fhL-pzjKy4HRAkYVzIuPg)]
- Added support for spawning Boss enemies at the end of waves. Simply select the data table entry for the wave, set the SpawnBossAtEnd? variable to True, & define the BossSpawnData (similar to normal enemy spawn data) parameters.
Other Changes:
-
Revamped the BP_WaveSpawnController workflow to incorporate the new features as well as to make it easier to understand. The visual setup now displays every step of the wave spawning system in a neatly arranged manner so as to enable identifying all working parts of the system in a single glance as soon as you open the blueprint.
[Note: If you need the old setup for reference, it’s still available when you download the v4.22 edition as no changes have been made to this blueprint while making the transition to Unreal Engine v4.23.]
Additional Notes:
- Search for Version2_10 in the blueprint editor to identify all the major changes in this update.
Hi, I’ve uploaded a new tutorial for setting up waves using the Batched Wave Spawn (spawning AI units in batches) Controller, taking into account the changes that were introduced in the latest v2.10 update.
[Note: If you’re using the Weighted Wave Spawning system, the old workflow still applies since the waves are not explicitly defined through data tables in that scenario.
It’s a simple 3-minute tutorial. So you should be able to create your own customized waves and have them up & running in just a matter of minutes. Have fun!
Hi Stormrage,
First, I wanted to say great job on this project. It’s got a ton of features, and I really love how modular this has gotten over its lifetime. Very nice, props!
I have a few suggestions that I think would be nice in this project. I’m in the process of implementing these features in my project, and thought they may be of use to others.
-
Muzzle flash emitters upon firing. Minor, easy to do, but I ended up throwing the logic in the base class (which means I can’t update super easily in the future) so all turrets had it if needed.
-
Damage types and armor types. Bolding this one because it’s kind of a staple in TDs.
-
It’d be awesome to have a table with each armor type and the multipliers for damage types. A tank’s armor, for example, could reduce all damage other than piercing. An entry in the table of “default” could make all unspecified damage types use that multiplier.
-
Projectile collision sounds would be pretty easy with this in place as well. Ricochets and metal “tink” sounds for metal armor. Fleshy sounds for unarmored units. Etc.
-
Ammo pool with recharge time upon depletion. Example, a rocket turret with 8 rockets. It can fire all 8 and the fire rate can account for the delay between them. However, once those 8 rockets are depleted, a recharge time which is totally independent of the fire rate is incurred before the next pool of 8 can be cycled through.
-
Turret thumbnails. It would be nice if I could just throw a thumbnail into the TowerData table, and if it exists, show it instead of the abbreviation. Only fall back to abbreviations when a texture isn’t provided for a thumbnail.
-
SpawnPointIndex value of -1 to randomize the spawn point in the Batched Wave Spawn system. Example, I know I want 10 of unit A and 10 of unit B. I don’t want it to be perfectly distributed to exactly the same point each time. The value of -1 would just pick a random spawn point for all 10 of unit A and B.
They’re mostly minor, but I’d really love to see damage types and armor types. If it actually uses physical materials, great, but totally not necessary imo.
Admittedly I haven’t even tried the latest version on 4.24, but looking forward to seeing the update for 4.24 as well.
Thanks, and again great work!
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.
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.
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: https://www.youtube.com/watch?v=n_myHNws1Kc]
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:
- Gameplay Demo for the 2.16 edition now available for download at: https://www.dropbox.com/s/rko8046vxo…16Demo.7z?dl=0
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:
-
Search for Version2_17_1 in the blueprint editor to identify all the major changes in this update.
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.