Side Relations: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Checkbox|yes}}" to "{{Icon|checked}}")
m (Lou Montana moved page Side relations to Side Relations: Name standard)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{TOC|side}}
{{TOC|side}}
{{Feature|arma3 | This page deals with all '''{{arma3}}''' sides, which has more than previous games. See the [[Side]] page to see previous titles' available sides. Also:
{{Feature|arma3|
This page deals with all '''{{arma3}}''' sides, which has more than previous games. See the [[Side]] page to see previous titles' available sides.
Also:
* [[west]] {{=}} [[blufor]]
* [[west]] {{=}} [[blufor]]
* [[east]] {{=}} [[opfor]]
* [[east]] {{=}} [[opfor]]
* [[resistance]] {{=}} [[independent]]}}
* [[resistance]] {{=}} [[independent]]
== Sides relations ==
}}
== Sides Relations ==


=== Sides friendship ===
{{Wiki|extractionScript}}
 
=== Sides Friendship ===


Helper function: [[BIS_fnc_sideIsFriendly]]
Helper function: [[BIS_fnc_sideIsFriendly]]


{| class="wikitable" style="text-align: center"
{| class="wikitable" style="text-align: center"
! is friendly to
! ↓ is friendly to →
! [[east]]
! [[east]]
! [[west]]
! [[west]]
Line 144: Line 149:
|}
|}


=== Sides enmity ===
=== Sides Enmity ===


Helper function: [[BIS_fnc_sideIsEnemy]]
Helper function: [[BIS_fnc_sideIsEnemy]]


