Cyber Engine Tweaks
Ask or search…
K
Links
Comment on page

VehicleSystem

Documents the VehicleSystem class and its functions.
PARTIALLY DOCUMENTED
We have limited information on how these commands function. More specifics will be added over time.

Invoking VehicleSystem

To invoke the vehicle system, use the following Global function:
vs = Game.GetVehicleSystem()
Following that, you can invoke sub-functions listed below as follows:
vs:EnableAllPlayerVehicles()

Sub-Functions

EnableAllPlayerVehicles

EnableAllPlayerVehicles
Info & Usage
EnableAllPlayerVehicles();
Grant the player all available vehicles.
Usage
vs = Game.GetVehicleSystem()
vs:EnableAllPlayerVehicles()

EnablePlayerVehicle

EnablePlayerVehicle
Info & Usage
EnablePlayerVehicle(vehicle : String, enable : Bool, optional despawnIfDisabling : Bool)
Grant the player a specific player vehicle. See this list for currently known vehicle strings.
Usage
vs = Game.GetVehicleSystem()
vs:EnablePlayerVehicle("Vehicle.v_sport1_quadra_turbo_r_player", true, false)

GetPlayerVehicles

GetPlayerVehicles
Info & Usage
GetPlayerVehicles(out vehicles : array:PlayerVehicle);
List currently owned player vehicles.

TogglePlayerActiveVehicle

TogglePlayerActiveVehicle
Info & Usage
TogglePlayerActiveVehicle(vehicleID : GarageVehicleID, vehicleType : gamedataVehicleType, enable : Bool)
Toggle the most recently used player vehicle.
Params to pass to this function are unknown

GetPlayerUnlockedVehicles

GetPlayerUnlockedVehicles
Info & Usage
GetPlayerUnlockedVehicles(out unlockedVehicles : array:PlayerVehicle);
Returns a list of vehicles the player has unlocked.

SpawnPlayerVehicle

SpawnPlayerVehicle
Info & Usage
SpawnPlayerVehicle(optional vehicleType : gamedataVehicleType);
Spawns a specific player vehicle.
We cannot currently pass the params required for this function. We expect this to change as more parameter types are supported by CET.

DespawnPlayerVehicle

DespawnPlayerVehicle
Info & Usage
DespawnPlayerVehicle(vehicleID : GarageVehicleID);
De-spawn a player vehicle.
The param type to pass to this function is currently unknown

ToggleSummonMode

ToggleSummonMode
Info & Usage
ToggleSummonMode();
Using this command once makes it so that when you summon a vehicle, it instantly spawns in front of you as opposed to automatically driving to you. Use command again to revert to default behavior.
Usage
vs = Game.GetVehicleSystem()
vs:ToggleSummonMode()

Unknown / Do Not Function

We have limited or no information on what the below functions do nor how they are used at this time.
EnablePlayerVehicleCollision(enable : Bool);
GetVehicleRestrictions() : array:CName;
OnVehicleSystemAttach();

Currently Known Vehicle Strings

Vehicle.v_sport1_herrera_outlaw_player
Vehicle.v_sport1_quadra_turbo_player
Vehicle.v_sport1_quadra_turbo_r_player
Vehicle.v_sport1_rayfield_aerondight_player
Vehicle.v_sport1_rayfield_caliburn_player
Vehicle.v_sport2_mizutani_shion_player
Vehicle.v_sport2_mizutani_shion_nomad_player
Vehicle.v_sport2_porsche_911turbo_player
Vehicle.v_sport2_quadra_type66_player
Vehicle.v_sport2_quadra_type66_avenger_player
Vehicle.v_sport2_quadra_type66_nomad_player
Vehicle.v_sport2_villefort_alvarado_player
Vehicle.v_standard25_mahir_supron_player
Vehicle.v_standard25_villefort_columbus_player
Vehicle.v_standard25_thorton_colby_pickup_player
Vehicle.v_standard2_archer_hella_player
Vehicle.v_standard2_archer_quartz_player
Vehicle.v_standard2_chevalier_thrax_player
Vehicle.v_standard2_makigai_maimai_player
Vehicle.v_standard2_thorton_colby_player
Vehicle.v_standard2_thorton_galena_player
Vehicle.v_standard2_thorton_galena_nomad_player
Vehicle.v_standard2_villefort_cortes_player
Vehicle.v_standard2_villefort_cortes_delamain_player
Vehicle.v_standard3_chevalier_emperor_player
Vehicle.v_standard3_thorton_mackinaw_player
Vehicle.v_sportbike1_yaiba_kusanagi_player
Vehicle.v_sportbike2_arch_player
Vehicle.v_sportbike3_brennan_apollo_player
Vehicle.v_sportbike3_brennan_apollo_nomad_player
Vehicle.v_sportbike2_arch_jackie_player
Vehicle.v_sportbike2_arch_jackie_tuned_player
Vehicle.v_sport2_villefort_alvarado_valentinos_player
Vehicle.v_standard2_thorton_galena_bobas_player
Vehicle.v_standard3_thorton_mackinaw_ncu_player
Vehicle.v_sport2_quadra_type66_nomad_ncu_player
Vehicle.v_sportbike1_yaiba_kusanagi_tyger_player
Vehicle.v_sportbike2_arch_tyger_player
Vehicle.v_sport2_mizutani_shion_nomad_02_player
Vehicle.v_sport1_rayfield_caliburn_02_player
Vehicle.v_standard25_thorton_colby_pickup_02_player
Note: There is 1 player ownable vehicle missing from this list.

Notes / Caveats

TweakDB currently contains entries for vehicles that aren't suffixed by _player. These vehicles cannot be added to owned vehicles due to flags in TweakDB which flags vehicles the player can own. Only vehicle strings that end in _player can be added to owned vehicles at this time.