Category:CMF3: Getting Started

From cluster wiki
Revision as of 23:30, 8 February 2023 by Eric (talk | contribs)
Jump to navigation Jump to search


CMF3 Logo Transparent.png

This page assumes you've already installed CMF3 on your mission. If not see CMF3: Installation. It does not assume you have any experience in scripting so this guide should be easy to follow for any mission maker.

So you've just installed CMF3 and now you want to get started learning how to make Cluster Community oriented missions, well then this guide is for you. It will cover the most basic functions in CMF3 and how to configure them as well as how to use the tools provided to you by CMF3.

(In the near future there will be videos here for each point)

Setting up our test environment

Before we get into it let's make sure you have a test environment ready, CMF3 is not designed for singleplayer and thus if you playtest the mission in a singleplayer environment you might get unexpected results. Therefore we need to launch the mission in a multiplayer environment, to do this simply open the mission in 3DEN and press "Play" in the toolbar and "Play in multiplayer". It will ask you if you want to host on LAN and which port to use, you can just ignore these settings and click "OK". Once you're in the multiplayer lobby simply quit out again.

Doing the above will also ensure that the CMF3 3DEN tools are loaded as well.

Creating playerunits

The most important part of any mission is having playerunits so your players can actually join in. Within Cluster Community we have a relatively strict ORBAT that we ask that you follow (If you are a Mission Maker in Cluster Community, if you aren't you are free to do whatever you want). To make this easier we have created a tool in the 3den toolbar called "Unit Spawner", you can find it under the "CMF3" tab. Inside Unit Spawner you will have a selection of ORBATs you can choose from, however for most Cluster Community Missions it is recommended to select a "Platoon Infantry Element" and delete the Platoon HQ (as we are not a big enough community to field an entire Platoon). Then spawn a zeus unit as well for yourself.

If you don't wish to use the tools provided you can also spawn in units yourself and assign their role using cmf_common_fnc_setRole inside the unit's init and cmf_common_fnc_setCallsign in the group init.

Creating a kosherArsenal Loadout

KosherArsenal is the star of CMF3, it allows mission makers to create a arsenal whitelist that takes into account the unit's role and any condition you can think of. These whitelists are canonically called loadouts or loadoutfiles. To create a loadoutfile follow the instructions given on the kosherArsenal Loadout page. Once you've created you loadout open up initPlayerLocal.sqf. In here look for the following line:

[["LOADOUTNAME HERE"], true, true] call cmf_kosherArsenal_fnc_init;

once you've located it replace "LOADOUTNAME HERE" with the name of your loadoutfile (without.sqf).

Adding rallypoints

Rallypoints is the silver star of CMF3, it creates a respawn system very similar to Offworld Industries's Squad. In short it allows for a player to create a temporary respawn point for other players to respawn on. This is already setup by default in CMF3 but if you want to disable it you can again open up initPlayerLocal.sqf and find the following line:

[["FTL", "SL", "PL", "CO"]] call cmf_respawn_fnc_rallypoint;

To now disable it just delete the entire line, or optionally if you want to add rallypoints for more/other units you can replace ["FTL", "SL", "PL", "CO"] with your configuration e.g. ["MED"] or [player1].

Limiting respawns

As cluster community is a small unit having 1-life operations can be quite boring as if something goes wrong the operation can end very quickly. But if we enable infinite respawns then that makes players undervalue their life and enables them to do stupid things. To prevent this we have created a system in which a players amount of respawns can be limited giving us a nice balance between not too short missions and players valuing their lives. Limited respawns is enabled by default as well with a limit of 4. if you wish to change this open up initPlayerLocal.sqf again and locate the following line:

[4] call cmf_respawn_fnc_limit;

To change the respawn limit change the 4 into any number you want, optionally if you just want to disable the system you can just delete the entire line.

Finishing up

Lastly it is of course important that our players have somewhere to spawn. In CMF3 BASE respawn is the default selected respawn type with the menuPosition Template, this means that players are free to choose their own respawn location and that they will choose their respawn location when they first join the mission. This means that if you don't have at least one respawn position set up no one will be able to spawn. Respawn positions are a part of vanilla Arma 3 and therefor is accessible as a module in the "Systems" menu under "Multiplayer". You can find the "Systems" menu by pressing F5 on your keyboard when you are in the 3DEN editor. The module you are looking for is called "Respawn Position". Place this module down where you want your players to respawn and open it up. Give it a name e.g. "Main Spawn" and change the "Side" Parameter to the player side. If the players occupy multiple sides simply place down a module for each side.

Where to go from here

After you've completed all the points above you have successfully created a minimally integrated CMF3 mission. There is a lot more going on behind the scenes as well as a lot more options to you as a mission maker. If you are interested in utilizing CMF3 to it's fullest I recommend you start by taking a look at the CMF3 Config, all the function components (and the functions within each one), all the Config Files, all the Event Files and if you feel extra hacky the CMF3 internal framework engine

Tips and Tricks

We highly recommend to get a proper text editor like Atom and Microsoft VSCode and installing a SQF linter (The easiest one is Microsoft VSCode). An SQF Linter will highlight errors in scripts you might be working on and allow you to spot mistakes immediately.

We also recommend to get the Advanced Developer Tools Addon to make script and mission testing 100 times easier.

Finally we recommend you also get the 3den Enhanced Addon and the Pythia Addon. These addons adds a lot of extra functionality to the 3DEN editor and lot's of really useful tools that don't create a dependency on the mission (except for 3DEN Enhanced Pythia tools, but these have a warning on them)

Pages in category "CMF3: Getting Started"

The following 2 pages are in this category, out of 2 total.