inkle / inky

An editor for ink: inkle's narrative scripting language
http://www.inklestudios.com/ink
2.39k stars 290 forks source link

Feature: set base path for INCLUDEs #501

Open t-schreibs opened 8 months ago

t-schreibs commented 8 months ago

In the Unity integration for Ink, our current project is taking advantage of runtime compilation to expose content for modding in the StreamingAssets folder. This means that content will live dynamically in a series of folders under our StreamingAssets/Mods directory. We also use a bunch of external functions to interact with game state, which currently are housed in a Globals.ink file that lives in StreamingAssets/Content. Anyways, in order to make INCLUDEs work from a mod folder to the Globals.ink file, we've set the base folder path in the Ink compiler in the Unity integration to the StreamingAssets/Content folder, and now any Ink file in our project can access Globals.ink or whatever else lives in that folder. The problem is: there is no way to set the base folder path in Inky. So as mod content is generated, nothing can be tested in the editor, because Inky assumes a relative file path. I think the simplest solution to this problem would be to expose a setting allowing a user the option to arbitrarily set the base folder path for INCLUDEs.