tModLoader Dynamic Invasions

would it be at all possible to use modded banners and music boxes in a future update?
I don't know about modded music boxes, but you can currently use modded banners. I'd need to do extra some special magic for modded music boxes, I'd guess.

Thanks :D
by the way i saw somethings in the config file, you can craft banners from trophies?

Not currently. I do want to add mini-bosses eventually, though.

Edit:

v0.8.4
  • Added support for Hamstar Helpers v1.2.0 issue report
  • Added mod icon
  • Added API
  • Minor internal refactoring
 

Attachments

  • DynamicInvasions v0.8.4.zip
    81.6 KB · Views: 194
Last edited:
Seems like this could be a good mod, though if you will implement random spawning invasions, then I believe their should be presets and such. Few examples I could think of are Slimy Revenge (The Slime King isn't finished yet. All of his minions are coming for revenge!) and Dungeon Onslaught (The denizens of the dungeon are not happy that you plundered their chests. They're coming to take it all back.)
 


Requires Hamstar's Helpers v1.0.17+


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
  • hp33tld.png
    1x
    Dark Shard
  • UNq42Zx.png
    1x
    Light Shard
  • 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
  • Source available: https://github.com/hamstar0/tml-dynamicinvasions-mod

For modders:
var di_mod = (DynamicInvasions.DynamicInvasions)ModLoader.GetMod( "DynamicInvasions" );
var di_wrld = di_mod.GetModWorld<DynamicInvasions.MyModWorld>();
var spawn_info = new List<KeyValuePair<int, ISet<int>>>();

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

di_wrld.Logic.StartInvasion( di_mod, MusicID.Plantera, spawn_info );


Installation

Requires tModLoader (0.10). 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.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


can you get the mirrior back now?
 
Internal code update; few major 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
 

Attachments

  • DynamicInvasions v0.8.5.zip
    41.6 KB · Views: 149
Whenever I try to join a world I get This message
The game has crashed!
Field not found: 'HamstarHelpers.Helpers.DebugHelpers.DebugHelpers.Display'.
at DynamicInvasions.Invasion.InvasionLogic.Update(DynamicInvasionsMod mymod)
at DynamicInvasions.DynamicInvasionsPlayer.PreUpdate()
at Terraria.ModLoader.PlayerHooks.PreUpdate(Player player)
at Terraria.Player.Update(Int32 i)
at Terraria.WorldGen.do_playWorldCallBack(Object threadContext)
at Terraria.WorldGen.playWorldCallBack(Object threadContext)
 
Whenever I try to join a world I get This message
The game has crashed!
Field not found: 'HamstarHelpers.Helpers.DebugHelpers.DebugHelpers.Display'.
at DynamicInvasions.Invasion.InvasionLogic.Update(DynamicInvasionsMod mymod)
at DynamicInvasions.DynamicInvasionsPlayer.PreUpdate()
at Terraria.ModLoader.PlayerHooks.PreUpdate(Player player)
at Terraria.Player.Update(Int32 i)
at Terraria.WorldGen.do_playWorldCallBack(Object threadContext)
at Terraria.WorldGen.playWorldCallBack(Object threadContext)
What version of the mod are you using?
 
THEY HAVE ARRIVED, MOONLORD SAVE US ALL!!!
212.png
On a more serious note, concept sounds nice, but banner eating is... A bit much, I'd say? How about furniture item with it's own little interface, five banner slots, music box slot, crystal slot and a button to start invasion - and trophy slot or two, for bosses between waves? Several levels of furniture item with more slots? Amount of crystals affecting amount or waves, or their intensity? Invasion happening only in certain range from that furniture? Enabling it with wires?
And more customization options - or fully customizable option with wire input for starting and output point for when invasion end, to be used in adventure maps as a part of arena, or endless variation for easy "custom biome" creation?
Basically, I'd recommend using furniture over inventory item and then making a wider array of them, with different amount of options like slots, intensity, waves, range etc.
 
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.
 

Attachments

  • DynamicInvasions v0.9.0.zip
    45.4 KB · Views: 111
  • DynamicInvasions v0.9.0.1.zip
    42.5 KB · Views: 143
Last edited:
This works great! But for anyone else who sees the "try crafting instead of summoning" thing just save and exit then come back. PS Can't wait to see what comes next, great work!
 
also a couple suggestions (i'm not a great coder so i don't know how this would work).

#1: customization. what i mean by this is the ability to change how often some mobs spawn, how many you have to kill to finish it, and minor things like item name and colour so you can find them from a glance (the last two can be done with other mods but i'm talking in game). 1.5: enemy customization. what i mean is just modifying the health and hp, not really important though.

#2: the end. why increase the costs of spawning it in if you don't get anything? i suggest removing drops and making the player choose their own drops, maybe another 5 max with rarities to drop?
"but what about the cost?" you may ask, well have it start at 1 but per item have it go up by 2.

i personally think this would be great for it but you are the maker who controls it, i hope you the best of luck
 
Hey Hamstar,
I wanted to report two issues I stumbled on while using your mod:
1) minor issue: when the mod is disabled in the ingame mod list it states I need Hamstars Helpers v4.2.4 to be able to use the mod, even though I have v4.2.5 enabled. Enabling the mod doesn't throw an error when reloading mods. So just an indication issue?
2) major issue: activating the mod keeps jopojellys Recipe Browser from generating any NPC loot in its "LootCache.json". This also happens if only Recipe Browser, Hamstars Helpers and Dynamic Invasions are active --> see my attached "LootCache.json".

{
"recipeBrowserVersion": "0.7.2",
"lastUpdateTime": 2268,
"cachedMods": {
"DynamicInvasions": "0.9.0.1",
"HamstarHelpers": "4.2.5",
"Terraria": "0.10.1.5"
},
"lootInfos": {}
}

--> Tested with tML64
 
Hey Hamstar,
I wanted to report two issues I stumbled on while using your mod:
1) minor issue: when the mod is disabled in the ingame mod list it states I need Hamstars Helpers v4.2.4 to be able to use the mod, even though I have v4.2.5 enabled. Enabling the mod doesn't throw an error when reloading mods. So just an indication issue?
2) major issue: activating the mod keeps jopojellys Recipe Browser from generating any NPC loot in its "LootCache.json". This also happens if only Recipe Browser, Hamstars Helpers and Dynamic Invasions are active --> see my attached "LootCache.json".

{
"recipeBrowserVersion": "0.7.2",
"lastUpdateTime": 2268,
"cachedMods": {
"DynamicInvasions": "0.9.0.1",
"HamstarHelpers": "4.2.5",
"Terraria": "0.10.1.5"
},
"lootInfos": {}
}

--> Tested with tML64
See if v0.9.0.2 fixes this issue.

v0.9.0.2
  • Added mod compat tweak to solve RecipeBrowser load issues
 

Attachments

  • DynamicInvasions v0.9.0.2.zip
    42.6 KB · Views: 135
Back
Top Bottom