Side Relations: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Undo revision 90270 by Austin medic (talk) faction doesnt return side. It returns faction.)
(sides friendship)
Line 35: Line 35:
<code>EAST setFriend [WEST, 1];
<code>EAST setFriend [WEST, 1];
WEST setFriend [EAST, 1];</code>
WEST setFriend [EAST, 1];</code>
==Sides Friendship==
The way how engine determines friendliness
===IsFriendly===
* [[east]]  <tt>is friendly to</tt>  [[east]]
* [[west]]  <tt>is '''NOT''' friendly to</tt>  [[east]]
* [[independent]]  <tt>is '''NOT''' friendly to</tt>  [[east]]
* [[civilian]]  <tt>is friendly to</tt>  [[east]]
* [[sideUnknown]]  <tt>is '''NOT''' friendly to</tt>  [[east]]
* [[sideEnemy]]  <tt>is '''NOT''' friendly to</tt>  [[east]]
* [[sideFriendly]]  <tt>is friendly to</tt>  [[east]]
* [[sideLogic]]  <tt>is '''NOT''' friendly to</tt>  [[east]]
* [[east]]  <tt>is '''NOT''' friendly to</tt>  [[west]]
* [[west]]  <tt>is friendly to</tt>  [[west]]
* [[independent]]  <tt>is friendly to</tt>  [[west]]
* [[civilian]]  <tt>is friendly to</tt>  [[west]]
* [[sideUnknown]]  <tt>is '''NOT''' friendly to</tt>  [[west]]
* [[sideEnemy]]  <tt>is '''NOT''' friendly to</tt>  [[west]]
* [[sideFriendly]]  <tt>is friendly to</tt>  [[west]]
* [[sideLogic]]  <tt>is '''NOT''' friendly to</tt>  [[west]]
* [[east]]  <tt>is '''NOT''' friendly to</tt>  [[independent]]
* [[west]]  <tt>is friendly to</tt>  [[independent]]
* [[independent]]  <tt>is friendly to</tt>  [[independent]]
* [[civilian]]  <tt>is friendly to</tt>  [[independent]]
* [[sideUnknown]]  <tt>is '''NOT''' friendly to</tt>  [[independent]]
* [[sideEnemy]]  <tt>is '''NOT''' friendly to</tt>  [[independent]]
* [[sideFriendly]]  <tt>is friendly to</tt>  [[independent]]
* [[sideLogic]]  <tt>is '''NOT''' friendly to</tt>  [[independent]]
* [[east]]  <tt>is '''NOT''' friendly to</tt>  [[civilian]]
* [[west]]  <tt>is friendly to</tt>  [[civilian]]
* [[independent]]  <tt>is friendly to</tt>  [[civilian]]
* [[civilian]]  <tt>is friendly to</tt>  [[civilian]]
* [[sideUnknown]]  <tt>is '''NOT''' friendly to</tt>  [[civilian]]
* [[sideEnemy]]  <tt>is '''NOT''' friendly to</tt>  [[civilian]]
* [[sideFriendly]]  <tt>is friendly to</tt>  [[civilian]]
* [[sideLogic]]  <tt>is '''NOT''' friendly to</tt>  [[civilian]]
* [[east]]  <tt>is '''NOT''' friendly to</tt>  [[sideUnknown]]
* [[west]]  <tt>is '''NOT''' friendly to</tt>  [[sideUnknown]]
* [[independent]]  <tt>is '''NOT''' friendly to</tt>  [[sideUnknown]]
* [[civilian]]  <tt>is '''NOT''' friendly to</tt>  [[sideUnknown]]
* [[sideUnknown]]  <tt>is '''NOT''' friendly to</tt>  [[sideUnknown]]
* [[sideEnemy]]  <tt>is '''NOT''' friendly to</tt>  [[sideUnknown]]
* [[sideFriendly]]  <tt>is friendly to</tt>  [[sideUnknown]]
* [[sideLogic]]  <tt>is '''NOT''' friendly to</tt>  [[sideUnknown]]
* [[east]]  <tt>is '''NOT''' friendly to</tt>  [[sideEnemy]]
* [[west]]  <tt>is '''NOT''' friendly to</tt>  [[sideEnemy]]
* [[independent]]  <tt>is '''NOT''' friendly to</tt>  [[sideEnemy]]
* [[civilian]]  <tt>is '''NOT''' friendly to</tt>  [[sideEnemy]]
* [[sideUnknown]]  <tt>is '''NOT''' friendly to</tt>  [[sideEnemy]]
* [[sideEnemy]]  <tt>is '''NOT''' friendly to</tt>  [[sideEnemy]]
* [[sideFriendly]]  <tt>is friendly to</tt>  [[sideEnemy]]
* [[sideLogic]]  <tt>is '''NOT''' friendly to</tt>  [[sideEnemy]]
* [[east]]  <tt>is '''NOT''' friendly to</tt>  [[sideFriendly]]
* [[west]]  <tt>is '''NOT''' friendly to</tt>  [[sideFriendly]]
* [[independent]]  <tt>is '''NOT''' friendly to</tt>  [[sideFriendly]]
* [[civilian]]  <tt>is '''NOT''' friendly to</tt>  [[sideFriendly]]
* [[sideUnknown]]  <tt>is '''NOT''' friendly to</tt>  [[sideFriendly]]
* [[sideEnemy]]  <tt>is '''NOT''' friendly to</tt>  [[sideFriendly]]
* [[sideFriendly]]  <tt>is friendly to</tt>  [[sideFriendly]]
* [[sideLogic]]  <tt>is '''NOT''' friendly to</tt>  [[sideFriendly]]
* [[east]]  <tt>is friendly to</tt>  [[sideLogic]]
* [[west]]  <tt>is friendly to</tt>  [[sideLogic]]
* [[independent]]  <tt>is friendly to</tt>  [[sideLogic]]
* [[civilian]]  <tt>is friendly to</tt>  [[sideLogic]]
* [[sideUnknown]]  <tt>is '''NOT''' friendly to</tt>  [[sideLogic]]
* [[sideEnemy]]  <tt>is '''NOT''' friendly to</tt>  [[sideLogic]]
* [[sideFriendly]]  <tt>is friendly to</tt>  [[sideLogic]]
* [[sideLogic]]  <tt>is '''NOT''' friendly to</tt>  [[sideLogic]]
===IsEnemy===
* [[east]]  <tt>is '''NOT''' enemy to</tt>  [[east]]
* [[west]]  <tt>is enemy to</tt>  [[east]]
* [[independent]]  <tt>is enemy to</tt>  [[east]]
* [[civilian]]  <tt>is '''NOT''' enemy to</tt>  [[east]]
* [[sideUnknown]]  <tt>is '''NOT''' enemy to</tt>  [[east]]
* [[sideEnemy]]  <tt>is enemy to</tt>  [[east]]
* [[sideFriendly]]  <tt>is '''NOT''' enemy to</tt>  [[east]]
* [[sideLogic]]  <tt>is '''NOT''' enemy to</tt>  [[east]]
* [[east]]  <tt>is enemy to</tt>  [[west]]
* [[west]]  <tt>is '''NOT''' enemy to</tt>  [[west]]
* [[independent]]  <tt>is '''NOT''' enemy to</tt>  [[west]]
* [[civilian]]  <tt>is '''NOT''' enemy to</tt>  [[west]]
* [[sideUnknown]]  <tt>is '''NOT''' enemy to</tt>  [[west]]
* [[sideEnemy]]  <tt>is enemy to</tt>  [[west]]
* [[sideFriendly]]  <tt>is '''NOT''' enemy to</tt>  [[west]]
* [[sideLogic]]  <tt>is '''NOT''' enemy to</tt>  [[west]]
* [[east]]  <tt>is enemy to</tt>  [[independent]]
* [[west]]  <tt>is '''NOT''' enemy to</tt>  [[independent]]
* [[independent]]  <tt>is '''NOT''' enemy to</tt>  [[independent]]
* [[civilian]]  <tt>is '''NOT''' enemy to</tt>  [[independent]]
* [[sideUnknown]]  <tt>is '''NOT''' enemy to</tt>  [[independent]]
* [[sideEnemy]]  <tt>is enemy to</tt>  [[independent]]
* [[sideFriendly]]  <tt>is '''NOT''' enemy to</tt>  [[independent]]
* [[sideLogic]]  <tt>is '''NOT''' enemy to</tt>  [[independent]]
* [[east]]  <tt>is enemy to</tt>  [[civilian]]
* [[west]]  <tt>is '''NOT''' enemy to</tt>  [[civilian]]
* [[independent]]  <tt>is '''NOT''' enemy to</tt>  [[civilian]]
* [[civilian]]  <tt>is '''NOT''' enemy to</tt>  [[civilian]]
* [[sideUnknown]]  <tt>is '''NOT''' enemy to</tt>  [[civilian]]
* [[sideEnemy]]  <tt>is enemy to</tt>  [[civilian]]
* [[sideFriendly]]  <tt>is '''NOT''' enemy to</tt>  [[civilian]]
* [[sideLogic]]  <tt>is '''NOT''' enemy to</tt>  [[civilian]]
* [[east]]  <tt>is enemy to</tt>  [[sideUnknown]]
* [[west]]  <tt>is enemy to</tt>  [[sideUnknown]]
* [[independent]]  <tt>is enemy to</tt>  [[sideUnknown]]
* [[civilian]]  <tt>is enemy to</tt>  [[sideUnknown]]
* [[sideUnknown]]  <tt>is '''NOT''' enemy to</tt>  [[sideUnknown]]
* [[sideEnemy]]  <tt>is enemy to</tt>  [[sideUnknown]]
* [[sideFriendly]]  <tt>is '''NOT''' enemy to</tt>  [[sideUnknown]]
* [[sideLogic]]  <tt>is '''NOT''' enemy to</tt>  [[sideUnknown]]
* [[east]]  <tt>is enemy to</tt>  [[sideEnemy]]
* [[west]]  <tt>is enemy to</tt>  [[sideEnemy]]
* [[independent]]  <tt>is enemy to</tt>  [[sideEnemy]]
* [[civilian]]  <tt>is enemy to</tt>  [[sideEnemy]]
* [[sideUnknown]]  <tt>is '''NOT''' enemy to</tt>  [[sideEnemy]]
* [[sideEnemy]]  <tt>is enemy to</tt>  [[sideEnemy]]
* [[sideFriendly]]  <tt>is '''NOT''' enemy to</tt>  [[sideEnemy]]
* [[sideLogic]]  <tt>is '''NOT''' enemy to</tt>  [[sideEnemy]]
* [[east]]  <tt>is enemy to</tt>  [[sideFriendly]]
* [[west]]  <tt>is enemy to</tt>  [[sideFriendly]]
* [[independent]]  <tt>is enemy to</tt>  [[sideFriendly]]
* [[civilian]]  <tt>is enemy to</tt>  [[sideFriendly]]
* [[sideUnknown]]  <tt>is '''NOT''' enemy to</tt>  [[sideFriendly]]
* [[sideEnemy]]  <tt>is enemy to</tt>  [[sideFriendly]]
* [[sideFriendly]]  <tt>is '''NOT''' enemy to</tt>  [[sideFriendly]]
* [[sideLogic]]  <tt>is '''NOT''' enemy to</tt>  [[sideFriendly]]
* [[east]]  <tt>is '''NOT''' enemy to</tt>  [[sideLogic]]
* [[west]]  <tt>is '''NOT''' enemy to</tt>  [[sideLogic]]
* [[independent]]  <tt>is '''NOT''' enemy to</tt>  [[sideLogic]]
* [[civilian]]  <tt>is '''NOT''' enemy to</tt>  [[sideLogic]]
* [[sideUnknown]]  <tt>is '''NOT''' enemy to</tt>  [[sideLogic]]
* [[sideEnemy]]  <tt>is enemy to</tt>  [[sideLogic]]
* [[sideFriendly]]  <tt>is '''NOT''' enemy to</tt>  [[sideLogic]]
* [[sideLogic]]  <tt>is '''NOT''' enemy to</tt>  [[sideLogic]]


==Arming Civilians==
==Arming Civilians==

Revision as of 22:13, 30 November 2015

Sides

The game consists of 8 Sides:

  • West
  • East
  • Civilian
  • Resistance
  • sideLogic
  • Friendly
  • Enemy
  • Unknown

You can determine which Side a unit is on by using the side command.

NOTE: Make sure to recognize the difference between the Side data type (setter) and the textual side display (getter).

Factions

Factions are are a subset of a given Side. Examples are "USMC", "RU" or "GUE".

A US vehicle driven by a Russian will change from West Side to the East Side, but still remains part of the USMC faction.

Use the faction command on objects or units to determine it.

Change relations

1) You can set which sides Resistance is friendly to in the mission editor (click on the Intel box).

NOTE: It is not possible to change the Resistance side relationship while a mission is running.

2) Everyone is friendly toward Civilians. This means an armed Civilian will be able to slaughter unfriendly AI troops with impunity.

3) You can use the setFriend command at the initialization of a mission to set relations. It is even possible to make Russian and American troops friendly and greet one another.

EAST setFriend [WEST, 1]; WEST setFriend [EAST, 1];

Sides Friendship

The way how engine determines friendliness

IsFriendly

IsEnemy

Arming Civilians

You can arm Civilians by inserting code like the following in their initialization field:

this addWeapon "Colt1911"; this addMagazine "7Rnd_45ACP_1911";

NOTE: By default no side will shoot units on the civilian side, even when fired upon by them (same as for captives).

One way hostility

1) Using the setCaptive command allows you to stop enemy units to fire on the target unit. soldier1 setCaptive true; // soldier1 unit can shoot at enemy, but enemy will not return fire

You can re-activate hostility by canceling captive status. soldier1 setCaptive false; // soldier1 will be shoot at again by enemy units

2) Armed civilians will automatically shoot at anybody who is not friendly to Resistance. Or alternatively, you can make Civilians hostile to other sides by using the setFriend command:

civilianUnit setFriend [west, 0]; // Will cause civilians to shoot at West, but not West and Civilians

Civilians will not be attacked back. No setCaptive command is needed.

Two way hostility to civilians

1) You can make other sides hostile to a civilian by making the civilian renegade, but this will mean other civilians too will attack the unit. Run this code on the unit: this addRating -10000; // Will cause sides to shoot civilian, but not civilian to shoot back

When the rating gets below -2000, the unit's side switches to "ENEMY" and the unit is attacked by everyone.

2) To enable hostility both ways - civilians shooting at a side and the side shooting back, you need to move the civilian unit to a hostile side.

Example:

To shoot at West, you can make Resistance unfriendly to West and group the civilian unit with Resistance, or you could group them to East side.

Set in the editor

  1. Group your civilians with an East officer of higher rank than the civilians.
  2. put: deleteVehicle this in the officer’s initialization field (this will cause the officer not to appear)
  3. an alternative is to set the probability of presence slider of the officer to Zero.
  4. When you start the mission, the officer won't be there as he is deleted, but the civvies think they are East, will take over command and follow all waypoints, and fire on anyone on the opposite side

Scripted approach

Causing a civilian unit to change sides during a mission by using the joinSilent command and joining them to a living officer (using an officer with deleteVehicle this in their init field will not work), will cause the civilian to attack the other side, but the other side will not attack the civilian.

The side command will return the correct side for units grouped with a side officer at the start of a mission, but not for units joined during a mission by means of the joinSilent command.

The trick to make it work is to do first: [_unit] joinSilent grpNull;

and as second step: [_unit] joinSilent _targetGroup;

The important part is not to join them into the target group directly. So for new units use:

_eastCenter = createCenter east;// if no other east unit exists in the mission _dummyGroupEast = createGroup east; _newUnit = _dummyGroupEast createUnit ["TK_Soldier_EP1",position player, [], 0, "FORM"]; [_newUnit] joinSilent _targetGroup;//_targetGroup could be 'group player' for example deleteGroup _dummyGroupEast;// if you no longer need the dummy group