Vendetta/API/get gstate

From Quasar-RCE
Revision as of 14:52, 3 March 2025 by Wikiadmin (talk | contribs) (created get_gstate)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Definition

lib.get_gstate (): table general_state_table

Description

Retrieves a table of data describing Neoloader's general state

Arguments

  1. None

Returns

  1. table general_state_table: A table holding Neoloader's relevant read-only information
Key Description
version Unique version information of the currently installed Neoloader instance.
major LME API (also returned by `get_API`).
minor LME minor version (also returned by `get_minor`).
patch LME patch version (also returned by `get_patch`).
lmever LME version string (for use in `lib.compare_sem_ver`).
pathlock A boolean defining if standard `dofile/loadfile` have preset paths (this occurs during the default plugin loader).
statelock A boolean defining if globals can be assigned normally, or if `declare()` is necessary.
current_mgr The `mod_ID` of the current management interface for the LME.
current_if The `mod_ID` of the current interface manager for the LME.

If no interface manager exists, this will return `vo-if`.

current_notif The `mod_ID` of the current notification provider for the LME.
notifications A list of all notification states sent to Neoloader.***
log The complete data log in Neoloader.***
pluginlist A list of every mod currently managed by Neoloader.
mgr_list A list of all mods that can be set as LME management front-ends.
if_list A list of all mods that can be set as LME interface managers.
notif_list A list of all mods that can be set as LME notification providers.


Other notes

  • Added in LME 2.x (Neoloader indev)
    • Changed in LME 3.4.x, 3.5.x, and 3.8.x
  • These tables are references to, not copies of, the tables in Neoloader, as creating copies of these potentially massive tables could lock up a user's system during processing.
  • These keys exist but are deprecated: manager, ifmgr, newstate, format_log, and log_level
    • manager and ifmgr are inconsistently named, and were replaced with current_if and current_mgr.
    • newstate, format_log, and log_level should now be retrieved with the lib.lme_get_config function
  • the version table and the API/minor/patch version are both styled as "semantic version" identifiers, but are not necessarily synced.
    • The API/minor/patch/lme_ver values are specific to the version of LME API supported.
    • The "version" table defines the version of Neoloader installed, which implemented the LME API

As long as plugins target a compatible LME API, it should not matter what version of Neoloader is installed, or if a different utility is used instead.