Modding Help NPC won't leave custom location

Discussion in 'Mods' started by Sem, Feb 19, 2017.

  1. Sem

    Sem Scruffy Nerf-Herder

    So I've gotten my custom npc working in normal locations, but when I have her default in her own custom house, she won't move at all. Does anyone have any insight into how I could fix this?
     
    • Entoarox

      Entoarox Oxygen Tank

      You need to force the pathing table to regenerate after your custom map has been added.
      Just make a call to `NPC.populateRoutesFromLocationToLocationList();` and your NPC will suddenly learn there is a way to leave/enter your custom map.
       
      • Sem

        Sem Scruffy Nerf-Herder

        Sorry, I'm a noob! I couldn't figure out where to do that. Could you help me out again?
        Edit: My map and NPC are XNB mods. I haven't ventured into actual coding yet. Is there a way to do this through XNB?
         
          Last edited: Feb 19, 2017
        • Entoarox

          Entoarox Oxygen Tank

          How are you adding your custom location then? It should not be possible to add a new map to the game without SMAPI.
           
          • Sem

            Sem Scruffy Nerf-Herder

            I'm using ALL and your framework along with SMAPI, but I haven't modded or created a SMAPI mod. I made the map in tide, and added it to the locations list.
             
            • Entoarox

              Entoarox Oxygen Tank

              If you are using ALL then the route table should already be getting rebuild, did you make sure to add exit warps to your map??
               
              • Sem

                Sem Scruffy Nerf-Herder

                I went back over the maps in tide, and the entries in ALL and I have warps set in both. They work fine for me, but the NPC still won't follow her schedule unless she's set into a normal location.
                 
                  Last edited: Feb 20, 2017

                Share This Page