eyza-cod2 / vscode-cod-gsc

Extension for VS Code for GSC scripts used in Call of Duty games
GNU General Public License v3.0
15 stars 0 forks source link

CoD GSC extension for VS Code

This extension adds language support for the GSC scripts used in Call of Duty games.

⚠️ This extension is still under development and is not fully finished. Check the list of the available features in List of features.

Supported games

Game Code Modification Status Not working yet
CoD1 IW1 original ✅ Supported
CoD2 IW2 original ✅ Supported
CoD4 IW3 original ✅ Supported
CoD5 T4 original ✅ Supported
Plutonium T4
MW2 IW4 original ❗ Tested, errors childthread, call
Alterware IW4x
BO1 T5 original ✅ Supported
Plutonium T5
MW3 IW5 original ❗ Tested, errors childthread, call
Plutonium IW5
Alterware IW5-Mod
BO2 T6 original ❗ Tested, errors #insert, #define, param default value, autoexec, const, %xxx::yyy, /@ comments @/
Plutonium T6 ❗ Tested, errors order of file references
Ghosts IW6 original
Alterware IW6-Mod
AW S1 original ❗ Tested, errors childthread, call
Alterware S1-Mod
BO3 T7 original 🚫 Not supported #using, #namespace, function, .gscc, .csc, .cscc
IW IW7 original
Aurora IW7-mod
CoD4:MWR H1 original
Aurora H1-mod ❗ Tested, errors param default value, call, childthread
WWII S2 original
BO4 T8 original
MW IW8 original
BOCW T9 original
Vanguard S3 original
MWII IW9 original
MWIII S4 original
BO6 T10 original

Change log

View changes

Features

Syntax highlighting

Syntax highlight



Completion items

Completion items - local functions

Completion

Completion items - included functions via #include

Completion

Completion items - with CoD2 MP functions

Completion

Completion items - variables

Completion

Completion items - variables with recognized variable type

Completion

Completion items - variables from included workspace folders

Completion



Diagnostics

Diagnostics - error messages

Completion

Diagnostics - invalid file for #include

Completion

Diagnostics - possible missing semicolon indication

Completion



Functions

Function - go to definition

Function definition

Function - hover info

Function hover

Function - hover info over CoD2 MP function spawn:

Function hover

Function - hover over path

Function hover

Function - references

Function hover

Function - rename

Function hover



Workspace folders

VSCode multi-root workspace can be used to "join" your mod folders as they get loaded into the game.

The order of how files are being searched is now determined by how the workspace folder appears in explorer tab. The last folder is searched first.

Function hover

It can simulate your .IWD files - their file name determines which files gets loaded first in the game.

For example, this is typical setup:

From game perspective, it could represents these files:

The alphabetical order of .IWD is important to correctly replace original files. The order of the workspace folders must be the same!



Code actions

Code actions - include folder for file references

Function hover

Code actions - ignore missing files

Function hover



GSC Files

Visualization of replaced (unreachable) files.

When GSC file is replaced by another GSC file in multi-root workspace because of the same game path, the code in text editor is shown as semi-transparent (unreachable code)
Example:

Function hover



Other

Status bar

Allows quickly change the targeted game or open settings.

Function hover

Side panel

GSC side panel with "Workspace", "File" and "Other" views. It shows information about workspace setup, parsed GSC files and available commands to run. In future version it will allow to change settings more interactively.

Function hover

List of features



TODO list

Priority

Install

This extension is available through Visual Studio Marketplace.

Support

Please test this extension in vscode on your GSC files and report bugs / suggestions on the github page or on discord KILLTUBE #vscode-cod-gsc

Donate with PayPal