-
Notifications
You must be signed in to change notification settings - Fork 22
Lua Scripting
The analysers can be scripted using the Lua programming language
In the global config file you can configure Lua's base behaviour.
To enable Lua scripting: "EnableLua" : true
To specify the Lua files that should always be loaded (for all games):
"LuaBaseFiles": ["Lua/LuaBase.lua","Lua/ViewerBase.lua"]
Individual games can also customise their Lua functionality.
To specify game specific Lua files:"LuaSourceFiles": ["ViewerScript.lua","MapViewer.lua" ]
The analysers expose an API that can be used to add additional functionality:
ReadByte(address)
Reads byte from memory and returns the value
ReadWord(address)
Reads a word (16 bits) from memory and returns the value
GetMemPtr(address)
Returns a pointer to an address in memory. This can be used for subsequent API calls that operate on memory
SetDataItemComment(address, comment text)
Set the comment text for a data item
Example: SetDataItemComment(0x1234,"Player Sprite 1")
SetDataItemDisplayType(address, display_type)
Set the display type for a data item value
Example: SetDataItemDisplayType(0x1234,EDataItemDisplayType.Pointer)