tModLoader Prefixes for Enemies

Yeah, so it would assign entirely new prefixes to the enemy which would be easier to deal with. I'll toss it into my list of possible features to be added.


My initial suspicion was that the displayName was being overwritten for some reason, but I had no idea why that would be happening. I've not overridden PreAI before - is it called every frame, or just before the AI initializes for the first time? Running a check every frame to see whether an NPC's name matches its prefix data seems like overkill.
1. cool.

2. It is called every frame, but you can make it efficient by assuming that once you fix the displayName, it should stay fine.

Code:
public override bool PreAI()
{
    if ( !((ExampleNPCInfo)npc.GetModInfo(mod, "ExampleNPCInfo")).nameConfirmed)
    {
        // check/fix name here
        ((ExampleNPCInfo)npc.GetModInfo(mod, "ExampleNPCInfo")).nameConfirmed = true;
    }

    return true;
}
 
1. cool.

2. It is called every frame, but you can make it efficient by assuming that once you fix the displayName, it should stay fine.

Code:
public override bool PreAI()
{
    if ( !((ExampleNPCInfo)npc.GetModInfo(mod, "ExampleNPCInfo")).nameConfirmed)
    {
        // check/fix name here
        ((ExampleNPCInfo)npc.GetModInfo(mod, "ExampleNPCInfo")).nameConfirmed = true;
    }

    return true;
}

Simple enough. Suffixes will make fixing the name a little more work, but I should change how I keep track of them anyway to facilitate future changes. The help is much appreciated - I'll work on this in the coming days and hopefully have this fixed for the next update.
 
No idea if this has been suggestive yet but, maybe some rarer Prefixes could change how much money the mobs drop with varying degree depending on the prefix.

For Example "Loaded" Would have the Enemy Drop Double the Money.
"Rich" Would be 3x.
"Wealthy" 4X
"Deep Pockets" Would be 5X the money.

Why stop there, maybe a prefix that changes the drop rates?
 
No idea if this has been suggestive yet but, maybe some rarer Prefixes could change how much money the mobs drop with varying degree depending on the prefix.

For Example "Loaded" Would have the Enemy Drop Double the Money.
"Rich" Would be 3x.
"Wealthy" 4X
"Deep Pockets" Would be 5X the money.

Why stop there, maybe a prefix that changes the drop rates?

Yes, both of these ideas have been brought up before, and I don't have plans to add this specific kind of loot prefix. However, I can say with much more confidence now that there will be a much more interesting and content-heavy loot system added in the future. Work on the initial content for said system is about half done, but I've been working on it since before I even released this mod.

Edit to avoid double post:

