Vendetta/overview: Difference between revisions

From Quasar-RCE
Jump to navigationJump to search
Updated overview page to better match Neoloader v6.11.0
m How Neoloader works: Added load state information
 
Line 17: Line 17:
Neoloader loads itself as Vendetta Online's interface, using the <nowiki>if=</nowiki> option in config.ini. As such, it will always be the first plugin to be loaded. Neoloader first sets up basic functionality and builds the API in the public "lib" table, before entering "Init", or the loader phase, where it handles loading and executing all mods that have been registered to the loading system. Once the Init phase is complete, it assigns a few events and commands, before completing. At this point, the game client takes back over and begins the normal mod loading procedure.
Neoloader loads itself as Vendetta Online's interface, using the <nowiki>if=</nowiki> option in config.ini. As such, it will always be the first plugin to be loaded. Neoloader first sets up basic functionality and builds the API in the public "lib" table, before entering "Init", or the loader phase, where it handles loading and executing all mods that have been registered to the loading system. Once the Init phase is complete, it assigns a few events and commands, before completing. At this point, the game client takes back over and begins the normal mod loading procedure.


Due to the highly limited file access abilities of the Vendetta Online sandbox, Neoloader cannot see plugins when installed. Instead, plugins must manually 'register' themselves to Neoloader during the normal mod loader's execution. Neoloader saves the path of the INI registration file to the game's config.ini; this is what is iterated over during the Init period.
Due to the highly limited file access abilities of the Vendetta Online sandbox, Neoloader cannot see plugins when installed. Instead, plugins must manually 'register' themselves to Neoloader during the normal mod loader's execution. Neoloader saves the path of the INI registration file to the game's config.ini; this is what is iterated over during the Init period. The config file will also track the current 'state' of a plugin, which defines if it loads. The current possible states are listed here:
{| border="1"
! Status
! Definition
|-
| NO
| This plugin will NOT load during the next Init cycle
|-
| YES
| This plugin will be loaded during the next Init cycle
|-
| FORCE
| This plugin will be loaded during the next Init cycle, even if its dependencies have not been met. Intended for debugging purposes
|-
| AUTH
| This plugin will be given Neoloader's 'auth' key when it loads, letting it execute specific LME functions that manage Neoloader
|}
 


To register a mod or execute any LME functions at the time of the game's normal plugin loading process, mods should check for the existence of Neoloader. To do this, plugins should wrap all LME calls within a check for the correct environment, as described here:
To register a mod or execute any LME functions at the time of the game's normal plugin loading process, mods should check for the existence of Neoloader. To do this, plugins should wrap all LME calls within a check for the correct environment, as described here:

Latest revision as of 03:00, 3 March 2025

Why modders should use Neoloader

The goals of Neoloader are twofold: make complex mods easier to develop, and make mods safer to run and manage for the user.

  • Neoloader provides a stable and managed way to load plugins based on their dependencies, and introduces safety measures for the plugin loading process
  • Neoloader provides an in-game toolset for managing a mod's state and settings directly
  • Neoloader provides an API that promotes inter-mod communication and expandability, including with Neoloader itself

Currently, no alternative exists for Vendetta Online. Plugins could be (and historically have been) designed in a monolithic style for the ASCII-betical plugin loader. Due to this, mods rarely communicate with each other, and a lot of duplicated code exists between projects.

Neoloader doesn't replace the default plugin loader embedded in the game, but runs before it using built-in game mechanics to provide its extended functionality without need for exploits.

Regarding the LME terminology

It is important for plugin developers to note that Neoloader itself is an implementation of a "Library Management Engine". The public-facing API could be seen as LME, where how that API is implemented is Neoloader. This distinction is important in the event that a new tool supercedes Neoloader in the future while providing the same features. For a game like Vendetta Online, which is undergoing active development to this day, this distinction helps future-proof plugins as the game changes. Indeed, as long as the API itself remains untouched, how that API is implemented should not matter.

How Neoloader works

Neoloader loads itself as Vendetta Online's interface, using the if= option in config.ini. As such, it will always be the first plugin to be loaded. Neoloader first sets up basic functionality and builds the API in the public "lib" table, before entering "Init", or the loader phase, where it handles loading and executing all mods that have been registered to the loading system. Once the Init phase is complete, it assigns a few events and commands, before completing. At this point, the game client takes back over and begins the normal mod loading procedure.

Due to the highly limited file access abilities of the Vendetta Online sandbox, Neoloader cannot see plugins when installed. Instead, plugins must manually 'register' themselves to Neoloader during the normal mod loader's execution. Neoloader saves the path of the INI registration file to the game's config.ini; this is what is iterated over during the Init period. The config file will also track the current 'state' of a plugin, which defines if it loads. The current possible states are listed here:

Status Definition
NO This plugin will NOT load during the next Init cycle
YES This plugin will be loaded during the next Init cycle
FORCE This plugin will be loaded during the next Init cycle, even if its dependencies have not been met. Intended for debugging purposes
AUTH This plugin will be given Neoloader's 'auth' key when it loads, letting it execute specific LME functions that manage Neoloader


To register a mod or execute any LME functions at the time of the game's normal plugin loading process, mods should check for the existence of Neoloader. To do this, plugins should wrap all LME calls within a check for the correct environment, as described here:

if (type(lib) == "table") and (lib[0] == "LME")) then
    --LME API functions here
end

You can explore how this used in some of the plugins located in the development examples package provided here (todo). The Design page also describes how to set up specific files to make your plugin ready for management through Neoloader.