so hammer just completely eradicated my map

FloofCollie

I really suck!
aa
Nov 5, 2016
600
670
I was in the process of fiddling around with my map when my computer screen froze up completely, with not even the mouse moving. This has happened a few times usually with Hammer open, and the only way I found out of it was holding the power button on my PC.
This time, when I booted it back up again and loaded my map from the "Hammer did not close correctly" dialogue, the file had been replaced with... nothing. There was nothing at all. It was a blank canvas, as though I'd selected new map.

No visgroups at all anymore, nothing.
I'd been working on this map for a while now, and I have a compiled version of it (without lighting and visibility because I was putting it through the interlopers.net compile log checker), and I save my maps constantly, every few minutes or so. But now the .vmf file is completely empty.
It's still somehow 1,009kb large though, which is peculiar.
It's also worth mentioning that I was having this problem before this happened.

Does anyone know of any way to retrieve an earlier version of it, through the temp folder or something similar? My autosave folder is completely empty (I have it set to save every minute, I believe).
 
May 25, 2015
390
307
Hammer appears to have a problem where if it saves at the same time as the computer is turned off or bluescreens, it will completely replace the vmf with null and is irrecoverable from that file. If you don't have autosaves enabled you could try to decompile a compiled version of the map if you have that.
 

Twist.vmf

L420: High Member
Jul 29, 2016
439
208
DO NOT DO THIS UNLESS A PRO CAN BACK ME UP! could it be possible to set the file to a previous version?
 

henke37

aa
Sep 23, 2011
2,075
515
Sure, it's a simple command. What source control system are you using?
 

FloofCollie

I really suck!
aa
Nov 5, 2016
600
670
@Crash
SArrqTn.png


@Dr. Orange
Well, damn. Thanks, I guess I'll try that. Since I didn't compile the map last time with any lighting, does this mean it won't have any light entities? Or are they still preserved in BSP-only compiles?

I want to say again, isn't it a little weird that the filesize is relatively large for an empty .vmf? Could there still be something stored in it?
 

Empyre

L6: Sharp Member
Feb 8, 2011
309
187
It won't help you recover this map, but in future, make manual back-up copies. In Windows, right-click and drag the file to the same folder and select Copy Here. This will automatically generate files with version numbers. I haven't used Linux, but there must be something similar to do there. To be even more secure, drag it to another drive. Do it before you start editing for the day, when you just made an important change you don't want to lose, and when you are about to make a big change that you are not sure about.
 

ics

http://ics-base.net
aa
Jun 17, 2010
841
543
I've had this happen years ago and i also have one extra tip for you regarding this. If you hammer ever crashes, and it asks if you want to recover the file from latest save, always answer no. Just decline and manually open the file yourself. I've had this issue where it recovers a black empty screen and writes over the existing map upon that moment with that data.

What empyre said is also a good idea. I basically save to a new file periodically to avoid a corrupted map file and it's a good practive too if you want to go back to check something from previous file.
 

FloofCollie

I really suck!
aa
Nov 5, 2016
600
670
Thanks everyone!! Hopefully I can salvage the map from limbo, heh

I wasn't aware there were issues with the recover file dialogue, but I'll definitely remember that in future.
I swear, every week I learn Hammer's even less stable than I thought.
 

henke37

aa
Sep 23, 2011
2,075
515
It won't help you recover this map, but in future, make manual back-up copies. In Windows, right-click and drag the file to the same folder and select Copy Here. This will automatically generate files with version numbers. I haven't used Linux, but there must be something similar to do there. To be even more secure, drag it to another drive. Do it before you start editing for the day, when you just made an important change you don't want to lose, and when you are about to make a big change that you are not sure about.
Or just do the sensible thing and use a source control system. That properly stores separate versions for you.