Hit & Run File Types
This book contains documentation on the inner workings of the various proprietary file types found in Hit & Run.
- Console Files (.con, .mfk)
- Console File Commands (.con)
- Console File Commands (.mfk)
- Pure3D Files (.p3d)
- Pure3D File Chunk Types
- Grid (0x1000)
- Grid Cell (0x1001)
- Locator 2 (0x1003)
- Spline 2 (0x1005)
- NAV (0x1006)
- Intersect Mesh (0x1008)
- Intersect Mesh 2 (0x1009)
- Black Magic (0x1025)
- Camera (0x2200)
- Light Group (0x2380)
- Texture 2 (0x3500)
- Image 2 (0x3510)
- Image Data 2 (0x3511)
- Texture Animation (0x3520)
- Texture Animation 2 (0x3521)
- Texture Animation 3 (0x42A0)
- Skeleton (0x4500)
- Skeleton Joint (0x4501)
- Skeleton Joint Mirror Map (0x4503)
- Skeleton Joint Bone Preserve (0x4504)
- Composite Drawable (0x4512)
- Composite Drawable Skin List (0x4513)
- Composite Drawable Prop List (0x4514)
- Composite Drawable Skin (0x4515)
- Composite Drawable Prop (0x4516)
- Composite Drawable Effect List (0x4517)
- Composite Drawable Effect List (0x4518)
- Composite Drawable Sort Order (0x4519)
- Multi Controller (0x48A0)
- Multi Controller Tracks (0x48A1)
- Locator (0x3000005)
- Trigger Volume (0x3000006)
- RadMusic Scripts (.rms)
Console Files (.con, .mfk)
About Console Files
Console files are a rudimentary Scripting Language that was developed exclusively for use in this game.
The files have a simplistic structure and syntax and are made up of a series of commands that take varying amounts of arguments. The commands are always executed in the order they are defined. The language does not have a concept of variables, defining functions, returning values or many other common features of more advanced scripting languages.
Console files come in two types, CON scripts and MFK scripts. The former is used exclusively to configure vehicles while the latter is used for initializing rewards, loading and initializing levels and loading and initializing missions.
Console File Commands (.con)
This is a list of all the commands that you can use in .con files.
Console File Commands (.mfk)
Level Load Commands
Level Initialization Commands
- Suppress Driver
Mission Load Commands
Mission Initialization Commands
These commands do nothing.
Adds a new character or moves the existing character to the specified locator upon reaching a specific stage in a mission.
The name of the character you're loading, i.e "homer".
Characters do not need to be explicitly loaded prior to the mission script being executed.
The name of the Locator where you'd like the NPC to spawn, i.e "level1_homer_walkto".
This locator can be loaded at any point prior to the mission script being executed.
Here's an example of this command being used to add
marge to a stage on a Locator named
m1_marge_sd. Note that this command must be called inside the stage's objective.
AddStage(); AddObjective("dummy"); AddNPC("marge", "m1_marge_sd"); CloseObjective(); CloseStage();
This command begins a stage in a mission.
This command takes a minimum of 0 parameters and a maximum of 7 parameters.
final can be specified as any of the first 3 arguments to this command to mark the stage as the final stage of the mission
locked followed by
skin as the second parameter and finally the name of a car or skin respectively as the third parameter will create a locked stage. This type of stage will display a message (specified by the stage's call to SetStageMessageIndex) on completion if the specified conditions are not met.
In many of Radical's mission scripts, a number is passed as an argument to this command. This number is meaningless.
Upon completing a final stage, the mission it is apart of will be marked as complete. Stages should not follow a final stage as this may cause unexpected issues
Here's an example of a Final stage with a timer objective wherein upon completing, the mission will be marked as complete.
AddStage("final"); AddObjective("timer"); SetDurationTime(1); CloseObjective(); CloseStage();
A locked stage should only be defined in a Sunday Drive mission as it is intended to be followed by a stage with a
buycar or a
A locked stage should always have a
AddStage("locked","car","homer_v"); SetStageMessageIndex(0); AddObjective("dialogue"); ... CloseObjective(); CloseStage(); AddStage(); AddObjective("buycar", "homer_v"); // CloseObjective(); CloseStage();
Maximum Stages Per Mission
You may only have 25 stages per mission.
Maximum Locked Stage Arguments
You may only have 2 locked arguments (car and outfit) per stage.
- A locked stage should only be used on a
- A locked stage should only be used before a
Allows you to set which conversation camera is used for each line of dialog.
The index for the line of dialog you want the camera used during.
The name of the camera to use for the previously specified dialog.
Changes a music state in the Level's RadMusic Script.
The name of the state in the RadMusic Script.
The value of the state in the RadMusic Script.
AddStage(); ... SetMusicState("Mission7", "Stage2"); CloseStage();
Triggers the specified music event when the stage starts.
The name of the event to trigger when the stage starts.
NOTE: This command only has access to specific events specified in the level's RadMusic Script.
AddStage(); ... StageStartMusicEvent("m7_drama"); CloseStage();
Pure3D Files (.p3d)
Pure3D File Chunk Types
Grid Cell (0x1001)
Locator 2 (0x1003)
Spline 2 (0x1005)
Intersect Mesh (0x1008)
Intersect Mesh 2 (0x1009)
Black Magic (0x1025)
Light Group (0x2380)
Texture 2 (0x3500)
Image 2 (0x3510)
Image Data 2 (0x3511)
Texture Animation (0x3520)
Texture Animation 2 (0x3521)
Texture Animation 3 (0x42A0)
Skeleton Joint (0x4501)
Skeleton Joint Mirror Map (0x4503)
Skeleton Joint Bone Preserve (0x4504)
Composite Drawable (0x4512)
Composite Drawable Skin List (0x4513)
Composite Drawable Prop List (0x4514)
Composite Drawable Skin (0x4515)
Composite Drawable Prop (0x4516)
Composite Drawable Effect List (0x4517)
Composite Drawable Effect List (0x4518)
Composite Drawable Sort Order (0x4519)
Multi Controller (0x48A0)
Multi Controller Tracks (0x48A1)
A locator is a versatile type of chunk whose primary feature is containing a location in the world and depending on the type, one or more Trigger Volumes and potentially even other chunk types.
|2||Locator²||Used for Wasp Cameras, Gag Positions and Gag Triggers³.|
|3||Car Start Locator|
|5||Zone Event Locator|
|7||Interior Entrance Locator|
|9||Action Event Locator|
|12||Static Cam Locator|
|13||Ped Group Locator||Used to change the active Ped Group when the player enters it's trigger.|
|14||?||When loaded, the game will place a coin at the locator's position.|
|15||Spawn Point||Created internally to house triggers that spawn wasp cameras.|
¹ These names are the official names Radical gave to these locator types and are derived from the game's Run-Time Type Information.
² This type of locator has no effect unless it's referenced by a script.
³ Gag Triggers are different from most Trigger Volumes since they're created automatically at the position of this locator
Trigger Volume (0x3000006)
RadMusic Scripts (.rms)
About RadMusic Scripts