tModLoader Dynamic Invasions

hamstar

Terrarian


Note: Requires Mod Helpers


Implements dynamic mob invasions. Use a
tfBSDJL.png
Cross-Dimensional Aggregator to summon your own invasions.

Crafted at a
bE6RziF.png
Tinker's Workshop with:
  • XKepBVc.png
    1x Magic/Ice Mirror
  • Ijq2VvO.png
    5x
    Banners (any npc); specifies each invading mob's type
  • UVSiDRb.png
    1x
    Music Box (any recorded); specifies invasion's music
  • Mob types can be customized by crafting with their respective banner. All mobs (including modded ones) that drop banners can be added. Note: Some mobs won't want to stick around if they're not in their respective biome/time-of-day/event, currently. Hoping to fix this, soon.
  • The Aggregator requires Eternia Crystals to summon. Cost increases with use.
  • Config file: Documents/My Games/Terraria/ModLoader/Mod Configs/Dynamic Invasions Config.json

For modders

Source available: hamstar0/tml-dynamicinvasions-mod

API now available.

var spawnInfo = new List<KeyValuePair<int, ISet<int>>>();

// Summons an invasion of Chaos Elementals
var npcEntry = new KeyValuePair<int, ISet<int>>( ItemID.ChaosElementalBanner, new HashSet<int>{NPCID.ChaosElemental} );
spawnInfo.Add( npcEntry );
spawnInfo.Add( npcEntry );
spawnInfo.Add( npcEntry );
spawnInfo.Add( npcEntry );
spawnInfo.Add( npcEntry );

DynamicInvasionsAPI.StartInvasion( MusicID.Plantera, spawnInfo );


Installation

Requires tModLoader (+0.11). Copy the above .tmod file to your 'Documents/My Games/Terraria/ModLoader/Mods' folder to play.


Future plans
  • Automatic (randomized) invasion events every so often.
  • Mid bosses.
  • Waves (hopefully).

v0.9.4.3
  • Fixed failure to flush banners between aggregator craftings
v0.9.4.2
  • Fixed crafting recipe not accepting multiple banner types
v0.9.4
  • Added ranges to config settings
  • Added config setting option (via. 0 InvasionAbortFuelCost) to abort invasions with 0 "fuel" item
  • Added error catching for invasion progress bar rendering (rare spritebatch error?)
v0.9.3
  • Implemented FloatInputElement for config
  • Updated for TML11.5
v0.9.2
  • Updated to TML11 and MH5b
v0.9.1
  • Added right-click function to Cross Dimensional Aggregator to cancel custom invasions at the cost of 3 Eternia Crystals (with API binding)
  • Added tooltip to aggregator about aborting invasions
  • Assorted minor internal refactoring
v0.9.0.2
  • Added mod compat tweak to solve RecipeBrowser load issues
v0.9.0.1
  • Tweaked inbox message
  • Adjusted invasion spawn rate (InvasionSpawnRatePerType) from 1100 to 2000
  • Added world unload cleanup
v0.9.0
  • Renamed base mod class files
  • Changed snake case to camel case
  • Updated to MH v4.2.4 conventions
  • Added instruction inbox message on enter world + sync
  • Set spawn rate as a config setting (upped it to 1100 from 1000)
  • Added recipe to revert the Cross Dimensional Aggregator back into a Magic Mirror.
v0.8.5.1
  • Fixed an incompatibility issue with DebugHelpers changes
v0.8.5
  • Removed dark and light shards from aggregator recipe
  • Updated to Mod Helpers v2.0.1
  • Set debug config setting to be individual flags
  • Updated player code
  • Added MP player load bug failsafe
v0.8.4
  • Added support for Hamstar Helpers v1.2.0 issue report
  • Added mod icon
  • Added API
  • Minor internal refactoring
v0.8.2
  • Minor internal class access fix
v0.8.1
  • Lots of general refactoring.
  • Fixed multiplayer item lag issue.
  • Invasions now restricted to world surface.

DynamicInvasions.png


 
Last edited:
So if I use a Zombie banner then I get a zombie apocalypse? Do modded banners work as well? Whatever the case, you made another good mod.
Modded banners won't work, currently. I'll (try) to add those soon.
Actually, it should.

I could use some some feedback on balance. If you think of any cool invasion combos, feel free to post them as well.

Also, if anyone gets any multiplayer lag or desync issues, let me know. This is still a WIP, after all.
 
Last edited:
Ok, this sounds awesome :3 gonna give it a try. I can imagine it'd be a crazy idea, and the fact you can select the banners would make grinding certain enemies easier, like, say, grouping a bunch of Granite or Marble enemies together.
 
This mod looks amazing. I do have a suggestion: you could put a boss trophy with the same crafting recipe with 10 NPC banners instead of 5 [multiple of the same banner makes those spawn more frequent] as the next tier up. then another tier which requires luminite in combination with the other crafting materials but 3 boss trophies instead of 1 [2 spawn occasionly, while one spawns rarer but is buffed] and 15 NPC banners.
Just a suggestion. hope this mod keeps updating!
 
v0.8.1
  • Lots of general refactoring.
  • Fixed multiplayer item lag issue.
  • Invasions now restricted to world surface.
Edit:

v0.8.2
  • Minor internal class access fix
 

Attachments

  • DynamicInvasions v0.8.2.zip
    60.4 KB · Views: 292
Last edited:
So, I have a question. What do you use to craft the Cross-Dimensional Agreggator? I've look all over the page and can't find it.
 
I feel that mobs on invasions should spawn faster, it took me almost 10 minutes to get 60%
You probably crafted a summon item of banners from shy npcs. Some npcs are hard-coded to flee if the occasion is wrong. I'm working on a (hackish) fix for this.

So, I have a question. What do you use to craft the Cross-Dimensional Agreggator? I've look all over the page and can't find it.
Recipe is indicated in the first post...
 
So i have all the required stuff on me. 1 Magic Mirror, 1 Light Shard, 1 Dark Shard, 5 seperate banners (Devourer, Milkyway Weaver, Bone Serpent, Dune Splicer, World Feeder), and 1 music box for the Old Ones Army ost

I cant seem to craft it though. What is the crafting station? It is a workbench right?
 
maybe make it renewable? if you make an invasion and grow unhappy with it, you should be able to ''uncraft'' it and get the resources (except the shards) back...
i had trouble getting magic mirrors in my world which is why i want a way to uncraft it.
 
maybe make it renewable? if you make an invasion and grow unhappy with it, you should be able to ''uncraft'' it and get the resources (except the shards) back...
i had trouble getting magic mirrors in my world which is why i want a way to uncraft it.
I can do that.
 
Back
Top Bottom