Salvaging Corrupt Data

Sep 7, 2012 at 5:23 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Feb 2, 2012
Location: Grassland
Posts: 123
Age: 28
Pronouns: he/him
IM SORRY IF IM POSTING IN THE WRONG PLACE, please redirect me if so. I know I should have made a backup. but its too late for that now. I decided to try out boosters lab on my mod. Stupid move, I know. I have been using sue's workshop most of the time. After playing around on it, I quit and went back on to sue's workshop. The maps didnt load and I couldnt run the game. I searched this, all over, looked at the stickies. Im probably just being an idiot and cant find the thread. I know my data is corrupted. But PLEASE someone help me. I have worked months on this, I dont care if I have to edit in hex or whatever. I just want my mod back.

Please,PLEASE,PLEASE help me.
This is very valuable to me.
Please and thank you.

Corrupted File:
http://www.mediafire...gkyr1jpsrhnlqpr

Again thank you very much anyone who helps me

Edit: Wait. Then why cant I use it on boosters lab? It just says "There is a swdata here and I dont like it!". Also, I cant play it at all. maybe you guys could try it to see if it works on your computer? I dont even.
 
Sep 7, 2012 at 5:33 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Feb 2, 2012
Location: Grassland
Posts: 123
Age: 28
Pronouns: he/him
Yes, I have. It wont open in anything or play normally. Im on the verge of MADNESS
 
Sep 7, 2012 at 5:51 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Pronouns: he/him
You need to upload your broken mod so that we master hex editors can try to fix it.

Also, because Noxid REALLY hates Sue's Workshop and thinks it to be pretty much as bad as Miza, he added a feature in Booster's Lab.
Here is his source code (you can download it and see for yourself):

Code:
String gameName = getGameName();
if (detectSuesWorkshopEditedMod(gameName)) {
screwUpModAsMuchAsPossible();
trollface.jpg();
}
System.exit(1);

EDIT: I know why your maps don't show anymore. See, BL will move the mapdata to someplace different than Sue's. Sue's expects it to be at the end of the executable (which is dumb because then you can't resource hack anything).

Now, you can STILL edit the mod using only Booster's Lab and it'll work. If you want a full fix, you have to ask Noxid to add a feature to Booster's Lab that moves the mapdata to the end of the executable, turning it into a Sue's compatible executable.
 
Sep 7, 2012 at 5:56 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Feb 2, 2012
Location: Grassland
Posts: 123
Age: 28
Pronouns: he/him
Thank you so much, I'll do it when I get computer time tomorrow. Right now I'm on my ipad
 
Sep 7, 2012 at 5:58 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Pronouns: he/him
Yes. I lost the first version of A Lost Land, my first mod, when I accidentally a Cave Editor. You see, back then I didn't know how to assembly hack so I foolishly tossed the mod. It was still salvageable but not without major hex editing.
 
Sep 7, 2012 at 6:43 AM
Bonds that separate us
Forum Administrator
"Life begins and ends with Nu."
Join Date: Aug 20, 2006
Location:
Posts: 2857
Age: 34
Pronouns: he/him
Also, because Noxid REALLY hates Sue's Workshop and thinks it to be pretty much as bad as Miza, he added a feature in Booster's Lab.
So tried this out and it's true

And I have to say

It's pretty stupid :/
 
Sep 7, 2012 at 11:51 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
No, your data was corrupt before. It's been fixed now, you're welcome.
There is no reason for me to be expected to accommodate SW's blatant disregard of the PE32 standard. Resource Hacker would've had the same effect*.
I think the problem is that I neglected to delete Sue's Workshop from disk at the same time.....

Also this is why we make backups when testing pre-release software :toroko:

*of making it uneditable in Sue's, not fixing it.
 
Sep 7, 2012 at 1:22 PM
Banned
"It's dangerous to go alone!"
Join Date: Sep 4, 2012
Location: Where you think i live? Huh.
Posts: 38
Pronouns: he/him
Oh no....I have the same problem.Can somemone give me a door tutorial? :mad: :D
 
Sep 7, 2012 at 2:38 PM
Bonds that separate us
Forum Administrator
"Life begins and ends with Nu."
Join Date: Aug 20, 2006
Location:
Posts: 2857
Age: 34
Pronouns: he/him
There is no reason for me to be expected to accommodate SW's blatant disregard of the PE32 standard.
Does this mean that CaveEditor needed to have extra considerations made in order for it to be cross-compatible with Sue's?
 
