Fancy new mod format

Discussion in 'Modding Patch Beta' started by [V] Knobby, Mar 7, 2015.

Thread Status:
Not open for further replies.
  1. [V] Knobby

    [V] Knobby Volition Staff

    Note that currently the new mod format only allows for ADDING things. We will add support for modification of existing/shipped things soon.

    Gone are the days of files dropped in the main folder. Gone are the days of mod conflicts simply because they both are weapon mods. The new format allows for easy distribution of a single packfile and makes you mod pretty easy to install and remove. So how do you create such an amazing new format you might ask? It actually isn't that bad. The largest change is with the table files. You simply pull out the part of the table file that adds your thing and that is all the table file will have in it. As an example, I will show you a mod for adding a new skin to the baseball bat. To do this, I need to alter the table file weapon_skins.xtbl. Instead of copying the originally shipped version and adding my piece, I simply create a file named weapon_skins.xtbl with just my changes in it. In this case:
    Code (Text):

    <root>
    <Table>
        <Skin><Name>BaseballBat_3</Name><Material_Library><Filename>baseballbat_SkinC.matlibx</Filename></Material_Library><Costume>baseball_bat-0-Bat</Costume><_Editor><Category>Entries:MELEE</Category></_Editor><Display_Name>CUST_WPN_SKIN_NAME_BAT_2</Display_Name><Description>CUST_WPN_SKIN_DESC_BAT_2</Description><Unlocked>True</Unlocked></Skin>
        </Table>
    </root>
     
    That file gets packaged up with the str2 for the skin and an asm that I named mods_skins.asm_pc. That asm file just has the one streaming container in it and that is it.

    The mod code will open the packfile and add the content it finds inside. Here is what it will look for:

    • Any textures named always_loaded.cpeg_pc/.gpeg_pc will be loaded.
    • Any items3d.xtbl will be parsed and we will look for items_containers.asm_pc and items_preload_containers.asm_pc.
    • Any weapons.xtbl will be parsed.
    • Any weapon_upgrades.xtbl will be parsed.
    • Any weapon_costumes.xtbl will be parsed and we will look for mods_costumes.asm_pc.
    • Any weapon_skins.xtbl will be parsed and we will look for mods_skins.asm_pc.
    • Any *_veh.xtbl will be parsed and we will look for vehicle_containers.asm_pc.
    • Any gameplay_*.lua file will be read in and <filename>_init function will be run. This will be in the gameplay context.
    • Any interface_*.lua file will be read in and <filename>_init function will be run. This will be in the interface context.
    • Any customization_items.xtbl and customization_outfitswill be parsed and we will look for custmize_item.asm_pc.
    • Any *.le_strings file will be parsed and added to the localization data. (note this follows the same naming convention as the game. If you are running in English, it will look for _US.le_strings files. If you are in Spanish, _ES.le_strings.)
    • Any store_weapons.xtbl will be parsed.
    • Any items_inventory.xtbl will be parsed.
    • Any tweak_table.xtbl will be parsed. (Note that these are mods and not adds)
    • Any preload.xtbl will be parsed and names of the included containers will be preloaded.
    • Any homies.xtbl will be parsed and homies will be created from the entries.
    • Homies.xtbl has been augmented to support the tag <Auto_Unlocked>true</Auto_Unlocked> to unlock the homie without having to use an unlock from the unlockables table.
    • Cheats.xtbl will be parsed and any cheats found will be added.

    I would love to see some examples of this during the beta to make sure that we won't have any issues with using the same file.

    This is all new code and hasn't had much exercise, so please help with that. Keep in mind that things could be broken or change before the release. If you have suggestions for things you'd like added to this format or changes that would be useful, please speak up.

    The tool for creating mod content was created by Minimaul and information can be found here
     
    Last edited: May 17, 2016
    bgan69, Ryan_saint_2, Admixon and 4 others like this.
  2. [V] Knobby

    [V] Knobby Volition Staff

    Updated with new things from the latest builds include builds 726137, 725649, and 723513.
     
  3. [V] Knobby

    [V] Knobby Volition Staff

    Updated to include new things from build 927197(preload.xtbl)
     
  4. [V] Knobby

    [V] Knobby Volition Staff

    Added homies.xtbl from build 1022952.
     
  5. [V] Knobby

    [V] Knobby Volition Staff

    Added homie unlock change from build 1024037.
     
  6. [V] Knobby

    [V] Knobby Volition Staff

    Added cheats.xtbl from build 1122618.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice