This tutorial is a mirror of the tutorial originally posted on Modderbase forum


Street Fighter 6 has been released, and the Expired Beta Versus Mod along with its Costume Slots system has been updated to support it.
The mod is now called the Costume X Versus Mod and is available on NexusMods for everyone.

Some fundamental things had to be changed to make costume slots work in the full game, so old Beta costume slot mods will need to be updated. 
The original tutorial for the Closed Beta Test can be found spoilered at the bottom of this message.

So, included with the Versus mod are these json files. Each one is for an original Capcom costume of its character (1 is default, 2 is Alternate):



If your mod is based on Juri's default costume, then you simply need to make a copy of her "1.json" file and put it in your mod's own "reframework\data\CostumeData\Juri\MyNewMod.json" file, naming it whatever you want.
Then you can edit this json file to say what you want it to load. Each fighter can have up to five sub-objects to it: Body, Head, Hair, Skeleton and Optional.
Additionally, each of these sub-objects can load a MESH (model) and a MDF (materials) file, as well as a "userdata" file for up to 4 additional properties.
And beyond that, you can specify an overall body chain file and a hair chain file for physics, and a prefab file as well.

Here is what a costume slot mod based on Juri's 1.json file looks like:
{
   "body_ao_geo_udata": "Product/Model/esf/esf016/001/esf016_001_01_AOgeo.user",
   "body_chain": "Product/Model/esf/esf016/001/01/esf016_001_01_chain.chain",
   "body_chain_udata": "Product/Model/esf/esf016/001/esf016_001_01_chain.user",
   "body_jcns_udata": "Product/Model/esf/esf016/001/esf016_001_01_jcs.user",
   "body_mdf": "Product/Model/esf/esf016/SPR/01/esf016_001_01_v00.mdf2",
   "body_mesh": "Product/Model/esf/esf016/SPR/01/esf016_001_01.mesh",
   "custom_colors_file": "Product/Model/esf/esf016/SPR/esf016_001_CCVD.user",
   "hair_chain": "Product/Model/esf/esf016/001/02/esf016_001_02_chain.chain",
   "hair_chain_udata": "Product/Model/esf/esf016/001/esf016_001_02_chain.user",
   "hair_jcns_udata": "Product/Model/esf/esf016/001/esf016_001_02_jcs.user",
   "hair_mdf": "Product/Model/esf/esf016/001/02/esf016_001_02_v00.mdf2",
   "hair_mesh": "Product/Model/esf/esf016/001/02/esf016_001_02.mesh",
   "head_jcns_udata": "Product/Model/esf/esf016/001/esf016_001_00_jcs.user",
   "head_mdf": "Product/Model/esf/esf016/000/00/esf016_000_00_v00.mdf2",
   "head_mesh": "Product/Model/esf/esf016/000/00/esf016_000_00.mesh",
   "name": "Sparring Costume",
   "prefab": "Product/CharParam/esf/esf016/prefab/esf016v00.pfb",
   "skel_mdf": "Product/Model/esf/esf016/000/10/esf016_000_10_v00.mdf2",
   "skel_mesh": "Product/Model/esf/esf016/000/10/esf016_000_10.mesh",
   "custom_color_names": {
       "1": "Gray and teal",
       "2": "Black and red",
       "3": "Purple",
       "4": "Gray and black",
       "5": "Gray with yellow hair",
       "6": "Gray with yellow hair",
       "7": "Gray and Black with red hairbands",
       "8": "Orange with orange hairbands",
       "9": "Maroon",
       "10": "Indigo"
   },
   "num_used_colors": 10
}



The field names are mostly combinations of the following five prefixes:
  • body
  • head
  • hair
  • skel - (skeleton as seen when being electrocuted)
  • optional - (extra mesh, most characters will not use this)

...combined with the following six suffixes:
  • _mesh
  • _mdf
  • _chain_udata
  • _jcns_udata
  • _ao_geo_udata
  • _havok_udata

So a valid field you could add to a costume slot could be "skel_mesh" to add a mesh to the skeleton sub-object, or "hair_chain_udata" to add a chain userdata file to the hair sub-object.

