UGX-Mods

Call of Duty: Black Ops 3 => Tutorial Desk => Modding => Topic started by: Xylozi on November 09, 2016, 10:44:45 pm

Title: [TUT] Adding Gametype to Custom Games selection menu
Post by: Xylozi on November 09, 2016, 10:44:45 pm
This tutorial will cover how to add a custom gametype to the Set Game Mode list in Custom Games. This is only for Multiplayer mods.

In your core_mod.zone, add the following:

Code Snippet
Plaintext
structuredtable,gamedata/tables/common/mod_game_types.json

In your mod folder, add the following folder structure: gamedata/tables/common/

From the raw files, copy the default mod_game_types.json file from Call of Duty Black Ops III\share\raw\gamedata\tables\common to your mod's gamedata/tables/common/ folder.

It should look like this:
Code Snippet
Plaintext
{
    "_meta": {},
    "data": [
        {
            "comments": "Keep GameType Index Between 200 - 250 For Readability",
            "id": 20,
            "index": 201,
            "session_mode": "mp",
            "name": "tdm",
            "name_ref": "MPUI_TEAM_DEATHMATCH",
            "name_ref_caps": "MPUI_TEAM_DEATHMATCH_CAPS",
            "hardcore_name_ref": "MPUI_HCTDM",
            "description": "MENU_KILL_PLAYERS_ON_THE_OPPOSING",
            "hardcore_available": "YES",
            "is_team_based": "YES",
            "groupname": "standard",
            "image": "playlist_tdm",
            "loading_screen_image": "t7_menu_mp_icons_gamemode_graphic_tdm",
            "presence_ref": "PRESENCE_TDM"
        }
    ]
}

Change MPUI_TEAM_DEATHMATCH and MPUI_TEAM_DEATHMATCH_CAPS to localisation keys for your mod. And change "tdm" to the name of your gametype.

For example, in my Onslaught mod I created a onslaught_menu.str file in english/localizedstrings, with the following:

Code Snippet
Plaintext
VERSION				"1"
CONFIG "C:\projects\cod\t7\bin\StringEd.cfg"
FILENOTES ""

REFERENCE ONSLAUGHT_LOWER
LANG_ENGLISH "Onslaught"

REFERENCE ONSLAUGHT_LOWER_SHORT
LANG_ENGLISH "Onslaught"

REFERENCE ONSLAUGHT_CAPS
LANG_ENGLISH "ONSLAUGHT"

REFERENCE ONSLAUGHT_CAPS_SHORT
LANG_ENGLISH "ONSLAUGHT"

ENDMARKER

And in the mod_game_types.json for the mod I did this:
Code Snippet
Plaintext
{
    "_meta": {},
    "data": [
        {
            "comments": "Keep GameType Index Between 200 - 250 For Readability",
            "id": 20,
            "index": 202,
            "session_mode": "mp",
            "name": "onslaught",
            "name_ref": "ONSLAUGHT_MENU_ONSLAUGHT_LOWER",
            "name_ref_caps": "ONSLAUGHT_MENU_ONSLAUGHT_CAPS",
            "hardcore_name_ref": "ONSLAUGHT_MENU_ONSLAUGHT_CAPS",
            "description": "MENU_KILL_PLAYERS_ON_THE_OPPOSING",
            "hardcore_available": "YES",
            "is_team_based": "YES",
            "groupname": "standard",
            "image": "playlist_onslaught",
            "loading_screen_image": "t7_menu_mp_icons_gamemode_graphic_tdm",
            "presence_ref": "PRESENCE_TDM"
        }
    ]
}

Once you have done that, re-compile and you should see this ingame:

(https://www.ugx-mods.com/forum/proxy.php?request=http%3A%2F%2Fi.imgur.com%2FkfTpxzn.jpg&hash=0a0f50ac4397dbf3f6e7db18e1686d0e203cf600)