{| class="wikitable" style="text-align: center"
{| class="wikitable" style="text-align: center"
! is enemy to
! ↓ is enemy to →
! [[east]]
! [[east]]
! [[west]]
! [[west]]
Line 283: Line 288:




== Change relations ==
== Change Relations ==


* You can set which sides [[resistance]] is friendly/enemy to in the mission editor (click on the Intel box).
* You can set which sides [[resistance]] is friendly/enemy to in the mission editor (click on the Intel box).
Line 289: Line 294:
* You can use the [[setFriend]] command to set relations between any sides (even [[east]] and [[west]]).
* You can use the [[setFriend]] command to set relations between any sides (even [[east]] and [[west]]).


{{cc|will make east friendly to west and vice versa}}
<sqf>
[[east]] [[setFriend]] [<nowiki/>[[west]], 1];
// will make east friendly to west and vice versa
[[west]] [[setFriend]] [<nowiki/>[[east]], 1];
east setFriend [west, 1];
west setFriend [east, 1];
</sqf>


=== One way hostility ===
=== One Way Hostility ===


Using the [[setCaptive]] command allows you to stop enemy units to fire on the target unit.
Using the [[setCaptive]] command allows you to stop enemy units to fire on the target unit.
_soldier [[setCaptive]] [[true]]; {{cc|_soldier can shoot at enemy but enemy will not return fire}}
<sqf>_soldier setCaptive true; // _soldier can shoot at enemy but enemy will not return fire</sqf>


You can re-activate hostility by canceling captive status.
You can re-activate hostility by canceling captive status.
_soldier [[setCaptive]] [[false]]; {{cc|_soldier will be shot at again by enemy units}}
<sqf>_soldier setCaptive false; // _soldier will be shot at again by enemy units</sqf>


=== Two way hostility with civilians ===
=== Two Way Hostility With Civilians ===


To make a civilian a potential target to other sides, you can either:
To make a civilian a potential target to other sides, you can either:
* make the civilian a renegade by using the [[addRating]] command. This will make him a [[sideEnemy|renegade]], meaning an enemy to everyone including other civilians.
* make the civilian a renegade by using the [[addRating]] command. This will make him a [[sideEnemy|renegade]], meaning an enemy to everyone including other civilians.
_civilian [[addRating]] -10000; {{cc|will cause sides to shoot civilian, but not civilian to shoot back - for that, use [[setFriend]]}}
<sqf>_civilian addRating -10000; // this will cause sides to shoot civilian, but not civilian to shoot back - for that, use setFriend</sqf>


{{Feature | Informative | the [[sideEnemy|renegade]] rating threshold is ''below'' -2000 (e.g -2001, -5000 etc).}}
{{Feature|informative|The [[sideEnemy|renegade]] rating threshold is ''below'' -2000 (e.g -2001, -5000 etc).}}


* make the civilian [[join]] an enemy group, e.g [[east]]:
* make the civilian [[join]] an enemy group, e.g [[east]]:<sqf>
[[private]] _eastGroup = [[createGroup]] [[east]];
private _eastGroup = createGroup east;
[_civilian] [[joinSilent]] _eastGroup;
[_civilian] joinSilent _eastGroup;
</sqf>


=== Set in the editor ===
=== Set in the Editor ===


# Group your civilians with an [[east]] leader
# Group your civilians with an [[east]] leader
# Delete the [[east]] leader on mission load:
# Delete the [[east]] leader on mission load:
#* Put {{Inline code|[[deleteVehicle]] [[this]]}} in the officer’s initialization field.
#* Put <sqf inline>deleteVehicle this</sqf> in the officer's initialisation field.
#* Alternatively, set the '''[[Eden Editor: System#Attributes|probability of presence]]''' slider of the officer to '''zero'''.
#* Alternatively, set the '''[[Eden Editor: System#Attributes|probability of presence]]''' slider of the officer to '''zero'''.
# On mission start, the [[east]] leader will not be here but the [[civilian]]s will be on the [[east]] side.
# On mission start, the [[east]] leader will not be here but the [[civilian]]s will be on the [[east]] side.
''Code used to generate the tables:''
<spoiler>
[[private]] _func = [[BIS_fnc_sideIsFriendly]];
[[private]] _sidesAsString = ["east", "west", "resistance", "civilian", "sideAmbientLife", "sideUnknown", "sideEnemy", "sideFriendly", "sideEmpty", "sideLogic"];
[[private]] _sideResults = [];
{
[[private]] _sideAsString = _x;
[[private]] _side = [[call]] [[compile]] _sideAsString;
_sideResults [[pushBack]] ([_sideAsString] + (_sidesAsString [[apply]] { [_side, [[call]] [[compile]] _x] [[call]] _func }));
} [[forEach]] _sidesAsString;
[[private]] _result = "{{| class=""wikitable"" style=""text-align: center""\n|-\n";
{
_result = _result + "! <nowiki>[[" + _x +"]]</nowiki>\n";
} [[forEach]] _sidesAsString;
{
[[private]] _results = _x;
{
[[if]] (_x [[isEqualType]] true) [[then]]
{
[[if]] (_x) [[then]]
{
_result = _result + "| <nowiki>{{Icon|checked}}</nowiki>\n";
}
  [[else]]
{
_result = _result + "| <nowiki>{{Icon|unchecked}}</nowiki>\n";
}
}
[[else]]
{
_result = _result + ("| <nowiki>[[" + _x + "]]</nowiki>\n");
}
} [[forEach]] _results;
_result = _result + "|-\n";
} [[forEach]] _sideResults;
_result = _result + "|}";
_result;</spoiler>




[[Category: Scripting Topics]]
[[Category: Scripting Topics]]

Latest revision as of 23:38, 25 May 2023

Arma 3
This page deals with all Arma 3 sides, which has more than previous games. See the Side page to see previous titles' available sides.

Also:

Sides Relations

Extraction script can be found on the Biki Export Scripts page.

Sides Friendship

Helper function: BIS_fnc_sideIsFriendly

↓ is friendly to → east west resistance civilian sideAmbientLife sideUnknown sideEnemy sideFriendly sideEmpty sideLogic
east Checked Unchecked Unchecked Checked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
west Unchecked Checked Checked Checked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
resistance Unchecked Checked Checked Checked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
civilian Unchecked Checked Checked Checked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
sideAmbientLife Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
sideUnknown Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
sideEnemy Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
sideFriendly Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
sideEmpty Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked
sideLogic Checked Checked Checked Checked Unchecked Unchecked Unchecked Checked Unchecked Unchecked

Sides Enmity

Helper function: BIS_fnc_sideIsEnemy

↓ is enemy to → east west resistance civilian sideAmbientLife sideUnknown sideEnemy sideFriendly sideEmpty sideLogic
east Unchecked Checked Checked Unchecked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
west Checked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
resistance Checked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
civilian Checked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
sideAmbientLife Checked Checked Checked Checked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
sideUnknown Checked Checked Checked Checked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
sideEnemy Checked Checked Checked Checked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
sideFriendly Checked Checked Checked Checked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
sideEmpty Checked Checked Checked Checked Unchecked Unchecked Checked Unchecked Unchecked Unchecked
sideLogic Unchecked Unchecked Unchecked Unchecked Unchecked Unchecked Checked Unchecked Unchecked Unchecked


Change Relations

  • You can set which sides resistance is friendly/enemy to in the mission editor (click on the Intel box).
  • Everyone is friendly toward civilians. Civilians AI have a total impunity and can kill any enemy without retaliation (same as captive units).
  • You can use the setFriend command to set relations between any sides (even east and west).

// will make east friendly to west and vice versa east setFriend [west, 1]; west setFriend [east, 1];

One Way Hostility

Using the setCaptive command allows you to stop enemy units to fire on the target unit.

_soldier setCaptive true; // _soldier can shoot at enemy but enemy will not return fire

You can re-activate hostility by canceling captive status.

_soldier setCaptive false; // _soldier will be shot at again by enemy units

Two Way Hostility With Civilians

To make a civilian a potential target to other sides, you can either:

  • make the civilian a renegade by using the addRating command. This will make him a renegade, meaning an enemy to everyone including other civilians.

_civilian addRating -10000; // this will cause sides to shoot civilian, but not civilian to shoot back - for that, use setFriend

The renegade rating threshold is below -2000 (e.g -2001, -5000 etc).

Set in the Editor

  1. Group your civilians with an east leader
  2. Delete the east leader on mission load:
  3. On mission start, the east leader will not be here but the civilians will be on the east side.