|
Post by rucifeld on Nov 3, 2024 19:20:00 GMT -5
I found a mod that has a very large string table because each key-value pair is duplicated dozens of times. While I can fix this in S4S, the process is really slow. The "Text" form of a StringTable is just a JSON payload, so I was hoping that using the "Export" button would allow me to export the JSON, which I could then quickly clean up with a Python script, and reimport.
However, it seems when I run export, it exports to a `.binary` type, and if I change that extension to `.json` it's... not JSON. Does anyone know what format S4S exports to?
|
|
|
Post by CatDevPete on Nov 3, 2024 19:56:17 GMT -5
I'm not proficient in this area, but from what I gathered, strings are actually saved as ".stbl" format (I don't know what it stands for, aside from likely involving "string table" and "binary". Maybe "language"?). If you go to the following link & download Deaderpool's DP STBL Editor, you can open the exported file once you change its type to .stbl so his application can read it. deaderpool-mccc.com/dpstbleditor.htmlFrom there, you can then export it out as an XML, which you can either modify or convert to json first, depending on how you want to set up your python script. Then import back in to convert back to stbl, so you can re-import it back into your package. Alternatively, you can also go to the following link to an online STBL editor, made by Frankk. stbl.sims4toolkit.com/What you can do with that is upload the .package directly, and it will read all the strings to the best of its ability. From there, it is possible to download the strings as a JSON (or even just view and/or edit JSON from it directly). I think they also offer the ability to export as either a standalone package, or as a "string table", which is essentially the .stbl format so you can import it into existing packages.
|
|
|
Post by rucifeld on Nov 3, 2024 20:29:37 GMT -5
Awesome thank you! Yes, I used Frankk's StringTable editor, which worked just fine so long as I created the project by uploading a package. If I created the package first and then imported strings it get stuck. But once uploaded, it has a very convenient JSON export/import function!
|
|