TEdit / Terraria-Map-Editor

TEdit - Terraria Map Editor - TEdit is a stand alone, open source map editor for Terraria. It lets you edit maps just like (almost) paint! It also lets you change world settings (time, bosses downed etc), edit chests and change sign, make epic dungeons, castles, cities, and add rewards for your adventurers!
https://docs.binaryconstruct.com/
Other
1.59k stars 342 forks source link

Set NPC spawn points #39

Closed Aimeryan closed 13 years ago

Aimeryan commented 13 years ago

This request is perhaps out of bounds of the map editor, but might be possible?

I'm wondering about npc editting within a map. I noticed the npc tab and got thinking. The chest tab allows you to edit chest contents. Could the npc tab be made to allow you to edit npcs?

At the moment there are four types of npc: Guide: Displays information in a message box. Nurse: Heals health (so a stat change) for a cost. Merchant/Arms/Demo/Clothier/Dryad: Sells items from respective and individual inventories. Old Man: Spawns a boss when clicked on (under certain conditions).

Would it be possible to spawn an npc at a certain place on a map (so painted there as such)? Would it be possible to give it a custom sprite and name? Could it use one of the existing functions the current npcs have but slightly modified (different inventory, different monster spawned, etc)?

A lot of questions, a lot of work! Makes me eager to go learn C# and have a go at it myself!

BinaryConstruct commented 13 years ago

NPCs have a home tile, current location and homeless flag. I believe the home tile is there "house", and the game will rebuild this as required. If homeless NPCs don't despawn then you might be able to place them wherever you wanted, but I haven't attempted this.

Aimeryan commented 13 years ago

That makes sense. I guess you could always make a home at the place you wanted that specific NPC to stay around, much like you actually do in game. The trick of course would be to looking into creating a custom npc, and being able to edit it at any time there after (including the spawn point).

Interestingly, the old man sticks around his spawn place regardless; even if the dungeon has been completely removed.

If I get some time I'll take a look at the npc code. I don't know C# so it will be interesting to see if I am able to actually do anything with it.

Also, darn the 'Close Issue' button for being so easy to press!

BinaryConstruct commented 13 years ago

merged into issue #46, closing this