You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Miepee edited this page Jun 11, 2022
·
4 revisions
UndertaleModTool can be extended with the use of C# Scripts. When writing such scripts, one should be familiar with both C# as a language, as well as having a broad understanding of GameMaker.
Scripts can be used for a variety of things such as:
automate tedious tasks
having an open patch format for mods
do other modifications to a GameMaker game
TODO: this needs to be done.
Currently, the API is not documented somewhere publically and is only observable via in-code documentation.
Examples
In general, all of the bundled UMT scripts located under the Scripts directory can be used as examples.
Lint and Run other Scripts
stringpathToScript="./MyScriptFile.csx";// Only Lints the script and determines whether it's valid codeboollintSuccecssful=LintUMTScript(pathToScript);// Runs the script. This can be called independently from lintingboolrunSuccessful=RunUMTScript(pathToScript);ScriptMessage("Script was linted successfully: "+lintSuccecssful);ScriptMessage("Script was run successfully: "+runSuccessful);if(!runSuccessful)// ScriptErrorType and ScriptErrorMessage contain the type and message of the last encountered error. // Both will be empty by default.ScriptMessage("Script error type: "+ScriptErrorType+" , script error message: "+ScriptErrorMessage);