Userdata (udata, user.2) files are RSZ-type files that have a handful of settings then point to a resource file. A chain userdata file will point to a chain file, for physics, and a Havok one will point to a havok file for cloth physics.
You can edit these files with RE_RSZ or RE Engine Resource Editor to change which files they load. If one character doesn't use a user.2 file for some body part, you can copy another character's one and use it in its place.

As an example, you could add a new chain file to a character's face by making a copy of one of your characters other chain user.2 files and editing its filepath to say it loads a new chain file. Then add your chain file at that location and add the filepath to the user.2 file to your JSON as "head_chain_udata" and the slot should use that file for physics on the head:



Additionally, you can set up a custom "CCVD" custom_colors_file, which you can edit to point to your own unique "CMD" color slots for your mod.
One simple way to do this is to open the character's unmodified CCVD file in a hex editor and use Find & Replace (as Unicode string) to replace all their CMD filepaths with the custom filepaths for your modded CMD files.
Then make sure your modded CMD files are where you replaced to.

In addition, there is the "prefab" file, which is a PFB file. The prefab file can load any number of things besides what's already specified in the JSON (which typically overrides the things in it), so it can be used for miscellaneous additions to a costume mod.
To edit a prefab file, use RE_RSZ or EMV Engine with RE Engine Resource Editor.


Additional json properties:
  • name - The name of the costume in the Versus mod's costume list
  • short_name - The name of the fighter displayed next to the lifebar while using the costume
  • custom_color_names - A table containing the names of the CMD color slots used by the mod, to be displayed in the Versus mod's colors list
  • num_used_colors - The number of colors actually used by the mod, if not all in the CCVD file are used
  • color_slot - The initial color slot that the costume defaults to when switched to (this one is not really necessary in most cases)
  • custom_tex_p1 - The texture showing P1's fighter's face, next to their lifebar (red)
  • custom_tex_p2 - The texture showing P2's fighter's face, next to their lifebar (blue)

Most of these properties can be omitted entirely from the json, if you have nothing for them. Though I encourage you to use them.


Below is an example of a costume slot version of BrutalAce's "Juri Sparring Costume" looks

Its json file is located here:


And looks like this:


Notice how it loads body files from the "SPR" folder instead of 001 or 002. Because of this, it can be independent from vanilla Juri and also load her other default files as part of its mod.

Here you can see how the meshes, textures and mdf2s are placed inside the mod folder:


Basically the only thing that was changed to make them unique was to change the "esf016\001\" to "esf016\SPR\" for each file.

This had to be done inside the mod's CCVD file (linked in the JSON) to direct it to SPR "CMD" files for coloring each costume slot of the mod. You can open this file with RE_RSZ:

...or you can just use find+replace in any old hex editor.

The hard part of all this is changing the paths for all the textures. You will need to open the MDF2 file(s) for the mod with a hex editor and either use the MDF Template (also for 010 Editor) to search + change paths using the fields in Template Results, or you can use find + replace again if you are good with that: 

One way to do it quickly is to switch between a window of your textures folder and 010, and F2 to rename a file, Ctrl+C to copy its name, ESC to cancel, alt+tab to go to 010 and Ctrl+F to search "Variable Value" for it. Then change its name in template results and go to the next one.

There are many textures to change and it can be hard to tell if you've made a mistake, so you should use the Noesis plugin to try and preview the mesh+mdf together and verify that all the textures are being loaded. Noesis' debug log will tell you if any textures were not found:



You can download a selection of simple sample costume slot mods here:
Versus Mod Sample Costume Pack



Advanced JSON Options:
Some advanced options for loading specific character data into a costume slot is also available. After loading a match with EMV Engine installed and "Extra Costumes" enabled, there will be a "Visual" field for each player inside the Game Info section of the Versus mod. In here, you can see the class that loads the data for the character, and click the "Dump JSON" button to dump all this data to a json file in the 'reframework\data' folder of your game directory that looks like this:

D:\SteamLibrary\steamapps\common\Street Fighter 6\reframework\data\P2_Ryu_VisualDump_CostumeData.json
{
   "add_voice_udata": "Product/CharParam/esf/esf001/data/udAddVoiceData_esf001.user",
   "body_ao_geo_udata": "Product/Model/esf/esf001/001/esf001_001_01_AOgeo.user",
   "body_chain": "Product/Model/esf/esf001/001/esf001_001_01_chain.chain",
   "body_chain_udata": "Product/Model/esf/esf001/001/esf001_001_01_chain.user",
   "body_havok_udata": "Product/Model/esf/esf001/001/esf001_001_01_havok.user",
   "body_jcns_udata": "Product/Model/esf/esf001/001/esf001_001_01_jcs.user",
   "body_mdf": "Product/Model/esf/esf001/001/01/esf001_001_01_v00.mdf2",
   "body_mesh": "Product/Model/esf/esf001/001/01/esf001_001_01.mesh",
   "ccvd": "Product/Model/esf/esf001/001/esf001_001_CCVD.user",
   "hair_chain": "Product/Model/esf/esf001/001/02/esf001_001_02_chain.chain",
   "hair_chain_udata": "Product/Model/esf/esf001/001/esf001_001_02_chain.user",
   "hair_mdf": "Product/Model/esf/esf001/001/02/esf001_001_02_v00.mdf2",
   "hair_mesh": "Product/Model/esf/esf001/001/02/esf001_001_02.mesh",
   "head_jcns_udata": "Product/Model/esf/esf001/001/esf001_001_00_jcs.user",
   "head_mdf": "Product/Model/esf/esf001/001/00/esf001_001_00_v00.mdf2",
   "head_mesh": "Product/Model/esf/esf001/001/00/esf001_001_00.mesh",
   "joint_map": "Product/Animation/esf/esf001/esf001_JointMap.jmap",
   "motion_bank": "Product/Animation/esf/esf001/v00/esf001v00_MotionBank.motbank",
   "motion_cam_bank": "Product/Animation/esf/esf001/v00/esf001v00_MotionCameraBank.mcambank",
   "muscle_control_udata": "Product/Model/esf/esf001/001/esf001_001_shape.user",
   "prefab_projectile": "Product/CharParam/esf/esf000/prefab/esf000fb01.pfb",
   "prefab_sound_eng": "Product/Sound/Sound_Prefab/snd_prefab_voice/esf_battle/snd_esf001_v_eng.pfb",
   "prefab_sound_jpn": "Product/Sound/Sound_Prefab/snd_prefab_voice/esf_battle/snd_esf001_v_jpn.pfb",
   "skel_mdf": "Product/Model/esf/esf001/000/10/esf001_000_10_v00.mdf2",
   "skel_mesh": "Product/Model/esf/esf001/000/10/esf001_000_10.mesh",
   "small_dmg_res_udata": "Product/Animation/esf/esf001/esf001_smallDamage.user",
   "sound_costume_udata": "Product/Sound/Resource/snd_userdata/snd_datacontainer/dcnt_esf001/snd_dcnt_cos_esf001v00.user",
   "sound_facial_udata": "Product/CharParam/esf/esf001/battle_ud/001_SoundFacial.user",
   "sound_udata": "Product/Sound/Resource/snd_userdata/snd_datacontainer/dcnt_esf001/snd_dcnt_esf001.user",
   "timeline_container_udata": "Product/CharParam/esf/esf001/timeline/btlc_esf001.user",
   "timeline_mat_param_udata": "Product/CharParam/esf/esf001/timeline/esf001_mpm.user",
   "wrinkle_control_udata": "Product/Model/cmn/cmn013/FCE_WrinkleControl.user"
}



The advanced json fields are:
  • motion_bank
  • motion_cam_bank
  • joint_map
  • small_dmg_res_udata
  • prefab_projectile
  • prefab_sound_eng
  • prefab_sound_jpn
  • sound_udata
  • sound_costume_udata
  • add_voice_udata
  • sound_facial_udata
  • muscle_control_udata
  • wrinkle_control_udata
  • timeline_container_udata
  • timeline_mat_param_udata


Adding such fields as "prefab_sound_eng" to your costume slot could allow you to give the costume a custom English sounds file that you can edit what it loads with RE_RSZ (or maybe sound_costume_udata or another). However, that means the mod will always override any model-swapped character's English sound file as well, so this may mute swapped characters because the character's audio cues expect IDs from a specific sound file.


I hope this helps and people are able to make lots of costume slot mods for the full game like they did for the beta!

Article information

Added on

Edited on

Written by

alphaZomega

1 comment

  1. EpicrexMods
    EpicrexMods
    • member
    • 1 kudos
    thanks