Frictional Games Forum (read-only)
Map File Corrupted - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html)
+--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html)
+---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-80.html)
+---- Thread: Map File Corrupted (/thread-31247.html)



Map File Corrupted - A.M Team - 10-09-2015

My map file wouldn't open, it would say "Error loading file, resetting (Check log for details)". This is really important for me as I spent a month on this map.

Fixing...


RE: Map File Corrupted - Romulator - 10-09-2015

Editting this post with a long answer so that everyone else can learn about how to do this. One moment

Alright! Errors like this can come up, but be aware, it is NOT the end of the world! There are solutions to these kinds of problems, and if an error along the lines of "Error reading map file (Check Log for details)" is on your Level Editor, then it is a hint as to what to do! Logs contain an amass of vital information to assist with correcting problems which come up, in all of the HPL3 tools and SOMA.

Following the instructions, once you have established there is an error, just close the Level Editor and navigate to the LevelEditor.log file. It should be located here:

Code:
Documents\HPL3
OR
C:\Users\<user_name>\Documents\HPL3

Upon looking at the level editor log file and scrolling down to when it is loading the map (noted by the "Loading scene:" line) it gave me a few errors. The one that causes the Level Editor to not function correctly is more often than not, the last line before "Error Loading Scene". Let's have a look at this Log file as an example:

Code:
---------------------------------------------------------------------------------------------------------------------------------------------------------
-- Loading scene: C:/Program Files (x86)/Steam/steamapps/common/SOMA/mods/troubleshooting/HPL3 Map/00_reception_start/00_reception_start.hpm
---------------------------------------------------------------------------------------------------------------------------------------------------------

Resetting editor...
Failed parsing of XML document C:/Users/Romulator/Documents/HPL3/Sessions/1998F7E08B747B0759B2D030905E4D367AEF24A5.hpm_session: file not found
ERROR: Could not open file C:/Program Files (x86)/Steam/steamapps/common/SOMA/mods/troubleshooting/HPL3 Map/00_reception_start/00_reception_start.hpm_Terrain_heightmap.png for reading!
ERROR: Could not open file C:/Program Files (x86)/Steam/steamapps/common/SOMA/mods/troubleshooting/HPL3 Map/00_reception_start/00_reception_start.hpm_Terrain_diffusecolorblend.png for reading!
Loading FileIndex: TerrainDecals ...not found
Loading FileIndex: UndergrowthMaterials ...not found
Creating DetailMesh: detail_meshes/robot/infections/wau_infections_wall01_wauonly.dae
Cache out of date! Reloading collada file 'C:/Program Files (x86)/Steam/steamapps/common/SOMA/detail_meshes/robot/infections/wau_infections_wall01_wauonly.dae'
WARNING: No 'extra scene' element found!
ERROR: Mesh C:/Program Files (x86)/Steam/steamapps/common/SOMA/detail_meshes/robot/infections/wau_infections_wall01_wauonly.dae has as many indices as vertices and does not seem to be correctly UV-mapped!
Optimized Mesh C:/Program Files (x86)/Steam/steamapps/common/SOMA/detail_meshes/robot/infections/wau_infections_wall01_wauonly.dae and removed 97 kb vertex data
Loading FileIndex: StaticObjects ...found
Cache out of date! Reloading collada file 'C:/Program Files (x86)/Steam/steamapps/common/SOMA/static_objects/robot/infections/wau_infections_debris_wall01_wauonly.dae'
WARNING: No 'extra scene' element found!
ERROR: Mesh C:/Program Files (x86)/Steam/steamapps/common/SOMA/static_objects/robot/infections/wau_infections_debris_wall01_wauonly.dae has as many indices as vertices and does not seem to be correctly UV-mapped!
Optimized Mesh C:/Program Files (x86)/Steam/steamapps/common/SOMA/static_objects/robot/infections/wau_infections_debris_wall01_wauonly.dae and removed 97 kb vertex data
Cache out of date! Reloading collada file 'C:/Program Files (x86)/Steam/steamapps/common/SOMA/static_objects/robot/detail/wall_detail_organic01_tentacles.dae'
WARNING: No 'extra scene' element found!
Failed parsing of XML document C:/Program Files (x86)/Steam/steamapps/common/SOMA/mods/troubleshooting/HPL3 Map/00_reception_start/00_reception_start.hpm_Entity: Error reading Attributes. in line 2320, column 66
---------------------------------------------------------------------------------------------------------------------------------------------------------
-- Error loading scene
---------------------------------------------------------------------------------------------------------------------------------------------------------

As we can see, the last few lines mention that it failed to parse the 00_reception_start.hpm_Entity file, which means that our error is located in there. Further reading of the line, it explicitly states that the error is located in line 2320, column 66.

So now we open up the 00_reception_start.hpm_Entity file with a text editor (preferably one with a line counter. I used NotePad++ here). At line 2320, we have this:

[Image: 4818f9865d.png]

Can you see the error? In this line, there are three quotation marks, therefore, it messes up all the text below it, converting it to strings. You can see it somewhat if we look at it with NotePad++ set to XML mode (since map files, and their respective contents, excluding the .hps file, are in XML format).

[Image: 5fff0bca4f.png]

Fix up the error as you see fit. The best way in this case is to simply remove one quotation mark. Save it, then reopen the Level Editor. Run again and see if we have any more problems, and in DoctorPoo's case, there were not any further problems.


RE: Map File Corrupted - A.M Team - 10-09-2015

Thank you very much! You should put this information on the wiki, it's really important! Heart


RE: Map File Corrupted - Mudbill - 10-09-2015

He already did Wink


RE: Map File Corrupted - Romulator - 10-09-2015

Surprisingly, I actually did not add this particular post to that page, but it did inspire me to create it xD I have since added it under the Level Editor Troubleshooting and have used a few images to explain why it happens.