FANDOM


General

The RTS feature in MCC is completely modified and with a bit of practice one can create his own structure with his own functions and custom groups.

In this page i'll try to cover the basics of how and what to edit.

The very first basic rules which applies to most MCC features is that MCC will look for the mission config first and if non is found it will fall back to the mod configs - this means that in the mod version you can overwrite the configs files you want to change with local files in the missions.

As usual config files go into the description.ext file I recommend to use include to keep the files organized and easy to edit but its up to you.

in the description file just add the line bellow and create a new file called "cfgRtsBuildings.hpp"

#include "cfgRtsBuildings.hpp"

You can download the MCC mission and look at the files as defined in the "mcc\rts" path.

cfgRtsBuildings

The cfgRtsBuildings class holds information about the buildings the player can build and upgrade.

There are 4 different building types:

  1. HQ - Only one HQ should be available for each side - you can upgrade it as much as you want.
  2. Storage - Storage building can store resources and each building can store 500 units from each resource per level. So a level 4 storage area can store 2000 units of each resource.
  3. Barracks - Serve as sleeping area and allow the recruitment of units/vehicles. Each barrack have 4 beds for each level. So a level 3 barrack will have 12 beds.
  4. TradePost - Used for traiding one resource with another.
  5. Workshop - Used for purchasing empty vehicles and will automatically repair vehicles around it.
  6. elecPower - Needed for supporting power to buildings that need power.
  7. triage - Will heal wounded units nearby and allow trading meds resources for tickets.

Here is an example of the HQ config:

class cfgRtsBuildings
{
	class MCC_rts_hq1
	{
		picture = "mcc\rts\data\hq.paa";

		displayName = "HQ";
		descriptionShort = "Basic short range radio H.Q allows scan for basic missions nearby";
		anchorType = "Land_TBox_F";
		requiredBuildings[] = {};
		needelectricity = 0;
		upgradeTo[] = {"MCC_rts_hq2"};
		buildings[] = {"MCC_rts_barracks1","MCC_rts_workshop1","MCC_rts_triage1","MCC_rts_tradePost1"};
		actions[] = {"MCC_rts_rtsBuildUIContainer","MCC_rts_rtsFortUIContainer","","","MCC_rts_scanResourcesBasic","","MCC_rts_scanResourcesCancel",""};
		fortifications[] = {"MCC_rts_fortSandbagLong","MCC_rts_fortSandbagRound","MCC_rts_fortRazorwire"};
		constType = "hq";
		level = 1;
		resources[] = {};
		actionFNC = "MCC_fnc_baseActionClicked";
		objectsArray[] = {{"Land_PowerGenerator_F", {-2.6,0,-1},{{0,1,0},{0,0,1}}},{"Land_cargo_addon01_V1_F", {3.36,0.5,-1.5},{{-1,0,0},{0,0,1}}},{"CamoNet_INDP_open_Curator_F", {0,0,0},{{0,1,0},{0,0,1}}},{"Land_TableDesk_F", {2.2,0.5,-1.5},{{1,0,0},{0,0,1}}},{"Land_Camping_Light_F", {2.2,1,-1},{{1,0,0},{0,0,1}}},{"Land_ChairWood_F", {2.8,0.5,-1.8},{{1,0,0},{0,0,1}}},{"Land_Map_altis_F", {2.2,0.5,-1.08},{{1,0,0},{0,0,1}}},{"Box_FIA_Support_F",{0,-3,-0.4},{{0,1,0},{0,0,1}}}};
 	};
 
 	class MCC_rts_hq2 : MCC_rts_hq1
 	{
 		displayName = "Radio Post";
 		descriptionShort = "Long range radio post allows scan for more advanced missions and access to supply drops requests.";
 		anchorType = "Land_Slum_House03_F";
 		requiredBuildings[] = {{"workshop",2},{"barracks",1},{"elecPower",1}};
 		needelectricity = 1;
 		upgradeTo[] = {"MCC_rts_hq3"};
 		actions[] = {"MCC_rts_rtsBuildUIContainer","MCC_rts_rtsFortUIContainer","","","MCC_rts_scanResourcesBasic","MCC_rts_scanResourcesAdvanced","","MCC_rts_scanResourcesCancel"};
 		level = 2;
 		resources[] = {{"ammo",200},{"repair",500},{"food",300},{"time",30}};
 		actionFNC = "MCC_fnc_baseActionClicked";
 		objectsArray[] = {{"Land_PowerGenerator_F", {5,0,-0.3},{{0,1,0},{0,0,1}}},{"Land_TTowerSmall_1_F", {5,2,6},{{0,1,0},{0,0,1}}},{"Land_TableDesk_F", {4,2,-0.8},{{-1,0,0},{0,0,1}}},{"Land_Camping_Light_F", {4,2.5,-0.3},{{1,0,0},{0,0,1}}},{"Land_Metal_rack_F", {1,2.8,-0.2},{{0,1,0},{0,0,1}}},{"Land_ChairWood_F", {3.5,2,-1.15}, {{-1,0,0},{0,0,1}}},{"Land_Laptop_unfolded_F", {4,2,-0.23},{{-1,0,0},{0,0,1}}},{"Land_Map_altis_F", {4.3,0,1},{{0,-1,0},{-1,0,0}}},{"Land_WaterCooler_01_old_F", {4,0.8,-0.4},{{1,0,0},{0,0,1}}},{"Land_Sleeping_bag_brown_F", {0,2,-1.05},{{-1,0,0},{0,0,1}}},{"Land_LuggageHeap_01_F", {-2.2,2.6,-0.65},{{1,0,0},{0,0,1}}},{"Land_WaterCooler_01_old_F", {4,0.8,-0.4},{{1,0,0},{0,0,1}}},{"CamoNet_BLUFOR_open_Curator_F", {0,0,1},{{0,1,0},{0,0,1}}},{"Box_FIA_Support_F",{0,-3,0},{{0,1,0},{0,0,1}}}};
 	};
 };

Let's go over the basics:

  • picture - path to the building icon
  • displayName - Name of the building.
  • descriptionShort - Short description of the building functionality.
  • anchorType - VehicleClass the base item which the rest of the items will be attached to it. If you are using CUP you can just put the warfare building here.
  • requiredBuildings[]- what building need to be build before building or upgrading this building. Leave empty for none. The required buildings will be in array of the type of building and the level needed. Example:
requiredBuildings[] = {{"workshop",2},{"barracks",1},{"elecPower",1}};
  • needelectricity - Does this building need electricity to work 0 for no 1 for yes.
  • upgradeTo - What building can this building be upgraded to. You can have up to 3 buildings.
  • buildings[] - What buildings can this building build needed to be defined in cfgRtsBuildings.
  • actions[] - Up to 12 actions that building can do needed to be defined in cfgRtsActions.
  • fortifications[] - up to 12 fortification that this building can build needed to be defined in cfgRtsActions.
  • groups[] - up to 12 groups that this building can recruit needed to be defined in cfgMCCRtsGroups.
groups[] = {"MCC_rtsGroup_Transport","MCC_rtsGroup_FT","MCC_rtsGroup_MG"};
  • constType -The type of the building from hq, storage, barracks exc.
  • level - the level of the building starting from 1.
  • resources[]- resources needed to build the building. Example:
resources[] = {{"ammo",200},{"repair",500},{"food",300},{"time",30}};
  • actionFNC - always leave "MCC_fnc_baseActionClicked"
  • objectsArray[] - array of attached object to the anchorType object and their attached position.

cfgRtsActions

The cfgRtsActions defines the actions we have put in the actions[] and fortifications[] in the cfgRtsBuildings.

There are some basic MCC functions that already there that you should know and use:

  • MCC_rts_rtsFortUIContainer - Create a sub menu for building fortifications as defined in fortifications[]
  • MCC_rts_rtsUnitsUIContainer - Create a sub menu for recruiting units as defined in groups[]
  • MCC_rts_rtsBuildUIContainer - Create a sub menu for buildings as defined in buildings[]
  • MCC_rts_rtsbuyVehicle - Open a vehicle kiosk for the commander where he can purchase empty vehicles.
  • MCC_rts_startElectricity - Start electricity production on the given generator costs 50 fuel.
  • MCC_rts_stopElectricity - Stop electricity production on the given generator.
  • MCC_rts_scanResourcesBasic - Start a basic resource mission.
  • MCC_rts_scanResourcesAdvanced - Start an advanced resource mission.
  • MCC_rts_scanResourcesCancel - Cancel resource mission that already started.
  • MCC_rts_buyTickets - Buy 5 tickets for 50 meds.
  • MCC_rts_ammo2Food - Trade ammo for food. costs 200 ammo.
  • MCC_rts_fuel2Food - Trade fuel for food. costs 200 fuel.
  • MCC_rts_repair2Food - Trade supplies for food. costs 200 supplies.
  • MCC_rts_destroyLogic - Destroy the current selected building.

Example:

class cfgRtsActions
{
	class MCC_rts_scanResourcesBasic
	{
		picture = "mcc\rts\data\hq.paa";

		displayName = "Basic Mission Scan";
		descriptionShort = "Order HQ to look for basic resources missions";
		condition = "!(missionNamespace getVariable [format ['MCC_rtsMissionOn_%1', playerSide],false]) && (missionNamespace getVariable ['MCC_isCampaignRuning',false]);";
		requiredBuildings[] = {{"hq",1}};
 		needelectricity = 1;
 		actionFNC = "MCC_fnc_rtsScanResourcesBasic";
 		resources[] = {{"time",60}};
 	};
 
 	class MCC_rts_scanResourcesAdvanced
 	{
 		picture = "mcc\rts\data\satcom.paa";
 
 		displayName = "Advanced Mission Scan";
 		descriptionShort = "Order HQ to look for advanced resources missions";
 		condition = "!(missionNamespace getVariable [format ['MCC_rtsMissionOn_%1', playerSide],false]) && (missionNamespace getVariable ['MCC_isCampaignRuning',false]);";
 		requiredBuildings[] = {{"hq",1}};
 		needelectricity = 1;
 		actionFNC = "MCC_fnc_rtsScanResourcesAdvanced";
 		resources[] = {{"time",60}};
 	};
 };

Let's go over the basics:

  • picture - path to the action icon.
  • displayName - Name of the action .
  • descriptionShort - Short description of the action functionality.
  • condition - a statement that must return true for this action to be enabled.
  • requiredBuildings[]- what building need to be build to enable this action.
  • needelectricity - Does this action needs electricity to work 0 for no 1 for yes.
  • actionFNC - Function name that will be called when the action clicked.

Always:

    • (_this select 0) - the control clicked.
    • getVariable missionNameSpace ["MCC_ConsoleGroupSelected",[]] - is an array containing all the groups/buildings selected by the commander.
  • resources[] - resource used when clicking the icon.

cfgMCCRtsGroups

The cfgMCCRtsGroups defines which AI groups will be available for recruiting as defined in groups[] in the cfgRtsBuildings.

Example:

class cfgMCCRtsGroups
{
	class MCC_rtsGroup_Transport
	{
		picture = "mcc\rts\data\groups\transport.paa";

		displayName = "Resources Transport";
		descriptionShort = "A basic truck to mobilize resources";
		condition = "";
		requiredBuildings[] = {{"barracks",1}};
 		unitsEast[] = {"O_Truck_03_transport_F"};
 		unitsWest[] = {"B_Truck_01_transport_F"};
 		unitsGuer[] = {"I_Truck_02_transport_F"};
 		needelectricity = 0;
 		actions[] = {"MCC_rts_orderStop","MCC_rts_OrderGetout","MCC_rts_LoadResources","MCC_rts_UnLoadResources","","","","",""};
 		actionFNC = "MCC_fnc_rtsCreateGroup";
 		resources[] = {{"ammo",30},{"repair",30},{"fuel",15},{"food",100},{"time",15}};
 	};
 
 	class MCC_rtsGroup_FT
 	{
 		picture = "mcc\rts\data\groups\fireTeam.paa";
 
 		displayName = "Fire Team";
 		descriptionShort = "A basic combat group";
 		condition = "";
 		requiredBuildings[] = {{"barracks",1}};
 		unitsEast[] = {"O_Soldier_TL_F","O_soldier_AR_F","O_Soldier_GL_F","O_soldier_LAT_F"};
 		unitsWest[] = {"B_Soldier_TL_F","B_soldier_AR_F","B_Soldier_GL_F","B_soldier_LAT_F"};
 		unitsGuer[] = {"I_Soldier_TL_F","I_soldier_AR_F","I_Soldier_GL_F","I_soldier_LAT_F"};
 		needelectricity = 0;
 		actions[] = {"MCC_rts_orderStop","","MCC_rts_orderStanceUp","MCC_rts_orderStanceDown","MCC_rts_orderPlaceSatchel","","MCC_rts_orderStealth","MCC_rts_orderAware","","","MCC_rts_takeControl","MCC_rts_respawnUnits"};
 		actionFNC = "MCC_fnc_rtsCreateGroup";
 		resources[] = {{"ammo",300},{"food",200},{"time",15}};
 	};
 };