New update is up. Fingers crossed that I fixed the invisible prefixes issue (haven't seen it in my testing); please report any observations of this and any other bugs.

No new content in the update, but some balancing to existing prefixes and cosmetic changes to some of the more dangerous prefixes that don't identify themselves in some other way. Currently the only projectile prefixes with dusts are Volcanic and Lightning Rod - these dusts will only spawn when the enemy is close enough to fire at you. This should help you identify threat ranges.
 
Last edited:
Idea for a Suffix, "The Doomsayer"
Would need its own exclusion group, and probably several instances, however basically
a 1/2000 (lower for some bosses) chance an <enemy> will spawn a Boss related too it.
For instance, a 1/2000 any slime can be a Doomsayer, and when killed, spawn a King Slime
Doomsayer Eyes can summon Eye of Cthulhu
Doomsayer Crimson Enemies can summon Brain of Cthulhu
Doomsayer Corruption Enemies can summon Eater,
Doomsayer Sharks in Hardmode can summon Fishron.(1/5000 id say)
Etc,
It adds a new way to farm bosses without the need of crafting their items or wait for them, Plantera would probably need to be killed before Doomsayers for plantera will spawn, same with Moon Lord (1/10000 for moonlord, have doomsayers spawn from the pillars or cultists)

I also feel like Trickster and Petrifying are cruel, day 1 I fought a Trickster Party Animal Green Slime, it destroyed me. (But it was also hillarous to watch it shoot confetti at me) (Another Reason Petrifying is cruel is that there is no counter to it)

Prefix "Pyromaniac"
Causes a firework to go off when attacked or attacking (Once every .5s so rapidfire stuff doesnt crash terraria) because who doesn't like Fireworks!

Prefix "Soul Eater" (Hard Mode)
Excludes Worm Bosses, Whenever a nearby enemy/player is killed this mob Heals to Full

Prefix "Intelligent"
Excludes Flying, Can Open Doors

Prefix "Healer"
Grants nearby hostile mobs a slow Regen, When killed Drops 10 Hearts.

Prefix "Hasty"
Moves 10% Faster

Prefix "Ghostly" (Hardmode)
After Death continues attacking for 3 seconds before dying. (immune to everything for 3 seconds at death/right before)

Prefix "Destructive"
Dealing damage deals 100% More damage, and deals an AOE, capable of killing Players or Enemies.

Prefix "Stealthy"
Has Invisibility, Removed for 10 seconds when dealing damage or taking damage.

Suffix "the Traitorous"
Fights for the Player. (if this is even possible)

Hope you like at least some of my ideas :D
 
how long before theres extra loot?

Don't expect anything soon. Spring break is coming up for me, we'll see how much I get done during that.

Idea for a Suffix, "The Doomsayer"
Would need its own exclusion group, and probably several instances, however basically
a 1/2000 (lower for some bosses) chance an <enemy> will spawn a Boss related too it.
For instance, a 1/2000 any slime can be a Doomsayer, and when killed, spawn a King Slime
Doomsayer Eyes can summon Eye of Cthulhu
Doomsayer Crimson Enemies can summon Brain of Cthulhu
Doomsayer Corruption Enemies can summon Eater,
Doomsayer Sharks in Hardmode can summon Fishron.(1/5000 id say)
Etc,
It adds a new way to farm bosses without the need of crafting their items or wait for them, Plantera would probably need to be killed before Doomsayers for plantera will spawn, same with Moon Lord (1/10000 for moonlord, have doomsayers spawn from the pillars or cultists)

Interesting idea, here. I think I prefer a system where they eventually summon the boss once they are alive long enough, giving the player a good amount of time to kill them before anything happens. A countdown above the npc could be implemented.

I also feel like Trickster and Petrifying are cruel, day 1 I fought a Trickster Party Animal Green Slime, it destroyed me. (But it was also hillarous to watch it shoot confetti at me) (Another Reason Petrifying is cruel is that there is no counter to it)

I don't feel as though trickster is all that bad, since the amount of time you're confused on hit is always the same. If I wanted to make it evil I'd set it to a random time between 2 and 4 seconds. Petrifying may be a little much, though - I'll consider dropping the rate of debuff application or the debuff time.

Prefix "Soul Eater" (Hard Mode)
Excludes Worm Bosses, Whenever a nearby enemy/player is killed this mob Heals to Full
Thematically very cool (would prefer absorption of various stats over full recovery), but it would be very tough to implement in an efficient way, code-wise.
Prefix "Ghostly" (Hardmode)
After Death continues attacking for 3 seconds before dying. (immune to everything for 3 seconds at death/right before)
Not all that tough to implement, will put it in the list of possible things to add.
Prefix "Stealthy"
Has Invisibility, Removed for 10 seconds when dealing damage or taking damage.
Interesting idea, and might be pretty easy to implement if the way I'm considering would work. Might even be able to do something where it slowly becomes more transparent while it regains invisibility, though that would be more trouble.
Suffix "the Traitorous"
Fights for the Player. (if this is even possible)
Possible, but probably not practical to implement as a general prefix due to the wide variety of AIs that need to be accommodated. Could definitely do something that stole life/stats from nearby enemies to buff itself up, though.

In general, these are pretty good ideas - don't think any of them are straight up impossible to implement, though not all would be worth the time investment. Good ideas that I will probably be taking portions of for implementation.
 
i like this mod alot, my only trifle with it though is the nullifier prefix, because alot of the time im mining, i end up finding a area with a mob having that prefix hidden in a cave i havent found yet, and then i just get stuck where i am because i cant attack, mine or place anything, maybe you could change it so you get the debuff for 4 seconds when they hit you, instead of just being on you when they are close by.
 
i like this mod alot, my only trifle with it though is the nullifier prefix, because alot of the time im mining, i end up finding a area with a mob having that prefix hidden in a cave i havent found yet, and then i just get stuck where i am because i cant attack, mine or place anything, maybe you could change it so you get the debuff for 4 seconds when they hit you, instead of just being on you when they are close by.

Only 1/500 enemies spawn as the Nullifier, so I can't believe this happens all that often. They also only start spawning post-Skeletron, by which time most players should have some kind of grappling hook or climbing accessory with which they can escape the situation. It would be a pretty weak suffix if the curse were relegated to on-hit - the suffixes are meant to create situations where you might have to play differently. If that means ensuring that you have the tools to deal with them before you go spelunking (or mining in a different way if you lack the tools), then so be it.

On the other hand, the radius of effect for the curse might be a little large. I'll consider dropping it a bit.
 
Only 1/500 enemies spawn as the Nullifier, so I can't believe this happens all that often. They also only start spawning post-Skeletron, by which time most players should have some kind of grappling hook or climbing accessory with which they can escape the situation. It would be a pretty weak suffix if the curse were relegated to on-hit - the suffixes are meant to create situations where you might have to play differently. If that means ensuring that you have the tools to deal with them before you go spelunking (or mining in a different way if you lack the tools), then so be it.

On the other hand, the radius of effect for the curse might be a little large. I'll consider dropping it a bit.

Well the Nullifier disables grappling Hooks (Atleast I think it does), it is certainly possible you get put in an inescapable position(especially if Blast Mining post Sleketron to get to hell), I wouldn't mind the Nullifier be moved to a prefix and be an on-hit thing.
 
Well the Nullifier disables grappling Hooks (Atleast I think it does), it is certainly possible you get put in an inescapable position(especially if Blast Mining post Sleketron to get to hell), I wouldn't mind the Nullifier be moved to a prefix and be an on-hit thing.

It does disable hooks, but situations where the enemy in question is stuck in a certain area so near to you that jumping won't ever get you out of the radius are not at all common. In addition, by that point rocket boots are accessible on top of the other movement accessories (cloud in a bottle, red balloon, etc.), all of which should make such situations escapable. The visual indicator on the Nullifier allows you to avoid getting close, as well. I like the Nullifier too much as-is to change it only to prevent such a rare case from happening. That said, the curse radius will be reduced somewhat next update. As it is, it's a little too hard to deal with pre-hardmode when your mobility is low.
 
Alternatively You can add a Post Hard Mode criteria too Nullifier, or say a 1 boss down in hardmode or so, or even make the radius larger, but Post Plantera.
Also heres an Interesting idea, Corruption/Crimson/Hallow based prefixes that can only spawn when your world is more then X% Corruption, Hallow, Crimson.

(All experience with this mode is in Expert Mode)
After playing a lot more with this mod, Martyr is the bane of my existence, almost half of the tombstones on my world are "Was killed by a Landmine" They deal too much damage, and are too hard to spot, no effects or anything. Feels like they do damage relative to the monsters damage, the issue is on expert mode, 9/10 Martyrs deal above lethal damage. Maybe have them drop a grenade that explodes after 2-3 seconds so you can atleast react to it, Just randomly attacking something and taking 600 damage "Zyro was torn in half by a landmine"

(All of the below is representative as a Melee Main build, Pre Hardmode, 3 boss down, Expert Mode world)
  • Small should make enemies deal 15% Less damage,
  • Large should deal 30% More Damage.
  • All the Damage Over Time effects don't do enough, usually when I die I die to stupid Burst... Looking at you Martyr Slime.
  • I can't recall ever dying to a Volcanic Enemy. (Whereas Rune Mages kill me all the time) I feel the projectile explodes on the ground very often immediately after its fired.
  • Shadowmage, Havnt died to this either, same with Lightning Rod.
  • Rune Mage This is SOOO annoy, when I am AFK in my house 100% of the time a Rune Mage Eye spawns specifically to kill me 6 times. Although certainly this is by far the most powerful Projectile spawn.
  • Flametrail, needs more fire, There is so little i never hit it.
  • Flammable needs to be x10 maybe even more, DOTS Generally don't kill things.
  • I don't have anything with Frostburn or Poison so I don't know if its ok.
  • Pyophobic should be 50%.
  • Nullifier's radius is too large (as you said above) or they spawn too early in progression.
I felt like too many Prefixes/Suffixes spawned and I lowered the chances by a lot, maybe 4x less. They don't feel unique or varied enough at the base spawns, There should probably be more prefixes, or possibly more negatives to balance out the bonuses.
It might feel better if there was a bunch of cosmetic prefixes, like Party Animal, for instance more Size Mods, like a Gigantic/Minature being 150 and 50 size respectively.

If its easy, maybe you could concider using the Dye effects to signify prefixes, or create new cosmetic effects, Especially the Acid Dyes and Reflective Dyes.
 
Also heres an Interesting idea, Corruption/Crimson/Hallow based prefixes that can only spawn when your world is more then X% Corruption, Hallow, Crimson.
That is an interesting idea. I'm not sure if there's an efficient way to check these values, though.
(All experience with this mode is in Expert Mode)
After playing a lot more with this mod, Martyr is the bane of my existence, almost half of the tombstones on my world are "Was killed by a Landmine" They deal too much damage, and are too hard to spot, no effects or anything. Feels like they do damage relative to the monsters damage, the issue is on expert mode, 9/10 Martyrs deal above lethal damage. Maybe have them drop a grenade that explodes after 2-3 seconds so you can atleast react to it, Just randomly attacking something and taking 600 damage "Zyro was torn in half by a landmine"
Yeah, it's kind of a pain right now. They do 2x the contact damage of the enemy. Unfortunately, there is no suitable vanilla projectile to drop (what you suggest is what I originally intended), but I will eventually get around to creating one for this purpose.

There should probably be more prefixes, or possibly more negatives to balance out the bonuses.
More prefixes will come as I update; suggestions are always welcome. Generally speaking, I'm avoiding creating too many prefixes that make enemies weaker. This is just as much a challenge mod as it is a variety mod. Same goes for why you feel some things are too hard on expert - I didn't make it with expert mode in mind, since it's already plenty hard for most people. Later, once updates become less frequent, I'll definitely consider releasing a few versions of the mod with different prefix frequencies to suit different tastes.
If its easy, maybe you could concider using the Dye effects to signify prefixes, or create new cosmetic effects, Especially the Acid Dyes and Reflective Dyes.
I don't know if there's a way to do this, but I would definitely make use of it. There aren't all that many dusts that emit light, so this would vastly expand the number of prefixes that could be made visible.


edit: NEW UPDATE. Check changelog for details. Highlights include nerfs to Martyr and the Nullifier, as well as value multipliers on prefix categories. You could get x240 coins from an enemy if it spawned with every prefix category (not including weakness) and a suffix! Of course, finding one of those will be more than a little unlikely (1/36000).
 
Last edited:
Unpacking the mod in tmodreader to change spawn rates yields this error when its put pack together...
"
Missing texture EnemyMods/Projectiles/MartyrBomb
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
"
Even just unpacking this mod and putting it back together, no edits, puts out this error for me. No idea why.
 
New update up! I doubled the pool of projectile prefixes and rebalanced them a bit. If the projectile can't pass through walls, an enemy needs line of sight before it will shoot. Many of the projectiles have had their damage adjusted down a bit. For other changes, check the changelog in the main post.

Unpacking the mod in tmodreader to change spawn rates yields this error when its put pack together...
"
Missing texture EnemyMods/Projectiles/MartyrBomb
at Terraria.ModLoader.ModLoader.GetTexture(String name)
at Terraria.ModLoader.Mod.SetupContent()
at Terraria.ModLoader.ModLoader.do_Load(Object threadContext)
"
Even just unpacking this mod and putting it back together, no edits, puts out this error for me. No idea why.
That's odd. This error, if I remember correctly, occurs when the builder can't find the associated .png for the a .cs file that requires one. My guess is that tModReader is losing the image file when unpacking for you. It's working fine for me, but I've attached a zip with the unpacked files for the new update.

Edit: Very small update to fix a couple bugs and a value left unchanged from testing
 

Attachments

  • RareEnemies.zip
    157.7 KB · Views: 241
Last edited:
I've been thinking about some extra loot prefix names...

Midas: Extra money dropped
Hoarding: Drops more item loot based on what it is (Zombies drop more Zombie loot, Demon Eyes drop more Demon Eye loot, etc.)

And a suffix idea somewhat like the Immortal suffix...

the Multiplier/Divider/Replicator: can be killed multiple times (optional, suggested amount: 2 or 3 times), spawns more of itself on death (1 to 2 if with multiple lives, 2 to 3 if single life), drops its loot each death, or spawns weaker (25-75% less HP, 30-60% less defense, 25-50% less damage)

Yes, The Multiplier suffix might get a little crazy, But I'm sure it can always be balanced over time.. Feel free to fiddle with these ideas, obviously

(Credit to Charon for the "Divider" and "Replicator" name suggestions)
 
Last edited:
I've actually been working on a sister mod (Rare Enemies) that follows a pretty similar premise. 1/100 enemies are "rare," and drop a Mystery Token on death. That token is a consumable that draws from a progression-based (#of unique bosses killed) loot table when used. This was meant to be a place to put all the content I create, but, well... I haven't made all that much yet. It takes a lot of stuff to fill up a loot table that's supposed to improve after every boss, and I haven't made enough cool stuff to put in yet. Anyway, if/when this is in a publishable state, I'll either put it up as a standalone that could be used alongside this mod or merge the two together.



Good luck killing that Regenerating Armored Shadowmage Eye of Cthulu! There's approximately a 1/500 chance of an NPC spawning with three prefixes right now.
This actually is really, really cool.
But pairing this with some other modded bosses for an extra challenge, like the one in my profile picture that already spawns a swarm of projectiles, will be very interesting.
I also really like that Mystery Token idea.

Some "Multiplier" idea
This will be insane if you could do this. But may I suggest that you change the name to "Divider" or "Replicator"?
 
Back
Top Bottom