Sirius902/LuaBackend

Ability to configure additional script path(s)

Closed this issue · 0 comments

Consider adding the ability to append additional script path(s) that LuaBackend searches when looking for scripts to execute. This opens up the possibility for OpenKH mods to include Lua scripts in the mod itself.

  • would allow for GoA ROM to bundle its own Lua so that the game mod files and corresponding Lua script are never out of sync with each other
  • would potentially allow for the rando seed generator to include Lua scripts for quality of life, alternate win conditions, etc.
  • probably other possibilities

Implementation suggestions:

(1) Config in the folder with the dll

A config file of some sort in the folder that contains the LuaBackend dll itself (whether json, ini, yml, whatever makes sense / is easy enough to implement)

AdditionalScriptPaths=C:\openkh\mod\lua,C:\Users\sora\Documents\custom_lua_scripts

and then within each of those folders we could still have the sub-folders for kh1, kh2, etc, so C:\openkh\mod\lua\kh2 as an example.

(2) Config in the existing scripts folder

Instead of in the folder with the dll, could look for the config file in the existing well known scripts folder for a particular game that points to additional absolute script paths for just that game.