{"name":"Arma 3: Main Menu","title":"Arma 3: Main Menu","type":"topic","url":"https://community.bistudio.com/wiki/Arma_3:_Main_Menu","revid":342109,"updated":"2023-07-09T12:26:36Z","aliases":["Arma 3 Main Menu"],"markdown":"Arma 3 Apex introduces a new main menu defined in the `RscDisplayMain` ressource.\n\n### World Scene\n\nWorld scene is a scenario shown behind main menu when a specific terrain is loaded and -skipIntro is not used.\nIf you're playing on Altis and leave to main menu, Altis scene will be used.\n\nThe scene must be defined in an addon either in the terrain configuration or later by overwriting the existing configurations.\n\n#### Guidelines\n\nBy default, the scene uses a camera but any scriptable system can be used, such as OGV videos.\n\n- All content of the scenario should be placed in the *Intro* phase.\n- The scene should work on 16:9 screen. Multiple monitors doesn't need to be considered, as the main menu shows a grey background there.\n\nFor a better player experience, the scene should meet following criteria:\n\n- Lower performance makes navigating the menu uncomfortable.\n- Low view distance (~200 m) is recommended.\n- Avoid Camera looking down or towards sloped terrain, so the view distance is not as apparent.\n- Avoid Unlit night scenes (dark menus on dark scene don't look well).\n- Avoid Bad weather (hides shadows).\n\n#### Configuration for Stratis Terrain\n\nconfig.cpp (must be binarized)\n\n```cpp\nclass CfgPatches\n{\n    class mainmenu\n    {\n        units[] = {};\n        weapons[] = {};\n        requiredVersion = 0.1;\n        requiredAddons[] = { \"A3_Data_F_Enoch_Loadorder\" };\n    };\n};\n\nclass CfgWorlds\n{\n    class CAWorld;\n    class Stratis : CAWorld\n    {\n        cutscenes[] = { \"MyWorldScene\" }; // Class names of used scenes. When more than one is present, the system will pick one randomly.\n    };\n    initWorld = \"Stratis\";\n    demoWorld = \"Stratis\";\n};\n\nclass CfgMissions\n{\n    class Cutscenes\n    {\n        class MyWorldScene // Class referenced in 'cutscenes' property in CfgWorlds\n        {\n            directory = \"MyAddon\\MyScene.Stratis\"; // Path to scenario with the scene\n        };\n    };\n};\n```\n\n#### Default Scenario with Camera\n\n1. Open Eden Editor on the desired terrain\n1. Switch to *Intro* phase and place a player character (the system will not work without a player!)\n1. Save the scenario using the name defined by *directory* property in config (*MyScene.MyWorld* in our example)\n1. Open scenario folder (*Scenario > Open Scenario Folder*)\n1. Create **initIntro.sqf** file, it will be run automatically at the scene start\n1. Copy the code below to the file\n\n   ```sqf\n   [\n       //--- Underwater plane\n       {\n           [\"InitDummy\", [\"Stratis\", [1445.92,4802.16,-4.05235], 140.191, 0.27, [-9.09091,-10.4773], 2.74605, 0, 1049.08, 0.00329716, 1, 1.10852, -0.157568, 1.23792]] call BIS_fnc_camera;\n           setViewDistance 200;\n       },\n       //--- Aegis\n       {\n           [\"InitDummy\", [\"Stratis\", [2622.76,580.76,16.5994], 25.2349, 0.53, [-44.4346,0], 0, 0, 526.374, 0.00669019, 1, 1, 0, 1]] call BIS_fnc_camera;\n       }\n   ] call BIS_fnc_initWorldScene;\n   ```\n\n   The script will automatically add a subtle vignette and play main menu theme repeatedly.\n1. Replace scenes in the array with your scenes captured by Arma 3: Splendid Camera. Make sure to use \"InitDummy\" string at the beginning. The example currently uses two Stratis scenes, you replace them with as many scenes as you wish.\n   - Optionally, add assets to the scene in the editor if needed (e.g., soldiers walking around, parked vehicles, etc.)\n1. Move the scenario folder to your addon folder (as defined by *directory* property in config; *MyAddon\\MyScene.Stratis* in our example)\n\n### Spotlight\n\nThree large square buttons in the middle of the main menu are spotlight buttons. While the left and right ones are hard-coded, the middle one can be used by any mod-maker.\n\nIt is possible to define a list of spotlights, with the system picking randomly from them every time the menu refreshes (i.e. startup or returning from sub-menu).\n\n#### Configuration\n\n```cpp\nclass CfgMainMenuSpotlight // RscDisplayMain >> Spotlight works but is considered obsolete since SPOTREP #00064\n{\n    class CoopCampaign\n    {\n        text = \"Coop Campaign\"; // Text displayed on the square button, converted to upper-case\n        textIsQuote = 1; // 1 to add quotation marks around the text\n        picture = \"\\a3\\Ui_f\\Data\\GUI\\Rsc\\RscDisplayMain\\spotlight_1_apex_ca.paa\"; // Square picture, ideally 512x512\n        video = \"\\a3\\Ui_f\\Video\\spotlight_1_Apex.ogv\"; // Video played on mouse hover\n        action = \"ctrlactivate ((ctrlparent (_this select 0)) displayctrl 101);\"; // Code called upon clicking, passed arguments are [<button:Control>]\n        actionText = \"$STR_A3_RscDisplayMain_Spotlight_Play\"; // Text displayed in top left corner of on-hover white frame\n        condition = \"true\"; // Condition for showing the spotlight\n    };\n\n    class AnotherCoopCampaign\n    {\n        text = \"Another Coop Campaign\";\n        picture = \"\\a3\\Ui_f\\Data\\GUI\\Rsc\\RscDisplayMain\\spotlight_1_eastwind_ca.paa\";\n        action = \"ctrlactivate ((ctrlparent (_this select 0)) displayctrl 149);\";\n        actionText = \"$STR_A3_RscDisplayMain_Spotlight_Play\";\n        condition = \"isKeyActive 'FinishedCoopCampaign';\";\n    };\n\n    class JoinServer\n    {\n        text = \"Splendid Server\";\n        picture = \"my_mod\\data\\spotlight.paa\";\n        action = \"connectToServer ['127.0.0.1', 2302, '']\";\n        actionText = \"Join the Splendid Server\";\n        condition = \"true\";\n    };\n};\n```","sections":[{"heading":null,"level":1,"markdown":"Arma 3 Apex introduces a new main menu defined in the `RscDisplayMain` ressource."},{"heading":"World Scene","level":3,"markdown":"World scene is a scenario shown behind main menu when a specific terrain is loaded and -skipIntro is not used.\nIf you're playing on Altis and leave to main menu, Altis scene will be used.\n\nThe scene must be defined in an addon either in the terrain configuration or later by overwriting the existing configurations."},{"heading":"Guidelines","level":4,"markdown":"By default, the scene uses a camera but any scriptable system can be used, such as OGV videos.\n\n- All content of the scenario should be placed in the *Intro* phase.\n- The scene should work on 16:9 screen. Multiple monitors doesn't need to be considered, as the main menu shows a grey background there.\n\nFor a better player experience, the scene should meet following criteria:\n\n- Lower performance makes navigating the menu uncomfortable.\n- Low view distance (~200 m) is recommended.\n- Avoid Camera looking down or towards sloped terrain, so the view distance is not as apparent.\n- Avoid Unlit night scenes (dark menus on dark scene don't look well).\n- Avoid Bad weather (hides shadows)."},{"heading":"Configuration for Stratis Terrain","level":4,"markdown":"config.cpp (must be binarized)\n\n```cpp\nclass CfgPatches\n{\n    class mainmenu\n    {\n        units[] = {};\n        weapons[] = {};\n        requiredVersion = 0.1;\n        requiredAddons[] = { \"A3_Data_F_Enoch_Loadorder\" };\n    };\n};\n\nclass CfgWorlds\n{\n    class CAWorld;\n    class Stratis : CAWorld\n    {\n        cutscenes[] = { \"MyWorldScene\" }; // Class names of used scenes. When more than one is present, the system will pick one randomly.\n    };\n    initWorld = \"Stratis\";\n    demoWorld = \"Stratis\";\n};\n\nclass CfgMissions\n{\n    class Cutscenes\n    {\n        class MyWorldScene // Class referenced in 'cutscenes' property in CfgWorlds\n        {\n            directory = \"MyAddon\\MyScene.Stratis\"; // Path to scenario with the scene\n        };\n    };\n};\n```"},{"heading":"Default Scenario with Camera","level":4,"markdown":"1. Open Eden Editor on the desired terrain\n1. Switch to *Intro* phase and place a player character (the system will not work without a player!)\n1. Save the scenario using the name defined by *directory* property in config (*MyScene.MyWorld* in our example)\n1. Open scenario folder (*Scenario > Open Scenario Folder*)\n1. Create **initIntro.sqf** file, it will be run automatically at the scene start\n1. Copy the code below to the file\n\n   ```sqf\n   [\n       //--- Underwater plane\n       {\n           [\"InitDummy\", [\"Stratis\", [1445.92,4802.16,-4.05235], 140.191, 0.27, [-9.09091,-10.4773], 2.74605, 0, 1049.08, 0.00329716, 1, 1.10852, -0.157568, 1.23792]] call BIS_fnc_camera;\n           setViewDistance 200;\n       },\n       //--- Aegis\n       {\n           [\"InitDummy\", [\"Stratis\", [2622.76,580.76,16.5994], 25.2349, 0.53, [-44.4346,0], 0, 0, 526.374, 0.00669019, 1, 1, 0, 1]] call BIS_fnc_camera;\n       }\n   ] call BIS_fnc_initWorldScene;\n   ```\n\n   The script will automatically add a subtle vignette and play main menu theme repeatedly.\n1. Replace scenes in the array with your scenes captured by Arma 3: Splendid Camera. Make sure to use \"InitDummy\" string at the beginning. The example currently uses two Stratis scenes, you replace them with as many scenes as you wish.\n   - Optionally, add assets to the scene in the editor if needed (e.g., soldiers walking around, parked vehicles, etc.)\n1. Move the scenario folder to your addon folder (as defined by *directory* property in config; *MyAddon\\MyScene.Stratis* in our example)"},{"heading":"Spotlight","level":3,"markdown":"Three large square buttons in the middle of the main menu are spotlight buttons. While the left and right ones are hard-coded, the middle one can be used by any mod-maker.\n\nIt is possible to define a list of spotlights, with the system picking randomly from them every time the menu refreshes (i.e. startup or returning from sub-menu)."},{"heading":"Configuration","level":4,"markdown":"```cpp\nclass CfgMainMenuSpotlight // RscDisplayMain >> Spotlight works but is considered obsolete since SPOTREP #00064\n{\n    class CoopCampaign\n    {\n        text = \"Coop Campaign\"; // Text displayed on the square button, converted to upper-case\n        textIsQuote = 1; // 1 to add quotation marks around the text\n        picture = \"\\a3\\Ui_f\\Data\\GUI\\Rsc\\RscDisplayMain\\spotlight_1_apex_ca.paa\"; // Square picture, ideally 512x512\n        video = \"\\a3\\Ui_f\\Video\\spotlight_1_Apex.ogv\"; // Video played on mouse hover\n        action = \"ctrlactivate ((ctrlparent (_this select 0)) displayctrl 101);\"; // Code called upon clicking, passed arguments are [<button:Control>]\n        actionText = \"$STR_A3_RscDisplayMain_Spotlight_Play\"; // Text displayed in top left corner of on-hover white frame\n        condition = \"true\"; // Condition for showing the spotlight\n    };\n\n    class AnotherCoopCampaign\n    {\n        text = \"Another Coop Campaign\";\n        picture = \"\\a3\\Ui_f\\Data\\GUI\\Rsc\\RscDisplayMain\\spotlight_1_eastwind_ca.paa\";\n        action = \"ctrlactivate ((ctrlparent (_this select 0)) displayctrl 149);\";\n        actionText = \"$STR_A3_RscDisplayMain_Spotlight_Play\";\n        condition = \"isKeyActive 'FinishedCoopCampaign';\";\n    };\n\n    class JoinServer\n    {\n        text = \"Splendid Server\";\n        picture = \"my_mod\\data\\spotlight.paa\";\n        action = \"connectToServer ['127.0.0.1', 2302, '']\";\n        actionText = \"Join the Splendid Server\";\n        condition = \"true\";\n    };\n};\n```"}],"categories":["Arma 3: Editing"],"groups":["Game and Troubleshooting"]}