Issue with save file? (SOLVED - Thank you MysticTempest!)

Discussion in 'Mods' started by Karmylla, Aug 6, 2017.

  1. Karmylla

    Karmylla Space Kumquat

    Hey everyone, I've been having this issue for a while but I finally know where it's coming from!

    Every time I try to right click on any craftable in the farm map, they get destroyed. I first thought it was an issue with the map, but after checking it on Tiled and trying the same map on a new save file, I've come to realize that that is not the case!
    Which makes me think that the issue is in my save file! I've tried checking it and comparing with others, but I can't understand where the bad code is! If anyone could check it out for me, I would appreciate it!

    Thank you!
     

      Attached Files:

    • MysticTempest

      MysticTempest Spaceman Spiff

      Here Karmylla, give this one a try. I came across this issue once before, but at the time I was pretty baffled, and was only able to narrow it down to the 'objects' area in the Farm gamelocation.
      Your farm's much smaller; so it was easier to parse the data. It seems the issue was that there was a stone on your farm without any location data(Vector2 for X & Y were both 0); and I guess that somehow breaks all craftables on the farm.

      Once, I deleted the broken stone data; I was able to verify in-game that craftables no longer break. Though, let me know if you have any other issues.
       

        Attached Files:

        Karmylla likes this.
      • Karmylla

        Karmylla Space Kumquat

        Gosh, Mystic, you're a life saver! Thank you for always helping me out, I appreciate it! :D
         
          MysticTempest likes this.
        • Karmylla

          Karmylla Space Kumquat

          @MysticTempest I'm sorry for bothering you again, but I'm having the same issue again! This time, it looks like it only affects the Worm Bin somehow, though I didn't check all of the craftables.
          Maybe you could teach me what to look for when this error happens? I've checked the Vector2 that you wrote about before, but none of them were set to 0 on x and y.
          Sorry to bother you again with this silly thing, but it gets annoying after a while x)
           

            Attached Files:

          • MysticTempest

            MysticTempest Spaceman Spiff

            No worries. ^-^
            I did a quick few tests. It affected all the craftables. This time it appeared to be a twig with a vector2 location of 1,0. So, perhaps as long as one of variables is "0" it causes these issues. I removed the data for that specific twig, and the craftables started working again.

            In terms of teaching; sure. In this case; it's still a bit tedious. I'm just breaking up the code in chunks til I narrow down the issue, but I can point you where to look.
            First backup your save.


            Next, you're going to want to open your save in a code editor. Something like Notepad++, or Geany depending on OS. And, then use the PrettyPrinterXML plugin to format the code into something more readable. Otherwise, you just have a long line of text.

            Then search for "GameLocation". The first one should be for the farmhouse; the 2nd will have the farm. Go to the farm, and there'll be some sub-sections starting with 'characters'; for pets & occasionally spouses.
            We need the next sub-section; 'objects'.(highlighted in the following screenshot)

            You should be able to use the '+' & '-' boxes on the side to the expand/collapse the code into easily readable chunks.
            Example1.png


            The 'objects' section on your specific save at this specific time starts at line 10643, and goes all the way to line 24913.
            You're going to want to copy all of it to a new file. Easily done when the code is collapsed like this.

            In the new file is where we start working. You should see something like this:
            Code:
            <objects>
            All the Items, and there data here.
            </objects>
            
            From there I start cutting the Objects' code in half. And, reinserting it into the save. If the first half is fine; it narrows it down to the 2nd half. Repeat til you're down to the last few lines; and you're golden. Keep in mind you need to make sure to reinsert the data either between the tags, or recreate the tags if they were deleted. To ensure proper loading of the save.

            Then restore the save all the way back to it's original state, and remove the corrupted item. It's better than fixing, because you don't want to have to verify you're not placing it in the same spot as another item.


            Though, now with this newer item showing that only one '0' is needed in the Vector2 location to screw up the farm. It should be easier to search for any corrupted items in the future.


            Your save with that twig removed is attached below.
             

              Attached Files:

              Karmylla likes this.
            • Karmylla

              Karmylla Space Kumquat

              @MysticTempest you are too good for this world, thank you for the help, your explanation was splendid!
              Hopefully I won't bore you with this issue again in the future, thank you again!
               

              Share This Page