PSHomeCacheDepot / DEV /Misc /lua_library_undocumented.txt
pebxcvi's picture
update
e5981d7
Raw
History Blame Contribute Delete
8.41 kB
LoadLibrary("Tutorial")
Tutorial.IsInSafeScreen
Tutorial.IsInWardrobe
Tutorial.ClearHasEnteredText
Tutorial.IsNavigatorOpen
Tutorial.IsPDAOpen
Tutorial.GetCurrentWardrobeCommand
Tutorial.SetCompleted
Tutorial.IsCompleted
Tutorial.HasEnteredText
Tutorial.ClearHasEnteredText
Tutorial.IsStartupScriptRunning
Tutorial.VidRecAudioFormat
Tutorial.VidRecStatus
LoadLibrary("System")
System.ActivateNavigator( false ) -- Need this regardless of if this app was launched from nav or not as it unblocks the pad
System.SetGlobalOption('isNewsViewerActive', 1) -- Setting this var prevents the easter egg hunt from killing the focus app.
System.IsMenuScreenActive
System.IsSafeScreenActive
LoadLibrary("NavApp")
NavApp.ExitScript
LoadLibrary("Platform")
Used mostly in the START UP, IGA, NEWSVIEWER, AND PROMO APPS objects
<!-- TYPES :
Gamelaunch Pool Type 5
- newviewers and challenges via MENUSCREENSETUP.XML (FOCUS_APP_FUNCTION)
ActivateApp ->
0) - FOCUS - standard focus app; Arcade Slot 0. there will be no 'start to exit' option, and commerce is unavailable.
examples -> pottermore NavApp sign up via navigator, rewarder objects via scej navigator
1) MINIFOCUS - Gamelaunch Pool Type 5; used in promo objects, ps4 card viewer NavApp on navigator, Inspect in NavigatorRoot.xml
2) ARCADEFOCUS - launches arcades; Arcade Slot 0
3) APP
4) MINIAPP - pottermore NavApps via navigator
5) PERSISTENTAPP
6) PERSISTENTMINIAPP - Gamelaunch Pool Type 5; used in IGA
7) PERSISTENTMINIFOCUSAPP - Gamelaunch Pool Type 5; used in homesquare cafe to open newsviewer
8) BACKGROUND
ActivatePlatformScript ->
0) STARTUP - in NavigatorRoot.xml (frontend)
1) MAIN - in NavigatorRoot.xml (help system)
2) GRIEF REPORT - in NavigatorRoot.xml
3) COMMERCE
4) RELOCATE - pottermore relocator object via SetRelocateObject
5) APP
6) UNUSED
7) BACKROUND 1 - used for challenge background app
8) BACKROUND 2
-->
Platform.ActivateApp ->
Platform.ActivateApp('E28F76F3-D80F4CBB-9A557914-4C88C851', 1) Startup.ExitScript() Platform.ActivatePlatformScript('EB6ECA9F-389B4140-96F12563-BE7264F8',0)
Platform.ActivateApp("UUID", "PERSISTENTMINIAPP")
Platform.ActivateApp( "UUID", "PERSISTENTMINIAPP", "PacRim.xml,fromScript=true" )
Platform.AssignAppToQuickChatButton ->
Platform.AssignAppToQuickChatButton("UUID", "PERSISTENTMINIAPP")
MINIAPP
APP
MINIFOCUS
ARCADEFOCUS
PERSISTENTAPP
PERSISTENTMINIAPP
PERSISTENTMINIFOCUSAPP
BACKGROUND
Platform.GetPlatformScriptActivateParam
Platform.GetAppActivateParam -> 4DF0EDE8-6B2D4F16-921C6E00-77DD2D78
-- Expected param format:
--
-- <configFileLocation>,fromScript=bool
--
-- eg.
-- "config/defiance.xml,fromScript=true"
--
-- fromScript - indicates whether this app was launched from script. If ommited, defaults to
-- false and assumes app was launched from the Navigator.
Platform.IsPlatformScriptActive
Platform.KillPlatformScript
Platform.ActivatePlatformScript ->
Platform.ActivatePlatformScript("C14E039A-F4744A39-808EE118-5FA35739", 7) Platform.ExitScript()
Platform.KillPlatformScript(0) --Platform.ActivatePlatformScript("C14E039A-F4744A39-808EE118-5FA35739", 0, "shutdown")
Platform.ActivatePlatformScript(XML.backgroundapp, 7)
Platform.AddNotificationAlert
Platform.ExitScript
Platform.StartSceneDownload
Platform.GetSceneDownloadProgress
Platform.QuerySceneCacheStatus
Platform.RenderNavBackground
Platform.SetNavBackgroundColour
Platform.HasThereBeenANetworkErrorThisSession
Platform.GetSystemOption
Platform.IsSceneLoaded
Platform.AddSillyChatReplacement |
Platform.RemoveSillyChatReplacement | --> Can be used to replace text in the chatlog. Best example would be the pirate talk UUID B942369F-84CD4FCA-A26A0930-7A812C91
Platform.RemoveAllSillyChatReplacements |
Platform.SendChatMessage
Platform.LoadAuxiliaryTssSettings
Platform.RelocateToApartment
Platform.HasVisitedScene
Platform.HasSceneHistory
Platform.EnableChatLogAutoMinimize
Platform.EnableMlaa
Platform.EnableVsync
Platform.IsGameLaunchPoolObjectActive
LoadLibrary("SceneInfo")
SceneInfo.FindSceneNameForId
function GetSceneList()
local sceneId = 1
while sceneId <= 65535 do
sceneName = SceneInfo.FindSceneNameForId(sceneId)
if sceneName ~= nil then
table.insert(sceneNames, tostring(sceneName))
table.insert(sceneNames, 'ENDLOC')
end
sceneId = sceneId + 1
end
slMaxIndex = #sceneNames
SceneListLoaded = true
System.AddChatLogMessage("SceneList Loaded Successfully")
end
SceneInfo.GetSceneId
SceneInfo.GetSceneName
SceneInfo.GetUniqueInstanceId
SceneInfo.FindSceneIdForName
SceneInfo.GetAccessObjectID
SceneInfo.GetSceneType
LoadLibrary("Admin")
Need an object in your inventory that matches the UUID of the <AdminObjectId></AdminObjectId> on the TSS.
if Admin.IsAdminMode() == false then
Admin.ActivateAdminMode(1)
if Admin.IsAdminMode() == true then
System.AddChatLogMessage("init " .. tostring(Admin.IsAdminMode()))
end
elseif Admin.IsAdminMode() == true then
System.AddChatLogMessage("already " .. tostring(Admin.IsAdminMode()))
end
Admin.SaveScreenshot - Save 1280x720 UNCENSORED NAMES to usb
Admin.StartChatLogging - Initiate chat logging to file on usb
Admin.StopChatLogging - Stop chat logging
Admin.IsAdminMode - Check if the local player is in Admin Mode
Admin.ActivateAdminMode - Activates Admin Mode!
Admin.RequestInstanceList - Request Instance List
Admin.GetInstanceListStatus -
Admin.GetNumInInstanceList - Returns the list of Instances
Admin.GetInstanceName - Returns the game instance name
Admin.GetInstancePlayerCount - Return game instance player count for scene
Admin.GetInstanceWorldID - Returns the game instance's WorldId
Admin.FindUser - Finds a Player by AccountId in Medius
Admin.FindUserGetStatus - Finds a player, returns PlayerStatus
Admin.FindUserGetWorldID - Finds a player, return WorldID
Admin.GotoInstance - Go To a scene instance
Admin.GetGameWorldInfo
Admin.GetGameWorldInfoStatus
Admin.GetGameWorldInfoSceneID
Admin.GetGameWorldInfoNumPlayers
Admin.GetGameWorldInfoGameName
Admin.SendInstanceSM - Send Server Message? Used to Mute, Kick, or Freeze a player in place
Admin.SendInstanceSMToAll Send Server Message to All?
Admin.SetInvisibility - Sets a Player invisible/Not Invisible
Admin.EnableProximityChat - Enables Proximity Voice Chat!
Admin.EnableFastRun - Enable Fast Run on the local player!
Admin.IsInvisible - Check if invisible
Admin.IsProximityChatEnabled - Check if Proximity Chat is enabled!
Admin.InuIsBusy (?)
LoadLibrary("Portable")
Portable.Destroy
Portable.SetDeactivation
Portable.AddNotificationMessage
Portable.AddRepertoire
Portable.RemoveRepertoire
LoadLibrary("CommercePoint")
CommercePoint.Create() - Creates a new commerce point object
CommercePoint.Open() - Opens / displays the commerce UI
CommercePoint.Close() - Closes the commerce UI
CommercePoint.BeginNode() - Starts a new menu node (like a folder/category)
CommercePoint.EndNode() - Ends the current node
CommercePoint.SetNodeName() - Sets the display name of the node
CommercePoint.SetNodeThumbnail() - Sets an image/thumbnail for the node
CommercePoint.SetNodeBackground()- Sets background image for the node
CommercePoint.AddNodeItem() - Adds a purchasable or selectable item inside the node
CommercePoint.Finalize() - Finalizes and builds the entire structure
CommercePoint.Gc() - Garbage collection / cleanup
CommercePoint.ToString() - Debug output
-- Builds Commerce Store via LUA.
cp = CommercePoint.Create()
CommercePoint.BeginNode(cp)
CommercePoint.BeginNode(cp, 1)
CommercePoint.SetNodeName(cp, "Test")
CommercePoint.AddNodeItem(cp, "00000000-00000000-00000000-00010033")
CommercePoint.EndNode(cp)
CommercePoint.EndNode(cp)
CommercePoint.Finalize(cp)
CommercePoint.Open(cp)
# enum Home::CommercePointNodeType, copyof_10642, signed, width 4 bytes
FFFFFFFF kCommercePointNode: .set 0
FFFFFFFF kCommercePointObjectsNode: .set 1
FFFFFFFF kCommercePointProductsNode: .set 2
FFFFFFFF kCommercePointQueryNode: .set 3
FFFFFFFF kNumCommercePointNodeTypes: .set 4
FFFFFFFF kInvalidCommercePointNodeType: .set -
Example ->
Audi Shop
44249A1D-B11E4595-B11B1630-8A4A2DFC - AUDICOMMERCE.LUA