Changes

Jump to navigation Jump to search
1,188 bytes added ,  17:19, 23 May 2018
Line 66: Line 66:  
//todo
 
//todo
 
==NPC==
 
==NPC==
//todo
+
 
 +
(Thanks to spacechase0):
 +
I've been working on a Custom NPCs mod (to create NPCs with json), so I know roughly what you need though:
 +
 
 +
* New file: Characters\Dialogue\<name>
 +
* New file: Characters\schedules\<name>
 +
* New file: Portraits\<name>
 +
* New file: Characters\<name>
 +
* Add entries Data\EngagementDialogue for NPCs that are marriable
 +
* Add entry to Data\NPCDispositions
 +
* Add entry to Data\NPCGiftTastes
 +
* Add entries to Characters\Dialogue\rainy
 +
* Add entries to Data\animationDescriptions (if you want custom animations in their schedule)
 +
 
 +
All of the above can be done with IAssetLoaders/IAssetEditors or Content Patcher. Finally, spawn the NPC with a SMAPI mod:
 +
 
 +
NPC npc = new NPC(AnimatedSprite sprite, Vector2 position, int facingDir, string name);
 +
 
 +
or
 +
 
 +
NPC npc = new NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDir, string name, Dictionary<int, int[]> schedule, Texture2D portrait, bool eventActor);
 +
 
 +
or
 +
 
 +
NPC npc = NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDirection, string name, bool datable, Dictionary<int, int[]> schedule, Texture2D portrait);
 +
 
 +
For spawning:
 +
 
 +
Game1.getLocationFromName("Town").addCharacter(npc);
 +
 
 
==UI==
 
==UI==
  
9

edits

Navigation menu