Page 9 of 20

Re: Star Stable Online - CSA & TGA files

Posted: Wed Jan 19, 2022 5:14 pm
by Rleqn
locknut wrote: Tue Jan 04, 2022 6:09 pm The only data that is actually encrypted (well obfuscated at least) are text strings. It's a simple Caesar cipher which you reverse by adding each byte of the data with (lenOfData%16)+1.

3D Object Converter does a pretty good job with reading the mesh files, but unfortunately it doesn't work well with the textures, materials, bones and animations etc... If it was open source I would have fixed it, but it's not and I cant be bothered to write a new converter from scratch just for this.

Hi! Thank you, you're a savior.

I've been looking for bones and animations as well 'cause as you said the 3D object converter doesn't import those at all. Since you've said that no data (except for the text strings) is encrypted I've wondered if you know any way to open the bone and animation files ( .pan I believe) and could shine some light on it too?

Re: Star Stable Online - CSA & TGA files

Posted: Wed Jan 19, 2022 7:18 pm
by locknut
Rleqn wrote: Wed Jan 19, 2022 5:14 pm Hi! Thank you, you're a savior.

I've been looking for bones and animations as well 'cause as you said the 3D object converter doesn't import those at all. Since you've said that no data (except for the text strings) is encrypted I've wondered if you know any way to open the bone and animation files ( .pan I believe) and could shine some light on it too?
I have not looked at the pan-files yet, only the meshes (pme), materials (pmt) and textures (pte). Those are converting nicely now.

The bones appears to be in the skinmesh files (psm), and the PAN I guess are the animations. Exporting them to text files would be relatively easy, the real challenge will be to sort out which float are coordinates, rotations, timestamps etc etc, and then converting it back something that can be read by other tools. I don't know if there is an suitable open format to convert to?

Re: Star Stable Online - CSA & TGA files

Posted: Thu Jan 20, 2022 3:17 pm
by Kanetsu
Samyy360 wrote: Fri Jan 07, 2022 8:24 pm okok, this reimport mode isnt working, is not packing anything
Did anybody figure out how to fix this? I have the same issue, even if it says that the file was reimported, it stays a .crn file. I tried every script I have and the effect was the same every time.

Re: Star Stable Online - CSA & TGA files

Posted: Thu Jan 20, 2022 3:20 pm
by Kanetsu
Pollaris wrote: Sun Jan 09, 2022 9:33 pm We actually know how to convert .dds files but there is still a problem about converting them into games files. C.C Creations once did a software for SSO to change textures. It named "Pimp my horse" or something like that. It doesn't work for me anymore. Maybe someone would like to fix this software?
I contacted CC yesterday and she said that she was planning on updating the program, but right now she doesn't have much time or motivation. I guess we could still ask her for some tips though.
Maybe we could find some clues in the files of that Pimp My Horse program? The setup can still be downloaded here: https://drive.google.com/drive/folders/ ... 8qokMEnhHa
Under the name PMHSSO_Setup (1).exe

Re: Star Stable Online - CSA & TGA files

Posted: Thu Jan 20, 2022 5:12 pm
by Kanetsu
I've also seen that people who were importing the textures into the game files say that they were using a hex editor (I think that refers to converting crn files back to tga files, but it might be more than that?). Maybe someone can figure out a method of importing the files using a hex editor?

Re: Star Stable Online - CSA & TGA files

Posted: Thu Jan 20, 2022 7:12 pm
by locknut
It can most likely be done, but it's probably harder now than before. Before, the textures were not compressed which meant that even if you changed it, it would stay the exact same size. So you could just paste a new texture over the original. Today, most textures are compressed, and that means that when you change a texture and recompress it, it will never have the exact same file size as the original.

So, on top of replacing the texture in the .csa file, you will also have to "relocate" all the other resources in the file. There are also some checksums and other details that may need to be recalculated, depending on how much the game validates during launch.

Re: Star Stable Online - CSA & TGA files

Posted: Thu Jan 20, 2022 7:41 pm
by Kanetsu
When I recently used Pimp My Horse (which was last updated in 2019) and checked the files, it looked as if the new textures were simply pasted in. In-game everything worked just fine, and you could see the new textures. Maybe it still works in a pretty similar way?

Re: Star Stable Online - CSA & TGA files

Posted: Thu Jan 20, 2022 9:12 pm
by ikskoks
Maybe someone can figure out a method of importing the files using a hex editor?
Basically what locknut said gives you the idea how it works.

