| If you enter a name different from the original...
Then you want to duplicate the object! But for it, it is not enough to change textures and to recreate the SGBIN file under another name! There are several files to modify and to add in the Patch file that you must create.
In our example, we used the following file :
- data\gfx\buildings\b_park01_t3.sgbin
We need 3 other files :
- data\design\buildings\civicservice\park\b_park01_t3.class
- data\design\layout\b_service\b_park01_t3.layout
- data\interface\ddstexture\buildings\b_park01_t3.dds
If you have not already created a working folder, let's create it now, let us call him "PremierSGBIN".
In this folder, create a data folder and and reproduce the tree-like aspect of the 4 files above.
Here is what you must get :

Move then the new SGBIN that you have just created in the good folder, to know data\gfx\building.
Make a COPY (never modify the original files) of the 3 necessary files and place them in their respective folder, still with the intention of keeping the same hierarchy as the original "data" folder.
You must then rename the 3 other files with the same name as your SGBIN (well on, do not change extensions of files).
Until now, we have now a folder "PremierSGBIN" which contains a "data" folder, several sub-folders and 4 files which the names are similar.
We have not more than to adapt the contents of these files. In this tutorial, I will not speak about the .layout file. Leave it as it is for the moment. Know simply that this file defines decorations of the object (trees, benches, ...) and the way the object must be connected to roads, etc. This file does not refer to our SGBIN therefore it is not necessary to change it.
We are going to concentrate on the .class file and the .dds file.
The .dds file is the thumbnail picture which appears in game when the mouse roll over the icon of the object..
You can change this picture completely. Attention : when you finished and that you record him, choose "None" as Compression and uncheck "Generate mipmaps".
The .class file is the most importantst le plus important, without this file, no object, no thumbnails nor layout file because it is this file which makes link between all, and it is it which is read in first by game.
- Open the .class file with a text editor and search for the following tag :
<Model>
You will see that in this tag there is the name of the SGBIN file. Change the name of the file SGBIN so that it corresponds to the name which you gave him.
<Thumb>
You will see the name of the thumbnail .dds file. Modify it.
- Finally, search this tag :
<LayoutFile1>
Modify it too.
There are lots of possible modifications in a .class file, but it is not the goal of this tutorial.
We have not more than to create a Mod with all this (Patch file) :
On the main interface / Compress a folder, choose the "data" folder which is in your "PremierSGBIN " folder, enter a name in "Output file", for example MOD_PREMIERSGBIN.PATCH then click on Compress.
You have just created your first duplicated object! Copy the Patch file which you have just created in the Paks folder of the game. You have not more than to go the to test him in the game.
Notice :
If game crash when loading, it is because you made an error in your files, you must double-check!
Do not hesitate to share your creations on the forum, and if you discover functions (whether it is tags inside files, or the function of a file especially), either do not hesitate to share your knowledge, it is the way you will make the community of Cities XL growing.
Thank you for having followed this tutorial.
Youcef and Arcadoli. |