ABCDEFGHI
1
SOTA API Reference27/05/2021 18:31:05
2
-5 GMT Eastern Time
3
Index
4
Global variables
5
6
Scene Informations
Colors Legend
7
Red = not tested yet
8
Character Informations
Yellow = Still on QA
9
10
Party Informations
11
12
Others Informations
13
14
ShroudOnGUI Functions call
15
16
Global Functions
17
18
Global Variables
19
NAME
RETURN TYPE
DESCRIPTION
20
ShroudPlayerXfloat
Return player position X
21
ShroudPlayerYfloat
Return player position Y
22
ShroudPlayerZfloat
Return player position Z
23
ShroudPlayerCurrentHealth
int
Return player current health
24
ShroudPlayerCurrentFocus
int
Return player current focus
25
ShroudTimefloat
Return time since start of the application
26
ShroudDeltaTime
float
Return time since last frame
27
ShroudServerTime
float
Return current server time
28
ShroudMouseXfloat
Return mouse X position on screen
29
ShroudMouseYfloat
Return mouse Y position on screen
30
ShroudLuaPathstringReturn current path to lua directory
31
ShroudDataPath
stringReturn path to data folder
32
33
Scene Information
34
NAMERETURN TYPE
DESCRIPTION
35
ShroudGetCurrentSceneName()
string
Return the current scene name
36
ShroudGetCurrentSceneMaxPlayerCount()
int
Return the maximum number of allowed players in the scene
37
ShroudGetCurrentSceneIsPVP()
bool
Return whether or not the scene is player vs player
38
ShroudGetCurrentSceneIsPOT()
bool
Return whether or not the scene is a player owned town
39
ShroudGetSceneCap()
objectReturn an object that hold Level and Skill value.
Can be used like this: ShroudGetSceneCap().Level
40
ShroudGetGameTime()
objectReturn an object with Day, Hour, Month, Year, Season, PeriodOfDay
41
42
Character Information
43
NAMERETURN TYPE
DESCRIPTION
44
ShroudGetPlayerName()stringReturn player name
45
ShroudGetPooledAdventurerExperience()
int
Return total adventure pooled experience
46
ShroudGetPooledProducerExperience()
int
Return total produced pooled experience
47
ShroudGetStatCount()
int
Return the total number of stat from the global stat table.
48
ShroudGetStatValueByNumber(int)
int
Return the value of a stat from the table by using a number
49
ShroudGetStatNameByNumber(int)
string
Return the key name of a stat from the table by using a number
50
ShroudGetStatValueByName(string)
int
Return the value of a stat from the table by using the key name
51
ShroudGetStatDescriptionByNumber(int)
string
Return the description of the stat from the table by using a number
52
ShroudIsCharacterSheetActive()bool
Return if character sheet is currently being displayed
53
ShroudGetCharacterSheetPosition()int,int
Return position of the character sheet from top left corner?
54
ShroudGetInventory()
tableReturn items in the inventory
name, durability, primaryDurability, maxDurability, weight, quantity, value = item
55
ShroudGetAttenuationAdventurerStatus()
boolReturn if attenuation is achieved
56
ShroudGetAttenuationProducerStatus()
boolReturn if attenuation is achieved
57
ShroudGetTotalAdventurerExperience()
intReturn the total experience acquired as adventurer
58
ShroudGetTotalProducerExperience()
intReturn the total experience acquired as producer
59
ShroudGetBuffCount()
intReturn the total number of buff on the player
60
ShroudGetBuffName()
int, stringReturn each buff name
61
ShroudGetBuffDescription()
int, stringReturn each buff description
62
ShroudGetBuffTimeRemaining()
int, floatReturn the time remaining for each buff
63
64
Party Information
65
NAMERETURN TYPE
DESCRIPTION
66
ShroudGetPartyMemberCountInScene()intGet the number of player from your party that are actually in the scene
67
ShroudGetPartyMemberNamesInScene()
table
Get the name of party member actually in the scene
68
Example:
--Will print members in party
for i in ShroudGetPartyMemberNamesInScene() do
ShroudConsoleLog(i)
end
69
ShroudGetPartyMemberCurrentHealthInScene(string name)
int
Return party member current health
70
ShroudGetPartyMemberCurrentFocusInScene(string name)
int
Return party member current focus
71
ShroudGetPartyMemberMaxFocusInScene(string name)
int
Return party member max focus
72
ShroudGetPartyMemberMaxHealthInScene(string name)
int
Return party member max health
73
74
75
76
Other Informations
77
NAMERETURN TYPE
DESCRIPTION
78
ShroudGetScreenX()
int
Return current width of the viewport
79
ShroudGetScreenY()
int
Return current height of the viewport
80
ShroudGetFullScreen()
bool
Return if the user viewport is set to fullscreen or not
81
82
ShroudConsoleLog(string)
bool
Output directly into the Lua chat tab in game
83
ShroudRegisterPeriodic(string, string, float, bool)boolSet a function to be run each X seconds by registering it in a table.
First string is the name, second the function name to be called, float is the time in seconds when the periodic table should be ran, and bool is the number of time to run the periodic function.
84
ShroudRemovePeriodic(string)boolRemove the periodic function by using the name you previously attributed.
85
ShroudListPeriodicsstring
Return the current list of periodic function previously created
86
ShroudGetKeyDown(string)
bool
87
Example:
--Will print hello world! when space bar is pressed
function ShroudOnUpdate()
if ShroudGetKeyDown("Space") then
ShroudConsoleLog("hello world!")
end
end
88
ShroudGetOnKeyDown(string)bool
Check if a key has been pressed using corresponding keycode
89
ShroudGetOnKeyUp(string)bool
Check if a key has been released using corresponding keycode
90
For all the keycode available:
https://docs.unity3d.com/ScriptReference/KeyCode.html
91
92
ShroudLoadTexture(string, bool)
intReturn the loaded image from the given path. JPG and PNG only. Use PNG for transparency. Set true for clamp or false for repeat.
93
ShroudGetTextureSize(textureid)
float,floatReturn the texture width and height with the previously loaded texture id.
94
ShroudUseLuaConsoleForPrint(bool)
Set true or false to switch the interpreter from printing via console
95
ShroudIsUIActive()
boolReturn if the current game UI is active or not. (Player disable it by pressing F9 in game)
96
97
ShroudOnGUI Functions call
98
Note: this is only usable inside the global function ShroudOnGui
99
NAMERETURN TYPE
DESCRIPTION
100
ShroudGUILabel(x,y,width,height,string)
boolPrint a label on screen at given coordinates and dimensions.