A fork of https://github.com/xensik/gsc-tool - A utility to compile & decompile IW engine game scripts.
Go to file
2022-09-13 14:58:36 +02:00
.github Create dependabot.yml 2022-05-24 16:40:24 +02:00
data move data 2021-09-17 16:46:55 +02:00
deps Bump deps/zlib from 53ce271 to 21767c6 2022-05-24 16:48:57 +02:00
docs iw8 build 2021-09-13 20:00:43 +02:00
gen update gen scripts 2022-08-23 13:47:49 +02:00
src add some tokens to s1 2022-09-13 14:58:36 +02:00
tools refactor 2021-12-26 13:21:19 +01:00
.gitignore update gitignore 2022-07-15 16:16:01 +02:00
.gitmodules init 2021-05-08 18:15:25 +02:00
appveyor.yml update build 2022-03-21 16:39:04 +01:00
LICENSE init 2021-05-08 18:15:25 +02:00
prebuild-macos.sh init 2021-05-08 18:15:25 +02:00
prebuild-windows.bat update build 2022-03-21 16:39:04 +01:00
premake5.lua update build script 2022-08-23 13:49:51 +02:00
README.md update supported platforms 2022-08-23 15:59:29 +02:00

Build status license GitHub issues GitHub release (latest by date)

GSC Tool

A utility to compile & decompile IW engine game scripts.

Supported Games

  • IW5 (Call of Duty: Modern Warfare 3) PC PS3 Xbox 360
  • IW6 (Call of Duty: Ghosts) PC PS4 Xbox One
  • IW7 (Call of Duty: Infinite Warfare) PC PS4 Xbox One
  • IW8 (Call of Duty: Modern Warfare (2019) / Warzone) PC PS4 PS5 Xbox One Xbox Series X|S
  • S1 (Call of Duty: Advanced Warfare) PC PS4 Xbox One
  • S2 (Call of Duty: WWII) PC PS4 Xbox One
  • S4 (Call of Duty: Vanguard) PC PS4 PS5 Xbox One Xbox Series X|S
  • H1 (Call of Duty: Modern Warfare Remastered) PC PS4 Xbox One
  • H2 (Call of Duty: Modern Warfare 2 Campaign Remastered) PC PS4 PS5 Xbox One Xbox 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 .gscbin format 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 .cgsc and decompressed stack buffer .cgsc.stack.

  • treyarch (T6) format is a single buffer with gscobj data .gsc or .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.