This isn’t a Twine issue as such, the same outcome would occur for any locally viewed HTML file that tried to use AJAX to access a file using the file://
protocol.
One kludge I have seen used in a Twine project that supports the loading of external image packs, is to transform the JSON file into an “equivalent” JS file, their then used the importScripts() function to load this file instead.
So the transformation of your “Range” based example into a JS
file may look something like the following.
window.GE = {
"Range" : [
"melee",
"reach",
"short-range",
"mid-range",
"long-range"
]
}
note: I am using a GE (Greyelf) namespace in the above example to isolate the loaded content from the properties that already existing on web-browser’s window
object, I suggest you use your own uniquely named namespace instead.