NPC Help

KirblesOcto

Stardust Pillar
I'm trying to make an NPC mod but all the info I can find seems outdated, are there any recent tutorials or base file to work off of?
 
I have a mod focused on NPCs, but I didn't tried to import it to 1.4 yet, and no much ideas what the differences are, so... I'm also interested, how the codes might changed XD
I can help a bit as far as pre-1.4 concerned, but that's probably kinda outdated...

Regardless though, I'm curious about your NPC ideas, so, would you like to tell more about them? If you want, I might try helping with brainstorming too.
 
I'm trying to make an NPC mod but all the info I can find seems outdated, are there any recent tutorials or base file to work off of?
You can look at Example Person from Example Mod.
1.3: tModLoader/ExamplePerson.cs at master · tModLoader/tModLoader
1.4: tModLoader/ExamplePerson.cs at 1.4 · tModLoader/tModLoader

I have a mod focused on NPCs, but I didn't tried to import it to 1.4 yet, and no much ideas what the differences are, so... I'm also interested, how the codes might changed XD
I can help a bit as far as pre-1.4 concerned, but that's probably kinda outdated...

Regardless though, I'm curious about your NPC ideas, so, would you like to tell more about them? If you want, I might try helping with brainstorming too.
Again, you can look at Example Person from Example Mod.
I have a 1.4 mod, Fisherman NPC, that you can extract in game to see the source code. Note that as of right now, 1.4 tModLoader does not have modded Town NPC happiness or the alternate texture (the one for parties) for Town NPCs implemented.
 
Again, you can look at Example Person from Example Mod.
I have a 1.4 mod, Fisherman NPC, that you can extract in game to see the source code. Note that as of right now, 1.4 tModLoader does not have modded Town NPC happiness or the alternate texture (the one for parties) for Town NPCs implemented.
Well, if some of those stuff still missing, would there be a point trying to upgrade it for 1.4 now, or better wait some more?
Are there any major differences in the coding compared to pre-1.4?
 
Well, if some of those stuff still missing, would there be a point trying to upgrade it for 1.4 now, or better wait some more?
Are there any major differences in the coding compared to pre-1.4?
In terms of a Town NPC, it's pretty much the same. For all NPCs, any instance of "npc." like in SetDefaults() is now "NPC.". Also, the alt texture and happiness not being implemented as I mentioned. The Bestiary entry is customizable too.
For other things, crafting recipes have changed their formatting quite a bit. A lot of functions were renamed too. See Update Migration Guide · tModLoader/tModLoader Wiki for a big list of things that were changed. You can also look at 1.4 Example Mod tModLoader/ExampleMod at 1.4 · tModLoader/tModLoader
 
Back
Top Bottom