GPC SCRIPTING
SCRIPT WARNING
While we have control over the GamePacks available in Zen Studio, we have no control over GPC scripts available in the GPC Library, Cronus Community, Discord, and other places. Therefore, moving forward, you should ALWAYS assume that any COD script is no longer compatible with the latest versions of those games, and will likely cause a temporary account block. The simple solution is to update to the latest version of the GamePack, but if you really need a particular COD script, then you should speak to the script author to confirm if it has been updated.
GPC is the scripting language used by both the Cronus Zen and CronusMAX game controller protocol converters and is widely recognized as the definitive scripting language for gaming mods and macros.
Commands are designed to be self-explanatory so anyone from a novice to the expert programmer is able to quickly pick it up. The basic syntax of GPC has been borrowed from the C language and the basic structure and keywords will be familiar to those who have programmed in C before.
GPC is simply a human-readable version of the code used by the Cronus, which actually uses a bytecode system. Whenever you program or compile a GPC script, the compiler built into the Cronus software converts the script into bytecode prior to being sent to the Cronus device.
[32bit]
GPC scripting is now available in both 16bit and 32bit flavors. Coding in 32bit allows for a much larger address space, which means more memory can be accessed and used by the GamePack. This can be hugely beneficial for programs that require large amounts of memory. Additionally, 32-bit systems also support more advanced features, enabling an infinitely higher accuracy in calculations - directly benefiting MODs such as Anti-Recoil and Aim Assist.
16bit has a maximum of 2^16 possible values and 32bit has a maximum of 2^32 possible values.
16bit: 0000 0000 0000 0000
32bit: 0000 0000 0000 0000 0000 0000 0000 0000
The default compiler mode of Zen Studio is now 32bit. If you wish to compile an older 16bit script (every script ever released before Cronus Zen v1.2.0), you must use the 16bit compiler.
Bytecode is an instruction set for the virtual machine (VM or software interpreter) that the Cronus runs. Inputs for controllers are sent to the VM which then modifies the signals according to the instructions set in the bytecode. This modified output is then sent to the console. The Virtual Machine is a hypothetical computer and its functions and architecture have been optimized specifically for the task of modifying and outputting game controller commands to a video game console.
The Cronus VM is a stack machine and has been optimized so it is able to send data to a console without delay. Providing the CPU load is kept below 80%, the Cronus CPU is able to carry out all the tasks assigned to it without delaying the output to the console. Part of the optimization process means error checks by the VM are kept to a minimum and to only what is necessary.
It is important the programmer has a good understanding of the limitations and fundamentals of GPC when developing scripts.