ate47 / t8-atian-menu

my mod menu for Black Ops 4/ColdWar with my notes for Call of Duty
https://ate47.github.io/t8-atian-menu/
MIT License
21 stars 8 forks source link
blackops4 blackout callofduty cold-war gsc-script multiplayer ps4 zombies

Atian menu

YouTube Discord GitHub

Compile scripts

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

FAQ

Downloads

Here precompiled versions of my menu with predefined configs. You have to find how to inject them by yourself.

Posts

Posts or videos I've made using these scripts, my notes or the sources:

Config

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)

Features

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.

Dev tools

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).

Symbols

You can config the compilation using these options:

Color

Using iprintln: ^0: red, ^1: cyan, but only for the whole line.

Using iprintlnbold:

Hash lookup

The 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.

Functions

// 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);

Create menu

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);

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);

You can use this function to check if a mod is activated:

<player> is_mod_activated(mod_name);

Key manager

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);

You 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;