Access Expansion data without loading?
-
Is it possible to access data (images, additional code) from an expansion without loading it?
I'm looking for a quick way to distribute some additional content without going full blown expansion. -
@dustbro You can access anything with the File and FileSystem APIs
-
@d-healey that's great news. If I have an intermediate monolith file (.hxi), how do I pass the Blowfish key and read contents?
-
@dustbro
If I have an intermediate monolith file (.hxi), how do I pass the Blowfish key and read contents?
Oh that's different. I was assuming file based expansion.
I think you can access the contents of expansions without loading them - play around with the
get
functions -
I think you can access the contents of expansions without loading them - play around with the
get
functionsI don't think those are available without using the the expandionHandler :/
I would just use the expansion system, but the built in preset browser gets weird. -
@dustbro said in Access Expansion data without loading?:
I don't think those are available without using the the expandionHandler :/
You can use the expansionHandler without loading an expansion.
-
Ok, so I can get access to the image files embedded in an .hxi by using:
var MyImage = "{EXP::MyExpansionName}MyImageFile.png"; ImagePanel.loadImage(MyImage, "pic");
But I can't seem to find the magic combo to get loadDataFile() working so I can load the AdditionalSourceCode
I've tried:var currentExpansion = "{EXP::MyExpansionName}"; reg expansionData = currentExpansion.loadDataFile("data.json");
EDIT:
Got itfor (e in expansions) { var p = e.loadDataFile("data.json"); Console.print(trace(p)); }