Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Deceased
Original Poster
#26 Old 3rd Jul 2015 at 11:34 AM
Quote: Originally posted by egureh
Got it, I just need to rename the files after extracting, that's pretty okay for me. Thanks again! :D

Version 1.1.0 now auto-detects what group number to use, assuming the input file is named using the EA default naming (starting with the 0x000000##! string). I coded all known (and as yet unnamed) game packs into an XML file that gets loaded in at run time, so this could be updated easily by anyone with the source in the future.

A couple of other miscellaneous changes were made, nothing really noteworthy.
Advertisement
Field Researcher
#27 Old 4th Jul 2015 at 11:57 AM
Quote: Originally posted by scumbumbo
Version 1.1.0 now auto-detects what group number to use, assuming the input file is named using the EA default naming (starting with the 0x000000##! string). I coded all known (and as yet unnamed) game packs into an XML file that gets loaded in at run time, so this could be updated easily by anyone with the source in the future.
A couple of other miscellaneous changes were made, nothing really noteworthy.

GREAT! Thank you! The dropdown list is really handy. :D
Lab Assistant
#28 Old 13th Jul 2015 at 11:22 PM
Does this still work? It says that the data at the root level is invalid, whatever that means.
Deceased
Original Poster
#29 Old 14th Jul 2015 at 6:37 AM Last edited by scumbumbo : 14th Jul 2015 at 7:37 AM.
Quote: Originally posted by KCrowns
Does this still work? It says that the data at the root level is invalid, whatever that means.

I used it with the latest combined tunings with no issues, but didn't extract all the packs. Which input file was this?

The cryptic error message is the result of minimal testing, likely it was an exception that wasn't caught, did it have any other information with the exception dialog?

ETA - That error can show up if you feed the program a binary extract of the combined tuning rather than one of the combined XML files available from EA.

ETA2 - The latest combined XMLs are here
Lab Assistant
#30 Old 14th Jul 2015 at 10:00 PM
Ah, Okay. I'm sorry.

I haven't used any tools or done any modding for a while, so I thought we were still pointing to the delta build.
Deceased
Original Poster
#31 Old 18th Jul 2015 at 10:55 AM
Version 2.0.0 will now convert a binary tuning file to combined XML.

This does take significant time to process all this for one of the larger files (base game or EPs). On my system, EP01 takes around 25 seconds, and the base game around 90 seconds. The smaller packs are very quick (FP01 takes 0.16 seconds, GP01 around 6 seconds).

Once the combined XML file is written, it can then be loaded in to do the complete extract of individual files.

I tested the results against the combined tunings provided by EA (for the packs I have at least) and all the final extracts were identical.

A list of the TGI-style filenames for each of the packs I know of follows:
  • BG - S4_62E94D38_00000000_F1352E740C4710BA
  • EP01 - S4_62E94D38_00000003_E23BB17404760CFA
  • GP01 - S4_62E94D38_00000002_F10287740C1C4EB0
  • FP01 - S4_62E94D38_00000005_E99F4C7408497F07
If anyone can provide me with the filenames for other packs, let me know and I'll update this list.
Screenshots
Pettifogging Legalist!
retired moderator
#32 Old 18th Jul 2015 at 3:17 PM
Cool, thank you =D

SGMS said that asm and/or jazz files (not sure which he meant exactly, he just said "state machine tuning" ) would also be shipped in binary form now -- can your tool decompile those too?

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Deceased
Original Poster
#33 Old 18th Jul 2015 at 5:54 PM
Quote: Originally posted by plasticbox
SGMS said that asm and/or jazz files (not sure which he meant exactly, he just said "state machine tuning" ) would also be shipped in binary form now -- can your tool decompile those too?

It should be able to process it and produce the combined tuning, but likely the second stage of extracting that to individual files would need some additional adjustments.
Deceased
Original Poster
#34 Old 18th Jul 2015 at 6:40 PM
By the way, I did update the source code download with the new binary tuning conversion for anyone interested in converting it for their own programs. There are some comments in the new class that hopefully should help explain how the conversion works, but if you have any questions let me know.
Lab Assistant
#35 Old 19th Jul 2015 at 12:30 AM
Nice work Scumbumbo
Deceased
Original Poster
#36 Old 19th Jul 2015 at 2:01 AM
Added a quick n' dirty tutorial for thiis in the tutorials forum.
Lab Assistant
#37 Old 19th Jul 2015 at 7:16 AM
big thank you
Quote: Originally posted by scumbumbo
Added a quick n' dirty tutorial for thiis in the tutorials forum.


A big thank you for that tutorial!
Now all pieces are falling together !

Lab Assistant
#38 Old 28th Jul 2015 at 6:05 AM
Default Ts4 binary extractor failed on EP01
Hi there,

Today i tried to extract the XML from EP01 (gtw) and got an unexpected error:
Quote:
************** Exception Text **************
System.Exception: Unable to locate schema index in mSchema
at TS4_Combined_XML_Extractor.clsSimDataFile.GetSchemaIndex(Int64 offset)
at TS4_Combined_XML_Extractor.clsBinaryTuning.GetRow(Int64 rowPos)
at TS4_Combined_XML_Extractor.clsBinaryTuning.WriteNodeAndChildren(Int64 offset)
at TS4_Combined_XML_Extractor.clsBinaryTuning..ctor(String filename, String dest_folder)
at TS4_Combined_XML_Extractor.frmMain.btnExtract_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



The binary has been extracted without error afaik S4_62E94D38_00000003_E23BB17404760CFA%%+UNKN (3.6Mb)

I tried with the BG binary and the extractor worked as expected.

Any help welcome...
Thanks
Pettifogging Legalist!
retired moderator
#39 Old 28th Jul 2015 at 12:57 PM
Merged this with existing thread.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Deceased
Original Poster
#40 Old 28th Jul 2015 at 3:57 PM
Quote: Originally posted by sachamagne
Today i tried to extract the XML from EP01 (gtw) and got an unexpected error:

The binary has been extracted without error afaik S4_62E94D38_00000003_E23BB17404760CFA%%+UNKN (3.6Mb)

That error would indicate an invalid binary tuning file. This is most likely because you are using an extract from the SimulationFullBuild for EP01? (I get precisely the same error trying to do that)

EP01 came out before the combined tunings were stored in simdata files, so the file from the full build is already in XML format. The program doesn't really look at the file to decide which type it is, it just makes an assumption based on the filename extension - if the extension is .bnry it assumes it's a binary simdata file and performs the step to convert it to a combined XML format - if the extension is anything else, it assumes it's already in combined XML format.

So if you really did want to look at that old tuning you could just rename the extracted file to have a .xml file extension. Or, if you wanted the most recent XML, extract that instance again using s4pe from the SimulationDeltaBuild instead of the full build.
Mad Poster
#41 Old 29th Jul 2015 at 4:47 AM
I just now got caught up to speed and grabbed the update. Thank-you very much Scumbumbo! Now I'm cooking with kerosene!

♥ }i{ Monarch of the Receptacle Refugees }i{ ♥
Test Subject
#42 Old 30th Jul 2015 at 3:31 PM
Thank you so very much for this and the tutorial! Everything works great
Pettifogging Legalist!
retired moderator
#43 Old 30th Jul 2015 at 4:26 PM
It would be good if the link to the tutorial were added to the fist post, I think =) otherwise, people who just download this without browsing the rest of the forums will not see that.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Deceased
Original Poster
#44 Old 31st Jul 2015 at 4:08 AM
Quote: Originally posted by plasticbox
It would be good if the link to the tutorial were added to the fist post, I think =)

