Jump to content

TestSkyLoad Programming in C++


Sharlikran

Recommended Posts

I would like to ask for a volunteer that is good with C++, if they are willing to do this.  A while back I tried to compile some of Dave Humphry's code for dumping Skyrim's plugins.  The output looks like this page.  I got permission to update it a long time ago and he said he would help get it working if needed but I never wanted to ask him.  The problem with the code is that all the C++ files have hard coded locations.  So if I don't put the code in, E:\Somewhere\Somewhere\whatever, then it can't find everything and it won't completely compile.

 

The reason I don't want to use what is on that page is it's outdated.  I would like to run it on all the DLC and on the unofficial patches and compare them.  Records and their sizes have changed since the initial release.

 

I would like to use it for two reasons. 1) It will dump out the length of the subrecords.  The CK only changes certain parts of the subrecords sometimes.  TES5Edit can handle it easier then Wrye Bash.  I could use it to ensure that 100% of the time a certain subrecord has a certain length and then I could better decode it for records that will require mitigation.  2) It also shows how many times the subrecord occurs in any given record and in the past a similar program was used to determine when a record is required or not.  

 

That information has been used in the past for Wrye Bash to determine when to use MelStruct or MelOptStruct when it's an optional record.  If I define something as required, then superfluous information gets written into the bash patch.  I don't want to over exaggerate it I'm sure it's not game breaking but Lojack mentioned to me once that it is important to some degree to define that correctly.

 

I have it hosted on my SVN for TES5Edit, and I resolved most of the header (*.h) files so it will almost compile.  However, I can't figure out the rest or whether or not I simply need to change the .vcxproj file to include certain paths. 

 

If you would like to take a poke at it the files are in this folder ("[sVN]\TES5Load\trunk" on my Goole SVN.

Link to comment
Share on other sites

Utumno from the Beth thread helped me so it compiles now.

 

His Responce, My response.

I think this block handles the files. I am going to ignore the comments since that code isn't implemented yet, and I'm pretty sure I don't need it for what I am doing.

{
	SystemLog.Open("testload.log");
	

	//Strings1.Load("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\Strings\\Skyrim_english.DLSTRINGS");
	//Strings2.Load("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\Strings\\Skyrim_english.ILSTRINGS");
	//Strings3.Load("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\Strings\\Skyrim_english.STRINGS");

	//Strings1.Dump();
	//Strings2.Dump();
	//Strings3.Dump();

	printf("Loading file...\n");
	TestFile1.Load("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\Skyrim.esm");
	//TestFile.GetEspFile().Save("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\Skyrim-2.esm");
	GatherTopLevelInfos(TestFile1);
	DumpRecordInfos();
	//DumpRecordInfos1();

	//CreateRawClasses("C:\\temp\\classes\\");

	//BsaFile.Load("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\skyrim - animations.bsa");
	//BsaFile.Save("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\skyrim - animations1.bsa");
	
	return 0;
}


It looks like these do the work and the rest are comments

	TestFile1.Load("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\Skyrim.esm");
	GatherTopLevelInfos(TestFile1);
	DumpRecordInfos();
	TestFile2.Load("C:\\Games\\Steam\\SteamApps\\common\\Skyrim\\Data\\Update.esm");
	GatherTopLevelInfos(TestFile2);
	DumpRecordInfos();

How can I change it to do that? TestFile2 might not be defined, and DumpRecordInfos(); might be the same file name so it would just write over the previous dump file' Lastly how do I clear the memory each time to initialize or start over.

Link to comment
Share on other sites

=========================== OPENED LOG testload.log ===========================
09:51:38 (12) - Current Date: Sunday, 26 of January, 2014
09:51:38 (22) - Loading strings file 'C:\Games\Steam\SteamApps\common\Skyrim\Data\Strings\Update_English.STRINGS'...
09:51:38 (34) - Loaded strings file 0.0120663 seconds
09:51:38 (35) - Loading strings file 'C:\Games\Steam\SteamApps\common\Skyrim\Data\Strings\Update_English.DLSTRINGS'...
09:51:38 (40) - Loaded strings file 0.00531686 seconds
09:51:38 (40) - Loading strings file 'C:\Games\Steam\SteamApps\common\Skyrim\Data\Strings\Update_English.ILSTRINGS'...
09:51:38 (45) - Loaded strings file 0.00483399 seconds
09:51:39 (46) - *** User Defined Error (1) ***
09:51:39 (46) -                Code = 2 (0)
09:51:39 (46) -               Level = Error (8)
09:51:39 (46) -        User Message = 0x00000BF5: Bad subrecord size for DATA! Expected 128 but found 164 bytes!
09:51:39 (46) -         Description = Invalid input received!
09:51:39 (46) - End read position for file 'C:\Games\Steam\SteamApps\common\Skyrim\Data\Update.esm' is 0x00001000.
09:51:39 (46) -  Loaded file in 0.033657 seconds

I don't think it's going to work that easy. I can't just tell it to use another file without updated things.

I would probably have to update all 120 records more than likely like I am doing for Wrye Bash. Not sure I wana do that. I could try to update it since Utumno worked on it just not sure yet. Unless Wrinkly's EsEdit has that already. hmmmm....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...