Note: This tutorial is presented with a caveat. It works in my game with no problems, but in -SeaBoundSaint-'s game it crashes
and I have no idea what causes the difference in behavior. So if you play with the included files please back everything up first and
start a new save file just in case.
Thank you to -SeaBoundSaint- for all the help provided. Past and Ongoing.
Cloning an NPC takes a number of steps
======================================
1. Editing All Of The Necessary Character xtbls
2. Renaming All Of The Necessary Mesh Files
3. Renaming The NPC. CNPC and SNPC files
4. Crunching The Character Xtbl to create a CVTF File.
5. Bonus Step: Change The Character's Appearance Or Clothing Colors
1. Character Xtbls That Need To Be Modded.
2. CNPC Files That Need To Be Modded
3. NPC Files That Need To Be Modded
4. SNPC Files That Need To Be Modded
Note: These pictures show the renamed files.
======================================
1. Editing All Of The Necessary Character xtbls
2. Renaming All Of The Necessary Mesh Files
3. Renaming The NPC. CNPC and SNPC files
4. Crunching The Character Xtbl to create a CVTF File.
5. Bonus Step: Change The Character's Appearance Or Clothing Colors
1. Character Xtbls That Need To Be Modded.
2. CNPC Files That Need To Be Modded
3. NPC Files That Need To Be Modded
4. SNPC Files That Need To Be Modded
Note: These pictures show the renamed files.
When you open character.xtbl and search for Anna you find three occurrences
(Original)
To add your new character to the file all you need to do is select the Anna entries (one at a time)
and copy them. Then paste the copied entry directly under the original and change the npc name to that
of your new character.
(Modded)
(Original)
Code:
<Character>
<Name>npc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Code:
<Character>
<Name>snpc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Code:
<Character>
<Name>cnpc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
To add your new character to the file all you need to do is select the Anna entries (one at a time)
and copy them. Then paste the copied entry directly under the original and change the npc name to that
of your new character.
(Modded)
Code:
<Character>
<Name>npc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
<Character>
<Name>npc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Code:
<Character>
<Name>snpc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
<Character>
<Name>snpc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Code:
<Character>
<Name>cnpc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
<Character>
<Name>cnpc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
You will do the same thing in this file
(Original)
(Modded)
There is only one entry in this file that needs to be changed, but there
are 5 name instances in it that need changing.
(Original)
Code:
<Character>
<Name>npc_Anna</Name>
<Approved>No</Approved>
<Model>
<Filename>npc_Anna.cmeshx</Filename>
</Model>
<Height_Class>Medium</Height_Class>
<Height>1</Height>
<Variation>0</Variation>
<Base_Height_Offset>0</Base_Height_Offset>
<Min_Blink>1000</Min_Blink>
<Max_Blink>4000</Max_Blink>
<Anim_Set>PML1</Anim_Set>
<Rig>
<Filename>SR2_Main_Rig.rigx</Filename>
<Preload>true</Preload>
</Rig>
<_Editor>
<Category>Entries</Category>
</_Editor>
<Morph>
<Filename>npc_Anna.morphx</Filename>
</Morph>
<Pcm>
<Filename>npc_Anna.pcmx</Filename>
</Pcm>
<Cloth_Sim>
<Filename>npc_Anna.simx</Filename>
</Cloth_Sim>
</Character>
Code:
<Character>
<Name>npc_Anna</Name>
<Approved>No</Approved>
<Model>
<Filename>npc_Anna.cmeshx</Filename>
</Model>
<Height_Class>Medium</Height_Class>
<Height>1</Height>
<Variation>0</Variation>
<Base_Height_Offset>0</Base_Height_Offset>
<Min_Blink>1000</Min_Blink>
<Max_Blink>4000</Max_Blink>
<Anim_Set>PML1</Anim_Set>
<Rig>
<Filename>SR2_Main_Rig.rigx</Filename>
<Preload>true</Preload>
</Rig>
<_Editor>
<Category>Entries</Category>
</_Editor>
<Morph>
<Filename>npc_Anna.morphx</Filename>
</Morph>
<Pcm>
<Filename>npc_Anna.pcmx</Filename>
</Pcm>
<Cloth_Sim>
<Filename>npc_Anna.simx</Filename>
</Cloth_Sim>
</Character>
<Character>
<Name>npc_Mehrman</Name>
<Approved>No</Approved>
<Model>
<Filename>npc_Mehrman.cmeshx</Filename>
</Model>
<Height_Class>Medium</Height_Class>
<Height>1</Height>
<Variation>0</Variation>
<Base_Height_Offset>0</Base_Height_Offset>
<Min_Blink>1000</Min_Blink>
<Max_Blink>4000</Max_Blink>
<Anim_Set>PML1</Anim_Set>
<Rig>
<Filename>SR2_Main_Rig.rigx</Filename>
<Preload>true</Preload>
</Rig>
<_Editor>
<Category>Entries</Category>
</_Editor>
<Morph>
<Filename>npc_Mehrman.morphx</Filename>
</Morph>
<Pcm>
<Filename>npc_Mehrman.pcmx</Filename>
</Pcm>
<Cloth_Sim>
<Filename>npc_Mehrman.simx</Filename>
</Cloth_Sim>
</Character>
There is only one entry in this file that needs to be changed, but there
are 5 name instances in it that need changing.
There are three entries that need changing here
(Original)
(Modded)
Change these individually, because if you copy and paste you might
not notice the differences in the code. (NPC,CNPC and SNPC)
(Original)
Code:
<Character>
<Name>npc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Code:
<Character>
<Name>snpc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Code:
<Character>
<Name>cnpc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Code:
<Character>
<Name>npc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
<Character>
<Name>npc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Code:
<Character>
<Name>snpc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
<Character>
<Name>snpc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
<Character>
<Name>cnpc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Character>
Change these individually, because if you copy and paste you might
not notice the differences in the code. (NPC,CNPC and SNPC)
There is only one instance in here to be changed
(Original)
(Modded)
(Original)
Code:
<Character>
<Name>npc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
<StreamCategory>Non Ambiently Spawnable</StreamCategory>
</Character>
Code:
<Character>
<Name>npc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
<StreamCategory>Non Ambiently Spawnable</StreamCategory>
</Character>
<Character>
<Name>npc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
<StreamCategory>Non Ambiently Spawnable</StreamCategory>
</Character>
There are three instances that need changing here
(Original)
(Modded)
<Preset>
<Name>cnpc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Preset>[/CODE]
Again pay attention to the NPC,CNPC and SNPC entries
(Original)
Code:
<Preset>
<Name>npc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Preset>
Code:
<Preset>
<Name>snpc_Anna</Name>
<_Editor>
<Category>Entries:TEST</Category>
</_Editor>
</Preset>
Code:
<Preset>
<Name>cnpc_Anna</Name>
<_Editor>
<Category>Entries:TEST</Category>
</_Editor>
</Preset>
Code:
<Preset>
<Name>snpc_Anna</Name>
<_Editor>
<Category>Entries:TEST</Category>
</_Editor>
</Preset>
<Preset>
<Name>snpc_Mehrman</Name>
<_Editor>
<Category>Entries:TEST</Category>
</_Editor>
</Preset>
<Preset>
<Name>cnpc_Anna</Name>
<_Editor>
<Category>Entries:TEST</Category>
</_Editor>
</Preset>
Code:
<Preset>
<Name>cnpc_Anna</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Preset>
<Name>cnpc_Mehrman</Name>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Preset>[/CODE]
Again pay attention to the NPC,CNPC and SNPC entries
There is only one entry to clone here, but you will need to change
both of the NPC names
(Original)
(Modded)
both of the NPC names
(Original)
Code:
<Preset>
<Name>npc_Anna</Name>
<Character>npc_Anna</Character>
<Spawn_Info_Rank>Civilian - Normal</Spawn_Info_Rank>
<Team>Civilian</Team>
<AI_Personality>civilian normal</AI_Personality>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Preset>
Code:
<Preset>
<Name>npc_Anna</Name>
<Character>npc_Anna</Character>
<Spawn_Info_Rank>Civilian - Normal</Spawn_Info_Rank>
<Team>Civilian</Team>
<AI_Personality>civilian normal</AI_Personality>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Preset>
<Preset>
<Name>npc_Mehrman</Name>
<Character>npc_Mehrman</Character>
<Spawn_Info_Rank>Civilian - Normal</Spawn_Info_Rank>
<Team>Civilian</Team>
<AI_Personality>civilian normal</AI_Personality>
<_Editor>
<Category>Entries</Category>
</_Editor>
</Preset>
Personal xtbl files refer to the npc xtbl files that pertain
specifically to your character, not the generic files mentioned above.
specifically to your character, not the generic files mentioned above.
(Originals)
Meshes.vpp_pc
=============
cnpc_Anna.cmesh_pc
cnpc_Anna.g_cmesh_pc
cnpc_Anna.pcm_pc
cnpc_Anna.sim_pc
cnpc_Anna.morph_pc
cnpc_Anna,cvtf
Pegs.vpp_pc
===========
cnpc_Anna.peg_pc
Textures.vpp_pc
===============
cnpc_Anna.g_peg_pc
Common.vpp_pc
=============
cnpc_Anna.xtbl
cnpc_Anna_cha.xtbl
cnpc_Anna_des.xtbl
cnpc_Anna_pre.xtbl
These all need to be renamed:
cnpc_mehrman.cmesh_pc
cnpc_mehrman.g_cmesh_pc
cnpc_mehrman.pcm_pc
cnpc_mehrman.sim_pc
cnpc_mehrman.morph_pc
cnpc_Mehrman,cvtf
cnpc_mehrman.peg_pc
cnpc_mehrman.g_peg_pc
cnpc_Mehrman.xtbl
cnpc_Mehrman_cha.xtbl
cnpc_Mehrman_des.xtbl
cnpc_Mehrman_pre.xtbl
Meshes.vpp_pc
=============
cnpc_Anna.cmesh_pc
cnpc_Anna.g_cmesh_pc
cnpc_Anna.pcm_pc
cnpc_Anna.sim_pc
cnpc_Anna.morph_pc
cnpc_Anna,cvtf
Pegs.vpp_pc
===========
cnpc_Anna.peg_pc
Textures.vpp_pc
===============
cnpc_Anna.g_peg_pc
Common.vpp_pc
=============
cnpc_Anna.xtbl
cnpc_Anna_cha.xtbl
cnpc_Anna_des.xtbl
cnpc_Anna_pre.xtbl
These all need to be renamed:
cnpc_mehrman.cmesh_pc
cnpc_mehrman.g_cmesh_pc
cnpc_mehrman.pcm_pc
cnpc_mehrman.sim_pc
cnpc_mehrman.morph_pc
cnpc_Mehrman,cvtf
cnpc_mehrman.peg_pc
cnpc_mehrman.g_peg_pc
cnpc_Mehrman.xtbl
cnpc_Mehrman_cha.xtbl
cnpc_Mehrman_des.xtbl
cnpc_Mehrman_pre.xtbl
(Originals)
Meshes.vpp_pc
=============
npc_Anna.cmesh_pc
npc_Anna.g_cmesh_pc
npc_Anna.pcm_pc
npc_Anna.sim_pc
npc_Anna.morph_pc
npc_Anna,cvtf
Pegs.vpp_pc
===========
npc_Anna.peg_pc
Textures.vpp_pc
===============
npc_Anna.g_peg_pc
Common.vpp_pc
=============
npc_Anna.xtbl
npc_Anna_cha.xtbl
npc_Anna_des.xtbl
npc_Anna_pre.xtbl
These all need to be renamed:
npc_mehrman.cmesh_pc
npc_mehrman.g_cmesh_pc
npc_mehrman.pcm_pc
npc_mehrman.sim_pc
npc_mehrman.morph_pc
npc_Mehrman,cvtf
npc_mehrman.peg_pc
npc_mehrman.g_peg_pc
npc_Mehrman.xtbl
npc_Mehrman_cha.xtbl
npc_Mehrman_des.xtbl
npc_Mehrman_pre.xtbl
Meshes.vpp_pc
=============
npc_Anna.cmesh_pc
npc_Anna.g_cmesh_pc
npc_Anna.pcm_pc
npc_Anna.sim_pc
npc_Anna.morph_pc
npc_Anna,cvtf
Pegs.vpp_pc
===========
npc_Anna.peg_pc
Textures.vpp_pc
===============
npc_Anna.g_peg_pc
Common.vpp_pc
=============
npc_Anna.xtbl
npc_Anna_cha.xtbl
npc_Anna_des.xtbl
npc_Anna_pre.xtbl
These all need to be renamed:
npc_mehrman.cmesh_pc
npc_mehrman.g_cmesh_pc
npc_mehrman.pcm_pc
npc_mehrman.sim_pc
npc_mehrman.morph_pc
npc_Mehrman,cvtf
npc_mehrman.peg_pc
npc_mehrman.g_peg_pc
npc_Mehrman.xtbl
npc_Mehrman_cha.xtbl
npc_Mehrman_des.xtbl
npc_Mehrman_pre.xtbl
(Originals)
Meshes.vpp_pc
=============
snpc_Anna.cmesh_pc
snpc_Anna.g_cmesh_pc
snpc_Anna.pcm_pc
snpc_Anna.sim_pc
snpc_Anna.morph_pc
snpc_Anna,cvtf
Pegs.vpp_pc
===========
snpc_Anna.peg_pc
Textures.vpp_pc
===============
snpc_Anna.g_peg_pc
Common.vpp_pc
=============
snpc_Anna.xtbl
snpc_Anna_cha.xtbl
snpc_Anna_des.xtbl
snpc_Anna_pre.xtbl
These all need to be renamed:
snpc_mehrman.cmesh_pc
snpc_mehrman.g_cmesh_pc
snpc_mehrman.pcm_pc
snpc_mehrman.sim_pc
snpc_mehrman.morph_pc
snpc_Mehrman,cvtf
snpc_mehrman.peg_pc
snpc_mehrman.g_peg_pc
snpc_Mehrman.xtbl
snpc_Mehrman_cha.xtbl
snpc_Mehrman_des.xtbl
snpc_Mehrman_pre.xtbl
Meshes.vpp_pc
=============
snpc_Anna.cmesh_pc
snpc_Anna.g_cmesh_pc
snpc_Anna.pcm_pc
snpc_Anna.sim_pc
snpc_Anna.morph_pc
snpc_Anna,cvtf
Pegs.vpp_pc
===========
snpc_Anna.peg_pc
Textures.vpp_pc
===============
snpc_Anna.g_peg_pc
Common.vpp_pc
=============
snpc_Anna.xtbl
snpc_Anna_cha.xtbl
snpc_Anna_des.xtbl
snpc_Anna_pre.xtbl
These all need to be renamed:
snpc_mehrman.cmesh_pc
snpc_mehrman.g_cmesh_pc
snpc_mehrman.pcm_pc
snpc_mehrman.sim_pc
snpc_mehrman.morph_pc
snpc_Mehrman,cvtf
snpc_mehrman.peg_pc
snpc_mehrman.g_peg_pc
snpc_Mehrman.xtbl
snpc_Mehrman_cha.xtbl
snpc_Mehrman_des.xtbl
snpc_Mehrman_pre.xtbl
Open the npc file for your new character
Scroll down and you will find a section like this:
Here is where you decide what color your npc's clothing will be. Every piece of clothing will have one of these sections.
Note: There are more than one section that effects the npc clothing so make sure you edit the color information section'
For more on editing NPC files see:
-SeaBoundSaint-'s NPC Editing Tutorial: https://www.saintsrowmods.com/forum/threads/npc-editing-a-comprehensive-guide.21322/
Scroll down and you will find a section like this:
Code:
<Color_Scheme_Chances>
<Color_Scheme_Chance>
<Name>Unnamed</Name>
<Chance>100.000</Chance>
<Color_Values>
<Color_Value>
<Variable_Name>Diffuse_Color_R</Variable_Name>
<Color>Abyssal Purple</Color>
</Color_Value>
<Color_Value>
<Variable_Name>Diffuse_Color_G</Variable_Name>
<Color>Abyssal Purple</Color>
</Color_Value>
<Color_Value>
<Variable_Name>Diffuse_Color_B</Variable_Name>
<Color>Abyssal Purple</Color>
</Color_Value>
<Color_Value>
<Variable_Name>Decal_Map_2_Color</Variable_Name>
<Color>Abyssal Purple</Color>
</Color_Value>
</Color_Values>
</Color_Scheme_Chance>
</Color_Scheme_Chances>
Here is where you decide what color your npc's clothing will be. Every piece of clothing will have one of these sections.
Note: There are more than one section that effects the npc clothing so make sure you edit the color information section'
For more on editing NPC files see:
-SeaBoundSaint-'s NPC Editing Tutorial: https://www.saintsrowmods.com/forum/threads/npc-editing-a-comprehensive-guide.21322/
You will need to use the sr2_npc_table_crunch utility (see Tools Section)
-SeaBoundSaint- has included a zip file called NPC Cruncher Stuff with his NPC Editing Tutorial (also in Tools section)
Download both files and unpack them in the same directory then open the 'Run SR2 NPC Table Crunch.bat' file in a text
editor and read it. It is self explanatory. So change the file names accordingly and then run the bat file.
If everything goes correctly you will have a cvtf file in the directory with your bat file.
-SeaBoundSaint- has included a zip file called NPC Cruncher Stuff with his NPC Editing Tutorial (also in Tools section)
Download both files and unpack them in the same directory then open the 'Run SR2 NPC Table Crunch.bat' file in a text
editor and read it. It is self explanatory. So change the file names accordingly and then run the bat file.
If everything goes correctly you will have a cvtf file in the directory with your bat file.
Drop all of your changed files into your Mods Folder and recompile your game patch. Then drop the patch in your
game directory and enjoy.
game directory and enjoy.
-SeaBoundSaint-'s NPC Cruncher Helper is available here:
Volitions NPC Cruncher is here:
github.com
Current Version: 1.0.0
With this series of .txt files, you will learn all about Saints Row 2's NPC related files.
You will learn how to change the colours of the items an NPC wears, change their gameplay voice, filter in-game appearance by gender/race/character type, force specific outfit variants, change a character's model, change a character's animation set, set which gang the character belongs to, change spawning conditions, change a character's height and height variability, fix a prop to a character's left hand, and much more...
With this series of .txt files, you will learn all about Saints Row 2's NPC related files.
You will learn how to change the colours of the items an NPC wears, change their gameplay voice, filter in-game appearance by gender/race/character type, force specific outfit variants, change a character's model, change a character's animation set, set which gang the character belongs to, change spawning conditions, change a character's height and height variability, fix a prop to a character's left hand, and much more...
- -SeaboundSaint-
- character customization file files guide npc table tutorial xtbl
- Replies: 34
- Forum: Saints Row 2
Volitions NPC Cruncher is here:
GitHub - saintsrowmods2/Shaundis-Secret-Stash
Contribute to saintsrowmods2/Shaundis-Secret-Stash development by creating an account on GitHub.
The npc_target01_pre file is included. It sets your first hitman target to the new npc.
Attachments
Last edited: