Side Relations: Difference between revisions
(Undo revision 90270 by Austin medic (talk) faction doesnt return side. It returns faction.) |
Killzone Kid (talk | contribs) (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.
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).
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
- east is friendly to east
- west is NOT friendly to east
- independent is NOT friendly to east
- civilian is friendly to east
- sideUnknown is NOT friendly to east
- sideEnemy is NOT friendly to east
- sideFriendly is friendly to east
- sideLogic is NOT friendly to east
- east is NOT friendly to west
- west is friendly to west
- independent is friendly to west
- civilian is friendly to west
- sideUnknown is NOT friendly to west
- sideEnemy is NOT friendly to west
- sideFriendly is friendly to west
- sideLogic is NOT friendly to west
- east is NOT friendly to independent
- west is friendly to independent
- independent is friendly to independent
- civilian is friendly to independent
- sideUnknown is NOT friendly to independent
- sideEnemy is NOT friendly to independent
- sideFriendly is friendly to independent
- sideLogic is NOT friendly to independent
- east is NOT friendly to civilian
- west is friendly to civilian
- independent is friendly to civilian
- civilian is friendly to civilian
- sideUnknown is NOT friendly to civilian
- sideEnemy is NOT friendly to civilian
- sideFriendly is friendly to civilian
- sideLogic is NOT friendly to civilian
- east is NOT friendly to sideUnknown
- west is NOT friendly to sideUnknown
- independent is NOT friendly to sideUnknown
- civilian is NOT friendly to sideUnknown
- sideUnknown is NOT friendly to sideUnknown
- sideEnemy is NOT friendly to sideUnknown
- sideFriendly is friendly to sideUnknown
- sideLogic is NOT friendly to sideUnknown
- east is NOT friendly to sideEnemy
- west is NOT friendly to sideEnemy
- independent is NOT friendly to sideEnemy
- civilian is NOT friendly to sideEnemy
- sideUnknown is NOT friendly to sideEnemy
- sideEnemy is NOT friendly to sideEnemy
- sideFriendly is friendly to sideEnemy
- sideLogic is NOT friendly to sideEnemy
- east is NOT friendly to sideFriendly
- west is NOT friendly to sideFriendly
- independent is NOT friendly to sideFriendly
- civilian is NOT friendly to sideFriendly
- sideUnknown is NOT friendly to sideFriendly
- sideEnemy is NOT friendly to sideFriendly
- sideFriendly is friendly to sideFriendly
- sideLogic is NOT friendly to sideFriendly
- east is friendly to sideLogic
- west is friendly to sideLogic
- independent is friendly to sideLogic
- civilian is friendly to sideLogic
- sideUnknown is NOT friendly to sideLogic
- sideEnemy is NOT friendly to sideLogic
- sideFriendly is friendly to sideLogic
- sideLogic is NOT friendly to sideLogic
IsEnemy
- east is NOT enemy to east
- west is enemy to east
- independent is enemy to east
- civilian is NOT enemy to east
- sideUnknown is NOT enemy to east
- sideEnemy is enemy to east
- sideFriendly is NOT enemy to east
- sideLogic is NOT enemy to east
- east is enemy to west
- west is NOT enemy to west
- independent is NOT enemy to west
- civilian is NOT enemy to west
- sideUnknown is NOT enemy to west
- sideEnemy is enemy to west
- sideFriendly is NOT enemy to west
- sideLogic is NOT enemy to west
- east is enemy to independent
- west is NOT enemy to independent
- independent is NOT enemy to independent
- civilian is NOT enemy to independent
- sideUnknown is NOT enemy to independent
- sideEnemy is enemy to independent
- sideFriendly is NOT enemy to independent
- sideLogic is NOT enemy to independent
- east is enemy to civilian
- west is NOT enemy to civilian
- independent is NOT enemy to civilian
- civilian is NOT enemy to civilian
- sideUnknown is NOT enemy to civilian
- sideEnemy is enemy to civilian
- sideFriendly is NOT enemy to civilian
- sideLogic is NOT enemy to civilian
- east is enemy to sideUnknown
- west is enemy to sideUnknown
- independent is enemy to sideUnknown
- civilian is enemy to sideUnknown
- sideUnknown is NOT enemy to sideUnknown
- sideEnemy is enemy to sideUnknown
- sideFriendly is NOT enemy to sideUnknown
- sideLogic is NOT enemy to sideUnknown
- east is enemy to sideEnemy
- west is enemy to sideEnemy
- independent is enemy to sideEnemy
- civilian is enemy to sideEnemy
- sideUnknown is NOT enemy to sideEnemy
- sideEnemy is enemy to sideEnemy
- sideFriendly is NOT enemy to sideEnemy
- sideLogic is NOT enemy to sideEnemy
- east is enemy to sideFriendly
- west is enemy to sideFriendly
- independent is enemy to sideFriendly
- civilian is enemy to sideFriendly
- sideUnknown is NOT enemy to sideFriendly
- sideEnemy is enemy to sideFriendly
- sideFriendly is NOT enemy to sideFriendly
- sideLogic is NOT enemy to sideFriendly
- east is NOT enemy to sideLogic
- west is NOT enemy to sideLogic
- independent is NOT enemy to sideLogic
- civilian is NOT enemy to sideLogic
- sideUnknown is NOT enemy to sideLogic
- sideEnemy is enemy to sideLogic
- sideFriendly is NOT enemy to sideLogic
- sideLogic is NOT enemy to sideLogic
Arming Civilians
You can arm Civilians by inserting code like the following in their initialization field:
this addWeapon "Colt1911"; this addMagazine "7Rnd_45ACP_1911";
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
- Group your civilians with an East officer of higher rank than the civilians.
- put: deleteVehicle this in the officer’s initialization field (this will cause the officer not to appear)
- an alternative is to set the probability of presence slider of the officer to Zero.
- 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