-
Notifications
You must be signed in to change notification settings - Fork 18
Total RP 3's API documentation
Ben edited this page Aug 22, 2022
·
6 revisions
The TRP3 API contains a few useful modules you can take advantage of to integrate your addon with TotalRP3.
It's recommended that you check that the TotalRP3 addon is loaded before making use of the API in your code.
-- Checks if the TotalRP3 addon is loaded
local TRP_Loaded = IsAddOnLoaded("TotalRP3")
-- Assigns a local accessor for easier access to the API
local TRP3 = TRP3_API
-- Make use of an API method
local profileCurrently = TRP3.profile.getData(path)
TRP3.profile.getData(path)
-
TRP3
- The TRP3 API global accessor assigned to the local variableTRP3
, usable from any addon running alongside TotalRP3 -
.profile
- This is the profile module containing profile-related methods[^1] -
.getData(path, profileRef)
- This is the method used to get specific data from the currently active profile if noprofileRef
is specified. For more information on this method, see getData.