VTOL VR Documentation

This page provides help to modders with different information people have found out about VTOL VR, such as where to find all the actors or how to get the players vehicle.
This page will get improved upon when there are more discoveries.


Getting all actors in scene

Inside the games class TargetManager, there is a list of all the current actors in the scene. Each actor registers and unregisters with this list when they get spawned and destroyed so make sure to keep checking this list in case the one you are using has been destroyed. There also is allied and enemy lists in the class TargetManager if you just want one team.
//All return a list of the class actor.

Posting message to the flight log

You can send messages to the flight logger by using the class FlightLogger. This can be useful when you want to debug values to see inside of VR without taking off the headset.
FlightLogger.Log("My Message");

Getting all Campaigns

When you have the campaign, you can get a list of all the scenarios inside that campaign.
//Returns a list of the class 'VTScenarioInfo'

Getting and setting pilots save

You can get a PilotSave from the PilotSaveManager class as long as you know the name of the save. Then you can set their pilot with PilotSaveManager.current.
PilotSaveManager.pilots; //Dictionary of the class 'PilotSave' with the key being their names'
PilotSaveManager.current; //To set the selected Pilot

VTOL VR's Debug Camera Controls

The game has a debug camera which the developer uses to view around the different actors in the scene from his desktop. These are the controls for it.
Insert - Enables/Disables
    [ - Moves back an actor in the list
    ] - Moves forward an actor in the list
    . - Cycles through time scales (0.1,0.25,0.5,1,2,4)
    , - Sets the timescale to 0.1
    / - Sets the time scale to 1
    Tab - Enables/Disables Gun shooting from mouse
    Left Shift + Scroll - Changes FOV
    h - Enables Head debug (Doesn't seem to work)
    v - Does a toggle mod (Doesn't seem to work)
    t - Does something called tgtMode (Doesn't seem to do anything)

Harmony - Patching Methods

Run this to patch your methods! https://github.com/pardeike/Harmony/wiki/Bootstrapping
private void Start()
    HarmonyInstance instance = HarmonyInstance.Create("me.mymod");

Harmony - Replacing Methods

Use this to replace a method. The return false stops the original method.
public class Patch0
    public static bool Prefix()
        //Your Custom Code
        return false;

Harmony - Getting and Setting Private Variables

Use this snippet to get and set private variables.
var foo = FindObjectOfType<CustomClass>();