This hack must be required by a mod to be enabled.
This hack adds several new mission objectives, mission conditions, script commands and other new script functionality.
Requiring This Hack
To require this hack, add this line to your mod's Meta.ini:
RequiredHack=AdditionalScriptFunctionalityUsing This Hack
This hack simply provides additional commands you can use in MFK and CON scripts. You can find pages with more information listed below.
Console Commands
See All Commands.
Mission Objectives
See All Objective Types.
Condition Types
See All Conditions.
Version History
Version 1.27
- Added the IfCurrentCar conditional.
- Added the IfStartedInCar conditional.
- Added the IfCurrentLevel conditional.
- Added the IfAllMissionsCompleted conditional.
- Added the IfAnyMissionCompleted conditional.
- Added the IfCurrentSkin conditional.
- Added the IfRewardUnlocked conditional.
- Added the SetStageKickForce command.
- Added the SetStageSlamForce command.
- Added the SetStageAirGravity command.
- Added the SetStageEnabledCheats command.
- Added the IfAllCheatsEnabled conditional.
- Added the IfAnyCheatEnabled conditional.
- Added the AddStageDynaLoadData command.
- Added the SetStageDynaLoadData command.
- Added the SetStagePedGroup command.
- Added the SetStageTrafficGroup command.
- Added the SetStageMusicEvent command.
- This is similar to Radical's StageStartMusicEvent command, except it can trigger all music events instead of a limited subset.
- Added the SetObjFailDistance command.
Note: Due to the nature of how console scripts work in the game, all conditional commands are evaluated at the time the script is executed. This unfortunately limits the utility of many of these, currently, but we believe they still have some use cases even within these limitations.
Version 1.26
CON Commands
Added the SetWheelieOffsetX command. This is equivalent to Radical's SetWheelieOffsetY and SetWheelieOffsetZ commands but for the X axis.
Version 1.25.1
Overhauled the handling of stage vehicles in regards to checkpoints.
This fixes various issues when resuming from a checkpoint when the mission added stage vehicles before it such as:
- Stage vehicles spawning near the origin of the world when activated in the stage with the checkpoint or any subsequent stages without a locator being given to ActivateVehicle.
- Stage vehicles that were added but not activated before the checkpoint would not exist if the checkpoint stage did not activate them even though they should.
- Several script functions added by this hack would fail and show an assert when used before the checkpoint:
- Stage vehicles added and activated in the first stage would cause an assert when using the
-testingcommand line argument.- Only if the checkpoint was not on the first stage (why would you even have one there?)
Version 1.25
- Added checkpoints. There are several commands related to this functionality:
- Made it so adding vehicle characters and manipulating them in stages prior to a stage that calls the RESET_TO_HERE is now handled when selecting or restarting the mission.
- Added the SetStageVehicleAbductable command.
- Added the ResetStageVehicleAbductable command.
Version 1.23.8
- Made it so this hack actually knows the previous or next stage when starting or ending a stage respectively.
- In previous versions, the hack just guessed the previous or next stage by subtracting or adding one to the current stage index.
- The old logic could cause issues in certain cases such as bombbarrel (nuclear waste) stages that can send you back multiple stages.
Fixed a bug where calling SetPedsEnabled alongside StreetRacePropsLoad would cause pedestrians to become disabled after the mission ends until another mission puts it back.
Version 1.23.5
Added the SetCollectibleSoundEffect command to set the sound effect used when picking up a collectible in delivery, dump or race objectives.
Version 1.23.4
- Fixed a crash when cancelling a mission or failing a mission and choosing "no" when the player is inside some types of disabled triggers.
- Made it so this hack does not assert if a locator is missing if Missing Locator Detection is enabled in Debug Checks.
Version 1.23.1
Fixed a conflict between this hack and the Debug Test hack when its Menus > Pause Menu > Pause Always Allowed setting was enabled.
This message would show the conflict as being between the Debug Test hack and Hack Support hack because it was caused by Additional Script Functionality being enabled and requesting functionality from the latter.
Version 1.22.4
Fixed an assert when starting a mission that has an "insidetrigger" or "outsidetrigger" objective or condition on its first stage.
Version 1.22.3
Made triggers disabled with the DisableTrigger command in two or more subsequent stages stay disabled between the stages.
Version 1.22
General
- Fixed an issue introduced in 1.21 where there would be an assert when entering the bonus game.
- Made characters added to cars with ASF commands get removed from and re-added to the world when the car does instead of just when it explodes and is repaired.
- Characters also now only get added immediately if the car is already in the world.
- This resolves an issue where characters could remain floating in the air after the game removed a car.
- Made
g_CustomMissionData.empty()only assert when using the-testingcommand line argument.
MFK Commands
- Added the AddParkedCar.
- This allows you to add a car to the level's parked cars list without needing it to be also added to a traffic group with the AddTrafficModel command.
- Added the UseTrafficGroup.
- This sets the current traffic group index when getting to the mission via mission select or restarting it.
- This does not work unless the DynamicTraffic feature of CustomTrafficSupport is set to
ModelsorSlots.
Version 1.21
Removed the "!m_bStart" assert (previously on line 3336) related to using SetParkedCarsEnabled.
Removed the "!m_bStart" assert (previously on line 3292) related to using SetPedsEnabled.
Version 1.20
MFK Commands
- Added the SetParkedCarsEnabled command.
- This allows you to enable or disable parked cars for a mission.
- Added the SetPedsEnabled command.
- This allows you to enable or disable pedestrians for a mission.
Version 1.19
This update brings about the ability to add characters to the player's car or stage vehicles.
You can use this exciting new functionality to have passengers accompany the player in missions and just have characters present in a car.
CON Commands
- Added the AddVehicleCharacter command.
- Added the AddVehicleCharacterSuppressionCharacter command.
- Added the SetVehicleCharacterAnimation command.
- Added the SetVehicleCharacterJumpOut command.
- Added the SetVehicleCharacterScale command.
- Added the SetVehicleCharacterVisible command.
MFK Commands
- Added the AddStageVehicleCharacter command.
- Added the RemoveStageVehicleCharacter command.
- Added the SetStageVehicleCharacterAnimation command.
- Added the SetStageVehicleCharacterJumpOut command.
- Added the SetStageVehicleCharacterScale command.
- Added the SetStageVehicleCharacterVisible command.
- Added the SetStageVehicleAllowSeatSlide command.
Updated to default the second argument to SetStageCharacterModel to default the player's current animation set instead of requiring the argument.
Version 1.18.1
New Features
Added the
nonedisplay mode for SetCondDisplay that works on all ASF conditions.- Added the new hitandrunlost condition.
- This will fail the player if they lose the Hit & Run they have during the stage.
- Added the new SetStageVehicleNoDestroyedJumpOut command.
- This prevents a driver from jumping out of a car should it explode.
- Added the new SetStageAllowMissionCancel command.
- This prevents the player from restarting or cancelling the mission on the stage.
Made ASF commands that take a boolean as an argument accept
trueorfalseas well as 0 or 1 instead of accepting any integer and treating it as true if it's not 0.
Bug Fixes
Fixed an issue where calling SetStageCharacterModel in a stage that also calls RESET_TO_HERE that is preceded by another stage that calls this command (with the same model and animation set) didn't work.
- Fixed an issue where pressing enter to continue after restarting from a failed delayed condition in a reset-in-car mission with "Action/Get Out" bound to enter would cause you to exit your vehicle after the mission restarted.
Fixed an issue where
hitandrunloststages that also callSetStageHitAndRun(100);to trigger a hit and run would automatically complete if you entered the stage without already having a Hit & Run.