gsc-tool
gsc-tool copied to clipboard
A utility to compile & decompile IW engine game scripts.
GSC Tool
A utility to compile & decompile IW engine game scripts.
Supported Games
- IW5 (Call of Duty: Modern Warfare 3)
PCPS3Xbox 360 - IW6 (Call of Duty: Ghosts)
PCPS4Xbox One - IW7 (Call of Duty: Infinite Warfare)
PCPS4Xbox One - IW8 (Call of Duty: Modern Warfare (2019) / Warzone)
PCPS4PS5Xbox OneXbox Series X|S - S1 (Call of Duty: Advanced Warfare)
PCPS4Xbox One - S2 (Call of Duty: WWII)
PCPS4Xbox One - S4 (Call of Duty: Vanguard)
PCPS4PS5Xbox OneXbox Series X|S - H1 (Call of Duty: Modern Warfare Remastered)
PCPS4Xbox One - H2 (Call of Duty: Modern Warfare 2 Campaign Remastered)
PCPS4PS5Xbox OneXbox Series X|S - T6 (Call of Duty: Black Ops II)
PC - T7 (Call of Duty: Black Ops III) *WIP*
- T8 (Call of Duty: Black Ops 4) *WIP*
- T9 (Call of Duty: Black Ops Cold War) *WIP*
Usage
./gsc-tool.exe <mode> <game> <path>
modes: asm, disasm, comp, decomp
games: iw5c, iw5, iw6, iw7, iw8, s1, s2, s4, h1, h2, t6
paths: file, directory (recursive process all files inside dir)
for zonetool files (.cgsc, .cgsc.stack) use: zasm, zdisasm, zcomp, zdecomp modes
Example: ./gsc-tool.exe comp iw5 ./data/iw5/my_fancy_script.gsc
| Mode | Description | Output |
|---|---|---|
asm |
assemble a file.gscasm |
file.gscbin |
disasm |
dissasemble a file.gscbin |
file.gscasm |
comp |
compile a file.gsc |
file.gscbin |
decomp |
decompile a file.gscbin |
file.gsc |
File Format
If you need to extract scripts from fastfiles or game memory, use Zonetool or Jekyll.
-
gsc-tool
.gscbinformat is a serialized ScriptFile struct:
name: null-terminated string
compressedLen: 4 byte uint
len: 4 byte uint
bytecodeLen: 4 byte uint
buffer: byte array[compressedLen]
bytecode: byte array[bytecodeLen] -
zonetool (IW5) format made of bytecode file
.cgscand decompressed stack buffer.cgsc.stack. -
treyarch (T6) format is a single buffer with gscobj data
.gscor.csc.
Credits
This project is based on RektInator's gsc-asm. Special thanks to RektInator, JTAG & Dasfonia.
Disclaimer
This software has been created purely for the purposes of academic research. Project maintainers are not responsible or liable for misuse of the software. Use responsibly.