#1 Re: GTA Modding » Can a CLEO script duplicate the effects of Clothes.DAT? » 22-05-2008 12:29

clothes.dat doesn't contain clothes entries - you are thinking Shopping.Dat

Clothes.dat contains essentially IF - Then codes that will hide certain models and replace them with others should a third model be loaded.

Example:

exclusive wedge
setc cowboy head tramline -
endexclusive wedge
cuts wedge cs_wedge
cuts tramline cs_tramline

That code in clothes.dat only applies when the file wedge.dff is loaded to the player model (exlcusive wedge)  The SETC line says that if the cowboy.dff file is also loaded to the player model, then whatever model is loaded in the head slot (head) will be replaced by tramline.dff (tramline) and use whatever texture was already loaded for that slot (-).  The CUTS line says that whenever a cutscene is loaded and the wedge.dff is loaded, wedge.dff (wedge) is replaced by cs_wedge.dff (cs_wedge).  The second CUTS line says the same thing except that it applies to tramline.dff and cs_tramline.dff instead.

There are other functions of clothes.dat, but this was the function I need to move to another file or script because mine became really long due to a complex matrix of models that I needed loaded to prevent clipping with the hats.

- JC

- JC

#2 GTA Modding » Can a CLEO script duplicate the effects of Clothes.DAT? » 21-05-2008 18:59

Jackie47
Replies: 2

Is it possible for a CLEO script to duplicate the effects of Clothes.Dat or to otherwise load a second data file that does the same thing?  I ask because I discovered while making a mod that SA apparently stops reading the clothes.dat file after a certain number of lines - which can cause crashes and bugs.  I'm working on a player replacement that needs a lot more haircut DFF substitutions for different hat models - but implementing my work causes the clothes.dat file to not load correctly.

Thanks in advance,
JC

#3 Re: GTA Modding » I need something that'll either be easy or impossible... » 20-05-2008 15:42

Really? that's awesome!

I had thought (not having tried, but just from what the gxthook readme said) that the gxthook would only add new entries for CLEO scripts to use, I didn't realize that it would redirect existing entries smile

Since that one turned out to be easy, maybe you can help with another problem I have:
What I need is a script that will load a file that works in the same way as clothes.dat - I discovered the hard way that clothes.dat just doesn't work anymore and causes crashes when it becomes too long. essentially, the part of the function I need is where it replaces CJ's head with a different DFF (keeping the same TXD) depending on if he has another DFF loaded, and replaces that different DFF with yet another DFF when in a cutscene. Here is the relevant code excerpt from the clothes.dat file that I wrote that was too long and caused a crash (if a CLEO script were to take care of this function, it would bring my clothes.dat file within limits so it wouldn't crash anymore):

START CODE

IGNORE wedge
SETC capovereye head cs_zorro -
SETC caprimup head cs_zorro -
SETC capside  head cs_zorro -
SETC boxingcap head cs_zorro -
SETC hatmanc  head boxingshoe -
SETC cappolice head boxingshoe -
SETC trilby  head boxingshoe -
SETC capback  head cs_zorro -
ENDIGNORE wedge
EXCLUSIVE wedge
SETC bandana  head tramline -
SETC bikerhelmet head tramline -
SETC boater  head tramline -
SETC bowler  head tramline -
SETC boxingcap head cs_flatears -
SETC cap  head tramline -
SETC capback  head tramline -
SETC capknit  head tramline -
SETC capovereye head tramline -
SETC caprimup head tramline -
SETC capside  head tramline -
SETC captruck head tramline -
SETC cowboy  head tramline -
SETC flatears head tramline -
SETC hatmanc  head tramline -
SETC tracktr  head tramline -
SETC trilby  head tramline -
SETC worktr  head tramline -
SETC cappolice head tramline -
ENDEXCLUSIVE wedge
EXCLUSIVE afro
SETC bandana  head cs_zorro -
SETC bikerhelmet head cs_zorro -
SETC boater  head cs_zorro -
SETC bowler  head cs_zorro -
SETC cap  head cs_zorro -
SETC capknit  head cs_zorro -
SETC captruck head cs_zorro -
SETC cowboy  head cs_zorro -
SETC flatears head cs_zorro -
SETC tracktr  head cs_zorro -
SETC worktr  head cs_zorro -
ENDEXCLUSIVE afro
EXCLUSIVE cornrows
SETC bandana  head gimptorso -
SETC bikerhelmet head gimptorso -
SETC boater  head gimptorso -
SETC bowler  head gimptorso -
SETC cap  head gimptorso -
SETC capknit  head gimptorso -
SETC captruck head gimptorso -
SETC cowboy  head gimptorso -
SETC flatears head gimptorso -
SETC tracktr  head gimptorso -
SETC worktr  head gimptorso -
ENDEXCLUSIVE cornrows
EXCLUSIVE elvishair
SETC bandana  head cs_bandana -
SETC bikerhelmet head cs_bandana -
SETC boater  head cs_bandana -
SETC bowler  head cs_bandana -
SETC cap  head cs_bandana -
SETC capknit  head cs_bandana -
SETC captruck head cs_bandana -
SETC cowboy  head cs_bandana -
SETC flatears head cs_bandana -
SETC tracktr  head cs_bandana -
SETC worktr  head cs_bandana -
ENDEXCLUSIVE elvishair
EXCLUSIVE flattop
SETC bandana  head boxingshoe -
SETC bikerhelmet head pimp  -
SETC boater  head boxingshoe -
SETC bowler  head pimp  -
SETC cap  head boxingshoe -
SETC capknit  head boxingshoe -
SETC captruck head boxingshoe -
SETC cowboy  head pimp  -
SETC flatears head boxingshoe -
SETC tracktr  head pimp  -
SETC worktr  head pimp  -
ENDEXCLUSIVE flattop
EXCLUSIVE groovecut
SETC bandana  head country  -
SETC bikerhelmet head country  -
SETC boater  head country  -
SETC bowler  head country  -
SETC cap  head country  -
SETC capknit  head country  -
SETC captruck head country  -
SETC cowboy  head country  -
SETC flatears head country  -
SETC tracktr  head country  -
SETC worktr  head country  -
ENDEXCLUSIVE groovecut
EXCLUSIVE highafro
SETC bandana  head flipflop -
SETC bikerhelmet head flipflop -
SETC boater  head flipflop -
SETC bowler  head flipflop -
SETC cap  head flipflop -
SETC capknit  head flipflop -
SETC captruck head flipflop -
SETC cowboy  head flipflop -
SETC flatears head flipflop -
SETC tracktr  head flipflop -
SETC worktr  head flipflop -
ENDEXCLUSIVE highafro
EXCLUSIVE jheri
SETC bandana  head boxingshoe -
SETC bikerhelmet head boxingshoe -
SETC boater  head boxingshoe -
SETC bowler  head boxingshoe -
SETC cap  head boxingshoe -
SETC capknit  head boxingshoe -
SETC captruck head boxingshoe -
SETC cowboy  head boxingshoe -
SETC flatears head boxingshoe -
SETC tracktr  head boxingshoe -
SETC worktr  head boxingshoe -
ENDEXCLUSIVE jheri
EXCLUSIVE mohawk
SETC bandana  head boxingshoe -
SETC bikerhelmet head pimp  -
SETC boater  head boxingshoe -
SETC bowler  head pimp  -
SETC cap  head boxingshoe -
SETC capknit  head boxingshoe -
SETC captruck head boxingshoe -
SETC cowboy  head pimp  -
SETC flatears head boxingshoe -
SETC tracktr  head pimp  -
SETC worktr  head pimp  -
ENDEXCLUSIVE mohawk
EXCLUSIVE slope
SETC bandana  head cs_bandana -
SETC bikerhelmet head cs_bandana -
SETC boater  head cs_bandana -
SETC bowler  head cs_bandana -
SETC cap  head cs_bandana -
SETC capknit  head cs_bandana -
SETC captruck head cs_bandana -
SETC cowboy  head cs_bandana -
SETC flatears head cs_bandana -
SETC tracktr  head cs_bandana -
SETC worktr  head cs_bandana -
ENDEXCLUSIVE slope
EXCLUSIVE head
SETC bandana  head cs_zorro -
SETC bikerhelmet head cs_zorro -
SETC boater  head cs_zorro -
SETC bowler  head cs_zorro -
SETC cap  head cs_zorro -
SETC capknit  head cs_zorro -
SETC captruck head cs_zorro -
SETC cowboy  head cs_zorro -
SETC flatears head cs_zorro -
SETC tracktr  head cs_zorro -
SETC worktr  head cs_zorro -
ENDEXCLUSIVE head
IGNORE balaclava
SETC bandknots head  tramline  -
SETC helmet  head  tramline  -
SETC skullycap head  tramline  -
SETC moto  head  tramline  -
ENDIGNORE balaclava
CUTS cornrows cs_cornrows
CUTS  afro  cs_afro
CUTS highafro cs_highafro
CUTS wedge  cs_wedge
CUTS slope  cs_slope
CUTS  flattop  cs_flattop
CUTS tramline cs_tramline
CUTS groovecut cs_groovecut
CUTS jheri  cs_jheri
CUTS  mohawk  cs_mohawk
CUTS elvishair cs_elvishair
CUTS  hands  cs_hands
CUTS boater  cs_bikerhelmet
CUTS  balaclava cs_tramline
CUTS cs_zorro cs_bandknots
CUTS cs_flatears cs_bandmask
CUTS cs_bandana tshirt2
CUTS pimp  hawaii
CUTS boxingshoe trackytop1
CUTS country  gimpfeet
CUTS gimptorso gimpmask
CUTS flipflop capover
CUTS  head  cs_head

END CODE

Note that it is very important that the change happen before the next animation is loaded, because in the case of the cutscene versions of the DFFs there is a different animation skeleton, so if the animation is loaded without the proper DFF being already in place there is a crash. For test purposes, the first beta of my mod available here has all the relevant files though the clothes.dat file included in that release has had many features from the code above stripped in order to keep from crashing.

Thanks a ton, I hope you can help because I've been banging my head against this problem for the past six months.

#4 GTA Modding » I need something that'll either be easy or impossible... » 20-05-2008 15:03

Jackie47
Replies: 2

I was hoping someone could help me out, I made a mod that replaces CJ with another character (http://www.gtaforums.com/index.php?show … 12207&st=0) and I need to replace a crapload of American.gxt entries, but I wanted to keep the mod compatible with other mods.

Is it possible to write a script similar to gxthook that would operate in essentially the same way but would replace entries in the MAIN table of American.gxt rather than create new entries for use by other scripts?  My feeling was that it would either be an easy thing or be impossible without causing too much processing overhead, but code and I don't get along.

Thanks in advance,
- JC

Board footer

Powered by FluxBB