Is it possible to make a plugin that enables to spawn a guide with whatever name you choose example: /spawnnpc "22" "Ryan" Then it would spawn the guide with the name Ryan. It would be a really cool plugin but is it possible to make?
the names are hard coded into the terrara spawn code, so no, its not possible without adding the support in the server code.
Would it be possible to have the plugin add the support automatically into the server code? Or still impossible?
Yea, the plugin adds to terrariaserver.exe, that "TShockAPI" adds to the server. They can work ahead of the server, like choosing if you can destroy a tile (region protect), but they can't change the fundamentals, like the names or types of mobs I guess. Could you write something that kills a guide every time he spawns until you get the right name? ;p
Plugin would require a list of all possible names for that NPC, otherwise player could set off an infinite loop of guide spawn/slay.
Sounds like a good way to spam the chat Here is how TShock spawns monsters: (taken from source for command /king) Code: TSPlayer.Server.SpawnNPC(king.type, king.name, amount, args.Player.TileX, args.Player.TileY); The parenthesis are arguments: the type (NPC ID), amount (here "amount" is player-specified), NPC name ...and two numbers that keep it spawned onscreen. The "NPC name" is just a source code thing, I believe an item in a list of spawned monsters.
It may sound like a little bit of a hassle, but you can download "TEdit" and spawn NPCs with custom name into your map using that. http://binaryconstruct.com/games/terraria/terraria-map-editor-tedit