|
OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
|
Functions | |
| read_game_script (game_dir, name) | |
| main () | |
Variables | |
| ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| BOT_DIR = os.path.join(ROOT, 'mods', 'bots', 'maps', 'mp', 'bots') | |
| str | CALLBACKS = 'maps/mp/gametypes/_callbacksetup.gsc' |
| str | MARKER = '[[level.callbackStartGameType]]();' |
| str | HOOK = 'thread maps\\mp\\bots\\_bots::init();' |
Installs the simple bots of mods/bots as a server-side mod folder.
python3 scripts/install_bots.py /path/to/CoD2 [--dest FOLDER] [--name cod2rev_bots]
It writes two loose script files into FOLDER/<name>:
maps/mp/bots/*.gsc the bots, copied from this repository
maps/mp/gametypes/_callbacksetup.gsc the game's own file with one line added
The second file is built from your own game files (read from the .iwd archives
in /path/to/CoD2/main), because the game scripts cannot be redistributed here.
FOLDER defaults to the game folder. Start the server with:
+set fs_game <name> +set bots_count 6
| install_bots.main | ( | ) |
| install_bots.read_game_script | ( | game_dir, | |
| name ) |
| install_bots.BOT_DIR = os.path.join(ROOT, 'mods', 'bots', 'maps', 'mp', 'bots') |
| str install_bots.CALLBACKS = 'maps/mp/gametypes/_callbacksetup.gsc' |
| str install_bots.HOOK = 'thread maps\\mp\\bots\\_bots::init();' |
| str install_bots.MARKER = '[[level.callbackStartGameType]]();' |
| install_bots.ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |