Permalink : www/retr0_dev/posts/4_post.html
Post date : Wed Feb 16 2022 1400
Greeting fellow modders ( and potential M lover), it is i Choccy Milk here making a tutorial about transform file. Now what is a transform file?, as the name suggest transform file transform the mesh into a specific location, rotation and scale. Now transform file by far is not something easy, its hard, painful and you will feel like you wanna break that precious vase that cost 90 billion dollar or you really just wanna go monke.
Requirement:
Get an asset file that Supports Transform files, usually this is commonly found on Parts that support attachment. As you can see in the picture i use the SA-58 EXT duty Receiver since it has mod_scope that i want to tinker around.
Now you want to look for the GameObject you want to tinker around, mine would be mod_scope since it only
support scope attachment.
Go see the preview tab and copy the SInt64 m_PathID number, after that you paste it into the search bar and
you should find the transform related to it.
Open UABE and open the asset file you picked (make sure to decompress it), now find the ID of that transform file and then export the dump to an easy access folder (name it so you can remember it later)
feeling a bit confused and tedious?, well that's only the first part
Go into your ASGui, select Scene Hierarchy, select the CAB-blablabla, and then checked the box. After checking it, go to model option and select export selected object (merge), Save the FBX in a easy access folder (preferably in desktop).
Get a scope bundle of your own choosing, and do the previous step for it.
Open blender, go to the File menu on the top left corner, select import and then import both the merged
scope and Receiver FBX file.
After importing it, the Model will be SMALL keep that in mind when you're importing stuff. Go to the object
properties and set the scale on XYZ to 1 for both of them.
Okay you got everything set up, now comes the difficult part or easy (depends honestly).
Grab your Exported Mod_scope Transform file, now take a look at the m_LocalPosition (mine is edited so yours will be different).
Back to Blender, select the Scope model, go to Object Constraint properties, select child of, target the Receiver armature, and then target the mod_scope bone.
Select the Receiver Armature, then from the dropdown of Object mode select Edit Mode. select the mod_scope
Bones, and go to Bones Properties.
Here you can see a value for both Head and Tails. Move the mod_scopes bones to your desireable position,
press tab to update the attachment position. You only need to copy the value from the Head XYZ.
Alternatively you can go into pose mode, move the bone to your wanted position, CTRL + A and select
Apply Pose as Rest Pose and check back the bone properties.
Now copy the XYZ value from head into the transform.
Import back the transform dump after assigning the new value.
After importing, copy the file to its original place, since we are using the Receiver of SA58, put it back in the Receiver bundle, overwrite the files, launch SPT up and voila, your changes has been made.
haha scope place go brrrrr
Notes:
- Transform on gun will only change if you edit the container bundle. Client Assets bundle won't affect
transform changes.
- Changes of transform file to Container bundle will reset after gun is drawn, this is an issue with animation
clip.
- If your custom animation modify the placement on idle animation eg. Scope, bullet and other stuff. First
grab the client assets of the gun you're animating, open it with ASGui, go to scene hierarchy, expand the
box that ends in _model, expand weapon root, weapon root anim, Tick the weapon box, go to model and export
selected object (merge). Do the steps of changing bones again and then import the new transform. This way
your gun will have consistency on the positioning. MAKE SURE TO USE THE TRANSFORM FROM CONTAINER BUNDLE
NOT CLIENT ASSETS BUNDLE (Container bundle will have duplicate game object [it's for different animator],
find the correct one)
- Rotation value are difficult and it's different than position value.