getExpansionForInstallPackage()
-
After the expansion has installed I think you need to call the
refreshExpansions
function.Then you can load the json with the
expansion.loadDataFile
function. No need to use the file API. Expansions were around years before that. -
@d-healey thanks! Should i keep
expNameInstall
where it is right now, or should i move that into the installation callback since wouldnt the expansion not exist when theexpNameInstall
var is in the first line of the browse function? -
@Casmat I don't see why you need that at all.
-
Assuming your install button is momentary you should check its value before showing the file browser, otherwise it will trigger twice.
-
@d-healey ahhh, we’d be using
obj.Expansion
, makes sense now! And will take note on the button check, Thanks again! -
@d-healey tried using
loadDataFile
but kept on getting unkown function errors, how do I use it? Or what should I put in as the relative path?
Tried this:
Expansion.loadDataFile(obj.Expansion)
-
@Casmat Expansion should be an expansion object.
-
@d-healey Ahh, thanks! what should i put in as the relative path?
-
@Casmat Probably just needs the name of the json file.
-
@d-healey Tried it:
obj.Expansion.loadDatafile("expInfo.json")
Still gives an error:
function not found
-
What does
Console.print(obj.Expansion.getProperties().Name);
output? -
@d-healey
Morphology - Night Owl
name of the expansion trying to import -
@Casmat Oh I see the problem. You have a typo ;)
-
@d-healey haha! Found it! silly me:face_with_tongue: sorry for the hassle!