-
-
Couldn't load subscription status.
- Fork 496
Adds replacement CJ clothing models #3967
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds replacement CJ clothing models #3967
Conversation
It looks like it doesn't work unless your model is linked with ingame texture. engineImportTXD doesn't help in this situation.
This feature doesn't work with most mods.
Can you provide a test resource, please?
Crash resource: clothes_test_crash.zip
It looks like it doesn't work unless your model is linked with ingame texture. engineImportTXD doesn't help in this situation. This feature doesn't work with most mods. Can you provide a test resource, please? Crash resource: clothes_test_crash.zip
From the tests I've done, I've noticed that if the clothe is bigger than the original clothe in the game, it crashes. I was testing with a model of mine, this model is light and wasn't giving me this problem, so I couldn't notice it. At the moment I still have no idea how to solve it, so I've left the PR as a draft until I find a way to solve it.
The crash when replacing CJ's clothing model has been resolved. Here's an example of a working script:
replace_clothes.zip
I've noticed that the game crashes if CJ is using the clothes that a script is trying to replace. It also crashes if you stop the resource that replaced the clothes.
I've noticed that the game crashes if CJ is using the clothes that a script is trying to replace. It also crashes if you stop the resource that replaced the clothes.
Which model are you using? Are you using the script I provided?
I've replaced policeshirt and policetr
I've replaced policeshirt and policetr
The models must follow the CJ pattern, with Ripped, Fat and Normal clumps. And the texture should also follow the game's pattern. About the crash when you turn off the resource, I think I know what it is, I'll check now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, it doesn't crash anymore
- Change uint16 to std::uint16_t> - Change the type of the variable g_clothesDirectory to auto
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[placeholder]
Congratulations @W3lac3 Do you need help documenting this on the wiki?
Congratulations @W3lac3 Do you need help documenting this on the wiki?
If you could do the documentation, I'd appreciate it. I've been a bit busy.
Congratulations @W3lac3 Do you need help documenting this on the wiki?
If you could do the documentation, I'd appreciate it. I've been a bit busy.
Which pages should be altered / created?
Which pages should be altered / created?
The pages that need to be changed are: clothes components and engineLoadDFF (On this page there should be something showing that you can replace CJ's clothes, something like engineImportTXD wiki.)
Which pages should be altered / created?
The pages that need to be changed are: clothes components and engineLoadDFF (On this page there should be something showing that you can replace CJ's clothes, something like engineImportTXD wiki.)
Done. Edited https://wiki.multitheftauto.com/wiki/Clothing_Component_IDs and added note to https://wiki.multitheftauto.com/wiki/EngineReplaceModel
FYI this was added in r22987
Which pages should be altered / created?
The pages that need to be changed are: clothes components and engineLoadDFF (On this page there should be something showing that you can replace CJ's clothes, something like engineImportTXD wiki.)
Done. Edited https://wiki.multitheftauto.com/wiki/Clothing_Component_IDs and added note to https://wiki.multitheftauto.com/wiki/EngineReplaceModel
FYI this was added in r22987
you need change exemple has used
local dff = engineLoadTXD("custom_afrobeard.dff")
correct is
local dff = engineLoadDFF("custom_afrobeard.dff")
no ?
exemple used in : https://wiki.multitheftauto.com/wiki/Clothing_Component_IDs
@LiraGamer Yes, you are right! I edited the page. thanks
image
im testing new fatures, im download cj female to teste.
to correct hair alpha change .txd to dxt5 or dxt3 the crash it's right
image
its is correct ?
code used
`local dff = engineLoadDFF("afro.dff");
engineReplaceModel(dff, 30000);
local txd = engineLoadTXD("afro.txd")
engineImportTXD( txd, 30201 )`
code used `local dff = engineLoadDFF("afro.dff"); engineReplaceModel(dff, 30000);
local txd = engineLoadTXD("afro.txd") engineImportTXD( txd, 30201 )`
I'm not sure why, but every time I edit txd using Magic TXD crashes, regardless of the compression I use. So try using TXD Workshop, because I used it while I was creating this system and everything worked normally. I also recommend asking questions about this function on the MTA discord.
code used `local dff = engineLoadDFF("afro.dff"); engineReplaceModel(dff, 30000);
local txd = engineLoadTXD("afro.txd") engineImportTXD( txd, 30201 )`
no crash while importing this, but if the texture is compressed (DXT1, 3, 5 or whatever) it will just look broken, so RGBA all the way... sadly that means bigger filesizes
This PR will allow you to replace clothing models in CJ using the
engineLoadDFFandengineReplaceModelfunctions. The clothing models should be made in the same way as in the original game, with 3 clumps, ripped, normal and fat,List of model ids: