Getting Started With Modding
Modding guide.
Supported Types
For now it supports these types:
scriptparsetree
- scripts (.gsc/.csc/.gsic/.csic) for replacement and auto linkingrawfile
- raw fileluafile
- compiled Lua HKS (only replacement)stringtable
- csv file (.csv)
Setting Up Folder For Mods
Create a directory in the Black Ops 4 install project-bo4/mods
Creating "metadata.json"
Create a directory with a json file metadata.json
in it.
For example project-bo4\mods\demo_mod\metadata.json
.
The format of this json is:
More configs are available in the script config.
Scripts
It is possible to load script file with the support of GSIC file, a custom format from the T8-Compiler to replace script functions from the game.
To inject a script, 2 ways are possible, to replace an already existing one or to inject a new one. To tell the game when an injected script should be loaded, a hook script config is available. When a hook script is loaded, the injected script will be loaded.
The hooks of a script are defined with the "hooks": [ "hook.gsc" ]
config. For example the script demo.gsc loaded when the script zm_common/load.gsc is loaded.
String tables
The game is using "compiled" csv files, these files have the cell values compiled instead of storing the string values. For example with zm_mansion_weapons.csv, the table to tell the weapon loaded by a map, the weapon names are hashes.
To create custom table, I've made a code to load the CSV with the first line used to tell the type of the columns. These types are:
string
int
hash
float
undefined (gsc)
For example with all the available types:
Commands
reload_mods
for the console to reload at runtime the mods, it only works if the user is in the UI level to avoid reloading scripts in game.
Last updated