Player model changing

Corrodias find a way to change player model to Cyrus; just write

customization_item_wear( "Cyrus Suit", "cyrus_hires.cmeshx", "Cyrus", false, SYNC_LOCAL )
customization_item_wear( "Cyrus Head", "cyrus_hires_head.cmeshx", "Cyrus", false, SYNC_LOCAL )
customization_swap_player_rig( "cyrus.rig", "PLYM", SYNC_LOCAL )

between "function sr3_city_main()" and "end" lines in your "sr_city.lua" ;).
 
That's pretty much it. I tried to use other models and rigs, too, but i never quite figured it out. I might revisit it.

If you want to change the player's team, look for a function with the word "team" in it in the same file. There are, like... a temporary version and a permanent version, and i don't know the difference. Anyway, it's good for having a little fun and taking nice screenshots.​

I assumed that i had so much trouble getting other models & rigs to load onto the player because they weren't preloaded, but i made SOME progress. Though not for the heads. Go figure. I had to go off on a tangent of patching the vpp-unpacker tool because it wasn't properly extracting the preload_rigs.vpp file. But my changes to it didn't seem to make a difference. Maybe there's a list of files it's supposed to preload, somewhere. I should look at that NPC behavior mod and see what it does to preload the pony cart animations.​
I have more notes at home. When i get home i'll dump any further information i have.​
 
According to that mod, you just add files to one of the preload_ vpp files. Don't know why i couldn't get my attempts to work, before. Maybe i'll start trying again.

As for the player's team, i forget what the valid teams are (it's in one of the xtbl files), but here's STAG:
set_team(LOCAL_PLAYER, "STAG")
Or, to go back to the Saints, it's this:
set_team(LOCAL_PLAYER, "Playas")

When you're done with the altered model, i believe this clears it.
customization_item_revert( )
customization_restore_player_rig( )
 
Examples of team-related functions:
team_make_hostile( "Neutral Gang", "Playas" )
team_make_allies( "Neutral Gang", "Playas" )
vehicle_set_team(M07_group.casino_vehicle.vehicles[1], "Playas")
set_team(girl, "Playas")
set_player_undercover_team(LOCAL_PLAYER, "STAG")
-- I have no idea what the difference between set_team and set_player_undercover_team is. Maybe it means your original team won't go hostile with you.

Teams:
Playas
STAG
Police
Civilian
Neutral Gang
Luchadores
Morningstar
Deckers
 
The thing about Cyrus is that there are cyrus head and body meshes inside customize_item.vpp, whereas the same isn't true for other NPCs. It may just be that he's the only one that you can do that with. He also has meshes in characters.vpp, as do all the others. Although i think i tried replacing his files in customize_item with another NPC's, and it still didn't work so well.
 
I figure he has meshes in there because they needed to make him a costume for the mission, so they did just that. There's a model of him in charactrs, that's the actual version that runs around and is all him... but the version in customize is the costume forced on you. Due to engine design it'd probably be a separate mesh thing entirely, and that's why mesh swapping just causes errors.. the game is looking for a "clothing-type" model and is getting a "character type" and bugs out. Or just what I'd guess.
Isn't there a toilet/sex-doll/avatar set in there as well, in customize? Because that's really the only other times they actually 'swap out' the character...
 
It's just incredibly frustrating. I can get the engine to change SOMETHING, but i can never get it to change what i want, because i just don't know what it's actually trying to load or what i would need in what files.

The thing is, even if i replace the cyrus outfit meshes in customization_item with Kinzie's character meshes, the game model doesn't change. So, clearly it's not using those. But swapping out the head mesh and associated files cause him to appear like he has two heads. It's hard to explain.

So, it must be using the character.vpp versions, right? Let's try replacing those. No dice. I think i need to alter the "f" versions of the custmeshes.
 
Well, that's closer. At least the head's working. But i still have no idea what's wrong.


Now, if i want to load kinzie's rig onto the player, i believe i have to pack it into preload_rigs.vpp.

Loading the kinzie.rig onto the player (at least with the "PLYF" animation set) is what causes it to fragment apart like in the first picture.

Yeah, changing the animation set doesn't help. There's just something not working between the kinzie.rig and the kinzie mesh files in the cyrus custmesh.str2 file.

I just noticed that kinzie's head has a separate rig file. What the heck? kinzie_head.rig. Of course, you can preload it, but trying to load it onto the player crashes the game. There might be a function to swap just your head rig (is there such a thing?), but it's never used by the game scripts, so i wouldn't know what it is.
 
Back
Top