Macros#
Defined in SDK.hpp. Convenience macros for declaring plugin metadata.
XENON_PLUGIN_INFO#
The standard plugin declaration macro.
| Parameter | Type | Description |
|---|---|---|
NAME |
string literal | Internal name (no spaces, used as identifier and display name) |
DISPLAY |
string literal | Reserved — currently unused (pass same value as NAME) |
AUTHOR |
string literal | Author name |
DESC |
string literal | Short description |
VERSION |
string literal | Version string |
HERO_ID |
uint64_t |
Target hero ID (0 = universal, or a HeroId:: constant) |
FLAGS |
uint32_t |
Bitwise OR of PluginFlags |
XENON_PLUGIN_INFO(
"my_plugin",
"My Plugin",
"Author",
"Does something cool",
"1.0",
0,
PluginFlags::HasOverlay | PluginFlags::HasMenu
)
Expands to an on_get_info function that fills a PluginInfo struct.
Note
The DISPLAY parameter is accepted but currently not stored. The NAME value is used as both the internal identifier and the display name. Pass the same value for both, or use NAME for identification and DISPLAY as a placeholder for future use.
XENON_PLUGIN#
Simplified macro for universal plugins with overlay and menu.
| Parameter | Type | Description |
|---|---|---|
NAME |
string literal | Internal name |
DISPLAY |
string literal | Display name |
DESC |
string literal | Short description |
Equivalent to:
XENON_PLUGIN_INFO("my_esp", "My ESP", "Unknown", "Simple enemy ESP", "1.0", 0,
PluginFlags::HasOverlay | PluginFlags::HasMenu)
XENON_LIBRARY_INFO#
Declares a library plugin that provides a named service.
| Parameter | Type | Description |
|---|---|---|
NAME |
string literal | Internal name |
AUTHOR |
string literal | Author name |
DESC |
string literal | Short description |
VERSION |
string literal | Version string |
PROVIDES |
string literal | Service name this library provides |
Sets targetHeroId = 0, flags = 0, and provides = PROVIDES. See the Dependencies guide.
XENON_PLUGIN_INFO_DEPS#
Declares a plugin with dependencies on library services.
| Parameter | Type | Description |
|---|---|---|
NAME |
string literal | Internal name |
DISPLAY |
string literal | Display name |
AUTHOR |
string literal | Author name |
DESC |
string literal | Short description |
VERSION |
string literal | Version string |
HERO_ID |
uint64_t |
Target hero ID |
FLAGS |
uint32_t |
PluginFlags |
DEPS |
string literal | Null-separated, double-null terminated dependency list |
XENON_PLUGIN_INFO_DEPS(
"my_plugin",
"My Plugin",
"Author",
"Uses math helpers",
"1.0",
0,
PluginFlags::HasOverlay | PluginFlags::HasMenu,
"math_helpers\0"
)
Dependency string format
Dependencies are listed as a single string with null-byte separators. The final \0 in the string literal provides the double-null terminator.
PluginInfo Struct#
All macros fill this struct:
struct PluginInfo
{
const char* name; // Internal name
const char* author; // Author
const char* description; // Description
const char* version; // Version string
uint64_t targetHeroId; // 0 = universal
uint32_t flags; // PluginFlags
const char* dependencies; // Null-separated deps (or nullptr)
const char* provides; // Service name (or nullptr)
};
You can also implement on_get_info manually if the macros don't fit your needs: