VTOL VR Mod Loader

VTOL VR Mod Loader

120 ratings
VTOLAPI
2
4
5
   
Award
Favorite
Favorited
Unfavorite
Multiplayer Type: Client Side
File Size
Posted
Updated
53.563 KB
Jun 11, 2024 @ 5:07am
Sep 12 @ 7:34am
15 Change Notes ( view )

Subscribe to download
VTOLAPI

Description
Provides useful methods for mod developers.



Add a reference to this dll from
steamapps\workshop\content\3018410\3265689427

Scene loaded action
VTAPI.SceneLoaded += SceneLoaded; void SceneLoaded(VTScenes scene) { switch (scene) { // Do code depending on the scene // If it's a scenario, this will only be ran when the scenario is ready. } }

Get Players Vehicle Object
GameObject obj = VTAPI.GetPlayersVehicleGameObject();

Fix Shaders on Object
GameObject go; VTAPI.FixShaders(go);

Referenceless Variable Access
public class ModA { private float _myEpicFloat = 420.69f; void Awake() { VTAPI.RegisterVariable("Danku-ModA", new VTModVariable("EpicFloat", _myEpicFloat, OnSetEpicFloat, OnGetEpicFloat)); VTAPI.RegisterVariable("Danku-ModA", new VTModVariable("DoThing", DoThing)); // Not a variable but who cares } void UnLoad() { VTAPI.UnregisterMod("Danku-ModA"); } // Actions are used to get and set the variables, so these can be replaced with lambda expressions. void OnSetEpicFloat(object v) { _myEpicFloat = (float)v; } void OnGetEpicFloat(ref object v) { v = _myEpicFloat; } void DoThing() { // Do Stuff } } public class ModB { private VTModVariables _modAVariables; private float _modAFloat = -1; void ModAStuff() { if (VTAPI.TryGetModVariables("Danku-ModA", out _modAVariables)) { if (_modAVariables.TryGetValue("EpicFloat", out var outFloat)) _modAFloat = (float)outFloat; _modAVariables.TrySetValue("EpicFloat", 1337f); _modAVariables.Invoke("DoThing"); } } }

Mod Loader Items
// Gets all subscribed steam items IReadOnlyCollection<SteamItem> subscribedItems = null; yield return FindSteamItemsCoroutine(steamItems => subscribedItems = steamItems); // Same as above but as a UniTask for whoever needs it. IReadOnlyCollection<SteamItem> subscribedItems = await VTAPI.FindSteamItemsAsync(); // Gets all local steam items from 'VTOL VR\@Mod Loader\Mods' IReadOnlyCollection<SteamItem> localItems = VTAPI.FindLocalItems(); // Checks if any steam item is loaded with the directory. bool itemLoaded = VTAPI.IsItemLoaded(itemDirectory); // Loads a steam item VTAPI.LoadSteamItem(steamItem); // Same as above but returns a UniTask<bool>. Not sure who may need it but its here. bool loadedItem = VTAPI.TryLoadSteamItem(steamItem); // Disables an item, obviously. VTAPI.DisableSteamItem(steamItem); // Same as above but returns a UniTask. Again, not sure who needs it. VTAPI.TaskDisableSteamItem(steamItem);
11 Comments
DankuwOs  [author]
Sep 12 @ 6:17pm 
i dont remember doing that
Sep 12 @ 1:32pm 
You son of a gun, you made it work with the latest update, thanks!
Feb 9 @ 6:51am 
You likely did get it from another mod, as, looking at the modloader’s (rather small) API, mods can automatically download workshop items if they are missing, and this is a rather important api.
Oct 8, 2025 @ 6:39pm 
Don't know what flatscreen mod is so probably not!!
Oct 5, 2025 @ 11:03am 
flatscreen, for example
Sep 18, 2025 @ 7:46pm 
Do we have any idea what other mods?
Sep 18, 2025 @ 4:31pm 
yes
Aug 9, 2025 @ 2:54pm 
Not sure how I got subscribed to this. Do some other mods require this and I got it automatically or needed it for some other mod?
Apr 7, 2025 @ 6:55pm 
Swaus
Feb 5, 2025 @ 3:23pm 
Sigma