gc8 970 Posted January 12, 2020 Hi Please correct me if I'm wrong but are some mission makers releasing their mission core files as mod and not mission? I see this as good idea as you don't have to keep updating your mission for every map but just update the mod and all maps are up to date. My main question is how do you test changes in your mission, don't you have to restart arma to get the modified mod files loaded again? thx Share this post Link to post Share on other sites
Dedmen 2593 Posted January 12, 2020 10 minutes ago, gc8 said: My main question is how do you test changes in your mission, don't you have to restart arma to get the modified mod files loaded again? if you set -filePatching it loads the unpacked files from your arma directory, and you can just edit and restart the mission. 1 Share this post Link to post Share on other sites
gc8 970 Posted January 12, 2020 3 minutes ago, Dedmen said: if you set -filePatching it loads the unpacked files from your arma directory, and you can just edit and restart the mission. I didn't know mod files get reloaded like that. thanks dedmen! Share this post Link to post Share on other sites
gc8 970 Posted January 12, 2020 I'm trying to get the reloading work now but no matter what I put in config.cpp the mod function wont get reloaded. here's my config.cpp: class CfgPatches { class TestMod { units[] = {}; weapons[] = {}; requiredVersion = 0.1; author[] = {"GC8"}; authorUrl = "armagc.blogspot.com"; requiredAddons[] = {"3DEN"}; }; }; class CfgFunctions { class GC { class TestModFns { file = "tm"; // Folder path class TMTest { postInit = 1; recompile = 1; }; }; }; }; Actually I have to close arma and pack the .pbo again to get any changes in game... (-filePatching is on) Share this post Link to post Share on other sites
Dedmen 2593 Posted January 12, 2020 2 hours ago, gc8 said: Actually I have to close arma and pack the .pbo again to get any changes in game... 3 hours ago, Dedmen said: it loads the unpacked files from your arma directory so if your pbo has the file \tm\fn_tmtest.sqf you need to have it in your arma directory as Arma 3\tm\fn_tmtest.sqf then you can edit the sqf file in your arma directory, and when you restart the mission, it will reload from that unpacked file and ignore whatever is in the pbo. 1 Share this post Link to post Share on other sites
pierremgi 4743 Posted January 12, 2020 4 hours ago, gc8 said: My main question is how do you test changes in your mission, don't you have to restart arma to get the modified mod files loaded again? What I do: If your addon doesn't need a config.cpp and what you want to test can run from description.ext (like cfgFunctions), there is no need to pbo your mission for testing the sqfs efficiency. When you restart a preview, all description.ext, mission.sqm and sqfs are reloaded. In editor, check for your settings/preferences/Misc/recompile functions. So, do you need a config.cpp and pboed files for your test?From BIKI: The Description.ext is used to set the overall mission attributes or to define global entites that will be available for other scripts. It is placed in the mission root folder and uses the same syntax as the config.cpp file, but supports only a limited number of config classes. Additionally, many attributes can also be set via the Eden Editor, where changes are automatically refreshed upon scenario preview. In the 2D Editor the mission has to be reloaded for changes to be applied Share this post Link to post Share on other sites
gc8 970 Posted January 13, 2020 On 1/12/2020 at 9:11 PM, Dedmen said: so if your pbo has the file \tm\fn_tmtest.sqf you need to have it in your arma directory as Arma 3\tm\fn_tmtest.sqf then you can edit the sqf file in your arma directory, and when you restart the mission, it will reload from that unpacked file and ignore whatever is in the pbo. ok thanks, now it works! 😃 On 1/12/2020 at 10:09 PM, pierremgi said: What I do: If your addon doesn't need a config.cpp and what you want to test can run from description.ext (like cfgFunctions), there is no need to pbo your mission for testing the sqfs efficiency. When you restart a preview, all description.ext, mission.sqm and sqfs are reloaded. In editor, check for your settings/preferences/Misc/recompile functions. So, do you need a config.cpp and pboed files for your test? I'm not sure if I follow you, sorry. Do you mean when I make addon version of the mission there can be description.ext instead of config.cpp? Share this post Link to post Share on other sites
pierremgi 4743 Posted January 13, 2020 8 hours ago, gc8 said: I'm not sure if I follow you, sorry. Do you mean when I make addon version of the mission there can be description.ext instead of config.cpp? Test and final addon can be different. If you mod new units, new weapons or new magazines (as examples), you'll need a config.cpp and pack your addon. Now, if your addon is just made of sqf scripts, there is no reason for testing the pbo, as you can write a scenario and add many functions, musics, sounds... in description.ext So, depending on what your final addon is made of. I worked all my advanced modules with a scenario and all functions from description.ext, before making a similar config.cpp for the addon folder. See also my link above and this (old) open topic. 1 Share this post Link to post Share on other sites
gc8 970 Posted January 16, 2020 I have a question. What about server parameters in description.ext? do they have to be there or can they somehow be in config.cpp? Also what about GUI classes, etc in description.ext? Share this post Link to post Share on other sites
gc8 970 Posted January 16, 2020 I tried this to get the params defined in config.cpp inherited to Params in description.ext: class CfgPatches { class TestMod { units[] = {}; weapons[] = {}; requiredVersion = 0.1; author[] = {"GC8"}; authorUrl = "armagc.blogspot.com"; requiredAddons[] = {"3DEN"}; }; }; class CfgFunctions { class GC { class TestModFns { file = "tm"; // Folder path class TMTest { //postInit = 1; //preInit = 1; preStart = 1; recompile = 1; }; }; }; }; class TestParams { class RespawnMoney { title = "How much money the player has at respawn"; values[] = {123,0}; default = 0; }; }; Then in description.ext: class Params : TestParams { }; But I get base class undefined for TestParams Share this post Link to post Share on other sites
pierremgi 4743 Posted January 16, 2020 If I'm right, cfgPatches is for addon then config.cpp. So, why in description.ext? description.ext is fine for cfgFunctions and the classes described in the link. Your class testparams should be in class params (you can select them in lobby, so MP only, for SP you can grab the default value, see BIS_fnc_getParamValue) Share this post Link to post Share on other sites
Dedmen 2593 Posted January 17, 2020 config.cpp/description.ext are different configs, they cannot see eachother. Share this post Link to post Share on other sites
gc8 970 Posted January 17, 2020 13 hours ago, pierremgi said: If I'm right, cfgPatches is for addon then config.cpp. So, why in description.ext? description.ext is fine for cfgFunctions and the classes described in the link. Your class testparams should be in class params (you can select them in lobby, so MP only, for SP you can grab the default value, see BIS_fnc_getParamValue) I would like the params be defined in addon so that I don't have to supply every mission with the same Parameter classes. Saves time not having to copy the parameters around. Been using Parameters a lot so I know how they work. Just looking for new ways for doing this thing 45 minutes ago, Dedmen said: config.cpp/description.ext are different configs, they cannot see eachother. Right. So config.cpp is for configFile and description.ext is for missionConfigFile Maybe it would be possible to use include file from addon to description.ext. Is that kind of path thing supported? Share this post Link to post Share on other sites
Dedmen 2593 Posted January 17, 2020 25 minutes ago, gc8 said: Is that kind of path thing supported? if your mission is in a mod pbo, probably. but from a mission pbo in mpmissions that creates problems, BI semi-broke "external" includes with 3DEN update. Share this post Link to post Share on other sites
gc8 970 Posted January 17, 2020 1 hour ago, Dedmen said: if your mission is in a mod pbo, probably. but from a mission pbo in mpmissions that creates problems, BI semi-broke "external" includes with 3DEN update. Really, I could have used include from mod to mission. What exactly is "external"? All files outside mission.pbo ? Share this post Link to post Share on other sites
Dedmen 2593 Posted January 17, 2020 3 hours ago, gc8 said: All files outside mission.pbo ? yes Share this post Link to post Share on other sites
gc8 970 Posted January 17, 2020 Ok well I was able to include a file from addon to description.ext and the mission is in missions folder and I am running it as multiplayer. The included class exists but inheritance has no effect (Params : TestParams) Edit: ok inheritance works but MP Params menu remains empty Share this post Link to post Share on other sites
pierremgi 4743 Posted January 17, 2020 6 hours ago, gc8 said: I would like the params be defined in addon so that I don't have to supply every mission with the same Parameter classes. Saves time not having to copy the parameters around. Been using Parameters a lot so I know how they work. Just looking for new ways for doing this thing Right. So config.cpp is for configFile and description.ext is for missionConfigFile Maybe it would be possible to use include file from addon to description.ext. Is that kind of path thing supported? On 1/12/2020 at 6:43 AM, gc8 said: My main question is how do you test changes in your mission, don't you have to restart arma to get the modified mod files loaded again? So it's two different topics. - you can test many things like functions in cfgFunctions in any scenario without restarting Arma. - once these features are OK, you can pbo them in an addon. So, you'll use it but your scenarios will depend on that addon. You can have specific addon for server (like spawn of units) or or for clients (like HUDs), or general (most of the case because several functions may have to run everywhere). - once your addon loaded, you can preview your scenario without restarting arma for tuning the specific feature of your scenario. Share this post Link to post Share on other sites
gc8 970 Posted January 17, 2020 @pierremgi Thanks, it's mostly those server Parameters that I am interested to give several missions, without having to manually copy them Share this post Link to post Share on other sites
gc8 970 Posted January 17, 2020 Ok finally got the parameter include working: class Params { #include "\tm\inc.h" class Teeest3 { title = "Teeeest3"; values[] = {0,1,2}; default = 1; }; }; inc.h: class RespawnMoney { title = "How much money the player has at respawn"; values[] = {123,0}; default = 0; }; class Teeest2 { title = "Teeeest"; values[] = {0,1,2}; default = 1; }; Tested also in dedicated server and it works Edit: But that only works with tm being folder in arma3 directory. How do I write the path to the addon .pbo ? Share this post Link to post Share on other sites
Melody_Mike 127 Posted January 18, 2020 Hi @gc8, Not sure if this is what you need. There are other ways to find filepaths, such as using preprocessor. See KillZoneKids' blog: http://killzonekid.com/arma-scripting-tutorials-mission-root/ Share this post Link to post Share on other sites
gc8 970 Posted January 18, 2020 Hi @Melody_Mike I think that page is for mission file path. I am looking for path to file inside a mod. The wiki has some examples but I haven't got it working. yet. Except with unpacked data in arma folder Share this post Link to post Share on other sites
gc8 970 Posted January 18, 2020 Ok I got the include working same way as with unpacked data. Don't know what I did wrong first but it works now. Share this post Link to post Share on other sites