Getting Started

From ESOUI Wiki

Jump to: navigation, search


There are millions of other things you can do to have fun in this game, but you chose the most difficult and time consuming one - congratulations!

Many hardships and frustrating moments will await you on the journey into the belly of the beast called API.

If you know what you are doing and/or have a high frustration tolerance, keep on reading - otherwise, run, while you still can!


Contents

Welcome to hell... *erm* ESO addon development

You have a brilliant idea and can't wait to upload your super-duper uber mighty awesome automated character stat sharing website thingy? Not so fast I say. Before you attempt something as complicated as this, you should first familiarize yourself with the basics and try to take the first hurdle of getting an addon to load in game.

If you have no programming experience, but still want to make an addon, you look at some basic Lua tutorials to learn the basics of programming first. For example this one or that one.

If you've already programmed in other languages, but have no idea about Lua, then you should take a look at this guide which will bring you up to speed.

If you already have worked with Lua before, you should also keep in mind that ESO is using a variant of Lua 5.1 that has many basic features like file IO locked down.

Now that you are ready to write Lua code, you will now start writing your first AddOn!

Resources for Beginners

Skip Dialogue

Step one: [Set up the file structure]

Now that you have a working addon, you should also take a look at the other pages in the How-To section on the home page of the wiki, although some may be outdated.

Step two: Getting the AddOn to do something

To communicate with the game, you need to access the API. [Here] is a list of functions that you can use to get game data.

Step three: Bugs, bugs, bugs!

Everything is broken? Welcome to [hell]. You have been warned - but worry not. You can do this.

Analyzing UI elements

There are several add-ons that are a great help for developers. Please note that you can not install them via minion, but you have to auto-extract them into your AddOn-folder. Ayantir was so kind to [create a bundle].

[Zgoo]:

[Mer Torchbug]: An alternative to /zgoo. The interface is far cleaner, you can edit variables on-the-fly by right-clicking on their value.

Testing in-game

This [AddOn] lets you run LUA code directly from their interface, and also save it between UI reloads.

Another way to get an idea of how Lua works, and test out various API functions is the /script chat command, which will execute anything after as a Lua command. Remember to use the d() function to see output. You can use a semicolon ; in place of a line break.

/script local var = "Hello world"; d(var)

So many questions!

After all this you most likely have a lot of questions about how to get your idea to work. Take a look at this wiki page, which should have the answer to some of them. If that does not help you, make sure to search the esoui forum, as many questions have already been asked and answered in the past. If you don't find your answer, you are free to create a new thread and ask there.

If you still have trouble to get something to work, or don't want to create a new thread for every simple issue you encounter, you are also very welcome to join our friendly live chat and ask there.

Advanced Developers

Once you made it this far, you should risk a look at some of the documentation that was published by ZOS or that has been gathered by other addon authors.

With every major update ZOS posts a dump of API globals and some patch notes in the addon section on the official forum. This dump is unfortunately not complete and usually misses a lot of constants, events and methods. It's still useful to find argument types and return values.

Then we have the wiki which contains sections for all types of globals. It is also not 100% accurate and there may be things missing, but you can add them yourself if you find something that is not where it should be.

Next we have the Lua part of the UI source code. You heard right. Some incredibly smart people wrote incredibly complex code to extract the source code from the game files so you can view it and ZOS has so far not said anything against it. You can download it here, or look at it online here and here.

And finally we have tools to look at these things ingame. You can find them in the Developer Utility section on esoui. Zgoo or Mer Torchbug are what you might want to look into first. There are also some bundles like Developer Suite or Dev Tools which contain them among many other useful tools.

One other thing you should also look into is the Library section. It contains many useful building blocks that can be used in your addon and help you save some time. One library that is especially useful is LibAddonMenu, which allows you to create a settings page in the addon setting menu.

Personal tools
Namespaces
Variants
Actions
Menu
Wiki
Toolbox