NPCs & Enemies Improving NPC AIs

azekill_DIABLO

Eye of Cthulhu
Improved and Lively NPCs!

Here's an organized list of all the possible improvements to (town) NPCs I'd like to see implemented in the future. If you disagree on any of those be sure to comment and tell me why!
(this will probably get updated if I see any good ideas)

kdcROYP.png

NPCs and fighting…
1 - Gearing up alongside you.
I wish NPCS could gear up alongside your current boss progression. The system would allow NPCs to get weapons adapted to the current world's "level" and it would be based on the player's Victory over key bosses. Currently town NPCs only upgrade their weapons when going into hardmode, but only there… Here my example proposal for the guide:
  • Game's beginning: Wooden bow + Wooden Arrow
  • EoC defeated: Copper/Tin bow + Flame Arrow
  • Skeletron defeated: Iron/Lead bow + Flame Arrow
  • WoF killed -> Hardmode: Gold/Platinium bow + Jester Arrow
  • Post-mech-bosses: Cobalt/Palladium Repeater (-increased use time ~2s) + Jester Arrow
  • Post-plantera: Hallowed Repeater (-increased use time ~2s) + Jester Arrow
There's no point in improving NPCs post-moonlord because the game doesn't get any harder at this point… But maybe in the Future. With this short example I just wanted to show how NPCs could become stronger alongside you, in order to feel like real people helping to player. And it also avoids NPCs getting murdered by the first wraith entering the house or so… Especially the guide which currently has very little upgrade in hardmode although he's the one supposed to know lots of things about crafting and surviving…


2 - Fighting with their head (not literally please, even if it would be hilarious)
My second concern in NPC fighting is their very basic AI which consists of mostly randomized movement and "Stop and Attack" pattern. If this works on weak mobs, NPCs get completely defenseless if they are facing multiple enemies without cover… I would like to submit a few ideas to improve their efficiency in combat:
  • Situationnal Awareness: Some simple details can make the difference… Such as knowing where monsters are around them or avoid to open the door during the night…
  • Cooperation between NPCs: Currently NPC only fight for themselves (except Nurse and Dryad). NPC could try to group together during fights and organize themselves: Melee in "first line" and the rangers behind, NPCs with low health could have an emoticon showing they're Calling for help and they should run towards others NPCs to get help. It may be hard to implement but it doesn't need to be completely like that. Even a simpler version of this would be awesome ;)
  • Extended Movement: Jumping exists! Even almost cut-in-half Zombies jump so why not NPCs? In houses with platforms as door, they cannot move out!

kdcROYP.png
Interactive NPCs…
3 - Emotions system
*guide was thrown into a pit of lava*
merchant: you have no idea how much dirt sells for Overseas!

To avoid this situation, an "emotion-o-meter" should be implemented. It is in theory just an extension of the current quote system. It could have following states:

  • Happy: if everything is alright during the current day then NPC are affected to the state: "happy" where they will act as they do right now.​
  • depressed: if the corruption/Crimson is at a high purcentage in the world NPCs will be "depressed". Also happens after an NPCs dies and lasts until the NPC in question respawns. Quotes will express their sadness regarding the death of the NPC that died.​
  • Upset: when player kills/hurts an NPC using rotten eggs or Voodoo dolls. Applies to all NPCs in the town and lasts until the end of the day if the target NPC didn't die, or until the NPC respawns. Quotes will be harsh towards the player. Also applies to female NPCs during blood moon as currently implemented.​
Two additionnal states could be added:

  • Motivating: Quotes try to motivate the player prior to a boss fight (ex: "Just do it!" would say the merchant when Impending doom approaches…) or try to re-motivate the player after a loss against a boss. This state would last until the next day and can be overridden by other states (Grateful, Depressed, Upset).
  • Grateful: Quotes refers to the player Victory over a boss (only when defeated for the first time in the world) by congratulating him and thanking him. This state will last until the end of the day and will shift into a happy state for another full day. (unless overridden by Depressed or Upset)
With those states (yet another hard thing to implement) the NPCs would actually really feel alive. But why using states over the current system (which simply chooses quotes after verifying some conditions) would you ask me? Because if NPCs have a state, more than their quotes can be affected: A Happy NPC will wander of the house more frequently and socialize a lot, A Grateful will stay closer to the player to socialize with him (which would be a lot of fun with the 1.3.6 emojis for players) but a depressed NPC will stay Inside their house, seated a lot and not socialize at all.

4 - Some funny little interactions

Finally just the ability to do some games with other NPCs, such as playing Tic-tac-toe or Rock-Paper-Scissors (already implemented) with NPCs would be nice, certainely not useful but fun nonetheless. I also thought of bets with the merchant and arm dealer to spice things up… imagine the situation:
:cool::I bet you 1 Platinium that I'll chop the moonlord in half!
*player's inards became outards*
:rolleyes:: I... Don't remember how much did we bet one gold am I right?
:merchantnaughty:: Gold I heard? Let me take that off ya!

5 - Improved movement

In order to let NPC move out of their house and feel alive and intelligent (as pointed out by
Meta Knight_but_Terraria) NPC movement should be improved. Although NPC can and will go trough platforms and jump to reach their new houses, they loose this ability when in their houses. The solution would be to allow them to freely jump and go trough platforms as a player would do. Even zombies can jump and move through platforms so why not NPCs?

However, jugdeing by how zombies jump in the void and get stuck, it would be important to make NPC "verify" the choosen path before taking in order to see if it is reachable. It would avoid NPCs getting stuck or falling from their homes.

That's all for now, but I'll try to come up with more interesting ideas and better presentation! Comment on what do you want to improve to NPCs!
 
Last edited:
IMPROVED & EXTENDED!
I improved the first post I did which was quite messy by adding ordered ideas and better presentation. I hope you'll enjoy reading this suggestion and be sure that's I'll update it if it contains mistakes! :pinky:
 
Last edited:
Seems like a fair idea, currently NPCs do tend to die quite easily and improving their AI with this suggestion would greatly improve them. Also fighting with your head is a little dangerous right?
 
Nioce.

The only problem I can think of is the Guide having a Hallowed Repeater is a little too strong combined with the new AI system you're talking about.
I kinda agree… Do you have an idea of a not-too-shabby bow/repeater for hardmode guide? I couldn't balance that out properly… Maybe increasing the use time to Something around 3 seconds would make it less OP?

Seems like a fair idea, currently NPCs do tend to die quite easily and improving their AI with this suggestion would greatly improve them. Also fighting with your head is a little dangerous right?
Thx for feeding back (that's doesn't sound quite right) :D
I'll do like I didn't see the striked text :O

BTW, can a mod tell me how to remove the poll? I broke it :sigh:
 
I kinda agree… Do you have an idea of a not-too-shabby bow/repeater for hardmode guide? I couldn't balance that out properly… Maybe increasing the use time to Something around 3 seconds would make it less OP?


Thx for feeding back (that's doesn't sound quite right) :D
I'll do like I didn't see the striked text :O

BTW, can a mod tell me how to remove the poll? I broke it :sigh:
How about that bow that shoots fast arrows?
 
Marrow? Seems too bone-themed to me and it is already in use with the bone merchant (maybe I Don't rememeber exactly)
A nerfed hallowed repeater is still OP… Maybe a titanium/adamantium repeater as final weapon would be better? with a slower use time obviously.
[doublepost=1555238300,1555238012][/doublepost]Anyway remember the travelling merchant has a pulse bow, arguably one of the best bows in-game! Balancing those out will be a pain… I'll try to balance that out again this afternoon, and I'll add my ideas for others NPC. The demolitionist and clothier will be very hard to balance I think.
 
Marrow? Seems too bone-themed to me and it is already in use with the bone merchant (maybe I Don't rememeber exactly)
A nerfed hallowed repeater is still OP… Maybe a titanium/adamantium repeater as final weapon would be better? with a slower use time obviously.
[doublepost=1555238300,1555238012][/doublepost]Anyway remember the travelling merchant has a pulse bow, arguably one of the best bows in-game! Balancing those out will be a pain… I'll try to balance that out again this afternoon, and I'll add my ideas for others NPC. The demolitionist and clothier will be very hard to balance I think.
How is it arguably the best bow in the game?
 
Pulse bow:
-> Highest base damage of any bow
-> Fires quickly
-> Shoots a special blue bolt which is
- unafected by gravity
- can pierce 5 enemies
- can bounce up to 5 time​

And according to the wiki:
The Pulse Bow is generally considered one of the best bows in the game, although the Tsunami and Phantasm can outdamage it against single targets.
 
I mostly agree with these statements, however:
Extended Movement: Jumping exists! Even almost cut-in-half Zombies jump so why not NPCs? In houses with platforms as door, they cannot move out!
I think that they should also be able to go under platforms and open trapdoors, because of what you said here:
A Happy NPC will wander of the house more frequently and socialize a lot
Many players (including myself) have built an apartment complex instead of a town, and they wouldn't be able to socialize with many people if the player did.
 
Oh I exactly see what you mean. Yes, for sure, they should be able to go trough platforms. I have made a tower of npc houses separated by platforms and NPCs cannot even climb up and down -_-

Added to OP
 
I feel like the npcs should have a post moon lord gear, the player by Itself already gets post moonlord gear as the game progression, the npcs could too.
Even more if Redigit decides to launches an Ultimate Terrarian Mode.
 
Back
Top Bottom