Good idea, I hadn't thought of that. Link added
Deceased
Original Poster
#45 Old 19th Aug 2015 at 1:15 AM
OK, this program is very nearly completed. Still no string support yet, but it's well on the way to being able to support that.

The full-auto mode should really speed up getting all the XML out from the game after a game patch. Reasonably fast too, takes a bit less than 3 minutes on my PC with all the delta files.

To get the XML from a game pack that doesn't have a delta, you would have to manually open the simulation full build package the old fashioned way, although S4PE is no longer required for that, you can open the package directly in the program and it will dump a binary tuning file to the output folder.

Let me know if there's any issues, although I still maintain that this program is completely unsupported
Pettifogging Legalist!
retired moderator
#46 Old 19th Aug 2015 at 2:37 AM
So, thanks for er .. not supporting this unsupported tool I suppose? (How do you mean "string support" -- plunking in the comments? (yay?!))

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Deceased
Original Poster
#47 Old 19th Aug 2015 at 6:37 AM
Quote: Originally posted by plasticbox
So, thanks for er .. not supporting this unsupported tool I suppose? :D

No problem - to tell the truth I'm burned out on modding. Well, that's not entirely true. I'm burned out on replying to posts of "Hey, your mod doesn't work," with no details, leaving you clueless on how to support them other than the obvious rehash of how to install it properly. It was either work on something else for a while or start replying, "Sucks to be you then" and "Yes, I specifically wrote it to be incompatilble with your computer." Which is a road I don't want to head down as there are sometimes legitimate problems. Bugs are never my fault, but they do happen.
Quote:
(How do you mean "string support" -- plunking in the comments? (yay?!))

Yes, I plan to start with just inserting the string table values and move on from there to XML references, object references, etc. It will slow down the extract process considerably, so I will probably have options for exactly which references to include. String tables will be easy as I can get at those prior to actually decoding the XML, but the rest will pretty much have to be done in a second pass.
Pettifogging Legalist!
retired moderator
#48 Old 19th Aug 2015 at 6:54 AM
Ah, I misunderstood what you meant by "support" then -- I thought I had read something along the lines of "I'm just dumping this here in case it is useful, am not going to put a lot more work in it", so I was happy to see the update =)

Sounds like a plan re. the references! For now I usually just leave an Explorer search window open to be able to see what is what exactly when I need it, but it would certainly be cool if the names and all that were included.

Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Deceased
Original Poster
#49 Old 20th Aug 2015 at 5:30 AM
OK, the string table stuff was pretty easy to add, so since @plasticbox wanted it, I finished that up tonight. Wouldn't have taken so long but I had to write a routine to decompress DBPF internal compression. Even that wouldn't have taken so long, but the docs I was reading had an error that I only figured out thanks to reading velocitygrass's old sources which thankfully had comments marking a "+1" for some lengths out. Once I removed all those +1's, it turned from crashes and gibberish to readable strings.

As I said, adding other references will be a lot more work as that will have to be done as a second pass, but this is a good start.

I sometimes find myself wanting to search the game's string tables, so while I had all those juicy strings nice and well-sorted in RAM I figured why not make the program dump a tab-delimited text file of hashes and strings into the output folder?

Finally, I have NO IDEA if this will work with anything other than the ENG_US string tables. If anyone tries it and it crashes.... well, the sources are downloadable - have at it!
Pettifogging Legalist!
retired moderator
#50 Old 20th Aug 2015 at 5:51 AM
It informs me it took 201,7625402 seconds now to do its thing =).

Also, those string lists become a little weird when they're sorted by ID ..

0x00821E71 How I Dumped Your Father
0x008236D6 Evicted households can be found in household management.


Stuff for TS2 · TS3 · TS4 | Please do not PM me with technical questions – we have Create forums for that.

In the kingdom of the blind, do as the Romans do.
Locked thread | Locked by: plasticbox Reason: See Downloads > Tools!
Page 2 of 4
Back to top