Adding new options to the character creation screen
Jan 7, 2017 0:38:54 GMT
Val E Ryon, The Mad Titan, and 8 more like this
Post by squidgy617 on Jan 7, 2017 0:38:54 GMT
Intro
Character customization is one of the best parts of Xenoverse, but what if you want even more options? You can always replace the models already in the game, but what if you don't want any limits? Well, this guide is for you! I'm going to tell you how to add new hairstyles, ears, jaws, pupils, whatever to the character creation. Adding certain things, such as eye shapes, can lead to some strange behavior, but for the most part this process works smoothly.
Things you'll need:
- genser - We will use this to convert a .bcs file into an editable .xml document. Can be found here.
- A text editor - Any text editor will do, though I personally use notepad++.
- Files to add - A hair file, ear file, anything will work for this tutorial. If you don't have anything, you can always pull one of the files from the game and just make a duplicate object as well. NOTE: Make sure you have all the necessary parts for this. For instance, not every modder packs .dyt files with their mods, which you will need for this tutorial. If you are missing something, just use a copy of one of the game's files.
So, without further introduction, lets begin.
Preparing your files
The first thing you need to do for this process is take your hair/eye/ear/nose/whatever files and rename them. Say you download a hair replacer mod, and, for example, all of the files are named "HUM_008_Hair.ext", where .ext is whatever extension the file has. You will want to rename this to a number that is not already used by the game. I would recommend you just go one above the highest number already used by the game. For reference, here are the numbers already used by the game in each category:
- Hair - 0-25, 295, 299, 390, 509, 534, 553, 601, 602, 604, 611, 612, 616, 619, 625, 627, 628, 630, 651, 655, 656, 659, 665, 666, 711, 906 - NOTE: 1-25 are used for actual hair, and 295+ are for accessories. I recommend you start at 26 for adding new hair.
- Ears - 0-3
- Eyes - 0-21, 299 - NOTE: Called "pupils" in-game.
- Forehead - 0-21, 299, 800 - NOTE: Called "eyes" in-game.
- Nose - 0-14
So, in the example that you are using files called "HUM_008_Hair.ext", replace the "008" with whatever number you are using. As I said before, do not use any of the numbers listed above. I recommend starting at 26, and just add to that whenever you add new options. (In this case, we will call the files "HUM_026_Hair.ext")
Files before name change
Files after name change
Please note that adding pupils is a bit different from adding other options, we will dive into that later.
Once you've renamed your files, move them into the folder of whatever race they are meant for (so, if we're adding a new hairstyle for humans/saiyans, we will put the files in "data/chara/HUM").
Converting the .bcs file
The .bcs file of your respective race does many things, including determining what customization options your race has. Lets go back to the hairstyle example and assuming we're adding a new hairstyle for humans/saiyans to the game.
Click and drag your .bcs file into the genser .exe to creat a .xml file of it. In this case, we will click and drag HUM.bcs into genser.
Drag "HUM.bcs" into genser.
And you get a new .xml file!
Now that you have your .xml file, its time for the interesting part.
Editing the .xml file
Open the .xml file you just created in your text editor of choice. You will be greeted with something like this:
Now, as you may be able to tell from scrolling through the file, the first entire chunk of this file is listing off all of the customization options. We're going to skip ahead to part set 151, the first unused part set in the file. Hit "ctrl+f" and search for 151.
Part set 151
As you can see, there is nothing in this part set yet. Its time to add a new entry. Copy and paste the code below over the "<!--This entry is empty.-->" line.
<Part idx="0">
<!--Face_base-->
<!--This entry is empty.-->
</Part>
<Part idx="1">
<!--Face_forehead-->
<!--This entry is empty.-->
</Part>
<Part idx="2">
<!--Face_eye-->
<!--This entry is empty.-->
</Part>
<Part idx="3">
<!--Face_nose-->
<!--This entry is empty.-->
</Part>
<Part idx="4">
<!--Face_ear-->
<!--This entry is empty.-->
</Part>
<Part idx="5">
<!--Hair-->
<!--This entry is empty.-->
</Part>
<Part idx="6">
<!--Bust-->
<!--This entry is empty.-->
</Part>
<Part idx="7">
<!--Pants-->
<!--This entry is empty.-->
</Part>
<Part idx="8">
<!--Rist-->
<!--This entry is empty.-->
</Part>
<Part idx="9">
<!--Boots-->
<!--This entry is empty.-->
</Part>
As you can see, each of these entries represents a part within the part set. However, all of them are empty at the moment. We need to add some information to actually add our part to the game.
Highlight the line below "<!--Hair-->" and then copy and paste the below code over it:
<MODEL value="26" />
<MODEL2 value="26" />
<TEXTURE value="0" />
<U_10 value="0x0" />
<U_18 value="0x0" />
<U_1C value="0x0" />
<U_20 value="0x0" />
<F_24 value="0.0" />
<F_28 value="0.0" />
<U_2C value="0x0" />
<U_30 value="0x0" />
<NAME value="HUM" />
<!--MODEL, EMM, EMB, EAN-->
<FILES value="NULL, HUM_026_Hair, HUM_026_Hair, NULL" />
As you can see, this code block is designed to add our "HUM_026.ext" files to the game as part of entry 151. The "MODEL value" serves as an id of sorts, and generally should be the same as the number you are using for your object.
At this point, if you save your .xml file, run it through genser, and place the resulting .bcs file in your data/char/HUM folder, you should find a new hairstyle, hairstyle 27!
The result of our hard work!
And you can repeat this process for as many new objects as you like, going up to 27, 28, 29, and so on.
Another thing to note, you can add multiple parts to a single part set. For instance, if you'd like to add a new hairstyle AND a new set of ears, you can put a code block in place of the line below "<!--Face_ear-->" in part set 151, and both the hairstyle and the ears will be added to the game!
It should be noted that the code blocks differ for each part. When in doubt, copy and paste an entry from another part set. Below, I will put the code blocks you need for each part type.
NOTE: For all below part types, xx is the number you are using for your files. If a number is displayed in the code, keep that number the same. Some files, like ears, load things from the base game (HUM_000) and so their file loading shouldn't necessarily be changed.
Hair
<MODEL value="xx" />
<MODEL2 value="xx" />
<TEXTURE value="0" />
<U_10 value="0x0" />
<U_18 value="0x0" />
<U_1C value="0x0" />
<U_20 value="0x0" />
<F_24 value="0.0" />
<F_28 value="0.0" />
<U_2C value="0x0" />
<U_30 value="0x0" />
<NAME value="HUM" />
<!--MODEL, EMM, EMB, EAN-->
<FILES value="NULL, HUM_0xx_Hair, HUM_0xx_Hair, NULL" />
Ears
<MODEL value="xx" />
<MODEL2 value="xx" />
<TEXTURE value="0" />
<U_10 value="0x0" />
<U_18 value="0x0" />
<U_1C value="0x0" />
<U_20 value="0x0" />
<F_24 value="0.0" />
<F_28 value="0.0" />
<U_2C value="0x0" />
<U_30 value="0x0" />
<NAME value="HUM" />
<!--MODEL, EMM, EMB, EAN-->
<FILES value="NULL, HUM_000_Face_ear, HUM_000_Face_base, NULL" />
Eye shape (forehead)
NOTE: HUM004U.fce seems to be an animation file for the eyes. You can just use any of the already existing files from other entries, unless you have a file of your own. You will also have to define what pupils correspond to your eye shape. Take a a look at the spoiler below for more info. If you don't define pupils for your eye shape, it will cause strange behavior with the other eye shapes in the game.
<MODEL value="xx" />
<MODEL2 value="xx" />
<TEXTURE value="0" />
<U_10 value="0x0" />
<U_18 value="0x0" />
<U_1C value="0x0" />
<U_20 value="0x0" />
<F_24 value="0.0" />
<F_28 value="0.0" />
<U_2C value="0x0" />
<U_30 value="0x0" />
<NAME value="HUM" />
<!--MODEL, EMM, EMB, EAN-->
<FILES value="NULL, HUM_0xx_Face_forehead, HUM_000_Face_base, HUM004U.fce" />
Pupils (eye)
NOTE: Pupils seem to work differently then other parts. When creating a pupil entry, you are really defining which eye shape the pupil corresponds to. You can use any pupil files you want, replacing yy with the pupil files' number, even using just some of the game's default pupil styles, but you will want to replace xx with the number that corresponds to your eye shape, or the forehead. For example, if you are adding a pupil called "HUM_016_Face_eye" and you want it to be selectable for eye shape "HUM_021_Face_forehead", you would change yy to 16 and xx to 21. You can also add the same pupils to multiple eye shapes by placing the same pupil in another part set but changing xx. So for example, now that its available for "HUM_021_Face_forehead", you could make it available for another forehead by placing the below code in another part set and changing xx to 22, thus making it available for "HUM_022_Face_forehead" as well. Now your pupil is selectable for two separate eye shapes.
Also note that you can have multiple pupils available to one eye shape, you just have to define each pupil in a new part set.
Also note that you can have multiple pupils available to one eye shape, you just have to define each pupil in a new part set.
<MODEL value="xx" />
<MODEL2 value="xx" />
<TEXTURE value="0" />
<U_10 value="0x0" />
<U_18 value="0x0" />
<U_1C value="0x0" />
<U_20 value="0x0" />
<F_24 value="0.0" />
<F_28 value="0.0" />
<U_2C value="0x0" />
<U_30 value="0x0" />
<NAME value="HUM" />
<!--MODEL, EMM, EMB, EAN-->
<FILES value="NULL, HUM_0yy_Face_eye, HUM_0yy_Face_eye, NULL" />
<ColorSelector>
<!--eye_-->
<PART_COLORS value="5" />
<COLOR value="1" />
</ColorSelector>
Jaw (base)
NOTE: Again, HUM002L.fce is an animation file. You can simply use one of the ones already in the game or use one of your own, this value can vary quite a bit.
<MODEL value="xx" />
<MODEL2 value="xx" />
<TEXTURE value="0" />
<U_10 value="0x0" />
<U_18 value="0x0" />
<U_1C value="0x0" />
<U_20 value="0x0" />
<F_24 value="0.0" />
<F_28 value="0.0" />
<U_2C value="0x0" />
<U_30 value="0x0" />
<NAME value="HUM" />
<!--MODEL, EMM, EMB, EAN-->
<FILES value="NULL, HUM_000_Face_base, HUM_000_Face_base, HUM002L.fce" />
Nose
<MODEL value="xx" />
<MODEL2 value="xx" />
<TEXTURE value="0" />
<U_10 value="0x0" />
<U_18 value="0x0" />
<U_1C value="0x0" />
<U_20 value="0x0" />
<F_24 value="0.0" />
<F_28 value="0.0" />
<U_2C value="0x0" />
<U_30 value="0x0" />
<NAME value="HUM" />
<!--MODEL, EMM, EMB, EAN-->
<FILES value="NULL, HUM_000_Face_nose, HUM_000_Face_base, NULL" />
As you can see, there are different rules for different parts. When in doubt, look at the other part sets in the file for reference. And remember, you can have multiple parts in the same part set.
If your character customization breaks when you hover over your new part, then your game is trying and failing to load a file. Make sure you have all the necessary files (including .dyt files) for the respective part. You can check what's missing by setting "log_all_files" to true in the xv2patcher.ini. Once your game breaks, quit the game, go to the xv2_log file, and scroll to the bottom of it. Then, ctrl+F and search up for "filesystem". If you look through all the instances that pops up at, you can generally find what files are missing. Often times, you can replace the missing file using one of the game's base files (for instance, when I was missing a HUM_004_Face_ear .dyt file, I simply renamed HUM_000_Face_ear's .dyt and used that instead).
And... that's it. If there are any questions, feel free to ask. Feel free to give me feedback on the tutorial as well, I don't write these often but I wanted everyone to be able to know how to do this!
Happy customizing!