Extracting STO's Game Data
Tutorial last updated June 22, 2015.
So, you want to see the inner bits of STO's client game data, eh?
Well, first off, you will need the Cryptic mod tools: Index of /builds/cryptic
Choose the latest version (i.e. highest r-number) and the full toolset, not just the unpacker, and extract to the folder where you will be working with them.
These mod tools are primarily run via the command prompt -- i.e. opening a command window and typing in commands -- but you can also drag & drop files into them.
Please note that I did not create these mod tools. The extremely talented Rick a.k.a. Gibbed made them, so he and others could make cool mods; his website is: Rick’s Game Stuff
To use the mod tools, you will need an up-to-date version of the .NET framework. Even though you may already have a sufficient version installed, you may want to run Microsoft's updater to be extra certain: Download: Microsoft .NET Framework 4 (Web Installer) - Microsoft Download Center
You can use the Unpacker to extract the Star Trek Online game data from *.hogg files, which can be found in:
..\Cryptic Studios\Star Trek Online\Live\piggs
(The ".." is the path to your installation directory, of course.)
Most of the time you can just drag & drop a .hogg file onto the unpacker and it will unpack, but if that doesn't work for some reason, then presuming the .hogg file you want to unpack is in the same folder as the Unpacker .exe, open a command prompt (Windows Vista/7: shift + right click within a folder then open command prompt) and execute the command:
Or whatever other .hogg file you want to unpack. (You can also add a specific folder to unpack too after the .hogg name if you like.)
The "texture*.hogg" files contain texture data, "sounds.hogg" contains sound data, the "data.hogg" file contains animations and some other stuff, and the massive "bins.hogg" file contains 3D models, binary control files, and lots of other stuff too -- it's become Cryptic's catch-all client data repository. Unpacking bins.hogg will take up quite a bit of hard drive space, so be prepared.
After you've extracted some data, chances are you'll need to convert the extracted stuff into something more usable. Unfortunately, I haven't yet figured out how to convert the 3D models or animations into a usable format, but you can convert textures, sounds, and even the *.bin control files into editable files.
Textures (.wtex files)
Texture files are extracted to:
It used to be that you could convert any of STO's textures into editable .dds files (and back to .wtex again) using the Wtex2DDS.exe posted in another thread -- instructions on how to use it are also posted there: Textures needed for STO
However, some time ago Cryptic added a new format to their wtexes, so now only some of the files (mainly icons and normal maps) will work with Wtex2DDS, for the other files you will need to use the Noesis software, available here: Rich Whitehouse
Extract Noesis to your working folder and open its [plugins\python] folder. Download the "fmt_cryptic_wtex.txt" file attached at the bottom of this post and place it in this folder. Then, rename it to "fmt_cryptic_wtex.py" (the forum here doesn't let you attach .py files).
Now when you start up the Noesis executable, it should recognize .wtex files and open them. You can then export them out so you can mess around with them.
Note that some textures may have heavy transparency, so in order to better see them you may need to follow the steps posted here: Textures needed for STO
Unfortunately, there is no easy way to get textures extracted by Noesis back into .wtex format. A subsequent update to this tutorial will cover how to do this.
Sound Data (.fsb files)
Sound files are extracted to:
You'll need some software to play/extract the .fsb files. I personally use the Aezay FSB extractor: FSB Extractor 14.03.10
Although I've not tried, you should be able to repack .fsb files with this: Luigi Auriemma
3D Models (.mset files)
3D models are extracted to:
I've not found any way to view or edit these files. All I've been able to do is remove models (i.e. "zero" them out) or swap one model for another. Model-swapping is beyond the scope of this tutorial.
Binary Control Files (.bin files)
.bin files are extracted to:
In order to view/edit .bins, you have to go in your mod tools directory then open the [bin\serializers\resources] folder and edit each .json file within that corresponds to the .bin you'd like to decompile. I've already done this for you, so if you like, you can replace the default ones with my pre-edited versions that are attached to this post in the "Toolset Update.zip" file. They should work for all the *.bins I edit and use as of the updating of this tutorial (I haven't figured them all out yet). Simply extract the .zip file in your mod tools folder and merge/overwrite the existing files and folders - note that if you're not asked to overwrite files, something has gone wrong and you'll need to check again and extract into the correct location.
Additionally, you will need an up-to-date serialization .dll file. You can generate one of these yourself using the ExportSchemas then GenerateSerializier executables, but I've also already done this for you, and a .dll is include in the "Toolset Update.zip" file attached to this post; if you've already extracted it in the previous step you should be good to go.
Once that's ready, you can decompile *.bin files (presuming they're in the same folder as the tools' bin folder) by either dragging & dropping them onto the ConvertResource tool, or executing (using a random .bin as an example):
Or whatever other bin file you want to decompile, although as I mentioned not all will work. That'll convert stuff to XML for easy editing -- recompile when done by dragging the folder onto the ConvertResource tool or with:
Gibbed.Cryptic.ConvertResource -x scaleinfos.bin
Gibbed.Cryptic.ConvertResource -b scaleinfos
As a cursory example of what these .bin files do, to add breast jiggle, I had to first edit Dynbouncer.bin to define a bounce object and then edit the "StarTrekFemale.xml" of Skelinfos to point to that bounce object using the <BouncerInfo> tag.
Detailed instructions for editing the decompiled .xml files are beyond the scope of this tutorial, but instructions for modifying Dynbouncer.bin and Scaleinfos.bin can be found in my mod package.
Getting the client to load modified files
Once you've modded a file (and put it back into its native format) and want to STO to load it, most of the time all you need to do is put it into the appropriate folder under your localdata folder:
(If you've used my installer, this folder should already have some relevant files and folders in it.)
..\Cryptic Studios\Star Trek Online\Live\Localdata\[bin/sound/texture_library/etc.]
For some .bin files, you may need to rename them in order to get them to load. For example, costumegeometry.bin must be renamed to costumegeometryclient.bin for it to load, and playercostume.bin must be renamed playercostumeclient.bin. Figuring out if a file needs this is a trial-and-error process. (Check out my mods if you like, I've done a lot of experimenting with .bin files.)
Once you've got things in the right folders, load up the game client and see if the changes are loaded. If not, try again and post a question if necessary.
Anyway, I hope that makes sense to y'all. If you need more help, feel free to post your question in the thread so others can benefit from the answer. You can also PM me if you'd rather have a private conversation.
Again, please note that I did not create these mod tools. The extremely talented Rick a.k.a. Gibbed did, his website is: Rick’s Game Stuff