1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Saints Row The Third Modding Basics

Discussion in 'Guides and Tutorials' started by [V] IdolNinja, Mar 8, 2012.

  1. [V] IdolNinja

    [V] IdolNinja Volition Staff

    NOTE: This is still a little rough, but consider it a work in progress that I'll refine with pics and more info and whatnot as time goes on.

    So, you want to start modding Saints Row the Third and have no idea where to start? Then this is the thread for you.


    SRTT FILE FORMATS

    The .vpp_pc archive
    All moddable files in the game are packed into archives with a .vpp_pc extension. Inside these archives contain all sorts of files you can change. All of the vpp_pc files can be found here:
    ..\steam\steamapps\common\saints row the third\packfiles\pc\cache\

    The most common vpp_pc that most modders extract to start with is misc_tables.vpp_pc. This archive contains a wealth of xtbl files controlling most settings of the open world like physics, vehicles, weapons, etc and are the easiest to edit.

    The .xtbl file format
    An .xtbl file is one of the many file types inside a vpp_pc archive. They are plain ascii text and can be edited with Notepad. If you have any experience with xml, then it will look very familiar to you with the same style format.

    The .str2_pc archive
    Another file type inside a vpp_pc archive. These are also archives that contain files inside them (think of it like an archive within an archive.) str2_pc file can contain many things like lua scripts, models, and textures. They are in an uncompressed format and need to load a very specific way in memory via an accompanying asm_pc file, so are a bit trickier to work with than xtbl files.

    The asm_pc file format
    Whenever you make any change to a file within a str2_pc file and repack it, you also need to update the asm_pc file that controls it so it loads correctly. One of the most common examples of this is vint_doc_containers.asm_pc from inside interface.vpp_pc. This particular asm_pc file controls loading for every str2_pc file inside that archive.

    The lua file format
    A lua script in ascii text that controls things like menus and missions. These are usually located inside str2_pc files. The str2_pc files inside interface.vpp_pc and the ones inside sr3_city_0.vpp_pc are the most common ones that modders work with (menus and missions respectively.)

    The gvbm_pc and gpeg_pc file format
    Each of these are containers for texture files. They are located within str2_pc files and each has an accompanying file that contains information about the texture (cvbm_pc and cpeg_pc.)


    HOW THE GAME LOADS FILES

    The game loads files into memory in the following order, overwriting any versions from previous steps:
    1. Each vpp_pc archive from the cache folder EXCEPT patch_compressed.vpp_pc and patch_uncompressed.vpp_pc
    2. Any files from inside patch_compressed.vpp_pc and patch_uncompressed.vpp_pc
    3. Any files in the root with the exe
    ..\steam\steamapps\common\saints row the third\

    Knowing how it loads, you can see that any files in the root will always take precedence so it's the best place to test modded files out. The purpose of the two patch files is so that volition can easily add their own changed files there for bug fixes and updates instead of having to replace an entire archive.

    Always first look in both patch_compressed and patch_uncompressed first to see if the files you want to modify are there. These will be the most current versions of Volition's files, and you'll want to use them as a base for your mod instead.


    HOW TO MOD AN XTBL FILE

    1. Download the latest version of gibbed's tools with Minimaul's fixes and extract them
    http://www.saintsrowmods.com/forum/index.php?threads/gibbed-tools.639/

    2. Drag one of your vanilla .vpp_pc files on to Gibbed.SaintsRow3.UnpackVPP.exe
    This will extract it into a subfolder of the same name as the archive

    3. There will be xtbl files inside. Make a copy of one to your SRTT install folder where the game exe is, and edit it with any changes. Your install folder will be wherever you installed Steam:
    ..\steam\steamapps\common\saints row the third\


    HOW TO MOD TEXTURES, SCRIPTS, ETC (UNCOMPRESSED STR2_PC FILES)

    1. Extract a .str2_pc file by dragging it on to Gibbed.SaintsRow3.UnpackSTR2.exe

    2. The above will create a new folder named after the str2_pc file. Edit your files inside (lua, cvbm, etc.)

    3. Repack the str2_pc file and update the asm_pc file that relates to it. I'm going to use cell_menu.str2_pc as an example which is located in interface.vpp_pc and uses vint_doc_containers.asm_pc. Your batch file would look something like this:

    Code:
    REM param 1 is the file name to save - param 2 is the folder containing the str2 pc files
    Gibbed.SaintsRow3.PackSTR2.exe cell_menu_main.str2_pc cell_menu_main
     
    REM param 1 is the asm - param 2 is the folder with the str2 files. . means current folder
    Gibbed.SaintsRow3.UpdateASM.exe vint_doc_containers.asm_pc .
    pause
    4. Move your newly created str2_pc file and updated asm_pc file to your SRTT install folder

    NOTE: Before running your batch file, make certain of two things
    * Delete the original str2_pc file before creating your new one. I've had problems with using the tools and having them crash if the str_pc files already exists and you're trying to create a new one with the same name
    * Make sure the extracted folder name doesn't have an extension. This will cause the tool to bomb out. The folder name in the example above should be cell_menu_main and NOT cell_menu_main.str2_pc


    TROUBLESHOOTING

    If the tools crash when you try to use them make sure that:

    * You are using the latest build with Minimaul's fixes linked above.

    * You have the latest .NET Framework 4 installed from Microsoft that the tools require
    http://www.microsoft.com/net

    * Your folder with the unpacked .str2_pc files you are trying to repack does not have a .str2_pc extension. i.e. the folder should have a name like cell_missions and NOT cell_missions.str2_pc

    NOTE: Attached the extracted vanilla files for both the misc_tables.vpp_pc and patch_compressed.vpp_pc archives for users having trouble extracting them.

    Attached Files:

    qazaq and Fan of Saints like this.
  2. hy, I don't understand "3. Repack the str2_pc file and update the asm_pc file that relates to it.". when i dragn'top the asm_pc file on "update the asm", nothing happends.
  3. [V] IdolNinja

    [V] IdolNinja Volition Staff

    That's because you can't drag and drop it. You have to create a batch file to do it as noted with the code snippet.
  4. year thanks a lots:) , i have done the batch file... (on the black window i had a long list) but i can't find my new created files
  5. [V] IdolNinja

    [V] IdolNinja Volition Staff

    Update asm doesn't create any files. It updates an existing asm file that you manually copied over yourself.
  6. Thanks a lot!!! for your fast, useful, simple to inderstand answers :) So kind!!
    (and sorry for my bad english)
  7. hey sorry about adding you to friends list i just needed some advice i am trying to make a mod for SR3 and i wanted to reduce the amount of buildings you see at once let them fade quicker than later so lower end computers like mine can play it without lag so could you tell me if there is already a mod out there or a file i am supposed to edit you know stuff like that thanks
  8. [V] IdolNinja

    [V] IdolNinja Volition Staff

    Draw distance is not something that can be modded at this time since there are no xtbl files that control it (that we've found.) Those settings are likely a part of the exe itself.

    Any further questions should be asked in the Help and Troubleshooting section instead of posting in one of the guides or trying to add me on Steam when my profile clearly states that I do not accept blind friend invites.
  9. I tried to unpack the misc_tables.vpp_pc with the unpacker but the batch crashed and now my game won't run :(

    EDIT: Disregard that, it somehow moved my misc_tables.vpp_pc to another folder and deleted it from the cache folder... I fixed that.

    Semi related though, does anyone have any idea how the game determines what kind of ricochet to use on each surface? For bullets, I mean... been looking for it but there are so many lines of text...
  10. Hi there, i have finally managed to get into the files but i dont know how to open CLMESH_PC files and GLMESH_PC files, they dont open in GIMP, is there further extraction i need to do? If so, how?

    thanks