Mod menu and notes for T8 (Black Ops 4) and T9/VM38 (Black Ops Cold War). IF YOU HAVE ANY ISSUE READ THE FAQ FIRST.
Using the compiler: https://github.com/shiversoftdev/t7-compiler (Some required features might not be implemented yet)
Using the sources: https://github.com/ate47/bo4-source
No test task to run found
-> You need to create a .vscode/tasks.json
file, I do not ship it with the menu by default, you can copy the default one in the default
directory, the .something LAZYLINK
-> This menu is using experimental features that might not be implemented in your compiler, they are probably implemented my version of the t8-compiler repo in the latest branch, you need to compile the compiler yourself. (I won't help on how to do it)How to change the default map in blackout
-> You Can read the README or you can simply change it in the scripts/config/blackout.gsc
file.1670707254
-> Try to redownload the menu completly, otherwise you can create an issue here.Here precompiled versions of my menu with predefined configs. You have to find how to inject them by yourself.
Posts or videos I've made using these scripts, my notes or the sources:
No available in the precompiled builds
If you don't want to use the menu and only use particular functions from the mod, you can set the value of no_menu
to true
in scripts/config/global.gsc.
If the config function is empty, nothing will happen in game.
self.no_menu = true;
You can config the mod keys in the scripts/config/keys.gsc
file, by default you open it with ADS+Melee.
You can config the mod menu in the scripts/config
directory, current tools:
(and others)
This tool can be paired with the t8-custom-ee mod (PC) to run EE in casual or offline, you don't need it for custom mutations.
My notes are in the notes directory.
You also have a doc about the game itself in the doc directory.
Some features might require some modification on the t8-compiler, you can get them here (search the latest branch).
You can config the compilation using these options:
-DATIAN_MENU_LOOKUP_BIG
: Big lookup structure in array explorer-DATIAN_MENU_DEV
: Run my dev configsUsing iprintln
: ^0
: red, ^1
: cyan, but only for the whole line.
Using iprintlnbold
:
^0
black (hide)^1
red^2
green^3
yellow^4
blue^5
cyan^6
pink^7
bright yellowThe hash_lookup(hash_str)
function can be used to look for unhashed values, to add a string to this function,
add it to the lookup/lookup.txt
file and run the build_lookup.ps1
script. The array explorer tool is using the lookup/lookup_structs.txt
file to search for structure elements.
If the lookup is too big, the game won't start.
You can explore CSV files from the game using the method get_known_csv_files()
in enums.gsc.
// object type of obj
get_object_type(obj);
// iprintbold msg if the dev mod is activated
<player> debugln(msg);
// test if the dev mod
is_dev_mode();
// test if we are in blackout
is_warzone();
// test if we are in zombies
is_zombies();
// test if we are in multiplayer
is_multiplayer();
// dynamic version of #ifdef _CSC
is_client();
// log message using compiler::nprintln or using the menu log system.
am_log(str);
The menu descriptions are usually put in the scripts/core_common/ui/menu_items.gsc
script.
To register a menu, you can call this method:
<player> add_menu(menu_id, menu_name, parent_id, create_menu = false, menuenterfunc = undefined);
menu_id
is the id of your menu.menu_name
is the name of your menu.parent_id
is the parent of your menu, ie: the menu openned if you go the previous menu in your menu. Can be ""
for no parent.create_menu
is creating the menu link from the parent to the menumenuenterfunc
is the optional function to when the used is entering your menu, it will call it with self set to the player and the menu as an argument.You can then add elements to your menu using
<player> add_menu_item(menu_id, item_name, action, actiondata = undefined, actiondata2 = undefined, actiondata3 = undefined, actiondata4 = undefined, actiondata5 = undefined);
<player> add_menu_item_menuswitch(menu_id, item_name, new_menu_id);
<player> add_menu_item_modswitch(menu_id, item_name, mod_name);
add_menu_item
, add an item with the name item_name
in the menu menu_id
, the action is a function, it will be called with the player as self, the item as a 1st parameter and then the actiondataX as 2nd to 6th parameter.add_menu_item_menuswitch
, add an item with the name item_name
in the menu menu_id
, it will open the menu new_menu_id
add_menu_item_modswitch
, add an item with the name item_name
in the menu menu_id
, it will toggle the mod mod_name
and set the menu item to activated by putting on/off on itYou can use this function to check if a mod is activated:
<player> is_mod_activated(mod_name);
The key manager is in the scripts/core_common/key_mgr.gsc
script.
You can register a key binding in the key_mgr_init()
function, the syntax is:
<player> key_mgr_compile_key(hash key_name, undefined|string config, array<string>|string default_config);
key_name
is the hashed name of the keyconfig
is the config from the user, it follows the same syntax as explained in scripts/keyconfig.gsc.default_config
is the default config, it can be an array or a single keyYou can then use the key as you want using these 2 functions:
// get the key config for this player (work with console controller)
<player> key_mgr_get_key_str(hash key_name) -> string;
// test if a key is pressed and if asked, wait until its release
<player> key_mgr_has_key_pressed(hash key_name, bool wait_release = false) -> bool;