Donut Team is a labor of love, built and maintained by a small group of passionate developers. We invest our own time and resources to offer our tools, mods, and web services completely free of charge.

We don't run ads, and we will never sell your data - period.

If you've enjoyed anything we've created, please consider supporting our work with a one-time or monthly donation via our Ko-fi page . Every contribution helps us continue building great experiences for the community.

Dismiss
  • Modding Tools
  • Lucas' Simpsons Hit & Run Mod Launcher
  • Hacks
  • Mod Requirable Hacks
  • Additional Script Functionality

Additional Script Functionality

Available since Version 1.18.

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=AdditionalScriptFunctionality

Using 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

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 -testing command line argument.
    • Only if the checkpoint was not on the first stage (why would you even have one there?)

Version 1.25

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 -testing command 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 Models or Slots.

Version 1.21

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

MFK Commands

Version 1.18.1

New Features

  • Added the none display 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 true or false as 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 hitandrunlost stages that also call SetStageHitAndRun(100); to trigger a hit and run would automatically complete if you entered the stage without already having a Hit & Run.