antonstruyk 24 Posted November 7, 2014 I'd like to be able to have users set some variables to change the behaviour of my mod. I'm looking to be able to set up some nested arrays of string data (defining some unit names to spawn in various cases) and some boolean values. Ideally it would be something in the mod folder and not in the 'userconfig' folder... I've been unable to find a way to load data from outside the PBO at all. I know it must be possible since I've seen other addons do it for settings and stuff, but I've been unable to successfully reverse-engineer how it was accomplished. Any ideas where I should be looking? Share this post Link to post Share on other sites
dr_strangepete 6 Posted November 8, 2014 if you are planning on using a config for your data, your config.cpp can include a file from the mod directory, same way as you would with \userconfig (you won't be able to binarize with this include, it has to find the file at runtime) #include "\@my_mod\settings.hpp" by using the slash, you define the root folder, and the @ is necessary to access the actual folder (where as #include "my_mod\settings.hpp" w/o '/@' refers to addon space, and the file won't be found unless included in the pbo) scripts can do the thing, by referring to the file directly, execVM "\@my_mod\somesqf.sqf"; or have the script auto-run, for example: class CfgFunctions { class MY { class myCategory { class myInit { file = "\@my_mod\somesqf.sqf"; preInit = 1; Limitations are primarily security, or lack there of by allowing user sqf; also, by using '/@my_mod', you'll need to ensure the directory is placed and named correctly, or it will CTD. I'd go with included configs over sqf Share this post Link to post Share on other sites
antonstruyk 24 Posted November 9, 2014 I've tried a ton of different ways to include a file like '\@my_mod\config.sqf' (including the ones you listed above) and every time it just comes back with something like 'Script @myMod\config.sqf not found'... I have no problem referencing the file if I include it in the PBO and use '\my_mod\config.sqf' ... Also I've tried putting it in the '@My_Mod' root folder and the '@My_Mod\addons' folder and neither seem to work. I tried rebuilding my whole PBO with a custom '-prefix' parameter passed to AddonBuilder and after fixing up all the previous internal references it still doesn't work. I'm not sure the next step to take in diagnosing the issue. Share this post Link to post Share on other sites
Tajin 349 Posted November 10, 2014 Your game dir acts as base directory. I'd suggest following the common practice of using a subdirectory for you mod in a folder called userconfig. (many mods use that) reference path could look like this: "userconfig\my_mod\config.sqf" (note: no backslash at the beginning) Share this post Link to post Share on other sites