This Call of Duty 4X source extension adds new utilities to extend the server and the creation of new plugins. Such things include new functions to get data types that the original source doesn't offer, the ability to call functions defined in GSC from the C files and async workers for expensive operations on the server. To use this extension you must add the CGSC files included in the release section to the /src/CGSC
folder, and then compile the CoD4X server source. More detailed instructions can be found towards the bottom of this document.
Note: Depending on the version of Call of Duty 4X that you're running, some features of CGSC may not be available.
In order to use this extension, just download the archived file down below, and extract it to the cod4x server's src/CGSC
directory, then copy the makefile snippet below and paste it before the default rule.
Then simply build the library with the build instructions and recompile the cod4x source with make
.
##################################
# CGSC
CGSC_DIR=$(SRC_DIR)/CGSC
WIN_LLIBS:=$(WIN_LLIBS) CGSC uv iphlpapi psapi userenv ws2_32 ole32 uuid dbghelp
LINUX_LLIBS:=$(LINUX_LLIBS) CGSC uv dl pthread rt
BSD_LLIBS:=$(BSD_LLIBS) CGSC uv dl pthread rt
WIN_LFLAGS:=$(WIN_LFLAGS) -mconsole
CGSC_ASM_SOURCES=$(wildcard $(CGSC_DIR)/asm/*.asm)
CGSC_ASM_OBJ=$(patsubst $(CGSC_DIR)/asm/%.asm,$(OBJ_DIR)/%.o,$(CGSC_ASM_SOURCES))
ASM_OBJ:=$(ASM_OBJ) $(CGSC_ASM_OBJ)
$(OBJ_DIR)/%.o: $(CGSC_DIR)/asm/%.asm
@echo $(NASM) $@
@$(NASM) $(NASMFLAGS) $< -o $@
Pre-Requisites:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install nasm:i386 build-essential gcc-multilib g++-multilib
Build Command:
mkdir build && cd build
cmake .. --preset linux
cmake --build .
Pre-Requisites:
- Windows MinGW i686-8.1.0-win32-dwarf-msvcrt
- NASM
- CMake and vcpkg.
Build Command:
mkdir build && cd build
cmake .. --preset windows
cmake --build .
This package is available for use via vcpkg-registry.
Note: If you would like to contribute to this repository, feel free to send a pull request, and I will review your code. Also feel free to post about any problems that may arise in the issues section of the repository.