SRIV Swapping the player to joeladle.rig (crashing)

[V] IdolNinja

Volition Staff
I'm trying to change the player to the Magarac Joe statue in the open world with Sandbox+. The customization_swap_player_rig() function works correctly for swapping other rigs, but not for joeladle.rig which causes the game to immediately crash when called. I have successfully packed joeladle.rig into preload_rig.vpp_pc, and this made no difference (the game still crashes when called.)

This is the current code.
Code:
          camera_script_enable("Joe Ladle")
           customization_item_wear("cm_joeladle", "joeLadle.cmeshx", "joeLadle", false)
           customization_swap_player_rig("joeladle.rig", "JOE", "joeLadle")
           human_gravity_enable(LOCAL_PLAYER, false)
           character_set_giant(LOCAL_PLAYER, true)

If I comment out the line with customization_swap_player_rig(), the rest of the code works correctly, but the rig doesn't animate correctly and ends up looking like this:

EE6F414375C66D895C51712C7EFD941EAF42F21B


I have also attached a crash dump for it as well.
 

Attachments

  • saintsrowiv_1102680_crash_2013_9_22T8_56_54C0.mdmp
    70.1 KB · Views: 379
Usually when a character tears apart like this the animations aren't indexed properly for the rig. It's possible the proper animation set isn't playing on this character or the character doesn't have the same bone hierarchy that most all characters have assigned. I would find that to be odd as this is a bipedal character and they generally inherit from a base skeleton definition. I'll have a look at the source and see what the difference could with the joeladle.rig. It would be helpful to know what animation set is running here. It should be player_male.
 
Usually when a character tears apart like this the animations aren't indexed properly for the rig. It's possible the proper animation set isn't playing on this character or the character doesn't have the same bone hierarchy that most all characters have assigned. I would find that to be odd as this is a bipedal character and they generally inherit from a base skeleton definition. I'll have a look at the source and see what the difference could with the joeladle.rig. It would be helpful to know what animation set is running here. It should be player_male.

My understanding is that the second parameter of customization_swap_player_rig() i.e. "JOE" is the animation set to use with the rig. Like I mentioned, that screenshot shows what happens when I comment out that line in the code. i.e. it doesn't crash, but the animations aren't correct. The issue here is that if I try to change the rig it crashes the game, even if I substitute PLYM instead. i.e. It's not the animation set, it's the rig itself outside of the mission that's crashing things even if it's preloaded.
 
It turns out, for whatever reason, the eyes in this rig and paul are indexed incorrectly in the middle of the rig. This throws off everything else of course, which is why you see the tearing you have there.
I re-indexed the rig and cmesh, it may be of some help here, but will only help when inheriting motions from the player_male. It will not work when playing the animations that were specifically made for the existing rig.

I can't comment on why its crashing when you don't comment out that line. I would have mentioned making sure the rig was preloaded but it sounds like you have that taken care of.
 

Attachments

  • joeladle.rar
    101.7 KB · Views: 277
What exactly am I supposed to do with the .morph_key_pc file? This file doesn't exist in any of the archives, and I don't see any other files of this type at all.

EDIT:
Also, I repacked those files into joeladle.str2_pc, custmesh_929185572.str2_pc, and custmesh_929185572f.str2_pc. The exact same thing happens. i.e. everything is distorted. If I enable the rig swap it just crashes the game.
 
Last edited:
Ignore the morphkey file. Its an intermediate file used for mapping the mesh verts to the morph verts.

My last thought here is that the animations in the "JOE" animation set are not marked as preloaded and are only loaded with the mission. If you are not preloading them the game will surely puke when trying to locate them.
 
Your crash is down in animlib in the function instance_bone_matrices. I can't be of much value down in here though. All I can say is entity_bone_info is NULL and that seems bad. :)
 
Your crash is down in animlib in the function instance_bone_matrices. I can't be of much value down in here though. All I can say is entity_bone_info is NULL and that seems bad. :)

What's interesting is that this is exact same line of code works flawlessly in the mission itself, but just not in the open world.
 
Back
Top