49
edits
(Created page with "{{uiaddon}} This document describes the WildStar load order for loading AddOns. It covers when the WS client first starts up, when AddOns load for the first time, and...") |
No edit summary |
||
| (5 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{uiaddon}} | {{dev/uiaddon}} | ||
This document describes the [[WildStar]] load order for loading [[AddOn]]s. It covers when the WS client first starts up, when AddOns load for the first time, and when user or WS reloads the [[UI]]. The availability of the Lua environment at various points in the process is also detailed. The term ' | This document describes the [[wildstarwiki:WildStar|WildStar]] load order for loading [[AddOn]]s. It covers when the WS client first starts up, when AddOns load for the first time, and when user or WS reloads the [[UI]]. The availability of the Lua environment at various points in the process is also detailed. The term 'WildStar Client' means: the WildStar game program that's launched. | ||
== General steps == | == General steps == | ||
| Line 40: | Line 40: | ||
* AddOn Forms - The TOC file, for regular AddOns, is responsible for itemizing Form .xml files to register AddOn relative Forms and UI widgets. Lua code can ask that an instance is generated from a registered form any time, which should normally be done during or after OnLoad. | * AddOn Forms - The TOC file, for regular AddOns, is responsible for itemizing Form .xml files to register AddOn relative Forms and UI widgets. Lua code can ask that an instance is generated from a registered form any time, which should normally be done during or after OnLoad. | ||
* TOC loaded - | * TOC loaded - Once all of the Script and Form children have been loaded, if a Lua AddOn instance was created, registered, its OnLoad event handler is then executed if exists, giving the AddOn a chance to finish the loading process and register any handlers and otherwise thereafter operate like a proper and complete AddOn. After OnLoad, the AddOn's OnRestore settings load events are run. Both OnLoad and OnRestore are run before the client moves on to load another AddOn. | ||
To illustrate the loading order, consider the following AddOn code example: | To illustrate the loading order, consider the following AddOn code example: | ||
| Line 89: | Line 89: | ||
==== Instance transition ==== | ==== Instance transition ==== | ||
# {{api|API EVENT|ChangeWorld}}() - event | # {{\|api|API EVENT|ChangeWorld}}() - event | ||
#* This event fires after player has changed instance servers, like when entering or exiting a dungeon. | #* This event fires after player has changed instance servers, like when entering or exiting a dungeon. | ||
#* Does not fire when player first enters game world from the character screen, as the UI and AddOns load after the player has entered. AddOns must register for this event. | #* Does not fire when player first enters game world from the character screen, as the UI and AddOns load after the player has entered. AddOns must register for this event. | ||
| Line 95: | Line 95: | ||
== See also == | == See also == | ||
* [[Handling events]] for information on how to sign up to receive event | * [[\Handling events]] for information on how to sign up to receive event | ||