{"name":"Eden Editor: Custom Composition","title":"Eden Editor: Custom Composition","type":"topic","url":"https://community.bistudio.com/wiki/Eden_Editor:_Custom_Composition","revid":368928,"updated":"2024-08-13T11:04:44Z","aliases":["Eden Editor: Composition"],"markdown":"Apart from pre-defined groups and compositions, you can save and share your own custom compositions.\n\nThe following things will be saved with the composition:\n\n- Attribute values (inventory, simulation, simple object, etc.)\n- Layer structure (i.e. one can place comments in their own sub-layer for easy removal)\n- Layer visibility and transformation\n- Connections\n\nSince Arma 3 v2.06, custom Eden Editor compositions are also available in Zeus.\n\n### Saving Compositions\n\nTo save a composition, select the entities in the scene, click **right mouse button** on one of them and pick the **Save Custom Composition** option (or use the button in the Asset Browser).\n\nA window will be opened where you can set a title, author and category for your composition.\n\nIn the list on the left, you can either choose to create a new composition, or overwite one of the existing ones. This way, you can edit already created compositions.\nTo edit a composition's attributes, **double-click** on it, or select it and click on the **Edit** button (or use the button in the Asset Browser). It will open a window where you can change the title, author and category again.\n\nIn order to delete a composition permanently, select it in list and then use the button.\n\n### Placing Compositions\n\nYou can find compositions in **Compositions > Custom**.\nPlace it just like any other entity - either select it and then click in the scene on desired position, or drag it from the list to the scene.\n\n> [!IMPORTANT]\n> Vertical mode defines how the composition will be placed.\n>\n> - **Terrain Level** - composition will be snapped to the surface underneath. Please note that objects which are placed on another objects may no longer be positioned precisely.\n> - **Sea Level** - the composition will be placed exactly as it was saved, ignoring surface slope. This option may work better for complex compositions, especially when manually lowering the entities after placing.\n\nIf you need to correct the position or rotation of a placed composition it is recommended to use the Translation Widget and Rotation Widget.\nThis way, relative position and orientation of all entities in the composition will be preserved.\n\nIf you do not want each composition to be placed in its own layer turn off `Automatic Composition Layering` which can be found in `Settings... -> Preferences... -> Misc`.\n\n### Publishing Compositions\n\nYou can also publish your compositions to [Steam Workshop](https://steamcommunity.com/workshop/browse/?appid=107410). Do so by selecting the saved composition in the Asset Browser, and then using the button there.\n\nA publishing window will be opened where you can enter a name, description, visibility setting, image, and various tags. After agreeing with the Workshop license, you are free to publish the composition and share the link with others.\n\n#### Creating a Screenshot\n\nIn order for your composition to be found easier in the Steam Workshop you should add a meaningful screenshot. It is very easy to do so:\n\n- Place your composition\n- Move the Eden Editor camera so that only the composition is visible\n- Press the Backspace button to hide the Eden Editor interface\n- Press F12 (or the key you have assigned for screenshots in your steam application)\n- Select your screenshot in the publish composition UI by pressing the **Browse...** button, navigate to **Steam screenshots** and select the previously taken screenshot\n\n### Republishing Compositions\n\nUpdating a composition that was already published is effectively the same as the first time. Select the composition and use .\nIn the publishing window, select your already published composition on the left. Consider entering relevant change notes and publish.\n\n### Unpublishing Compositions\n\nIn order to unpublish a composition from within Eden Editor, open the publishing window by selecting any saved composition and using the button.\nNow select the published composition in the list on the left and press **DELETE**.\n\n### Subscribing to Compositions\n\nYou can easily find all published compositions made by yourself and others by selecting the **Steam subscribed content** entry in the Asset Browser, and then pressing the button.\nThis will open a Steam overlay with the [Workshop](https://steamcommunity.com/workshop/browse/?appid=107410) opened and compositions filtered.\nSoon after subscribing to any number of composition items there, the game should download these in the background. Large compositions may take a brief while to download and appear.\nThey will then be listed in the Asset Browser, ready for regular placement. Note that certain compositions require placement using a specific vertical mode to work correctly (see above).\n\n### Unsubscribing from Compositions\n\nTo unsubscribe from a Workshop composition from within Eden Editor, select it in the Asset Browser and press the button.\nNote that you should look for compositions listed under **Steam subscribed content**, otherwise you may accidentally delete a local composition instead.\n\n### Local Files\n\nCompositions are saved in the *Compositions* folder in your Profile directory.\n\nThey can be shared freely - if you pack a composition folder into a *.zip file and make it available for download, people who place the unpacked composition to their *Compositions* folder will have it available as well.\n\n### Modding Compositions (Arma 3 v2.10)\n\nIt is possible for mods to add their own compositions.\nThe mod needs to register them in config (see the Example below) for them to be loaded and displayed in groups tabs in Eden and Zeus.\n\n> [!NOTE]\n> Init scripts and all other composition features are supported.\n\nModded Compositions can be used as replacement for `CfgGroups` and the arsenal can be used in compositions, thus removing the need to make custom hidden unit classes with custom loadouts in order to construct a group.\nNote that placement-wise, compositions are slightly less efficient than using `CfgGroups`.\n\n#### Example\n\n```cpp\nclass CfgEditorCategories\n{\n    class EdCat_NATO // CfgGroups NATO\n    {\n        displayName = \"$STR_A3_CfgGroups_West_BLU_F0\";\n    };\n};\n\nclass CfgEditorSubcategories\n{\n    class EdSubcat_Armored // CfgGroups Armored\n    {\n        displayName = \"$STR_A3_CfgGroups_West_BLU_F_Armored0\";\n    };\n};\n\nclass Cfg3DEN\n{\n    class Compositions\n    {\n        class ModTag_MyComposition1 // one class per composition\n        {\n            path = \"edenCompositionTestmod\\compositionTank\";    // pbo path to a folder containing header.sqe/composition.sqe files\n            side = 0;                                            // 0 opfor, 1 blufor, 2 indfor, 3 civ, 8 Empty/Props\n            editorCategory = \"EdCat_NATO\";                        // link to CfgEditorCategories\n            editorSubcategory = \"EdSubcat_Armored\";                // link to CfgEditorSubcategories\n            displayName = \"$STR_Composition_Armored01\";\n            icon = \"\\A3\\ui_f\\data\\map\\markers\\nato\\b_inf.paa\";    // left side icon in groups list\n            useSideColorOnIcon = 1;                                // 1 == icon is always colored in faction color\n        };\n    };\n};\n```\n\n### Automating Composition Creation\n\nIt's possible to automate the creation of compositions. This is extremly helpful for maintaining a large number of compositions.\n\n> [!WARNING]\n> Always make a backup of your composition folder before running this script. It will overwrite existing compositions!\n\n```sqf\n0 spawn\n{\n    private _compositionLayers = [];\n\n    // Get all layers that follow a naming scheme\n    all3DENEntities # 6 apply\n    {\n        private _name = _x get3DENAttribute \"name\" select 0;\n        if (\"SPE_Comp_\" in _name) then\n        {\n            _compositionLayers pushBack [_name, _x];\n        };\n    };\n\n    // Loop though all layers\n    {\n        _x params [\"_name\", \"_ID\"];\n\n        // Get the entities\n        private _entities = get3DENLayerEntities _ID;\n\n        // Select the entities so do3DENAction works\n        set3DENSelected _entities;\n\n        // Open the create composition dialog\n        do3DENAction \"CreateCustomComposition\";\n\n        // Make sure it's open\n        waitUntil { !(isNull findDisplay 317) };\n\n        // Set the layer name as composition name in the dialog\n        findDisplay 317 displayCtrl 95 ctrlSetText _name;\n\n        // Close the dialog by activating the OK button\n        ctrlActivate (findDisplay 317 displayCtrl 1);\n\n        // Add a small delay\n        sleep 0.1;\n    } forEach _compositionLayers;\n};\n```","sections":[{"heading":null,"level":1,"markdown":"Apart from pre-defined groups and compositions, you can save and share your own custom compositions.\n\nThe following things will be saved with the composition:\n\n- Attribute values (inventory, simulation, simple object, etc.)\n- Layer structure (i.e. one can place comments in their own sub-layer for easy removal)\n- Layer visibility and transformation\n- Connections\n\nSince Arma 3 v2.06, custom Eden Editor compositions are also available in Zeus."},{"heading":"Saving Compositions","level":3,"markdown":"To save a composition, select the entities in the scene, click **right mouse button** on one of them and pick the **Save Custom Composition** option (or use the button in the Asset Browser).\n\nA window will be opened where you can set a title, author and category for your composition.\n\nIn the list on the left, you can either choose to create a new composition, or overwite one of the existing ones. This way, you can edit already created compositions.\nTo edit a composition's attributes, **double-click** on it, or select it and click on the **Edit** button (or use the button in the Asset Browser). It will open a window where you can change the title, author and category again.\n\nIn order to delete a composition permanently, select it in list and then use the button."},{"heading":"Placing Compositions","level":3,"markdown":"You can find compositions in **Compositions > Custom**.\nPlace it just like any other entity - either select it and then click in the scene on desired position, or drag it from the list to the scene.\n\n> [!IMPORTANT]\n> Vertical mode defines how the composition will be placed.\n>\n> - **Terrain Level** - composition will be snapped to the surface underneath. Please note that objects which are placed on another objects may no longer be positioned precisely.\n> - **Sea Level** - the composition will be placed exactly as it was saved, ignoring surface slope. This option may work better for complex compositions, especially when manually lowering the entities after placing.\n\nIf you need to correct the position or rotation of a placed composition it is recommended to use the Translation Widget and Rotation Widget.\nThis way, relative position and orientation of all entities in the composition will be preserved.\n\nIf you do not want each composition to be placed in its own layer turn off `Automatic Composition Layering` which can be found in `Settings... -> Preferences... -> Misc`."},{"heading":"Publishing Compositions","level":3,"markdown":"You can also publish your compositions to [Steam Workshop](https://steamcommunity.com/workshop/browse/?appid=107410). Do so by selecting the saved composition in the Asset Browser, and then using the button there.\n\nA publishing window will be opened where you can enter a name, description, visibility setting, image, and various tags. After agreeing with the Workshop license, you are free to publish the composition and share the link with others."},{"heading":"Creating a Screenshot","level":4,"markdown":"In order for your composition to be found easier in the Steam Workshop you should add a meaningful screenshot. It is very easy to do so:\n\n- Place your composition\n- Move the Eden Editor camera so that only the composition is visible\n- Press the Backspace button to hide the Eden Editor interface\n- Press F12 (or the key you have assigned for screenshots in your steam application)\n- Select your screenshot in the publish composition UI by pressing the **Browse...** button, navigate to **Steam screenshots** and select the previously taken screenshot"},{"heading":"Republishing Compositions","level":3,"markdown":"Updating a composition that was already published is effectively the same as the first time. Select the composition and use .\nIn the publishing window, select your already published composition on the left. Consider entering relevant change notes and publish."},{"heading":"Unpublishing Compositions","level":3,"markdown":"In order to unpublish a composition from within Eden Editor, open the publishing window by selecting any saved composition and using the button.\nNow select the published composition in the list on the left and press **DELETE**."},{"heading":"Subscribing to Compositions","level":3,"markdown":"You can easily find all published compositions made by yourself and others by selecting the **Steam subscribed content** entry in the Asset Browser, and then pressing the button.\nThis will open a Steam overlay with the [Workshop](https://steamcommunity.com/workshop/browse/?appid=107410) opened and compositions filtered.\nSoon after subscribing to any number of composition items there, the game should download these in the background. Large compositions may take a brief while to download and appear.\nThey will then be listed in the Asset Browser, ready for regular placement. Note that certain compositions require placement using a specific vertical mode to work correctly (see above)."},{"heading":"Unsubscribing from Compositions","level":3,"markdown":"To unsubscribe from a Workshop composition from within Eden Editor, select it in the Asset Browser and press the button.\nNote that you should look for compositions listed under **Steam subscribed content**, otherwise you may accidentally delete a local composition instead."},{"heading":"Local Files","level":3,"markdown":"Compositions are saved in the *Compositions* folder in your Profile directory.\n\nThey can be shared freely - if you pack a composition folder into a *.zip file and make it available for download, people who place the unpacked composition to their *Compositions* folder will have it available as well."},{"heading":"Modding Compositions (Arma 3 v2.10)","level":3,"markdown":"It is possible for mods to add their own compositions.\nThe mod needs to register them in config (see the Example below) for them to be loaded and displayed in groups tabs in Eden and Zeus.\n\n> [!NOTE]\n> Init scripts and all other composition features are supported.\n\nModded Compositions can be used as replacement for `CfgGroups` and the arsenal can be used in compositions, thus removing the need to make custom hidden unit classes with custom loadouts in order to construct a group.\nNote that placement-wise, compositions are slightly less efficient than using `CfgGroups`."},{"heading":"Example","level":4,"markdown":"```cpp\nclass CfgEditorCategories\n{\n    class EdCat_NATO // CfgGroups NATO\n    {\n        displayName = \"$STR_A3_CfgGroups_West_BLU_F0\";\n    };\n};\n\nclass CfgEditorSubcategories\n{\n    class EdSubcat_Armored // CfgGroups Armored\n    {\n        displayName = \"$STR_A3_CfgGroups_West_BLU_F_Armored0\";\n    };\n};\n\nclass Cfg3DEN\n{\n    class Compositions\n    {\n        class ModTag_MyComposition1 // one class per composition\n        {\n            path = \"edenCompositionTestmod\\compositionTank\";    // pbo path to a folder containing header.sqe/composition.sqe files\n            side = 0;                                            // 0 opfor, 1 blufor, 2 indfor, 3 civ, 8 Empty/Props\n            editorCategory = \"EdCat_NATO\";                        // link to CfgEditorCategories\n            editorSubcategory = \"EdSubcat_Armored\";                // link to CfgEditorSubcategories\n            displayName = \"$STR_Composition_Armored01\";\n            icon = \"\\A3\\ui_f\\data\\map\\markers\\nato\\b_inf.paa\";    // left side icon in groups list\n            useSideColorOnIcon = 1;                                // 1 == icon is always colored in faction color\n        };\n    };\n};\n```"},{"heading":"Automating Composition Creation","level":3,"markdown":"It's possible to automate the creation of compositions. This is extremly helpful for maintaining a large number of compositions.\n\n> [!WARNING]\n> Always make a backup of your composition folder before running this script. It will overwrite existing compositions!\n\n```sqf\n0 spawn\n{\n    private _compositionLayers = [];\n\n    // Get all layers that follow a naming scheme\n    all3DENEntities # 6 apply\n    {\n        private _name = _x get3DENAttribute \"name\" select 0;\n        if (\"SPE_Comp_\" in _name) then\n        {\n            _compositionLayers pushBack [_name, _x];\n        };\n    };\n\n    // Loop though all layers\n    {\n        _x params [\"_name\", \"_ID\"];\n\n        // Get the entities\n        private _entities = get3DENLayerEntities _ID;\n\n        // Select the entities so do3DENAction works\n        set3DENSelected _entities;\n\n        // Open the create composition dialog\n        do3DENAction \"CreateCustomComposition\";\n\n        // Make sure it's open\n        waitUntil { !(isNull findDisplay 317) };\n\n        // Set the layer name as composition name in the dialog\n        findDisplay 317 displayCtrl 95 ctrlSetText _name;\n\n        // Close the dialog by activating the OK button\n        ctrlActivate (findDisplay 317 displayCtrl 1);\n\n        // Add a small delay\n        sleep 0.1;\n    } forEach _compositionLayers;\n};\n```"}],"categories":["Eden Editor: Asset Types"],"groups":["Mission Editing"]}