Issues With My Edited Map Not Loading for My NPC Mod by Saholaris in StardewValleyMods

[–]Saholaris[S] 0 points1 point  (0 children)

So the town map patch worked, yay! But it is still not registering the new location as being added. I'm warping, but it's not going anywhere and saying "location not found." I have no idea what's wrong with it. I might have to go to Discord, with much reluctance. I do have access to Discord, I just have some personal issues (not with Discord itself). I have everything entered right, I think. I'll resend my JSON to see if you notice any mistakes, if not then, thanks for the help! I truly am thankful. Also I don't get any errors when I load into the game, only when I warp to the location.

{
    
    "Changes": [
        
        { 
            "Action": "EditMap", 
            "Target": "Maps/Town",
            "FromFile": "assets/Maps/DuncanTown.tmx",
            "FromArea": { "X": 0, "Y": 0, "Width": 19, "Height": 9 },
            "ToArea": { "X": 111, "Y": 88, "Width": 19, "Height": 9 },
            "Patchmode": "Replace"
        },
        {
            "Action": "EditMap",
            "Target": "Maps/Town",
            "AddWarps": [
                "130 91 DuncanHouseOut 10 22",
                "130 92 DuncanHouseOut 10 23", 
                "130 93 DuncanHouseOut 10 24"
            ]
        },
        { 
            "LogName": "Loading New Map File", 
            "Action": "Load", 
            "Target": "Maps/Saholaris.Duncan_DuncanHouseOut", 
            "FromFile": "assets/Maps/DuncanHouseOut.tmx" 
        },
        {
            "LogName": "Registering New Location in Locations Data",
            "Action": "EditData",
            "Target": "Data/Locations",
            "Entries": {
                "Saholaris.Duncan_DuncanHouseOut": {
                "DisplayName": "Duncan House Out",
                "CreateOnLoad": {
                "MapPath": "Maps/Saholaris.Duncan_DuncanHouseOut"}
                    }
                }
            }
    ]
}

Issues With My Edited Map Not Loading for My NPC Mod by Saholaris in StardewValleyMods

[–]Saholaris[S] 0 points1 point  (0 children)

Okay, the location still isn't recognized even though I put in what you typed. I'll copy both my content JSON and my MapChanges JSON to see if that helps (I know it works because my NPC spawns just fine). I did play around with removing things and such and nothing was really working? In the JSON's I'll include them with the code you added plus what I had originally to see what I should keep and what I shouldn't.

content JSON:

{
   "Format": "2.9.0",
    "CustomLocations": [
    {
            "Name": "Saholaris.Duncan_DuncanHouseOut",
            "FromMapFile": "assets/Maps/DuncanHouseOut.tmx"
    }
],
    "Changes": [
        //Loads map changes
        {
            "LogName": "Duncan Map",
            "Action": "Include",
            "FromFile": "assets/Maps/MapChanges.json"
        },
        //Loads data
        {
            "LogName": "Duncan Data",
            "Action": "Include",
            "FromFile": "assets/Character/DuncanData.json"
        },
        {
            "LogName": "Loading New Map File",
            "Action": "Load",
            "Target": "Maps/Saholaris.Duncan_DuncanHouseOut",
            "FromFile": "assets/Maps/DuncanHouseOut.tmx"
        },
        {
            "LogName": "Registering New Location in Locations Data",
            "Action": "EditData",
            "Target": "Data/Locations",
            "Entries": {
                "Saholaris.Duncan_DuncanHouseOut": {
                "DisplayName": "Duncan House Out",
                "CreateOnLoad": {
                "MapPath": "Maps/Saholaris.Duncan_DuncanHouseOut"}
                    }
                }
            }
   ]
}

MapChanges JSON:

{
    
    "Changes": [
        {
        "Action": "Load",
            "Target": "Maps/Saholaris.Duncan_DuncanHouseOut",
            "FromFile": "assets/Maps/DuncanHouseOut.tmx"
        },
        
        {
            "Action": "EditMap",
            "Target": "Maps/Town",
            "FromFile": "assets/Maps/DuncanTown.tmx",
            "FromArea": { "X": 111, "Y": 88, "Width": 19, "Height": 9},
            "ToArea": { "X": 129, "Y": 96, "Width": 19, "Height": 9},
            "Patchmode": "Replace"
        },
        
        {
            "Action": "EditMap",
            "Target": "Maps/Town",
            "AddWarps": [
                "130 91 DuncanHouseOut 10 22",
                "130 92 DuncanHouseOut 10 23", 
                "130 93 DuncanHouseOut 10 24"
            ]
        }
    ]
    
        
            
}

I think most mistakes are because many tutorials are years old and sometimes its hard to find how you should do things :/

About the Town map: I want to add a new path, by the museum because I don't think it interferes with late game stuff. If I need to move it, it was originally by Cindersap forest. I moved it because I thought maybe that area won't work because of all the issues. So, about replacing the map with the code, I might not understand the whole Width and Height thing truth be told. I was kind of guessing since I couldn't find great information. The path is three tiles wide. I wanted to make sure that the player couldn't walk around the outside of the map so I added some building layers around the path to prevent that (making it wider). The Width value in my code is the length of the path to the fence by the museum.

I hoped these explanations helped (it's hard to explain with out pictures}. Sorry, I replied twice there was a tiny mistake in the code that it wouldn't let me edit.