Accidentally deleted my maps .xml file.

So, I've just finished up my first map and thought I would do a little editor cleaning as I accumulated a handful of test maps and unneeded files during the process. I deleted everything in the directory as I wanted to start fresh. I backed up the .stg .dds, and the folder found in the prebuilt section for my map. Problem is, I forgot to backup the .xml also found in the prebuilt section. The file needed to tell the editor where everything is placed.:face_with_stuck-out_tongue_winking_eye:

It's not a huge deal as I'm fairly happy with my map but is there any way to recover or generate a new .xml for the map? I don't think there is but figured I'd ask since it seems this information must be stored in the .stg of the map. I did see I have a Windows restore point from the 14th but I'd rather not go that route.

Thanks for any advice.😉

last edited by PicSoul

If you simple pressed "Delete" on the .xml then it should be in your recycle bin unless you have it setup to bypass the bin deletion.

Aside from that and the restore, I can't think of much, aside from a Recovery Program.

You should be able to generate a new .xml file by verifying your game files in Steam.

@Digital-X

Unfortunately, I did a permanent delete as I was sure I had everything important LOL. I did try one recovery program and it did find the file but it was somewhat corrupted and not complete.

@Iyagovos

Interesting. I'm not sure how that would work but I'll give it a try.

Thanks for the replies folks.

@picsoul You're not alone. I did this too. You can also right click and restore previous version on a folder if you emptied your recycle bin. Unfortunately I wasn't able to recover mine.

@iyagovos The cloud doesn't seem to sync the .xml to Steam. At least this didn't work for me.

Your saved .stg and .dds files for your map won't get you diddly at this point.

However...

IF you DIDN'T DELETE your level_level name_autobackup folder in AppData\Roaming\SpinTiresEditor, you can recreate the xml...PARTIALLY as it was just with that. It's a relatively simple process in itself(that much of it at least). But what you won't be able to recover with it is anything on the map that was set in a particular place on the map(stay with me, it's not as bad as it sounds). You can only recover the things that are autobackedup with a dds(height, tint, water, water mud, mtrl base/new, and dstr). Locators, models, plants, overlays, rivers, references, trucks, and routes would all need replaced by hand(since what they are, and where they are on the map, is stored in the xml).

Create New Terrain. Make it the same name and size as the map you want to recover the xml for. Allow it to create a new .stg. Open the folder for it in prebuild and delete all the files in it. Place the latest backups(highest numbered, NOT labeled src). for height, tint, water, water mud, mtrl base/new, and dstr. Rename them so they look exactly like the ones you just deleted(no _number or _src at the end of the names). The _src files are blanks. If you left the whatever blank the latest backup would be the _src(if not it's the one with the highest number). Basically just ignore the _srcs. They won't get you anything. When you've got all the files in the prebuild folder replaced with the latest backups, add all the backed up stuff back(for every dds file add the whatever it was to the terrain). JUST ADD THEM. Don't bother rebrushing them. Then rebuild terrain. Now you will have your map back, but without the stuff found in the deleted xml. Then save it. Now you'll have an xml for it too. Then you need to go in and replace all the things on the map that have placement coordinates stored in the xml(mentioned above).

I may have forgotten something or not figured out what won't work with the process. But I'm pretty sure it will work exactly as I'm saying. Worth a try at least.

last edited by MudHappy

Wow thats good info to know, thanks Mudhappy. I may just start something new since it was very close to 100%

Thanks for the info MudHappy.

I did figure this out as I had all the files needed except the .xml and thought this process might work. Unfortunately, as you discovered, it does not help with objects which is a huge part of the map building process.

No big deal, my map was done anyway and I just figured if it was possible to fix I would give it a try but it's not a huge issue. Unless.... when they add map support to the workshop I need that .xml file LOL.