![]() |
4 年之前 | |
---|---|---|
.. | ||
data | 4 年之前 | |
config.cpp | 4 年之前 | |
readme.md | 4 年之前 |
Brief overview of how to add compositions to Zeus.
class CfgGroups {
class Empty {
// Categories go here (detailed below)
};
};
Note that you cannot have more than 2 categories depth or the Zeus UI will fail to render the items (Making them unusable).
config.cpp
class RD501_Compositions_Republic {
name = "[RD501] Republic";
//Another group if desired can be nested, or compositions themselves.
/* If you exceed 3 layers of nesting (2 groups and the composition itself) inside
* class Empty{}: Zeus will not be able to see the items.*/
};
config.cpp
class RD501_Compositions_Republic_Base_0 {
name="Example Base";
side = 8;
icon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa";
#include "data\republic\bases\example_base.hpp"
};
data\republic\base\example_base.hpp
class Object1 {side=8;vehicle="Land_Wreck_Truck_dropside_F";rank="";position[]={-0.291016,3.2417,-0.00143862};dir=201.1;};
class Object2 {side=8;vehicle="Land_Wreck_Car2_F";rank="";position[]={2.88428,0.916016,0.601496};dir=107.267;};
class Object3 {side=8;vehicle="Land_JunkPile_F";rank="";position[]={-3.45459,2.1582,-0.24174};dir=0;};
class Object4 {side=8;vehicle="Land_Tyres_F";rank="";position[]={-3.74097,2.26416,0.0051589};dir=0;};
Final structure should end up with something along the lines of:
Base Definition {
Category Definition {
Composition Definition {
Include Composition Content (in external hpp)
OR
Composition Content (directly in class body)
};
};
};
copyToClipboard
works).[] call BIS_fnc_exportcfgGroups;
cis/installations/my_new_test_installation.hpp
config.cpp
in the desired category location.RD501_Compositions_CIS_Installation_0
becomes RD501_Compositions_CIS_Installation_1
.This should match the changes you've made, for a complete file version see below.
config.cpp > CfgGroups > RD501_Compositions_CIS > RD501_Compositions_CIS_Installations
class CfgGroups{ class Empty { class RD501_Compositions_CIS { name = "[RD501] CIS"; class RD501_Compositions_CIS_Installations { name = "Installations"; class RD501_Compositions_CIS_Installation_1 { name="Example Base That I Added!"; side = 8; //Ensure the side is set to 8, not having this will prevent the composition from showing. icon = "\a3\Ui_f\data\Map\Markers\NATO\n_unknown.paa"; //include hpp you added previously #include "data\cis\installations\my_new_test_installation.hpp" }; }; }; }; };
data\cis\installations\my_new_test_installation.hpp
class Object1 {side=8;vehicle="Land_Wreck_Truck_dropside_F";rank="";position[]={-0.291016,3.2417,-0.00143862};dir=201.1;};
class Object2 {side=8;vehicle="Land_Wreck_Car2_F";rank="";position[]={2.88428,0.916016,0.601496};dir=107.267;};