From Riftui Wiki

Jump to: navigation, search

The file RiftAddon.toc contains the important information about an Addon. Several items are required, and some items must be set correctly for an Addon to load normally in Rift.



The RiftAddon.toc file has a number of fields that can be included in the file. All fields are strings.

Required Fields

Every RiftAddon.toc file must include:

Optional Fields

Important Notes

Whether an addon by itself, or including a dependent library addon, you must be aware how Rift checks versions. See Version for detailed information on Addon versioning.

Other fields can be readily included in the RiftAddon.toc


Below is the RiftAddon.toc file from Trion's Developer Tools Addon, an Addon provided by Trion to get detailed information from the API.

-- Each addon needs a .toc file. A .toc file is a normal Lua file, although the standard libraries aren't included.
-- Each addon needs a unique identifier. Please make sure it's descriptive! Identifiers must start with a letter and must consist solely of letters, numbers, and _.
-- For regexp buffs, that's [a-zA-Z][a-zA-Z0-9_]*.
Identifier = "TrionDevelopmentTools"
-- Each addon needs a human-readable name. Languages are not currently supported but they will be soon.
Name = {
  English = "Trion Development Tools",
  French = "Outils de développement de Trion",
  German = "Trion Development-Tools",
-- Addons can optionally have a short name. This is used for print() output within the client. If a short name isn't provided, Rift will use the full name.
NameShort = "Dev"
-- It's recommended that you include a description, author, and website. These aren't required but they will be shown to users when enabling your addon.
Description = {
  English = "Tools designed to inspect and analyze the addon environment. Enabling this may be a major performance hit. Intended only for addon developers.",
  French = "Outils conçus pour inspecter et analyser l'environnement de jeu modifié par la programmation ou l'implémentation d'addons. Leur activation peut affecter de manière significative la performance. Réservés aux développeurs d'addons.",
  German = "Dies sind Werkzeuge, um die Umgebung für Mods zu überprüfen und zu analysieren. Die Aktivierung könnte zu einem starken Leistungsabfall führen und ist nur für Entwickler von Add-ons bestimmt.",
Author = "ZorbaTHut / Ben Wilhelm / Trion Worlds"
Website = "http://www.riftgame.com"
-- You may want to include a version string for your addon as well.
Version = "1.5.0"
-- An email is required. Trion may use this email to contact you about your addon, so please make sure it's valid.
Email = "[email protected]"
-- Addons must include which version of Rift they're designed to work with. Right now, the only valid numbers are "1.3", "1.4" and "1.5". We strongly recommend using "1.5" for any addons intended to function at the 1.5 addon release..
Environment = "1.5"
-- Finally, addons must include a list of files that will be executed when the addon starts. These files must be packaged along with your addon and will be run in order.
RunOnStartup = {
-- Addons can use SavedVariables for persisting data between logons. It's currently recommended, but not required, that addons prefix their savedvariable name with the addon identifier.
SavedVariables = {
  TrionDevelopmentTools_EventLog = "account", -- SavedVariables can be either "character"-specific or "account"-specific.
  TrionDevelopmentTools_EventLogStatus = "account",
  TrionDevelopmentTools_EventLogFilter = "account",
-- While none of our examples currently make use of this, the addon framework supports embedding addons.
-- This line would embed several libraries into this addon. It would look for SomeLibrary/RiftAddon.toc, SomeOtherLibrary/RiftAddon.toc, and Libraries/Minimal/TinyLib/RiftAddon.toc. If those were found, and this addon was enabled, then those addons would be run along with this one.
-- You must add an entry using just the library identifier into Dependencies as well for the library to actually be loaded.
Embed = {
  SomeLibrary = true,
  SomeOtherLibrary = true,
  ["Libraries/Minimal/TinyLib"] = true,
-- If some other addons also included SomeLibrary, the Rift system would compare their version numbers. This is a somewhat complex process that should generally pick the "higher" version number - if it doesn't, please report as a bug.
-- (The technical process: split the version into "numeric" and "alphabetical" tokens. Whitespace and the character '.' are stripped entirely and used for delimeters between tokens. If the version is prefixed by "v", "ver", or "version", remove that token entirely. The token arrays are then lexicographically compared. Numeric tokens are considered to be greater than alphabetical tokens. Comparing an alphabetical token to another alphabetical token is done lexicographically, comparing a numeric token to another numeric token is done numerically. Therefore "1.10" is considered to be a higher version than "1.9", and "1.4 beta" is considered to be lower than "1.4.0". Be warned: "1.4 beta" is currently a higher version than "1.4".)
-- This line would set up dependencies with several other addons.
Dependencies = {
  LibUnitChange = {"required", "before"}, -- LibUnitChange must be installed for this to work, and must be loaded before this addon is loaded.
  Visualizer = {"required"}, -- Visualizer must be installed for this to work. It may be loaded either before or after this addon.
  SomeLibrary = {"required"}, -- Embedded libraries are not added to the dependencies automatically. If the embedded library fails to load due to a conflict, your addon will still load unless it's set as a required dependency.
  OptionalHelper = {"optional", "before"}, -- This addon is optional, but if it's loaded, it must be loaded before this addon is loaded.
  SomethingThatNeedsToBeHooked = {"optional", "after"}, -- This addon is optional, but if it's loaded, it must be loaded *after* this addon is loaded.
  DataHelper = {"optional"},  -- This addon is optional and we don't care about load order.
-- You must include either the "optional" or "required" tag, but not both. You may include either "before" or "after", but not both.
-- If you want to include more information here, go right ahead! Variables starting with capital letters are reserved for Trion's use, but anything else is available for the users.
Personal tools