Forum Mod Bakery Docs

Cell out Restoration and other silly things.

Please login to contribute to the conversation.
How do I replace mission cars without crashing the game?
You have to load any vehicles you want to use either in the level's "level.mfk" script or in the mission segment's load script "m7l.mfk" for Mission 7 main segment, for instance. You use the "LoadDisposableCar" function to do this.

// VEHICLE_INTERNAL_NAME is the internal name of the vehicle - "homer_v" for the 70s Sports Car for example.
// VEHICLE_SKELETON_NAME is always just the internal name of the vehicle again. Radical use it differently once, not sure.
// VEHICLE_TYPE usually has to be correct and could be "DEFAULT" (level default vehicle), "OTHER" (forced mission vehicle), or "AI" (AI vehicle).

With a vehicle loaded, you can use it within mission stages (defined in the mission script, "m7i.mfk" for Mission 7 main segment for instance). You can do this with two different functions at different points.

// Using this function adds/teleports the vehicle (VEHICLE_INTERNAL_NAME) to a given/loaded Type 3 locator (LOCATOR_TYPE_3).
// They will, in that stage, use the specified AI mode (AI_MODE) which could be "NULL" (remains completely still),
// "race", "target", "evade", "waypoint" (follows stage waypoints), or "chase" (chases the player).
// If a CON file is specified (CON_FILE_PATH, relative to "/scripts/cars") they will use that to base their statistics off of, if not the vehicle's default CON file will be used.
// If a driver is specified (DRIVER_INTERNAL_NAME) and the CON file does not call "AddDriver" then that driver will appear in the vehicle.
// CON_FILE_PATH and DRIVER_INTERNAL_NAME cannot be changed with subsequent function calls; only the first is acknowledged, as far as I know.
// Similar to AddStsgeVehicle, but here...
// ... using DRIVER_INTERNAL_NAME is pointless; you probably would've called "AddStageVehicle" prior in the mission and it apparently forces this driver there too.
// ... LOCATOR_TYPE_3 can be left blank/as "" and the vehicle will just resume from its location in the prior stage, assuming it has one.
Thank you Ill try it out