Quantcast
Download
(8 Kb)
Download
Updated: 07/31/21 06:50 AM
Pictures
File Info
Compatibility:
Blackwood (7.0.5)
Flames of Ambition (6.3.5)
Markarth (6.2.5)
Stonethorn (6.1.5)
Greymoor (6.0.5)
Updated:07/31/21 06:50 AM
Created:07/31/21 06:50 AM
Monthly downloads:1,325
Total downloads:3,025
Favorites:1
MD5:
LibTutorial
Version: 0.2
by: Alianym [More]
Welcome to LibTutorial!

For developers, this is a re-jig of the base game tutorial functions but usable by AddOn authors with a simple function call once initialized. I did a search and couldn't find anything similar, so let me know if something like this already exists either in AddOn form or in the base game. See the Demo.lua file for an example simple implementation.

Setting Things Up
The current three Tutorial Types supported are; (see screenshots for visuals)
  • Brief Hud Tutorial
  • Hud Info Tutorial
  • UI Info Box Tutorial

In your implementation you'll need an array set up in this format:

Code:
local tutorialArray = {
	["hudbrief"] = {					--ID must be at least (string) 5 characters or > (number) 9999
		title = "",					--(string) No title displayed nor needed for this Tutorial Type
		text = "Example Description",			--(string)
		tutorialType = LIB_TUTORIAL_TYPE_HUD_BRIEF,	--LibTutorial Global
		displayPriority = nil,				--Not used for this Tutorial Type
	},
	["hudinfo"] = {						--ID must be at least (string) 5 characters or > (number) 9999
		title = "Example Title",			--(string) 
		text = "Example Description",			--(string)
		tutorialType = LIB_TUTORIAL_TYPE_HUD_INFO,	--LibTutorial Global
		displayPriority = 1,				--(number) Determines priority when inserted into the queue
	},
}

These are the valid tutorialType value:
Code:
LIB_TUTORIAL_TYPE_HUD_BRIEF	--Brief Hud Tutorial
LIB_TUTORIAL_TYPE_HUD_INFO	--Hud Info Tutorial
LIB_TUTORIAL_TYPE_UI_INFO_BOX	--UI Info Box Tutorial

Then you'll need to initialize an instance of LibTutorial, and override the empty default implementation of obj:SetTutorialSeen(tutorialIndex):
Code:
LIB_TUTORIAL_EXAMPLE = LibTutorialSetup.New(tutorialArray)
function LIB_TUTORIAL_EXAMPLE:SetTutorialSeen(tutorialIndex)
	--Do stuff here such as SavedVar updates or however/if you want to track if a Tutorial has been seen)
end

Using LibTutorial to display tutorials:
Just call this function and pass in the tutorialIndex of the tutorial you want to trigger.
Code:
LIB_TUTORIAL_EXAMPLE:DisplayTutorial(tutorialIndex) --This is the main function you'd use to display your tutorial.
There have been no comments posted to this file.
Be the first to add one.



Category Jump: