https://github.com/jaliborc/customtutorials-2.1
World of Warcraft library that makes easy the creation of custom tutorials for addons.
https://github.com/jaliborc/customtutorials-2.1
library lua tutorials world-of-warcraft
Last synced: 6 months ago
JSON representation
World of Warcraft library that makes easy the creation of custom tutorials for addons.
- Host: GitHub
- URL: https://github.com/jaliborc/customtutorials-2.1
- Owner: Jaliborc
- Created: 2013-06-22T11:18:17.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2025-07-04T21:28:27.000Z (7 months ago)
- Last Synced: 2025-07-04T22:35:50.205Z (7 months ago)
- Topics: library, lua, tutorials, world-of-warcraft
- Language: Lua
- Size: 32.2 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README

[](https://www.patreon.com/jaliborc)
[](https://www.paypal.me/jaliborc)
[](https://bit.ly/discord-jaliborc)
# CustomTutorials-2.1 :exclamation:
A library that makes creating interactive tutorials extremely simple. It handles both displaying the tutorials and saving the user progress in them.
## API Overview
|Name|Description|
|:--|:--|
| .RegisterTutorials(id, data) | Registers a new tutorial with the given ID. |
| .TriggerTutorial(id, index [,maxAdvance])| Advances a step in a given tutorial and unlocks progression up to `index`. |
| .ResetTutorials(id) | Resets progression in a given tutorial. |
| .GetTutorials(id) | Returns `data` originally registered for a given tutorial. |
| :Embed(object) | Embeds the above methods into the given object. |
:warning: Note that, for legacy and embedding reasons, all methods except for `:Embed(object)` use a dot `.` syntax, instead of the more common `:` syntax.
## Usage Example
First of all, you must register the new tutorial for you addon:
```
Lib.RegisterTutorials("MyAddon", {
savedvariable = "MyAddon_TutorialsSavedVariable",
title = "MyAddons",
{ -- This is tutorial #1
text = "Hello",
image = "SomeImage",
},
{ -- Tutorial #2
text = "Bye",
}
})
```
Finally, you need to tell the library when you want the tutorial to be shown. If you provided the `savedvariable` argument, you won't have to worry about which panels the user has already seen neither to save that information. CustomTutorials will handle that for you:
```
-- Shows up to panel #3 if the user has not seen it already
MyAddon:TriggerTutorial(3)
```
### :warning: Reminder!
If you use this library, please list it as one of your dependencies in the CurseForge admin system. It's a big help! :+1: