-
Notifications
You must be signed in to change notification settings - Fork 2
Script Documentation
The scripting system incorporates two parts: the editor scripting API and the Game Engine (ie Telltale Tool) API. The editor API contains all functionality related to The Telltale Editor. This allows you to write custom mod scripts, open files and do what you like with telltale games files. On the other hand, the Game Engine API provides all of the functionality provided by the actual game engine (ie all the functions in Lua scripts). This allows those scripts to be run in this environment. These functions are defined for each game separately in their own Lua script and call underlying script functions provided by the internal C++ code. The internal functions are typically just prefixed with an underscore, followed by the same name. Don't use those, use the ones defined in the script for that game (eg Game/WD100.lua for Walking Dead Season 1). You do not have to ever (and should not) include those scripts, as they will be done automatically.
You use require("filename") as normal. By prefixing the filename string with 'ToolLibrary/' this means that editor scripts (the library sub project in this repository) will be included on the path after that prefix. If not, then the file is searched for in game files in the current tool context (see the C++ documentation).
The documentation for script functionality is all generated by the Telltale Editor. If you run with command line arguments 'mkdocs' then it will generate a Lua script with all documentation. See the command line usage help command for more information. See the modding section, as this can be done there and you can search for functions, have documentation tool-tips in VSCode as well as autocomplete and constants.