Let's go over the basics:

  • picture - path to the group icon.
  • displayName - Name of the group.
  • descriptionShort - Short description of the group.
  • condition - a statement that must return true for this group to be enabled.
  • requiredBuildings[]- what building need to be build to enable this group.
  • unitsEast[] - an array of units that will spawned if the commander is from the east side.
  • unitsWest[] - an array of units that will spawned if the commander is from the west side.
  • unitsGuer[] - an array of units that will spawned if the commander is from the resistance side.
  • needelectricity - Does this group needs electricity to be recruited 0 for no 1 for yes.
  • actions[] - What actions this group would have. As defined in cfgRtsVehiclesActions.
  • actionFNC - leave the "MCC_fnc_rtsCreateGroup" function.
  • resources[] - resource used when clicking the icon.

cfgRtsVehiclesActions

The cfgRtsVehiclesActions defines what special action each AI group will be have as defined in actions[] in the cfgMCCRtsGroups .

There are some basic MCC functions that already there that you should know and use:

  • MCC_rts_LoadResources - Load nearby Logistics crates to a logistic truck.
  • MCC_rts_UnLoadResources - Unload nearby Logistics crates to a logistic truck.
  • MCC_rts_respawnUnits - Replenish dead units. Needs to be near a barracks.
  • MCC_rts_destroyObject - Destroy the current selected Object.
  • MCC_rts_populateVehicle - Spawn Crew to the selected vehicle/weapon.
  • MCC_rts_orderStop - Stop Current Actions.
  • MCC_rts_OrderGetout - Disembark cargo units.
  • MCC_rts_OrderLand - Order the helicopter to land.
  • MCC_rts_orderStanceUp - Order group units to stand
  • MCC_rts_orderStanceDown - Order group units to prone.
  • MCC_rts_orderStealth - Order group units to switch to stealth behavior.
  • MCC_rts_orderAware - Order group units to switch to aware behavior.
  • MCC_rts_orderPlaceSatchel - Place an explosive satchel that will detonate in 60 seconds.
  • MCC_rts_takeControl - Remote control the selected unit.

Example:

class cfgRtsVehiclesActions
{
	class MCC_rts_LoadResources
	{
		picture = "mcc\rts\data\groups\transportLoad.paa";

		displayName = "Logistics Load";
		descriptionShort = "Load Logistics crates";
		condition = "typeOf _target in (missionNameSpace getVariable ['MCC_supplyTracks',[]]) && alive _target";
		dontShowDisabled = 1;
		requiredBuildings[] = {};
		needelectricity = 0;
		actionFNC = "MCC_fnc_rtsLoadResources";
		resources[] = {};
	};

	class MCC_rts_respawnUnits
	{
		picture = "mcc\rts\data\addTickets.paa";

		displayName = "Replenish";
		descriptionShort = "Replenish dead units. Needs to be near a barracks.";
		condition = "group _target call MCC_fnc_rtsIsRespawnUnits";
		dontShowDisabled = 0;
		requiredBuildings[] = {{"barracks",1}};
 		needelectricity = 0;
 		actionFNC = "MCC_fnc_rtsrespawnUnits";
 		resources[] = {{"food",40}};
 	};
 };
  • picture - path to the action icon.
  • displayName - Name of the action .
  • descriptionShort - Short description of the action .
  • condition - a statement that must return true for this action to be enabled where "_target" is the group.
  • dontShowDisabled - 1 to not show the action if not available - 0 - to show.
  • needelectricity - Does this group action electricity to be recruited 0 for no 1 for yes.
  • actionFNC - Function name that will be called when the action clicked.

Always:

    • (_this select 0) - the control clicked.
    • getVariable missionNameSpace ["MCC_ConsoleGroupSelected",[]] - is an array containing all the groups/buildings selected by the commander.
  • resources[] - resource used when clicking the icon.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.