tModLoader

tModLoader

Not enough ratings
NPC Unlimiter
   
Award
Favorite
Favorited
Unfavorite
Mod Side: Both
tModLoader Version: 1.4.3
File Size
Posted
Updated
35.289 KB
22 Apr, 2023 @ 11:33pm
23 Apr, 2023 @ 6:38pm
5 Change Notes ( view )

Subscribe to download
NPC Unlimiter

Description
This mod patches Vanilla to have a variable maximum NPC limit.
In tML for Terraria 1.4.3 all the mods cannot be notified correctly of this change
so they can and probably will have problems unless they are created with this mod in mind.
In a similar way to avoid compatibility errors it's suggested to only increase the NPC limit,
although this mod allows also to decrease it.

Keep in mind that many parts of Terraria relay on looping over the NPC array so increasing this
value a lot has the effect of decreasing performance.

IMPORTANT (partially fixed):
- "Prevent double IL application" is false by default in the config, it's IMPORTANT that this stays
false to interact with more complex mods using heavy IL (like MultiSpawn); this prevents the mod from
loading correctly tho if you Mod Reload in game (Suggested usage, setup all mods with reload required
fields, set the NPC limit in this mod and exit tML, THEN reopen it and never reload mod again)

MODS SUPPORTING AND USING THIS:
- MultiSpawn >= 0.8

Changelog:
- 0.6
-- Description and checks for reload behaviour (see IMPORTANT above)
- 0.5
-- Fixed major bugs for world load/save in 1.4.3

Known problems:
- Reload behaviour and compatibility with other IL mods (see IMPORTANT above)
- Long load time for the mod (changing the cap is realtime and can be done in game)
- Not yet mapped to relative the spawn positions of special bosses in vanilla. (@TODO)

Originally posted by tModLoader:
Developed By DarioDaF
11 Comments
Dario Fa  [author] 29 Jul, 2023 @ 3:21am 
@Terraman also bosses will be broken from other mods because pre 1.4.4 the NPC count is an hardcoded constant of 200 so all checks for NPCs in mods that do not account for this will fail, https://github.com/DarioDaF/tml-NPCUnlimiter this is the source, I will in 1.4.4 where tML addresses this issue work for high compatibility, if you are interested for a singleplayer run feel free to add an issue in the github and we can look at some fixes that are mod specific and will not appear in the workshop :steamthumbsup:
Terraman 18 Jul, 2023 @ 3:45am 
Actually only town NPCs. Other NPCs don't usually cause problems.
Terraman 18 Jul, 2023 @ 3:43am 
Can you add an option where all vanilla NPCs & certain modded NPCs chosen by the player use the extra NPC slots & everything else uses the first 200 NPC slots to prevent incompatibility?
Zazz 11 Jun, 2023 @ 7:23am 
I am playign with Achelmeist Lite, fargo's mutant mod, Calamity, and more
Zazz 11 Jun, 2023 @ 7:22am 
Also there is a system error that it will disable and doesn't allow it to type in system32
Zazz 11 Jun, 2023 @ 7:19am 
can you make it so that multiple town NPCs live in one house and also make it so a house can never be too small or too big.
4k1n0m 21 May, 2023 @ 5:16am 
@Dario Fa i left it at what i believe is the default config (which is 500 iirc) and the errors occurred when enabling the mods and reloading and when i talked to the dev of the Better Traveling Merchant mod he said he believes it's messing with the npc hit immunity or smth like that.
Dario Fa  [author] 21 May, 2023 @ 1:29am 
@4k1n0m Thanks for the feedback, when all mods will be ported to 1.4.4 it should have way better compatibility, I can give a look at those mods in the meantime and see what's interacting (note, in 1.4.3 this mod will increase the cap, but all mobs above 200 of other mods will probably behave wrong). I'd like to know what did you set as the cap number for your tests and feel free to file an issue at https://github.com/DarioDaF/tml-NPCUnlimiter/issues
4k1n0m 19 May, 2023 @ 5:30am 
Dario Fa  [author] 18 May, 2023 @ 1:33pm 
@Volcanis this mod increases the NPC cap, but I doubt it will help spawn calamity NPCs because if they didn't spawn due to the cap not even bosses would spawn in your world