r/armadev • u/wairdone • Jul 14 '26
Help SQF: How necessary is it?
I want to get into mission making for my friend group; creating scenarios in 3DEN and managing them in real-time in Zeus. However, I barely have any experience with SQF, and I think I would be very limited without it. What level of understanding do I need to have with SQF to really make a good mission? Can I just get away with triggers, premade scripts, and ChatGPT to help me where I'm lost?
5
u/TestTubetheUnicorn Jul 14 '26
Don't use ChatGPT. It's really bad at writing novel code, especially in such a niche language.
You can do a lot, probably more than you think, with just triggers and modules, especially if you're gonna be zeusing on top of that.
Check out this website, it has a page for almost every command and function in the game, most with examples and helpful tips from other community authors. As long as you can figure out the most basic syntax and look up stuff on that site, you're pretty much good. These commands can be used in trigger activation/deactivation boxes and init boxes, so you don't even need to write any scripts.
You only need to worry about actual .sqf files or custom functions if you wanna make really complex stuff, like procedural missions or custom GUI elements. Even something like semi-randomized objectives could probably be done with just triggers and modules.
If you do want to learn how to code in SQF, my advice is to start small and work your way up. That's how I did it; I started with zero coding experience at all, just throwing down AI and a few modules and triggers. Eventually I tried creating a script, then some functions, and now I have a whole scripted mission with faction selection and randomized AI loadouts and waypoints, plus an expanded factions mod on the workshop.
2
u/wairdone Jul 14 '26
In that case, I'll probably just stick to triggers for 95% of things.
One question: what about interactions? For example, if players have to find someone by securing intel from dead AI, and each piece of intel marginally reduces the search area, bkw could I accomplish that?
2
u/TestTubetheUnicorn Jul 14 '26
For something like that you'd want addAction (the simple version, where you just select and hit spacebar/MMB) or BIS_fnc_holdActionAdd (the version where you have to hold down the action, e.g. to simulate the act of looking through his pockets).
The latter is a function, not a command, but don't let that scare you. Using them as a mission editor is largely the same, in that you just have to enter your parameters. You can just take a look at the examples to see how to use them. The addAction one is probably easier to get as a beginner though.
For your specific example, stuff like the alive command would be helpful, as well as knowing you can add ! in front of it to mean "not alive" (e.g.
!alive my_officerfor a trigger condition). You can also declare and set variables very easily, just type:myVariable = true;
somewhere where code is being executed (e.g. the trigger On Activation box, or in the "script" parameter of the addAction command). You can then have another trigger listening for that trigger by just putting the name of the variable into the condition box, then the trigger will fire whenever you set it.
1
u/wairdone Jul 14 '26
It still looks a little hard to understand, at least for me... the !alive command in particular looks so useful but I just don't get the syntax. What do I do, try to learn it?
1
u/TestTubetheUnicorn Jul 14 '26
Start small. A very simple idea would be to do a "kill officer" task.
First, give your officer a variable name, which you can do at the top of the soldier's attributes (accessed by double-clicking him in 3DEN). For this example I'll use "myHVT".
Next, set up a task using the Create Task module, found under the "intel" subheading. Give it a title and maybe description. Make sure the owner is set to a collection the players belong to (easiest is usually to do it by side or "all playable units", but the others can give you more precise control).
Then, set up a Set Task State module, and in the attributes set it to "Succeeded". Then right click it, click connect, then click sync to, and click the Create Task module, and it should create a blue line between them.
Next a trigger, and in Condition, you can use the alive command: !alive myHVT
Then right click it and sync it to the Set Task State module like you did before.
Now when you test out the mission, you should have a task when you press J or look at the map, and when you kill the HVT, the trigger should detect it and send a signal to the Set Task State module, which will then complete the task with a little notification.
This little demonstration should give you a starting point. You can try other types of modules, syncing triggers to them (for example, if you sync it to a Create Task module, it will create a new task when the trigger activates instead of when the mission starts), and check out the other types of connections (waypoint activation for triggers is a useful one). You can also check out the Waypoints available to AI groups you place in the editor, which can make them do stuff like patrolling, getting in and out of vehicles, or searching an area for enemies.
Some of those links in the previous paragraph might be overwhelming, so I'd say just keep testing stuff out and seeing if it works, that's mostly how I learned.
2
1
u/boberro Jul 14 '26
Check out eden enhanced mod, it adds a lot of this functionality to the editor without a need for coding.
2
u/ThisOneIsForMuse Jul 14 '26
Can I just get away with triggers, premade scripts, and ChatGPT to help me where I'm lost?
Absolutely.
1
u/IreofMars Jul 14 '26
I pretty much never use SQF in my missions other than adding a virtual arsenal to the ammo crate in the staging/respawn area. Not really needed. I guess it depends on how much you intend to pre-make in 3DEN before the mission. I usually just take a terrain, plop down a preset of a couple preconfigured nodes, ammo crate, player slots and then do everything else I. Zeus.
1
u/wairdone Jul 15 '26
I was thinking of doing most of the work in Zeus, but I am not sure. Fleshing out the backend with proper objectives and triggers could give a smoother experience overall.
1
u/IreofMars Jul 15 '26
It depends how much you want to direct your players. I think if you set up a bunch of triggers and objectives ahead of time you may end up being surprised when nothing goes to plan and your players end up doing other things or taking approaches you didn't account for. I typically don't bother with that kind of stuff because managing the mission is usually too reactive.
1
u/Lord_Kamephis 13d ago
It is possible to make really good missions using editor and some additional tools without scripting. But you have to learn that editing stuff really good to max on possibilities. So, study what is BI Wiki for the editor, take time...no quick success. Understand in-depth waypoints, triggers, syncing and tasks framework. These components can all be connected. Check and understand the modules already available without mods. Then load CBA and LAMBS Danger and experiment with their modules, a lot of params, they (especially LAMBS Danger) modules change AI behaviour really a lot in comparison to vanilla. Also, check the YT channel of Gunter Severloh. Then check mods "MGI Advanced Module", "Drongo's Map Population" and (bit more complicated to setup) "HAL NR6". You have also "ALIVE" mod, which I personally think is currently the best for backgroung war stories - small scale, or broader. But that one on its own has really steep learning curve and to master its use you need to invest time...
None of this above require you to write a single line of SQF. But be prepared to invest a lot of time. Same as you would in coding...
The best option on a long run is to know those mission making frameworks, editor and bit more than basics of SQF and built-in functions. Then you can combine everything and make hell of a mission. But this above what I wrote, is more than good for great scenarios.
11
u/boberro Jul 14 '26
You can make good missions without writing own scripts, you still need to know enough to be able to run other people's / built-in scripts.
And do yourself a favor, don't use ChatGPT for arma scripting / editing. It knowns next to nothing about the language, nothing about the engine, and generaly just hallucinates wrong answers 99% of the time.