This has allowed us to support the use of the Lua dofile functionality, allowing you to for instance have a "toolkit" of Lua functions that you can easily share between skins in your current root config folder.
You can view dofile as very similar in Lua to what @Include does in a skin...Using dofile
The dofile function can be used to include libraries or other snippets of Lua code. You must specify a full path to the dofile, using the syntax dofile('C:\PathToDoFile\SomeLua.lua'). Use GetVariable function if you want to use the #@# variable shortcut to the @Resources folder for the current config, or MakePathAbsolute if you want to have the .lua file be relative to the current skin folder.
Note: While a dofile you call can be anywhere on your system, be aware that if you do not put the dofile .lua file somewhere in the path to the current config, you won't be able to distribute it with your skin as a .rmskin package. A .rmskin package can only distribute the contents of a single root config folder.Code: Select all
function Initalize() dofile(SKIN:GetVariable('@')..'MyDoFiles\\toolkit.lua') dofile(SKIN:MakePathAbsolute('toolkit.lua')) end
Here is an example: