Curator – Arma 3

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 12: Line 12:


== Costs ==
== Costs ==
=== Detailed Explanation ===
=== Manual Assigning ===
You can assign individual cost for every object in the game using [[Arma_3:_Event_Handlers#CuratorObjectRegistered|CuratorObjectRegistered]] event handler.
You can assign individual cost for every object in the game using [[Arma_3:_Event_Handlers#CuratorObjectRegistered|CuratorObjectRegistered]] event handler.


Line 49: Line 49:
  ];
  ];


=== Functions ===
=== Automated Assigning ===
Alternatively, you can use scripting functions which will simplify cost settings:
Alternatively, you can use scripting functions which will simplify cost settings:
* Set cost of specific objects by [[BIS_fnc_curatorObjectRegistered]], with crew costs calculated automatically based on vehicle cost + cost of all crew members.
* Set cost of specific objects by [[BIS_fnc_curatorObjectRegistered]], with crew costs calculated automatically based on vehicle cost + cost of all crew members.
* Export object list to a spreadsheet using [[BIS_fnc_exportCuratorCostTable]], set values there and use them in the game again using [[BIS_fnc_curatorObjectRegisteredTable]]
* Export object list to a spreadsheet using [[BIS_fnc_exportCuratorCostTable]], set values there and use them in the game again using [[BIS_fnc_curatorObjectRegisteredTable]]
=== Action Multipliers ===


== Unlocking Objects ==
== Unlocking Objects ==

Revision as of 17:53, 17 February 2014

arma3 curator eye.png

Curator is a technical name for Arma 3 Zeus game master system. Every involved scripting command, event handler or class name contains the name. The reason for it is to have a generic name which can be passed from project to project without any associations.

Setup

The central piece of every curator is Game Master module, otherwise referred to as Curator Logic. It stores every setting, like editing areas, available objects or their costs.

You can find the module in Modules (F7) > Zeus > Game Master

In module arguments, can set the curator unit (either specific unit, player with given UID or server admin) and that's all you need to add game master to your mission. Without any further settings, all objects will be available for free and whole map will be editable.

In every examples on this page, we'll call the module myCurator.

Costs

Manual Assigning

You can assign individual cost for every object in the game using CuratorObjectRegistered event handler.

myCurator addEventHandler ["CuratorObjectRegistered",{...code here, see below...}];

Arguments passed into the handler are:

Expected returned value is an Array of Arrays of the same size as the input array, with each item belonging to a class with the same array index. Missing or incorrect values will be replaced by default [true,0,0].

  • Input: [string1, string2, string3, ... classN]
  • Output: [array1, array2, array3, ... arrayN]

Example:

  • Input (3 classes): ["B_Soldier_f", "B_MRAP_01_F", "ModuleLightning_F"]
  • Output (3 arrays with settings): [[true,0.1], [true,0.5,0.6], [false,0,0]]


Every item in the array is in the following format:

[show, cost, (costWithCrew)]
  • show: Boolean - true to let the object appear in the CREATE list, false to hide it (costs will still be accepted if an object of the type is already present in the mission and made editable)
  • cost: Number - cost of the object
  • costWithCrew (Optional): Number - cost of the object with crew in it (affects only vehicles). When undefined, normal cost is used.

Example of the whole event handler:

myCurator addEventHandler [
	"CuratorObjectRegistered",
	{
		_classes = _this select 1;
		_costs = [];
		{
			_cost = if (_x isKindOf "Man") then {[true,0.1]} else {[false,0]}; // Show only objects of type "Man", hide everything else
			_costs = _costs + [_cost];
		} forEach _classes; // Go through all classes and assign cost for each of them
		_costs
	}
];

Automated Assigning

Alternatively, you can use scripting functions which will simplify cost settings:

Action Multipliers

Unlocking Objects

Editable Objects

Editing Areas

Camera Areas