hamstar
Terrarian
Note: Requires Mod Helpers
Implements dynamic mob invasions. Use a

Crafted at a
Tinker's Workshop with:

- 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 );
// 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
- Fixed crafting recipe not accepting multiple banner types
- 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?)
- Implemented FloatInputElement for config
- Updated for TML11.5
- Updated to TML11 and MH5b
- 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
- Added mod compat tweak to solve RecipeBrowser load issues
- Tweaked inbox message
- Adjusted invasion spawn rate (InvasionSpawnRatePerType) from 1100 to 2000
- Added world unload cleanup
- 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.
- Fixed an incompatibility issue with DebugHelpers changes
- 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
- Added support for Hamstar Helpers v1.2.0 issue report
- Added mod icon
- Added API
- Minor internal refactoring
- Minor internal class access fix
- Lots of general refactoring.
- Fixed multiplayer item lag issue.
- Invasions now restricted to world surface.

Last edited: