Spieler Loadout: Unterschied zwischen den Versionen

Aus Arma Wiki
Wechseln zu: Navigation, Suche
(Erstellung des Event Script (initPlayerLocal.sqf))
 
(31 dazwischenliegende Versionen des gleichen Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
{{DISPLAYTITLE:Loadout für MP Mission erstellen}}
+
{{DISPLAYTITLE: Individuelles loadout für Coop Mission erstellen}}
 +
Diese Anleitung ist für jeden Spielbaren Charakter, welcher ein spezifisches loadout nutzten soll, durchzuführen.
  
 
==Erstellung des Event Script (initPlayerLocal.sqf)==
 
==Erstellung des Event Script (initPlayerLocal.sqf)==
- Im Missions Verzeichnis die Datei initPlayerLocal.sqf erstellen.<br>
+
*Im Mission Verzeichnis die Datei '''initPlayerLocal.sqf''' erstellen.
- Datei initPlayerLocal.sqf ist wie folgt Aufbau:
+
*Datei '''initPlayerLocal.sqf''' ist wie folgt Aufbau:
 +
<br>
 
<source line lang="sql">
 
<source line lang="sql">
 
_loadoutScript = switch (toUpper (str player)) do {
 
_loadoutScript = switch (toUpper (str player)) do {
 
case "S1": {"loadout\s1.sqf"};
 
case "S1": {"loadout\s1.sqf"};
 +
case "S2": {"loadout\s2.sqf"};
 
...
 
...
 
...
 
...
Zeile 13: Zeile 16:
 
[player] call compile preprocessFileLineNumbers _loadoutScript;
 
[player] call compile preprocessFileLineNumbers _loadoutScript;
 
</source>
 
</source>
 +
<br>
 +
{{Box|blau|[[Bild:1000px-Pictogram_voting_info.svg.png‎|Hinweis|25px|verweis=]] Hinweis|"S1" ist der Name der im Editor platzierten spielbaren Figur.<br>
 +
Das Verzeichnis, loadout ist im Hauptverzeichnis der Mission zu erstellen. In der Datei s1.sqf ist das loadout hinterlegt.}}
  
 +
==Spieler Ausrüstung zusammenstellen==
 +
*das Grundgerüst von z.b. s1.sqf, das Loadout, wird am besten via Virtual Arsenal. Zu erreichen über '''LEARN''' > '''VIRTUAL ARSENAL'''.
 +
* Im ''VIRTUAL ARSENAL'' das gewünschte loadout erstellen.
 +
* Mit '''STRG + C''' oder via '''Exportbutton''' in einen Editor deiner Wahl exportieren.
  
<blockquote width=80%; style="background:#f4f4ff; border: 2px solid #999; border-right-width: 2px">
+
===Bearbeiten des ''VIRTUAL ARSENAL'' export===
"S1" der Name der im Editor plazierten spielbaren Figur ist.<br>
+
*Beispiel export aus ''VIRTUAL ARSENAL''
loadout\s1.sqf bedeutet das im zuvor erstellten Verzeichnis, loadout, im Haupverzeichnis der Mission das loadout für den spieler "S1" abgelegt ist.
+
<source line lang="sql">
</blockquote >
+
comment "Exported from Arsenal by Neodym";
  
{{Box|blau|[[Bild:Verweis.png]] Titel|Der eigentliche Text}}
+
comment "Remove existing items";
 +
removeAllWeapons this;
 +
removeAllItems this;
 +
removeAllAssignedItems this;
 +
removeUniform this;
 +
removeVest this;
 +
removeBackpack this;
 +
removeHeadgear this;
 +
removeGoggles this;
 +
 
 +
comment "Add containers";
 +
this forceAddUniform "U_I_CombatUniform";
 +
for "_i" from 1 to 4 do {this addItemToUniform "30Rnd_556x45_Stanag";};
 +
this addItemToUniform "16Rnd_9x21_Mag";
 +
this addVest "V_PlateCarrierIA2_dgtl";
 +
for "_i" from 1 to 4 do {this addItemToVest "FirstAidKit";};
 +
for "_i" from 1 to 6 do {this addItemToVest "HandGrenade";};
 +
for "_i" from 1 to 3 do {this addItemToVest "16Rnd_9x21_Mag";};
 +
this addBackpack "B_TacticalPack_oli";
 +
for "_i" from 1 to 2 do {this addItemToBackpack "SatchelCharge_Remote_Mag";};
 +
for "_i" from 1 to 4 do {this addItemToBackpack "DemoCharge_Remote_Mag";};
 +
this addHeadgear "H_Cap_headphones";
 +
this addGoggles "G_Bandanna_oli";
 +
 
 +
comment "Add weapons";
 +
this addWeapon "arifle_Mk20C_F";
 +
this addPrimaryWeaponItem "muzzle_snds_M";
 +
this addPrimaryWeaponItem "acc_flashlight";
 +
this addPrimaryWeaponItem "optic_MRCO";
 +
this addWeapon "hgun_P07_F";
 +
 
 +
comment "Add items";
 +
this linkItem "ItemMap";
 +
this linkItem "ItemCompass";
 +
this linkItem "ItemWatch";
 +
this linkItem "ItemRadio";
 +
this linkItem "ItemGPS";
 +
 
 +
comment "Set identity";
 +
this setFace "GreekHead_A3_03";
 +
this setSpeaker "Male03GRE";
 +
[this,"TFAegis"] call bis_fnc_setUnitInsignia;
 +
</source>
 +
<br>
 +
* Im loadout Script, den Absatz '''''comment "Set identity";''''' löschen!
 +
* Via Editor '''this''' durch '''_unit''' ersetzten.
 +
* Am beginn des loadout script ist folgendes hinzuzufügen
 +
<source line lang="sql">
 +
waitUntil {!isNull player};
 +
_unit = _this select 0;
 +
</source>
 +
 
 +
* In die letzte Zeile im loadout script ist folgendes einzufügen:
 +
<source line lang="sql">
 +
if(true) exitWith{};
 +
</source>
 +
<br>
 +
=== Endgültiges Script ===
 +
So soll das Script nach Bearbeitung aussehen:
 +
<br>
 +
<source line lang="sql">
 +
waitUntil {!isNull player};
 +
_unit = _this select 0;
 +
comment "Exported from Arsenal by Neodym";
 +
comment "Remove existing items";
 +
removeAllWeapons _unit;
 +
removeAllItems _unit;
 +
removeAllAssignedItems _unit;
 +
removeUniform _unit;
 +
removeVest _unit;
 +
removeBackpack _unit;
 +
removeHeadgear _unit;
 +
removeGoggles _unit;
 +
 
 +
comment "Add containers";
 +
_unit forceAddUniform "U_I_CombatUniform";
 +
for "_i" from 1 to 4 do {_unit addItemToUniform "30Rnd_556x45_Stanag";};
 +
_unit addItemToUniform "16Rnd_9x21_Mag";
 +
_unit addVest "V_PlateCarrierIA2_dgtl";
 +
for "_i" from 1 to 4 do {_unit addItemToVest "FirstAidKit";};
 +
for "_i" from 1 to 6 do {_unit addItemToVest "HandGrenade";};
 +
for "_i" from 1 to 3 do {_unit addItemToVest "16Rnd_9x21_Mag";};
 +
_unit addBackpack "B_TacticalPack_oli";
 +
for "_i" from 1 to 2 do {_unit addItemToBackpack "SatchelCharge_Remote_Mag";};
 +
for "_i" from 1 to 4 do {_unit addItemToBackpack "DemoCharge_Remote_Mag";};
 +
_unit addHeadgear "H_Cap_headphones";
 +
_unit addGoggles "G_Bandanna_oli";
 +
 
 +
comment "Add weapons";
 +
_unit addWeapon "arifle_Mk20C_F";
 +
_unit addPrimaryWeaponItem "muzzle_snds_M";
 +
_unit addPrimaryWeaponItem "acc_flashlight";
 +
_unit addPrimaryWeaponItem "optic_MRCO";
 +
_unit addWeapon "hgun_P07_F";
 +
 
 +
comment "Add items";
 +
_unit linkItem "ItemMap";
 +
_unit linkItem "ItemCompass";
 +
_unit linkItem "ItemWatch";
 +
_unit linkItem "ItemRadio";
 +
_unit linkItem "ItemGPS";
 +
if(true) exitWith{};
 +
</source>

Aktuelle Version vom 30. Juni 2016, 08:55 Uhr

Diese Anleitung ist für jeden Spielbaren Charakter, welcher ein spezifisches loadout nutzten soll, durchzuführen.

Erstellung des Event Script (initPlayerLocal.sqf)

  • Im Mission Verzeichnis die Datei initPlayerLocal.sqf erstellen.
  • Datei initPlayerLocal.sqf ist wie folgt Aufbau:


  1. _loadoutScript = switch (toUpper (str player)) do {
  2. CASE "S1": {"loadout\s1.sqf"};
  3. CASE "S2": {"loadout\s2.sqf"};
  4. ...
  5. ...
  6. DEFAULT { hint "default" };
  7. };
  8. [player] CALL compile preprocessFileLineNumbers _loadoutScript;


Hinweis Hinweis
"S1" ist der Name der im Editor platzierten spielbaren Figur.
Das Verzeichnis, loadout ist im Hauptverzeichnis der Mission zu erstellen. In der Datei s1.sqf ist das loadout hinterlegt.

Spieler Ausrüstung zusammenstellen

  • das Grundgerüst von z.b. s1.sqf, das Loadout, wird am besten via Virtual Arsenal. Zu erreichen über LEARN > VIRTUAL ARSENAL.
  • Im VIRTUAL ARSENAL das gewünschte loadout erstellen.
  • Mit STRG + C oder via Exportbutton in einen Editor deiner Wahl exportieren.

Bearbeiten des VIRTUAL ARSENAL export

  • Beispiel export aus VIRTUAL ARSENAL
  1. comment "Exported from Arsenal by Neodym";
  2.  
  3. comment "Remove existing items";
  4. removeAllWeapons this;
  5. removeAllItems this;
  6. removeAllAssignedItems this;
  7. removeUniform this;
  8. removeVest this;
  9. removeBackpack this;
  10. removeHeadgear this;
  11. removeGoggles this;
  12.  
  13. comment "Add containers";
  14. this forceAddUniform "U_I_CombatUniform";
  15. FOR "_i" FROM 1 TO 4 do {this addItemToUniform "30Rnd_556x45_Stanag";};
  16. this addItemToUniform "16Rnd_9x21_Mag";
  17. this addVest "V_PlateCarrierIA2_dgtl";
  18. FOR "_i" FROM 1 TO 4 do {this addItemToVest "FirstAidKit";};
  19. FOR "_i" FROM 1 TO 6 do {this addItemToVest "HandGrenade";};
  20. FOR "_i" FROM 1 TO 3 do {this addItemToVest "16Rnd_9x21_Mag";};
  21. this addBackpack "B_TacticalPack_oli";
  22. FOR "_i" FROM 1 TO 2 do {this addItemToBackpack "SatchelCharge_Remote_Mag";};
  23. FOR "_i" FROM 1 TO 4 do {this addItemToBackpack "DemoCharge_Remote_Mag";};
  24. this addHeadgear "H_Cap_headphones";
  25. this addGoggles "G_Bandanna_oli";
  26.  
  27. comment "Add weapons";
  28. this addWeapon "arifle_Mk20C_F";
  29. this addPrimaryWeaponItem "muzzle_snds_M";
  30. this addPrimaryWeaponItem "acc_flashlight";
  31. this addPrimaryWeaponItem "optic_MRCO";
  32. this addWeapon "hgun_P07_F";
  33.  
  34. comment "Add items";
  35. this linkItem "ItemMap";
  36. this linkItem "ItemCompass";
  37. this linkItem "ItemWatch";
  38. this linkItem "ItemRadio";
  39. this linkItem "ItemGPS";
  40.  
  41. comment "Set identity";
  42. this setFace "GreekHead_A3_03";
  43. this setSpeaker "Male03GRE";
  44. [this,"TFAegis"] CALL bis_fnc_setUnitInsignia;


  • Im loadout Script, den Absatz comment "Set identity"; löschen!
  • Via Editor this durch _unit ersetzten.
  • Am beginn des loadout script ist folgendes hinzuzufügen
  1. waitUntil {!isNull player};
  2. _unit = _this SELECT 0;
  • In die letzte Zeile im loadout script ist folgendes einzufügen:
  1. IF(TRUE) exitWith{};


Endgültiges Script

So soll das Script nach Bearbeitung aussehen:

  1. waitUntil {!isNull player};
  2. _unit = _this SELECT 0;
  3. comment "Exported from Arsenal by Neodym";
  4. comment "Remove existing items";
  5. removeAllWeapons _unit;
  6. removeAllItems _unit;
  7. removeAllAssignedItems _unit;
  8. removeUniform _unit;
  9. removeVest _unit;
  10. removeBackpack _unit;
  11. removeHeadgear _unit;
  12. removeGoggles _unit;
  13.  
  14. comment "Add containers";
  15. _unit forceAddUniform "U_I_CombatUniform";
  16. FOR "_i" FROM 1 TO 4 do {_unit addItemToUniform "30Rnd_556x45_Stanag";};
  17. _unit addItemToUniform "16Rnd_9x21_Mag";
  18. _unit addVest "V_PlateCarrierIA2_dgtl";
  19. FOR "_i" FROM 1 TO 4 do {_unit addItemToVest "FirstAidKit";};
  20. FOR "_i" FROM 1 TO 6 do {_unit addItemToVest "HandGrenade";};
  21. FOR "_i" FROM 1 TO 3 do {_unit addItemToVest "16Rnd_9x21_Mag";};
  22. _unit addBackpack "B_TacticalPack_oli";
  23. FOR "_i" FROM 1 TO 2 do {_unit addItemToBackpack "SatchelCharge_Remote_Mag";};
  24. FOR "_i" FROM 1 TO 4 do {_unit addItemToBackpack "DemoCharge_Remote_Mag";};
  25. _unit addHeadgear "H_Cap_headphones";
  26. _unit addGoggles "G_Bandanna_oli";
  27.  
  28. comment "Add weapons";
  29. _unit addWeapon "arifle_Mk20C_F";
  30. _unit addPrimaryWeaponItem "muzzle_snds_M";
  31. _unit addPrimaryWeaponItem "acc_flashlight";
  32. _unit addPrimaryWeaponItem "optic_MRCO";
  33. _unit addWeapon "hgun_P07_F";
  34.  
  35. comment "Add items";
  36. _unit linkItem "ItemMap";
  37. _unit linkItem "ItemCompass";
  38. _unit linkItem "ItemWatch";
  39. _unit linkItem "ItemRadio";
  40. _unit linkItem "ItemGPS";
  41. IF(TRUE) exitWith{};