Difference between revisions of "Plugins"
From Zenbot Wiki
Views
Actions
Namespaces
Variants
Tools
(Created page with "=== Plugin Definition === A plugin is defined as a folder, or (encrypted) archive that contains the following: ## info.lua [required] - name - the name by which it can be module.load-ed - if two with the same name exist the newer one will be loaded - if one exist in core and in plugin folder with the same name, the one from plugin will be loaded - version - for example "0.0.1" - title - this will get displayed in loader/menu - author - this will g...") |
|||
| Line 1: | Line 1: | ||
=== Plugin Definition === | === Plugin Definition === | ||
A plugin is defined as a folder, or (encrypted) archive that contains the following: | A plugin is defined as a folder, or (encrypted) archive that contains the following: | ||
1. info.lua [required] | |||
- name | - name | ||
- the name by which it can be module.load-ed | |||
- if two with the same name exist the newer one will be loaded | |||
- if one exist in core and in plugin folder with the same name, the one from plugin will be loaded | |||
- version | - version | ||
- for example "0.0.1" | |||
- title | - title | ||
- this will get displayed in loader/menu | |||
- author | |||
- this will get displayed in loader | |||
- description | |||
- this will get displayed in loader/menu | |||
- dependencies | |||
- required | |||
- plugin needs those libraries to work and will not load if one or more is missing/not available | |||
- example: { "Orbwalker", "HealthPrediction" } | |||
- optional | |||
- plugin integrates those libraries but will load regardless if they are not missing/available | |||
- example: { "Evade" } | |||
- conflicts | |||
- plugin cannot work if one or more of those is loaded, plugin will not load if they are loaded | |||
- example: { "Aatrox" } | |||
- library | |||
- boolean to indicate if submodules should be loadable outside of this plugin | |||
- load | |||
- (lambda) function returning a boolean that indicates if the plugin should show up ingame | |||
- function() return GameData.champion == "Aatrox" end | |||
- "GameData.champion == 'Aatrox'" | |||
- only GameData will be available inside the function with the following properties: | |||
- champion : string | |||
- mapID : number | |||
- gameMode : string | |||
- isMatchmadeGame : boolean | |||
2. thumbnail.png [optional] | |||
- this will get displayed in loader/menu | - this will get displayed in loader/menu | ||
3 init.lua [optional] | |||
- this will get loaded during loading screen | |||
- you can pre-create menu here | |||
- most objects and instances are not available | |||
4. main.lua [required] | |||
- this is the entry to your plugin | |||
- this will get loaded during loading screen | |||
- you can pre-create menu here | |||
- most objects and instances are not available | |||
- this is the entry to your plugin | |||
Revision as of 17:38, 20 January 2022
Plugin Definition
A plugin is defined as a folder, or (encrypted) archive that contains the following: 1. info.lua [required]
- name
- the name by which it can be module.load-ed
- if two with the same name exist the newer one will be loaded
- if one exist in core and in plugin folder with the same name, the one from plugin will be loaded
- version
- for example "0.0.1"
- title
- this will get displayed in loader/menu
- author
- this will get displayed in loader
- description
- this will get displayed in loader/menu
- dependencies
- required
- plugin needs those libraries to work and will not load if one or more is missing/not available
- example: { "Orbwalker", "HealthPrediction" }
- optional
- plugin integrates those libraries but will load regardless if they are not missing/available
- example: { "Evade" }
- conflicts
- plugin cannot work if one or more of those is loaded, plugin will not load if they are loaded
- example: { "Aatrox" }
- library
- boolean to indicate if submodules should be loadable outside of this plugin
- load
- (lambda) function returning a boolean that indicates if the plugin should show up ingame
- function() return GameData.champion == "Aatrox" end
- "GameData.champion == 'Aatrox'"
- only GameData will be available inside the function with the following properties:
- champion : string
- mapID : number
- gameMode : string
- isMatchmadeGame : boolean
2. thumbnail.png [optional]
- this will get displayed in loader/menu
3 init.lua [optional]
- this will get loaded during loading screen - you can pre-create menu here - most objects and instances are not available
4. main.lua [required]
- this is the entry to your plugin