Far East Lieutenant 27 Posted April 8, 2022 Hey guys, about two or three years ago, I was able to publish two very simple multiplayer scenario mods with a lot of help from the community. Now that I have more free time, I am trying to design a bigger scenario for myself. So far I've been able to build the mod within the editor. All the scripts were written within the init box inside the editor. all the nodes have been linked to all kinds of trigger box, pcs, and npcs, which eventually created a hell of a mess. So, I would like to try building mod in free scripting, but i'm still confused and want to ask how you guys usually do it. When building a scenario, do you use your editor only to place objects? or do you guys never use the editor? Share this post Link to post Share on other sites
pierremgi 4879 Posted April 8, 2022 Editor is fine for specific units or objects you want to place, like players, FOBs at start,... Usually, scripters add triggers for events with edited (for example revealing hidden >> shown units/objects) or scripted spawned units... You can also use BI modules for specific features. Personally, I did (and shared) my own modules for multiple parts like ambient life, traffic, enemy patrols, enemy attacks, features on players, interactions with map objects, enhanced BI modules... So, as far as you can use tools like this, or create your own functions, do not hesitate. Scenarii are optimized and easier to do. If you script in MP, you will probably have some init scripts like description.ext (not mandatory, for MP parameters menu as example) + initServer.sqf (for all scripts from server like spawning units), + initPlayerLocal.sqf (for all scripts needed by player(s) like HUDs or display interface, loadouts, respawn features...) + init.sqf if the scripts must run on server + clients. So, there is no bad solution, just solutions adapted to your goal. See all multiplayer topics on forum and read the Gunter's one first: Share this post Link to post Share on other sites
_foley 192 Posted April 8, 2022 Doing things in editor is more visual and intuitive so it's appealing at the start and you can actually go pretty far using just editor with minimal use of .sqf files. As you noticed though, there is a point where you have to many overlapping things in the editor that's it gets overwhelming. At that point you might start moving scripts from editor into .sqf files and running them from editor using execVM. Generally, as your scenario gets more complicated, you will see more value in keeping scripts in .sqf files where you have explicit control in which order and on what machine your scripts are running. It's also much easier to reuse the same piece of code in multiple places. There are other convenient advantages like the ability to search and replace phrases or variable names across all your code base. So it's a matter of preference, do what you're most comfortable with. You seem to be keen on using editor so I would say stick to the editor but move some of the reusable/complex logic into separate script files. Share this post Link to post Share on other sites
Dekade 2 Posted April 8, 2022 I think the editor is great but once the mission becomes more complex it can get messy imo. I'm not a very experienced scripter but I started a while ago and I can show you how I go about things if you want. For sure it's not the best way but it's doing what I want and my missions are not that complicated yet that I run into any performance issues so I guess that's good enough. Like @pierremgi said; I usually use the editor to place the scenery for my mission. Camps, structures, vehicles, etc, mostly static objects. And if I want to have any specific units at certain places when the mission starts I'll put those down too but other than that I use scripts outside of the editor for spawning AI and what not. Especially on bigger missions it saves a lot of resources not having all the AI already spawned in when the mission loads. And it's just way easier to structure your files and keep oversight over everything that is going on in your mission. Share this post Link to post Share on other sites
dwringer 45 Posted April 9, 2022 I think this is a really interesting question, bound to get all sorts of different answers from different people. For me, the editor has both strengths and weaknesses. Setting up waypoints in the editor has never felt right to me, because units have so much agency of their own and there are so many subtle aspects of waypoint assignment that by the time you get things working the way they should according to common sense (IMO), you've had to add all kinds of extra code and workarounds to triggers, unit init fields, and waypoint On Act fields. What the editor gets very right, IMO, is the trigger system. These can be used for all kinds of things, from simple mission init scripts and waypoint switching, to marking out areas and gathering units together to send to script functions. I really try to make full use of unit inits and triggers to do anything they can be made to do. I like putting the code here because it's easy to see in the editor and doesn't require me to Alt-Tab and navigate through labyrinths of folder structure and page through thousands of lines of code. When it comes to waypoints, I do use them in the editor because it's a lot easier than scripted solutions, but for complicated scenarios I still prefer to script them. Particularly if I want them to be dynamic in some way. I often use Game Logics to represent points in space to feed into my scripts. But, again, I often put extensive scripting inside triggers and init fields, rather than in separate files. All that said, I tend to have a huge library of function-defining scripts that I include with every mission, mostly to give me the ability to write code in the way that's most comfortable to me, with abstractions that are familiar to me. I don't like to define functions inside the editor unless it's a one-off. Share this post Link to post Share on other sites
dreadedentity 278 Posted April 9, 2022 The most I ever do in editor is put down soldiers/vehicles, I'm here for fun programming. If I want to play the game, well, there's always KOTH 🤭 Although I have been playing a lot of Liberation lately Tbh, the way Arma is, I don't see much value in hand-crafted stuff that only works in literally 1 place, unless executed better-than-perfectly. I much more prefer to create dynamic systems that work anywhere/a variety of situations 1 Share this post Link to post Share on other sites
dwringer 45 Posted April 9, 2022 13 minutes ago, dreadedentity said: The most I ever do in editor is put down soldiers/vehicles Tbh, the way Arma is, I don't see much value in hand-crafted stuff that only works in literally 1 place, unless executed better-than-perfectly. I much more prefer to create dynamic systems that work anywhere/a variety of situations Couldn't agree more with this, to me the challenge of creating something dynamic that can surprise even the creator is an endless pursuit that puts Arma head and shoulders above anything else. Share this post Link to post Share on other sites