This method is straight-forward and can be used to mod ANY game, not only SSO:
1. First your new file has to be smaller or equal in size compared to original file.
2. Then you just copy and paste data in hex editor.
3. Then you add missing padding to fill the space (just fill with zeroes)

And that's it (when you're lucky and there are no checksums to correct). You don't need any scripts - but it's a lot of manual work.
That's why it is often better to do it with scripts.

Re: Star Stable Online - CSA & TGA files

Posted: Sat Jan 22, 2022 12:58 pm
by Pollaris

Re: Star Stable Online - CSA & TGA files

Posted: Sat Jan 22, 2022 1:11 pm
by Kanetsu
Pollaris wrote: Sat Jan 22, 2022 12:58 pm Hey! I've found a solution for C.C software!
Proof:
https://gyazo.com/a753bd2a596f33aa71e02a4842573942
https://gyazo.com/f39b4a60dd55916fe087f7371e8219ed
Did you change the mane too? The only thing that doesn’t work for me is changing the mane, even after reinstalling multiple times. Still it would be nice to have a new/updated software since there are many new breeds that aren’t included in pimp my horse.

Re: Star Stable Online - CSA & TGA files

Posted: Sun Jan 23, 2022 3:39 pm
by Pollaris
Kanetsu wrote: Sat Jan 22, 2022 1:11 pm
Pollaris wrote: Sat Jan 22, 2022 12:58 pm Hey! I've found a solution for C.C software!
Proof:
https://gyazo.com/a753bd2a596f33aa71e02a4842573942
https://gyazo.com/f39b4a60dd55916fe087f7371e8219ed
Did you change the mane too? The only thing that doesn’t work for me is changing the mane, even after reinstalling multiple times. Still it would be nice to have a new/updated software since there are many new breeds that aren’t included in pimp my horse.
Things what I do:
1. Open "Pimp my horse sso" as an administrator
2. Check your texture how big it is. Height and width must be like 900x900. Scale your texture then
3. Not sure how you open software with game but I'm doing it like that:
First open your game, log in.
If your game updated and you see button "play" then open pimp my horse as an administrator, like i've said before.
Then check your textures and add them into game

Re: Star Stable Online - CSA & TGA files

Posted: Wed Jan 26, 2022 11:15 am
by Kanetsu
ikskoks wrote: Thu Jan 20, 2022 9:12 pm
Maybe someone can figure out a method of importing the files using a hex editor?
Basically what locknut said gives you the idea how it works.

This method is straight-forward and can be used to mod ANY game, not only SSO:
1. First your new file has to be smaller or equal in size compared to original file.
2. Then you just copy and paste data in hex editor.
3. Then you add missing padding to fill the space (just fill with zeroes)

And that's it (when you're lucky and there are no checksums to correct). You don't need any scripts - but it's a lot of manual work.
That's why it is often better to do it with scripts.
So I tried to mix both methods:
1. I first used crunch on the dds file and got a crn file
2. I renamed the file to tga
3. I opened it in a hex editor and added 25 bytes at the beggining.

When I did the whole process in reverse i got a dds file, so the method is working and the tga file can be imported back into the game. The only question is, how do I import it to csa?

Re: Star Stable Online - CSA & TGA files

Posted: Fri Jan 28, 2022 11:09 am
by Kanetsu
Oh we could also use a new bms script, the newest one doesn't export files of the new horses (since july 2021).

Re: Star Stable Online - CSA & TGA files

Posted: Fri Jan 28, 2022 3:22 pm
by dpu8xhys
So I tried to mix both methods:
1. I first used crunch on the dds file and got a crn file
2. I renamed the file to tga
3. I opened it in a hex editor and added 25 bytes at the beggining.

When I did the whole process in reverse i got a dds file, so the method is working and the tga file can be imported back into the game. The only question is, how do I import it to csa?
You can't because the old script "star_stable_online.bms" doesnt work anymore except if you modify it as prescribed in the previous pages of the forum but you will get the files in .pte and not in .tga

I just realized a short time ago that the .tga files are no longer available

Re: Star Stable Online - CSA & TGA files

Posted: Sat Jan 29, 2022 11:57 am
by locknut
The first thing I would try would be to just paste the CRN-file into the CSA-file over the original data. If it's smaller than the original, then it might be as simple as that, but they might also do some checks on the size and checksums, and if so the best option is to write a script to do it so you don't have to recalculate those values manually.

Steps 2 & 3 above is not necessary.