Sirius902 / LuaBackend

A standalone script interpreter for PC games. Compatible with LuaEngine.
GNU General Public License v3.0
40 stars 5 forks source link

Ability to configure additional script path(s) #5

Closed paulblessing closed 2 years ago

paulblessing commented 2 years ago

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.

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.