But I don't know how to make clothes gxt lines with CLEO. I like CLEO mods, they works without replacing any files. So, could you tell me, how to make CLEO code for clothes?
Alrighty (I really should when I finish beta2 of my mod write a tutorial LOL)... essentially there is no way getting around having to replace clothes.dat and shopping.dat in the SA data directory. However, you don't have to replace American.gxt
What you need to do is download gxthook (available at the sannybuilder website) and look at its example file. The IDs you want to use are in the second column of data in the shopping.dat file clothing section - those are the game IDs that tell it what text to associate with the piece of clothing. In the file you make for your custom FXT file in the Cleo_Text directly, each line will be the ID for something you replaced, followed by a space - everything after that space is the text that will show up in-game. This way you can rename things without altering the american.gxt.
Example of an FXT file (which you make in notepad):
CUTDENM Daisy Dukes
This single line will make it so that when the ID CUTDENM (normally cut off denims, which loads from cutoffdenims.txd) is referenced by the game, it is intercepted by gxthook.cs and directed to say "Daisy Dukes" (which is what my mod replaces the cut off denims with).
Now, you can go a step further than replacing clothes with this method up to the limits of San Andreas (which I believe is 12 of each clothing item per store, so a total of 36 pants, 36 torsos, etc... but you can't actually get that much because SA gets unstable when the player.img gets beyond a certain arbitrary number of files in it - more on that later). You can add completely new clothes so long as you use an ID naming convention nobody else is likely to use.
Shopping.Dat uses the txd name as the identifying name of each article of clothing. A line in the clothes section looks like this (with tabs instead of spaces - that's important to remember as SA doesn't like it if you don't use tabs):
cutoffdenims CUTDENM shorts 2 respect 0 sexy 7 1000
What this translates to is the first item (cutoffdenims) is the name of the txd, which must be unique to EVERY ITEM in Shopping.dat. The second item is the ID for American.gxt (or in our case our custom fxt file). The third is the name of the DFF file you want the item to use - you can reuse a DFF as many times as you want. The fourth item (the number "2" in this case) is a number that tells the game what type of clothing this is. The fifth thing ("respect") cannot be changed and must be there or it can cause a crash error. The sixth thing ("0") is the numeric modifier to the player's respect statistic while wearing this item. The seventh thing ("sexy") cannot be changed and must be there or it can cause a crash error. The eighth thing ("7") is the numeric modifier to the player's sexiness statistic when wearing this item. The final thing on the line ("1000") is the dollar cost of the item in a store.
Possible values for items four, six, and eight are:
# 0 = torso cant go over 25 for stats
# 2 = legs cant go over 10 for stats
# 3 = shoes cant go over 5 for stats
# 13 = extra1 (necklace) cant go over 2 for stats
# 14 = extra2 (bracelet/watch) cant go over 3 for stats
# 15 = extra3 (glasses) cant go over 2 for stats
# 16 = extra4 (hats) cant go over 3 for stats
Now that you know what each of these lines does, we can duplicate them. Copy one of these lines and paste it to the end of the clothes section of shopping.dat. Change the first item to the name of a txd you have created (omit the file extension), change the second item to something completely unique using only numbers and capital letters and no more than seven characters (my personal preference is to use my first and last initial, followed by the initials of my mod's name, followed by two numbers: so the first thing I make would be JCFCJ01, the second JCFCJ02, etc). Change the dff name to whatever dff you want it to use, and change the fourth item (a number) to the appropriate value as previously explained. Then change the statistic values as you see fit, and congrats you have a piece of clothing added to the game.
Now, that doesn't do much good unless the player can buy it... so we have to alter another part of the shopping.dat to put it in-game.
In the shopping.dat there are various sections referring to different shops, for example:
section Csdesgn # VICTIM
# END OF VICTIM TORSO
# END OF VICTIM LEGS
# END OF VICTIM SHOES
# END OF VICTIM CHAINS
# END OF VICTIM WATCHES
# END OF VICTIM GLASSES
# END OF VICTIM HATS
At this point, what you need to do should be pretty self-explanatory, just find the store you want to add to and add a line into the code that says
item "your txd name"
Sans quotes of course.
And bing batta boom, you have a new piece of clothing in-game. Now, I mentioned something about stability of the player.img file earlier... I discovered quite by accident that strange bugs occur if you put a lot of new filenames into the player.img. "But this means I can't add new stuff doesn't it?" you might ask... but the truth is that you can add files - its just a bit arbitrary based on file size how many you can add before the IMG file becomes unstable - but we won't let that stop us You see, there are quite a few files that the game has in the player.img that AREN'T USED and therefore may be safely replaced before you start add totally new ones, so this delays running into instabilities. I discovered that the following TXD files aren't used and should be safe to replace:
And the following DFF files aren't used:
Now, this doesn't mean you are limited to just replacing these files for adding new stuff... it just means that you should replace these first, and then start adding new files.
Whew... that was a mouthful.
Hope that helps you out my friend If so just give me a shout out and I'll be happy +grins+
Keep up the good work on that mod, there are a lot of people looking forward to it.