gsc-tool/README.md

52 lines
2.7 KiB
Markdown
Raw Normal View History

2020-05-21 07:32:38 -04:00
[![Build status](https://ci.appveyor.com/api/projects/status/defmhg4753c1ap1o?svg=true)](https://ci.appveyor.com/project/xensik/gsc-tool)
![license](https://img.shields.io/github/license/xensik/gsc-tool.svg)
[![GitHub issues](https://img.shields.io/github/issues/xensik/gsc-tool)](https://github.com/xensik/gsc-tool/issues)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/xensik/gsc-tool)](https://github.com/xensik/gsc-tool/releases)
# GSC Tool
A utility to compile & decompile IW engine game scripts.
2022-01-19 14:01:12 -05:00
## Supported Games
2020-05-21 07:32:38 -04:00
- **IW5** *(Call of Duty: Modern Warfare 3)*
- **IW6** *(Call of Duty: Ghosts)*
- **IW7** *(Call of Duty: Infinite Warfare)*
2021-05-08 13:18:20 -04:00
- **IW8** *(Call of Duty: Modern Warfare (2019))*
2020-05-21 07:32:38 -04:00
- **S1** *(Call of Duty: Advanced Warfare)*
- **S2** *(Call of Duty: WWII)*
2021-09-13 11:50:36 -04:00
- **S4** *(Call of Duty: Vanguard)*
2020-05-21 07:32:38 -04:00
- **H1** *(Call of Duty: Modern Warfare Remastered)*
- **H2** *(Call of Duty: Modern Warfare 2 Campaign Remastered)*
2021-12-26 10:19:49 -05:00
- **T4** *(Call of Duty: World at War)* ***\*WIP\****
- **T5** *(Call of Duty: Black Ops)* ***\*WIP\****
2022-02-18 13:07:37 -05:00
- **T6** *(Call of Duty: Black Ops II)*
2022-03-21 11:40:05 -04:00
- **T7** *(Call of Duty: Black Ops III)* ***\*WIP\****
2020-05-21 07:32:38 -04:00
## Usage
2021-11-15 11:35:00 -05:00
``./gsc-tool.exe <mode> <game> <path>``
2022-01-19 14:01:12 -05:00
**modes**: `asm`, `disasm`, `comp`, `decomp`
2021-11-15 11:35:00 -05:00
2022-02-18 13:07:37 -05:00
**games**: `iw5`, `iw6`, `iw7`, `iw8`, `s1`, `s2`, `s4`, `h1`, `h2`, `t6`
2021-11-15 11:35:00 -05:00
2022-02-19 10:22:11 -05:00
**paths**: `file`, `directory` (recursive process all files inside dir)
2021-11-15 11:35:00 -05:00
2022-02-19 10:22:11 -05:00
for zonetool files (*.cgsc*, *.cgsc.stack*) use: `zasm`, `zdisasm`, `zcomp`, `zdecomp` modes
2020-05-21 07:32:38 -04:00
| Mode |Description | Output |
|:---------|:--------------------------|:------------|
2021-11-15 11:35:00 -05:00
|`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` |
2020-05-21 07:32:38 -04:00
2022-02-19 10:22:11 -05:00
## File Format
2022-05-01 07:52:25 -04:00
If you need to extract scripts from fastfiles or game memory, use [Zonetool](https://github.com/ZoneTool/zonetool) or [Jekyll](https://github.com/EthanC/Jekyll).
2020-05-21 07:32:38 -04:00
- gsc-tool ``.gscbin`` format is a serialized ScriptFile struct: ***name***: null-term string, ***compressedLen***: 4 byte uint, ***len***: 4 byte uint, ***bytecodeLen***: 4 byte uint, ***buffer***: byte array[compressedLen], ***bytecode***: byte array[bytecodeLen].
2022-02-19 10:22:11 -05:00
- 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``.
2022-05-01 07:52:25 -04:00
2020-05-21 07:32:38 -04:00
## Credits
This project is based on [*RektInator's* gsc-asm](https://github.com/ZoneTool/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.