LibAchievements

Wargames' Tome Achievement Page (example)

This addon provides functionality to other addons by allowing them to create their own achievement entries in the Tome of Knowledge. You won't notice anything just by installing this addon without other addons using it!

This is work in progress so the interface, function names, etc. might still change!

Provided functions

LibAchievements.CreateCategory(name)


Creates the category named "name" (if it doesn't exist yet) and returns the addon internal ID used in other functions.
name (string/wstring): The name of the new category.
return value (int): The created (or found) category's ID.

LibAchievements.CreatePage(catid, name, unlocked, desc)


Creates the page named "name" (if it doesn't exist yet) in the category identified by ID and returns its ID.
catid (int): The ID of the category (see above) where the page should be added.
name (string/wstring): The name of the new page.
unlocked (bool): Determines if the page's entry is clickable.
desc (string/wstring): The description to show on the page once it's opened.
return value (int): The created (or found) page's ID.

LibAchievements.AppendEntry(pageid, name, desc, func)


Adds a new achievement entry to the page and returns its ID.
pageid (int): The ID of the page (see above) where the entry should be added.
name (string/wstring): The name of the entry.
desc (string/wstring): The description text of the entry.
func (function returning bool): The function to check, if the entry is unlocked (will be called and has to return a boolean value (true/false))
return value (int): The created entry's ID.

LibAchievements.UpdateEntry(pageid, entryid, name, desc, func)


Updates an entry by modifying name, description, etc.
entryid (int): The ID of the entry that should be modified.
For other parameters read "AppendEntry".

Right now there is no way to remove categories/pages/entries "on the fly" but in the rare case you'd have to do it, you could just modify LibAchievements.Categories and LibAchievements.Pages.

You must login to post a comment. Don't have an account? Register to get one!

Facts

Date created
24 Apr 2009
Category
Last update
20 Aug 2009
Development stage
Beta
License
Creative Commons Attribution-Noncommercial-Share Alike 3.0
Curse link
LibAchievements
Reverse relationships
1
Recent files

Authors