tortuosit 486 Posted June 13, 2016 Hi, I often create quick missions and want to have quick access to code and I want to put it into the editor. A temporary thing. I.e. I do not want to do file/filesystem based things: "save mission, edit mission.sqm, etc...". I want to stay in the editor. Example: I wrote a small script to start mission on sunrise/sunset... /* [0, 0.25] spawn ... <=> "15 minutes after sunrise" [1, -1.5] spawn ... <=> "1.5 hours before sunset" */ 0 = [0, 0] spawn { private _tmp = ((date call BIS_fnc_sunriseSunsetTime) select (_this select 0)); _tmp =((_tmp + (_this select 1)) + 24) %24; _tmp = [date select 0, date select 1, date select 2, floor _tmp, floor(60 * (_tmp - (floor _tmp)))]; setdate _tmp }; Now what I do is putting the code into the init line of a Game Logic. Then I save this game logic as a custom composition for future use. I was quite happy about the custom compositions in Eden. I think the customs compositions are stored in the ArmA profile so I have to backup this. The other idea is, I could write a function and somehow register it like the BIS_fnc functions. But I don't know yet how that works. Thoughts? How do you do it? Thx Share this post Link to post Share on other sites
sarogahtyp 1109 Posted June 13, 2016 Read this please: https://community.bistudio.com/wiki/Functions_Library_(Arma_3)#Tag I use the default path method described there. my description.ext looks like this: class CfgFunctions { class SaRoSTag { class sarosFolder { class do_it {}; class do_it_another_way {}; }; }; }; I have 2 files in functions/sarosFolder/ fn_do_it.sqf fn_do_it_another_way.sqf arma processes, compiles and registers those function for use with function library. After that I can use em: [] call SaRoSTag_fnc_do_it; [] call SaRoSTag_fnc_do_it_another_way; 1 Share this post Link to post Share on other sites
kylania 568 Posted June 13, 2016 Adding functions is kinda easy but is based on description.ext and some extra files per mission, however is great to know how to do. You could make an addon of all your code snippets but maintenance on that wouldn't be easy and it would be required that your players have that addon loaded to play your games. Fine for something like a milsim unit, but not public consumption. Personally I just use my website or endless Notepad++ tabs. :P 1 Share this post Link to post Share on other sites
tortuosit 486 Posted June 13, 2016 Missions are just temporary and only for me, I do not distribute missions for other players. When I play for the sake of playing or testing maps, or testing my mods, I usually make some quick DAC/Alive/Ravage based missions. If the description.ext as mentioned by Sarogahtyp is per-mission, then it is not what I am searching for. Addon is maybe a good idea I did not have in mind. I think I would just feed an init.sqf with my functions there. Maybe even outside of the loader pbo and INCLUDE. ArmA definitely needs an ingame code editor and support of named code snippets. 1 Share this post Link to post Share on other sites
djotacon 190 Posted June 13, 2016 Missions are just temporary and only for me, I do not distribute missions for other players. When I play for the sake of playing or testing maps, or testing my mods, I usually make some quick DAC/Alive/Ravage based missions. If the description.ext as mentioned by Sarogahtyp is per-mission, then it is not what I am searching for. Addon is maybe a good idea I did not have in mind. I think I would just feed an init.sqf with my functions there. Maybe even outside of the loader pbo and INCLUDE. ArmA definitely needs an ingame code editor and support of named code snippets. Agree. I don't understand the "misterious way" to do somethings inside the Arma 3. A good internal editor with proper tron/troff commands will be a "must" to help developing mission. Right now the mission developers uses a pletora of text editor that help to do mission but thisn't the way to do things in the XXI century. Share this post Link to post Share on other sites
das attorney 858 Posted June 13, 2016 From execVM wiki page: Compiles and adds SQF Script to the scheduler queue and returns script handle. The script is first searched for in the mission folder, then in the campaign scripts folder and finally in the global scripts folder. I used to use a global scripts folder in Arma 2 but I'm not sure it's a thing on arma 3. I remember someone talking about it a while ago so it might be worth checking out Here's a post about it but it was for Arma and might not apply still https://forums.bistudio.com/topic/50899-where-is-the-global-scripts-folder/?p=916210 1 Share this post Link to post Share on other sites
Grumpy Old Man 3549 Posted June 13, 2016 One could also use the link shell extension to make symbolic links to your master folder. Works just fine. I use it to test my framework on multiple maps on the fly. Cheers 1 Share this post Link to post Share on other sites
MarkCode82 21 Posted June 14, 2016 Depends, if he's working with Symlinks or Junctions. Junctions are very versitile. and can exist on seperate drives. Put ArmA 3's Addons files on my SSD and it's other files on the HDD. And Symlinked it via a junction. Hardlinks via a junction point to a directory OR Folder.Hardlinks via a /H link are to a singular FileSoftlinks are similar to folders Share this post Link to post Share on other sites
tortuosit 486 Posted June 14, 2016 I use ntfs links all over the place, especially in the Steam games/ArmA/Addons/OldA2Addons/SSD/HDD/yaddayadda scope. ...I use those ones which I create via mklink [/d] Global scripts folder, I do not see... where would I have to put the scripts folder, where to link it? It will be auto parsed by init processes? Share this post Link to post Share on other sites