Changes

Jump to navigation Jump to search
Line 82: Line 82:  
All of the above can be done with IAssetLoaders/IAssetEditors or Content Patcher. Finally, spawn the NPC with a SMAPI mod:
 
All of the above can be done with IAssetLoaders/IAssetEditors or Content Patcher. Finally, spawn the NPC with a SMAPI mod:
    +
<source lang='c#'>
 
  NPC npc = new NPC(AnimatedSprite sprite, Vector2 position, int facingDir, string name);
 
  NPC npc = new NPC(AnimatedSprite sprite, Vector2 position, int facingDir, string name);
 +
</source>
    
or
 
or
    +
<source lang='c#'>
 
  NPC npc = new NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDir, string name, Dictionary<int, int[]> schedule, Texture2D portrait, bool eventActor);
 
  NPC npc = new NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDir, string name, Dictionary<int, int[]> schedule, Texture2D portrait, bool eventActor);
 +
</source>
    
or
 
or
    +
<source lang='c#'>
 
  NPC npc = NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDirection, string name, bool datable, Dictionary<int, int[]> schedule, Texture2D portrait);
 
  NPC npc = NPC(AnimatedSprite sprite, Vector2 position, string defaultMap, int facingDirection, string name, bool datable, Dictionary<int, int[]> schedule, Texture2D portrait);
 +
</source>
    
For spawning:
 
For spawning:
    +
<source lang='c#'>
 
  Game1.getLocationFromName("Town").addCharacter(npc);
 
  Game1.getLocationFromName("Town").addCharacter(npc);
 +
</source>
    
==UI==
 
==UI==
9

edits

Navigation menu