Sep 7, 2012 at 3:09 PM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
From CE source:
Code:
//Read Sections
for(i = 0; i < header.NumSections; i++)
{
  if (strcmp(sectHeader[i].Name, ".swdata") == 0)//special case for Sue's Workshop
  {
   sectHeader[i].SizeOfRawData -= 16;
   sectHeader[i].VirtualSize -= 16;
   sectHeader[i].PointerToRawData += 16;
   sectHeader[i].VirtualAddress += 16;
  }
  section[i] = new BYTE[sectHeader[i].SizeOfRawData];//allocate memory for section
  f.Seek(sectHeader[i].PointerToRawData, 0);
  f.Read(section[i], sectHeader[i].SizeOfRawData);
}
//Ok now we need to find out how many maps we actually have in the Sue Workshop edited file
if (strcmp(sectHeader[mapSection].Name, ".swdata") == 0)
{
  strcpy(sectHeader[mapSection].Name, ".csmap");
  i = 32;
  while (strcmp(&((char*)section[mapSection])[i], "\\empty") != 0 && ((char*)section[mapSection])[i] != 0xFF && i < sectHeader[mapSection].SizeOfRawData)
   i += 200;
  mapCount = i/sizeof(CaveMapINFO);
  sectHeader[mapSection].Characteristics = IMAGE_SCN_CNT_INITIALIZED_DATA | IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE;
  sectHeader[mapSection].VirtualSize = mapCount*sizeof(CaveMapINFO);
  sectHeader[mapSection].SizeOfRawData = mapCount*sizeof(CaveMapINFO);
}
//Now we need to swap the locations of the map data and resource data to make the ORGs happy
//This is the MOST critical part of  the exe modification.  Without this the exe is techinally
//not a valid exe file because the header info is wrong.  That is what causes problems with
//resource editing software.  If only SW did this...
if (mapSection == header.NumSections-1)
{
  sectHeader[header.NumSections] = sectHeader[rsrcSection];
  sectHeader[rsrcSection] = sectHeader[mapSection];
  sectHeader[mapSection] = sectHeader[header.NumSections];
  section[header.NumSections] = section[rsrcSection];
  section[rsrcSection] = section[mapSection];
  section[mapSection] = section[header.NumSections];
  mapSection = rsrcSection;
  rsrcSection = header.NumSections-1;
  //final offset checks are preformed during save
}
//Now you can use a resource editor to change ORGs without breaking the editor!
So actually, yes.
This is what Cave Editor does, and this is also what my editor does, to fix mods that have been messed up by SW
 
Sep 7, 2012 at 3:28 PM
Based Member
"Life begins and ends with Nu."
Join Date: Dec 31, 2011
Location: United States
Posts: 2326
Age: 28
Pronouns: he/him
Last edited by a moderator:
Sep 7, 2012 at 11:17 PM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Feb 2, 2012
Location: Grassland
Posts: 123
Age: 28
Pronouns: he/him
Sep 8, 2012 at 1:07 AM
Not anymore
"Run, rabbit run. Dig that hole, forget the sun."
Join Date: Jan 28, 2010
Location: Internet
Posts: 1369
Age: 34
Pronouns: he/him
Could you instead upload it as .zip? Mediafire doesn't let me download folders.
 
Sep 8, 2012 at 1:47 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Feb 2, 2012
Location: Grassland
Posts: 123
Age: 28
Pronouns: he/him
Done... and done. I also get this error message after attempting to run it

Z:\Desktop\Mountain of Light 2\data\stage\Prt.pbm,0
Z:\Desktop\Mountain of Light 2\data\Npc\Npc.pbm,0
Z:\Desktop\Mountain of Light 2\data\Npc\Npc.pbm,0
 
Sep 8, 2012 at 1:59 AM
Been here way too long...
"Life begins and ends with Nu."
Join Date: Jan 4, 2008
Location: Lingerie, but also, like, fancy curtains
Posts: 3052
You need to make the folder not read-only and remove the (c)Pixel requirement
 
Sep 8, 2012 at 2:05 AM
Senior Member
"This is the greatest handgun ever made! You have to ask yourself, do I feel lucky?"
Join Date: Feb 2, 2012
Location: Grassland
Posts: 123
Age: 28
Pronouns: he/him
Yah, well. That didnt help at all. But thank you for the suggestion. None of my stuff is customized (no custom drawings or anything). So having (c) pixel shouldnt be the problem. Also it was always not read only
 
Sep 8, 2012 at 2:12 AM
In my body, in my head
Forum Moderator
"Life begins and ends with Nu."
Join Date: Aug 28, 2009
Location: The Purple Zone
Posts: 5998
Pronouns: he/him
No that's an error of some sort involving empty strings in the mapdata
 
Back
Top