SC4 Devotion Forum Archives

SimCity 4 General Discussion and Tutorials => SimCity 4 General Discussion => General Custom Content Discussion => Topic started by: nerdly_dood on June 16, 2008, 12:43:55 PM

Title: Replacing FSH files in Reader
Post by: nerdly_dood on June 16, 2008, 12:43:55 PM
I'm trying to find some models to re-skin, like for ambulances and police vans (I have plenty for fire trucks and police cars) but I can't for the life of me figure out how to replace the FSH files that I'm trying to do (The model is in a different DAT file). It's easy to extract the FSH file, turn it into some PNGs, but I really don't get how to put the re-skinned FSH file into the game. When I try to, the Reader just crashes. What am I doing wrong? Should I try to find the model in the SimCity DAT files and add the skin there, or what? Of course, if you have some suitable automata models with a light-bar on top, that'll be awesome...

This applies to Swamper77's American ambulances, too - their FSH files aren't in the same DAT file as the models. (If I could figure out how to re-skin them, I could easily create a suitable skin and change the right IIDs to make a police van mod)
Title: Re: Replacing FSH files in Reader
Post by: vester on June 16, 2008, 01:06:12 PM
Quite simple:

Click on the s3d file on the left side.
Then click on the matr tab on the right.
Click on the material/texture you want to replace.
Right click and then Replace Texture

(https://www.sc4devotion.com/forums/proxy.php?request=http%3A%2F%2Fimg185.imageshack.us%2Fimg185%2F6727%2Freplacematrxa8.jpg&hash=26ed6a915d1293aee01e0fc16b2e959d358309aa)

Title: Re: Replacing FSH files in Reader
Post by: nerdly_dood on June 17, 2008, 11:30:07 AM
I know exactly how to do it when the S3D file is in the same DAT file, but I don't know how to replace FSH files alone, without a S3D file available in the same DAT file. (Same theory as transit textures, for which there is no S3D file at all) My recent invasion of the STEX is quite enough evidence that I know how to re-texture S3D models. The Maxis ambulance and police van, for example, have the model in one DAT file and the texture in another, and so do Swamper77's American ambulances (http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=82). Most every automata mod has the S3D file in the same DAT file as the FSH. Zwanneman's various Civic Vehicle mods, for example: All of their components except their police cars are only FSH files to re-skin the same model as the original mod.  (They are available from SimCityCentral.net in the Downloads section; it requires registration)

Thanks anyway...
Title: Re: Replacing FSH files in Reader
Post by: Andreas on June 17, 2008, 11:39:51 AM
You mean replacing a FSH file that sits in a DAT, regardless how it is used by the S3Ds? In the Reader, right-click on the FSH and choose "Save selected file(s)" - or "Save decoded file", if the FSH file is compressed. This will give you a *.fsh file and one *.tgi file in your default save folder (i. e. My Documents\SimCity 4\Plugins). Open the extracted FSH file with FiSHMan, extract the bitmap and the alpha map as PNG and edit them to your likings. Then remove the bitmap #1 entry in FiSHMan, import your modified PNG and alpha map, and save the FSH under a new name. Make a copy of it and delete the old FSH file that you have extracted, replace it with the copy of your new FSH, and select "Insert file" or "Insert & Compress" file from the context menu in the Reader. If you named your new FSH properly, it should pick up the old IDs from the *.tgi file and add another FSH file with the same IDs into the file list in the reader. Finally, right-click the old FSH and remove it, then save your DAT.
Title: Re: Replacing FSH files in Reader
Post by: nerdly_dood on June 17, 2008, 11:45:34 AM
Oh, insert and compress! I wasn't compressing them... i guess that's why the reader crashes. Thanks!
Title: Re: Replacing FSH files in Reader
Post by: Andreas on June 17, 2008, 11:51:05 AM
The Reader will also crash if you click on an S3D file that "lost" its FSH file, so after inserting the new and deleting the old one, do a reindex/rebuild directory and save the DAT. Once you close and reopen it, it should work fine again.
Title: Re: Replacing FSH files in Reader
Post by: nerdly_dood on July 01, 2008, 03:30:11 PM
That tip about the TGI files was really helpful. thanks a million!
Title: Re: Replacing FSH files in Reader
Post by: Ennedi on September 28, 2008, 02:47:45 PM
That's an old thread, but I have similar problem.

Quote from: Andreas on June 17, 2008, 11:39:51 AM
You mean replacing a FSH file that sits in a DAT, regardless how it is used by the S3Ds? In the Reader, right-click on the FSH and choose "Save selected file(s)" - or "Save decoded file", if the FSH file is compressed. This will give you a *.fsh file and one *.tgi file in your default save folder (i. e. My Documents\SimCity 4\Plugins). Open the extracted FSH file with FiSHMan, extract the bitmap and the alpha map as PNG and edit them to your likings. Then remove the bitmap #1 entry in FiSHMan, import your modified PNG and alpha map, and save the FSH under a new name. Make a copy of it and delete the old FSH file that you have extracted, replace it with the copy of your new FSH, and select "Insert file" or "Insert & Compress" file from the context menu in the Reader. If you named your new FSH properly , it should pick up the old IDs from the *.tgi file and add another FSH file with the same IDs into the file list in the reader. Finally, right-click the old FSH and remove it, then save your DAT.

1. What is the "proper" name of the new FSH file created in FishMan after PNG and alpha map modification? When I extract the FSH from the DAT, it is saved as "file00000001.fsh" and "file00000001.tgi" in the default save folder (if it is empty; my default save folder is in another place).  I rename files to "fxxxx" following Chrisim's advice from this tutorial (http://sc4devotion.com/forums/index.php?topic=4093.0), when xxxx are last four digits from the instance ID.
2. As I understand, Reader will use an information from TGI file to assign old IDs to the newly inserted FSH. So, both TGI and the new FSH should be placed in the default save folder before inserting FSH to the DAT - am I right?

Title: Re: Replacing FSH files in Reader
Post by: nerdly_dood on September 28, 2008, 03:08:02 PM
I think that if you have a file called example.fsh then your TGI file should be example.fsh.tgi and BTW if you want to edit a *.tgi file without using Reader, you can right click it and select "Open with..." and then select Notepad. Notepad will then open up with the type ID on top, then the group ID below that and the instance ID on the bottom. Here I have what would show up in Notepad, using the texture for one of Swamper77's fire trucks as an example. The [gray text] is added to help clarify what's what - it's not actually showing up in Notepad.

7AB50E44
[Type ID]
1ABE787D
[Group ID]
C2350005
[Instance ID]
Title: Re: Replacing FSH files in Reader
Post by: Ennedi on September 29, 2008, 12:00:50 PM
Thank you very much Nerdly_dood! :thumbsup:

I will try it tonight

Adam