Call of Duty 5: SP Script Structure
From COD Modding & Mapping Wiki
GSC scripts are more than just event scripts. Various scripts are used throughout the game for a variety of tasks. The scripts files can be broken down into a few categories.
- Format: levelname.gsc
- Location: \raw\maps
- Description: The level scripts are most commonly used scripts files by designers on a day to day basis. They contain the event scripting for each level. Typically, each function is labeled with the event name so that any other scripter can quickly debug the script if necessary.
- Format: _utilityname.gsc
- Location: \raw\maps
- Description: The utility scripts contain scripting that encompases one particular functionality. For example, all the scripting related to sherman tanks would be located in _sherman.gsc, or the spawning in of Ai functionality is contained in _spawner.gsc. These scripts are usually left alone in the later stages of the project. Because editing these script can potentially effect the entire game, the lead scripter should be notified of any changes to any utility scripts.
- Format: animscriptname.gsc
- Location: \raw\animscripts
- Description: The animscripts are what drive the AI in cod. Modifying the animscripts is very dangerous unless you know what you're doing, and is usually left for the lead scriper and programmers. All the scripts for the AI reactions to just about everything (cover, running, pain, movement, etc.) are all contained in the animscripts.
- Format: traversalname.gsc
- Location: \raw\animscripts\traverse
- Description: The traversal scripts are used for making the AI traverse over objects. In Radiant, the scripter needs to add a node_negotiation_begin pointed to a node_negotiation_end. The begin node needs to have the key of "animscript" assigned, and the value of the animscript the Ai should use. These are used for making the AI jump over walls, jump down from a ledge, climb through windows, and so on.
- Format: team_country_weapontype_weapon.gsc
- Location: \raw\aitype
- Description: These scripts are autogenerated and should never be modified unless through GDT files. They define the team, loadout, defaut health, etc of each AI type.
- Format: character_gametype_country_charactertype_weapon.gsc
- Location: \raw\character
- Description: These scripts are autogenerated and should never be modified unless through GDT files. they define the models (heads, bodies) to use for each character.
- Format: codescriptname.gsc
- Location: \raw\codescripts
- Format: commonscriptname.gsc
- Location: \raw\common_scripts
Sources: Treyarch's Wiki