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 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)

Console File Commands (.con)

Index

This is a list of all the commands that you can use in .con files.

  • SetAllowSeatSlide
  • SetBrakeScale
  • SetBurnoutRange
  • SetCMOffsetX
  • SetCMOffsetY
  • SetCMOffsetZ
  • SetCharacterScale
  • SetCharactersVisible
  • SetDamperC
  • SetDonutTorque
  • SetDriver
  • SetEBrakeEffect
  • SetGamblingOdds
  • SetGasScale
  • SetGasScaleSpeedThreshold
  • SetHasDoors
  • SetHighRoof
  • SetHighSpeedGasScale
  • SetHighSpeedSteeringDrop
  • SetHitPoints
  • SetIrisTransition
  • SetMass
  • SetMaxSpeedBurstTime
  • SetMaxWheelTurnAngle
  • SetNormalSteering
  • SetShadowAdjustments
  • SetShininess
  • SetSlipEffectNoEBrake
  • SetSlipGasScale
  • SetSlipSteering
  • SetSlipSteeringNoEBrake
  • SetSpringK
  • SetSuspensionLimit
  • SetSuspensionYOffset
  • SetTireGrip
  • SetTopSpeedKmh
  • SetWeebleOffset
  • SetWheelieOffsetY
  • SetWheelieOffsetZ
  • SetWheelieRange

Console File Commands (.mfk)

Console File Commands (.mfk)

Index

Level Load Commands

Gag Commands

  • AddGagBinding
  • ClearGagBindings
  • GagBegin
  • GagCheckCollCards
  • GagCheckMovie
  • GagEnd
  • GagPlayFMV
  • GagSetAnimCollision
  • GagSetCameraShake
  • GagSetCoins
  • GagSetCycle
  • GagSetInterior
  • GagSetIntro
  • GagSetLoadDistances
  • GagSetOutro
  • GagSetPersist
  • GagSetPosition
  • GagSetRandom
  • GagSetSound
  • GagSetSoundLoadDistances
  • GagSetSparkle
  • GagSetTrigger
  • GagSetWeight

Level Initialization Commands

  • SetCoinDrawable
  • SetParticleTexture
  • Suppress Driver

Actor Commands

  • AddBehaviour
  • AddFlyingActor
  • AddFlyingActorByLocator
  • AddShield
  • AddSpawnPoint
  • AddSpawnPointByLocatorScript
  • PreallocateActors
  • SetActorRotationSpeed
  • SetCollisionAttributes
  • SetProjectileStats

Mission Load Commands

  • LoadDisposableCar
  • LoadP3DFile

Mission Initialization Commands

  • SetDynaLoadData
  • SetInitialWalk
  • SetMissionResetPlayerInCar
  • SetMissionResetPlayerOutCar
  • UsePedGroup

Stage Commands

Objective Commands

General

"dialogue" Objective

"fmv" Objective

  • SetFMVInfo

"goto" Objective

  • TurnGotoDialogOff

"loadvehicle" Objective

  • SetVehicleToLoad

Condition Commands

Rewards Commands

  • BindReward
  • SetCarAttributes
  • SetTotalGags
  • SetTotalWasps

Dummy Commands

These commands do nothing.

  • AddVehicleSelectInfo
  • ClearVehicleSelectInfo
  • SetCarStartCamera
Console File Commands (.mfk)

AddNPC

Description

Adds a new character or moves the existing character to the specified locator upon reaching a specific stage in a mission.

AddNPC(Character_Name, Locator_Name);

Parameters

Character_Name

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.

Locator_Name

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.

Examples

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(); 
Console File Commands (.mfk)

AddStage

Description

This command begins a stage in a mission.

AddStage();

Parameters

This command takes a minimum of 0 parameters and a maximum of 7 parameters.

final

The string 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

The string locked followed by car or 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.

Other Parameters

In many of Radical's mission scripts, a number is passed as an argument to this command. This number is meaningless.

Examples

Final Stage

A final stage should only be defined during a Story Mission, Street Race or Bonus Mission. It should not be used during a Sunday Drive mission.

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();

Locked Stage

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 buyskin objective.

A locked stage should always have a dialogue objective.

AddStage("locked","car","homer_v");
	SetStageMessageIndex(0);
	AddObjective("dialogue");
		...
	CloseObjective();
CloseStage();

AddStage();
	AddObjective("buycar", "homer_v");
		// 
	CloseObjective();
CloseStage();

Limitations

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.

More Information

  • A locked stage should only be used on a dialogue objective stage.
  • A locked stage should only be used before a buycar or buyskin objective stage.
Console File Commands (.mfk)

SetConversationCam

Description

Allows you to set which conversation camera is used for each line of dialog.

SetConversationCam(Dialog_Index, Camera_Name);

Parameters

Dialog_Index

The index for the line of dialog you want the camera used during.

Camera_Name

The name of the camera to use for the previously specified dialog.

Examples

TODO


Console File Commands (.mfk)

SetMusicState

Description

Changes a music state in the Level's RadMusic Script.

SetMusicState(State_Name, State_value);

Parameters

State_Name

The name of the state in the RadMusic Script.

State_Value

The value of the state in the RadMusic Script.

Examples

AddStage();
	...
	SetMusicState("Mission7", "Stage2");
CloseStage();
Console File Commands (.mfk)

StageStartMusicEvent

Description

Triggers the specified music event when the stage starts.

StageStartMusicEvent(Event_Name);

Parameters

Event Name

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.

Examples

AddStage();
	...
	StageStartMusicEvent("m7_drama");
CloseStage();

Pure3D Files (.p3d)

Pure3D File Chunk Types

Pure3D File Chunk Types

Grid (0x1000)

Pure3D File Chunk Types

Grid Cell (0x1001)

Pure3D File Chunk Types

Locator 2 (0x1003)

Pure3D File Chunk Types

Spline 2 (0x1005)

Pure3D File Chunk Types

NAV (0x1006)

Pure3D File Chunk Types

Intersect Mesh (0x1008)

Pure3D File Chunk Types

Intersect Mesh 2 (0x1009)

Pure3D File Chunk Types

Black Magic (0x1025)

Pure3D File Chunk Types

Camera (0x2200)

Pure3D File Chunk Types

Light Group (0x2380)

Pure3D File Chunk Types

Texture 2 (0x3500)

Pure3D File Chunk Types

Image 2 (0x3510)

Pure3D File Chunk Types

Image Data 2 (0x3511)

Pure3D File Chunk Types

Texture Animation (0x3520)

Pure3D File Chunk Types

Texture Animation 2 (0x3521)

Pure3D File Chunk Types

Texture Animation 3 (0x42A0)

Pure3D File Chunk Types

Skeleton (0x4500)

Pure3D File Chunk Types

Skeleton Joint (0x4501)

Pure3D File Chunk Types

Skeleton Joint Mirror Map (0x4503)

Pure3D File Chunk Types

Skeleton Joint Bone Preserve (0x4504)

Pure3D File Chunk Types

Composite Drawable (0x4512)

Pure3D File Chunk Types

Composite Drawable Skin List (0x4513)

Pure3D File Chunk Types

Composite Drawable Prop List (0x4514)

Pure3D File Chunk Types

Composite Drawable Skin (0x4515)

Pure3D File Chunk Types

Composite Drawable Prop (0x4516)

Pure3D File Chunk Types

Composite Drawable Effect List (0x4517)

Pure3D File Chunk Types

Composite Drawable Effect List (0x4518)

Pure3D File Chunk Types

Composite Drawable Sort Order (0x4519)

Pure3D File Chunk Types

Multi Controller (0x48A0)

Pure3D File Chunk Types

Multi Controller Tracks (0x48A1)

Pure3D File Chunk Types

Locator (0x3000005)

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.

Types

Type Name¹ Uses
0 Event Locator  
1 Script Locator  
2 Locator² Used for Wasp Cameras, Gag Positions and Gag Triggers³.
3 Car Start Locator  
4 Spline Locator  
5 Zone Event Locator  
6 Occlusion Locator  
7 Interior Entrance Locator  
8 Directional Locator  
9 Action Event Locator  
10 FOV Locator  
11 ? Unused.
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

Pure3D File Chunk Types

Trigger Volume (0x3000006)

RadMusic Scripts (.rms)

RadMusic Scripts (.rms)

About RadMusic Scripts

TODO