tModLoader [Tutorial] Custom Invasion

How do you add a custom icon? Do you just need to have an image with _icon or something on the end in the same folder?
 
Any way to add a custom boss after about 50% done, like how the Flying Duchman works?
Also, can you change just the sun/moon during the invasion?
 
Any way to add a custom boss after about 50% done, like how the Flying Duchman works?
Also, can you change just the sun/moon during the invasion?

Yes, you can spawn a boss in the NPCLoot() method in GlobalNPC. Here it decrements Main.invasionSize when you kill an enemy, so just check if Main.invasionSize == number, and spawn your boss when it's at a certain amount.
 
Im having problems with the item that summons the invasion

public override bool UseItem(Player player)
{
if(!MWorld.customInvasionUp)
{
Main.NewText("The custom invasion is starting.......", 175, 75, 255, false);
CustomInvasion.StartCustomInvasion();
return true;
}

when i put in my invasion name where it says CustomInvasion.StartCustomInvasion(); and (!MWorld.customInvasionUp) it gets underlined red
 
Do you have a method named StartCustomInvasion() in the class CustomInvasion? And the bool for customInvasionUp in your ModSystem?
 
Back
Top Bottom