Data file tool (2014-09-07: v0.0.0.5: second save fix and STBL info)
2014-09-07: v0.0.0.5: (Hopefully) fixed the issue with tool crashing on second save of file. Thanks to Kodek for reporting this. Added support for a STBL file so that STBL IDs will display the text in the data info and the tree. (For now you'll need to copy/paste the path to the STBL file in the input field for it.) Note: I also changed the order in the export, so that it now has the data first and the meta info second. (ETA: sorry, I accidentally uploaded the .exe a second time instead of the source code)
2014-09-03: v0.0.0.4: Support for drag and dropping files into the tool, passing a file to the executable (e.g. setting it as default program for .data files). It will also automatically load the file now after either browsing, dropping, or starting with it (though not if you just start the .exe and it recovers the last filename).
2014-09-03: v0.0.0.3: overwriting files now works (previously if the files existed, it wouldn't do anything since I forgot an additional check for that) Thanks to JettSchae for reporting this.
2014-08-31: v0.0.0.2: Editing values, cloning/deleting structs and list elements, saving of edited files
2014-08-25: updated link to Dropbox
I'm working on a tool that handles DATA (0x545AC67A) files.
I've now updated the tool to allow editing and saving (see "How to use" section on how and limitations). I haven't done much testing with edited files, so there are likely bugs. I did test editing the seed names for the CAS demo and that worked. The saving was also quite thoroughly tested. All files when loaded and left unchanged should be saved to a binary same file (except S4_545AC67A_006CA304_D89CB9186B79ACB7, which also doesn't read correctly). I won't get the game until Thursday, so I have only tested with the files available in the demo.
The data structure is complex enough that I didn't even know where to start implementing it in the s4pe wrapper (I'm capable of copy/pasting stuff to add a field, but this went beyond that and beyond my capabilities), so this is written in C++ as a quick and dirty prototype. Source code is attached and GPL3. It's a Qt Creator project, because I'm familiar with Qt from work. Unfortunately it makes the libraries the program depends on rather huge. The download is over 6MB, so I uploaded it elsewhere:
If you've downloaded the previous version, you can simply download the much smaller updated .exe (Sims4Data000xupdate.7z) attached to this post and overwrite the old one (the dependencies are the same and don't need to be replaced).
Caveat: I started looking at the data based on the info that s4pe already implements. The data field types are just my guesses. I'll make corrections as necessary. This will be changed to something useful once I add more columns.
How to install
- Use 7zip to unpack the folder/file. If you have the large package with the .dlls, it's enough to download the updated executable attached to this post and overwrite the old version.
How to start
- Just click the exe
How to use
There are several options to open a file. In all cases the DATA resource must have been previously exported with s4pe.
- Click "Browse" to select a DATA resource that was previously exported with s4pe.
- Pass the file path as a parameter to the executable (this is what happens when you set the .exe as default program for the .data file type)
- Drag a file onto the window
- You can also simply paste the path to the file in the line edit (this option doesn't remember the path)
Once you have set the file path in one of the above ways, the tool will mostly automatically load the file. In case of pasting the path, or if the tool restored the path from the last session, you'll have to manually click "Show File Info". (The loading of the data info might take a moment for the largest ones.)
- "Clear" clears everything
- "Save" saves the currently displayed file
- "Export All" is a convenience function that takes all .data files in the folder of the current file, then exports the meta info and data info as text files into a subfolder "as_text" (the folder needs to exist; if the files already exist nothing happens).
- Right-clicking on list elements and structs directly in the table will allow you to clone/delete them (you can't delete the last struct in the main tables, though)
- Double-clicking on values allows you to edit them (mode name is the exception)
Credit: Thanks to Rick, ChaosMageX, Kuree, Peter and Inge Jones and everyone else who helped with s4pe and in particular the DATA wrapper, which I used as a starting point.