WEC.3DN.RU
Hello Guest . LogIn ? Registration T Main Page
Addon Tutorial (How Add Classes from Addon to Mission) WASP Warfare Tutorial

    In all versions after 0.209 release the "Data" folder will be stored in "an open variant" that will bring you a possibility to add additional classes of vehicles, guns from addons.


    Here is the small tip's list:

  • 1. First of all go to "Data" folder that is located in root of the mission. There you will find all necessary files for further add.
  • 2. Before you will start to modify those files please check the short description of those files:
- Data_Units.sqf            - Barracks Units Array

- Data_LVehicles.sqf        - LightFactory Vehicles Array

- Data_HVehicles.sqf        - HeavyFactory Vehicles Array

- Data_BVehicles.sqf        - BoatFactory Vehicles Array

- Data_AVehicles.sqf        - AirFactory Vehicles Array

- Data_TVehicles.sqf        - TownCenter Units and Vehicles Array

- Data_Construction.sqf     - Base Building, Walls, Defences Array

- Data_Gear.sqf             - Gear Array

- Data_Upgrades.sqf         - All Upgrades Array

 

  • 3. Now check the common syntax of data files.
        In all files "Data_Units, Data_LVehicles, Data_HVehicles, Data_BVehicles, Data_AVehicles, Data_TVehicles" first 6 (0...5) columns in arrays are similar (every file we will describe separately):

 


[ 0     , 1                , 2       , 3     , 4        , 5       ]

[UpLevel, Class or Type    , Rank    , Supply, Money    , Time    ]



 0    - [String]    Upgrade Level After Vehicle or Unit will be Available

 1    - [String]    Object Type or Class, taken from CfgVehicle

 2    - [String]    Rank or Crew Rank, for Unit or Vehicle Crew

 3    - [Scalar]    Supply Cost (Not Use in Mission now)

 4    - [Scalar]    Money Cost

 5    - [Scalar]    Time Needed to Create Unit or Vehicle


    Small notation concerning syntax: you need to remember that all data files have the common construction as follows: "an array in array" ( [[],[],...,[]] ). If you make a mistake in this area of code the whole array will not load into the mission properly. Finally you will not see the updated list of units or gear.
    
      Simple example "Data_Units.sqf":

_Bluefor = [

   ["B2"    , "B_Miller"            , "CORPORAL"    , 2 , 100 , 5 ],
   ["B2"    , "B_Kerry_F"           , "CORPORAL"    , 2 , 100 , 5 ],
   ["B2"    , "B_RangeMaster_F"     , "CORPORAL"    , 2 , 100 , 5 ],
   ["B2"    , "B_Soldier_02_f"      , "CORPORAL"    , 2 , 100 , 5 ],
   ["B2"    , "B_Soldier_03_f"      , "CORPORAL"    , 2 , 100 , 5 ]
          ]; 

      Common rules:
        - all arrays assign with help of "[" and "]" brackets;
        - Elements of array always separate by "," character;
        - Pay attention on TYPE of columns in array. All columns should have the proper type that was assign before: String, Scalar, Boolean, ... . Otherwise you will get errors in console!
        - Always check "," or coma after the last element in array. It should not be there or you will get a syntax error.

      Exmaple:

//Correct:

   ["B2"    , "B_Soldier_02_f"      , "CORPORAL"    , 2 , 100 , 5 ],
   ["B2"    , "B_Soldier_03_f"      , "CORPORAL"    , 2 , 100 , 5 ]
];

//Incorrect:

   ["B2"    , "B_Soldier_02_f"      , "CORPORAL"    , 2 , 100 , 5 ],
   ["B2"    , "B_Soldier_03_f"      , "CORPORAL"    , 2 , 100 , 5 ],
};

 

  • 4. Let's describe the way of unit's add into array:

 

// Old West Units Array:

_Bluefor = [

  ["B2" , "B_Miller"            , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Kerry_F"           , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_RangeMaster_F"    , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Soldier_02_f"      , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Soldier_03_f"      , "CORPORAL" , 2 , 100 , 5 ]
];

// Copy Array with Unit data and paste to Array end
_Bluefor = [
  ["B2" , "B_Miller"            , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Kerry_F"           , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_RangeMaster_F"    , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Soldier_02_f"      , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Soldier_03_f"      , "CORPORAL" , 2 , 100 , 5 ] // copy
  ["B2" , "B_Soldier_03_f"      , "CORPORAL" , 2 , 100 , 5 ] // paste
];

/*
  You can change:
    - Set Upgrade Level (can take All Upgrades Level from Data_Upgrades.sqf)
    - Change Old Unit Class to New Class from Addon
    - Set Rank
    - Set Supply Cost (not use in mission now), can set just Zero "0" [Scalar]
    - Set Money Cost
    - Set Time Create
*/

// And you have Array like this:
_Bluefor = [
  ["B2" , "B_Miller"            , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Kerry_F"           , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_RangeMaster_F"    , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Soldier_02_f"      , "CORPORAL" , 2 , 100 , 5 ],
  ["B2" , "B_Soldier_03_f"      , "CORPORAL" , 2 , 100 , 5 ], // Add ","
  ["B1" , "B_FranceSolder_01"   , "SERGEANT" , 0 , 200 , 6 ], // Add ","
  ["B3" , "O_RussianSF_01"      , "SERGEANT" , 0 , 300 , 8 ]
];

 

  • 5. "Barracks" Data_Units.sqf:
    For add new Units from Addon you need find and use Arrays:

 

////////////////////////
//// Special Units Data
////////////////////////

 ...

  Resistance  - _Resis = [...
  West        - _Bluefor = [...
  East        - _Opfor = [...

 

  • 6. "LightFactory" Data_LVehicles.sqf:
    Arrays of vehicles (LF,HF,BF,AF,TC) have additional elements, as following:

 

     6      , 7      , 8        , 9        ];
... , Driver, Gunner , Commander, AiUse    ];

  // Boolean Variable can have only 2 values: true/false
    6 - [Boolean] Can be Driver Crew or not
    7 - [Boolean] Can be Gunner Crew or not
    8 - [Boolean] Can be Commander Crew or not
    9 - [Boolean] Can AI in Town Use Vehicle, when town Respawn

For add new Vehicles from Addon you need find and use Arrays:

  Resistance  - _ResisLightVeh = [...
  West        - _BlueforLightVeh = [...
  East        - _OpforLightVeh = [...

 

  • 7. "HeavyFactory" Data_HVehicles.sqf:
    For add new Vehicles from Addon you need find and use Arrays:
    
      Resistance  - _ResisHeavyVeh = [...
      West        - _BlueforHeavyVeh = [...
      East        - _OpforHeavyVeh = [...
    
  • 8. "BoatFactory" Data_BVehicles.sqf:
    For add new Vehicles from Addon you need find and use Arrays:
    
      Resistance  - _ResisBoatVeh = [...
      West        - _BlueforBoatVeh = [...
      East        - _OpforBoatVeh = [...
    
  • 9. "AirFactory" Data_AVehicles.sqf:
    For add new Vehicles from Addon you need find and use Arrays:
    
      Resistance  - _IHelicopters = [...
      West        - _BHelicopters = [...
      East        - _OHelicopters = [...
    
  • 10. "TownCenter" Data_TVehicles.sqf:
    For add new Vehicles from Addon you need find and use Arrays:
    
    Resistance,West,East (Civilian Vehicles for All)    - _TCVehicles = [...
    
  • 11. "For Construction Module" Data_Construction.sqf:
    
    //[ 0          , 1        , 2                , 3        , 4        , 5        , 6           ]    
    //[ BldName    , key     , Type or Class    , Supply , Money    , time     , Abbreviation ]
      0 - [String]    Building Name
      1 - [Scalar]    KeyPress
      2 - [String]    Building Class or Type from CfgVehicles
      3 - [Scalar]    Supply Cost  4 - [Scalar]    Money Cost
      5 - [Scalar]    Time needed to Create Building
      6 - [String]    Building Name Abbreviation (B, LF, HF, BF, AF, CC)
    
    You can change: 
      BldName[0], Class[2], Supply[3], Money[4], time[5] cell in Building Array Data.
      Also you can add additional classes, but they will not be connected with main scripts of the mission.
    
      // Building
      West        - _BuildingsDataBluefor = [...
      East        - _BuildingsDataOpfor = [...
    
      // Walls
      For All     - _WallsData = [... // Not Use now in Mission
    
      // Defences
      West        - _DefensDataBluefor = [... // Not Use now in Mission
      East        - _DefensDataOpfor = [... // Not Use now in Mission
    
  • 12. "Upgrade Data" Data_Upgrades.sqf:
    
    //[ 0       , 1       , 2    , 3     , 4   , 5      , 6         , 7           ]
    //[ Name    , Updated , Supply, Money , Time , MustBe , Full Name , Description ]
      0 - [String]  Upgrade abbreviation, used in "MustBe" Cell and Units and Vehicles Array
      1 - [Boolean] Upgraded or not
      2 - [Scalar]  Supply Cost
      3 - [Scalar]  Money Cost
      4 - [Scalar]  Nime needed to Upgrade
      5 - [Array]   Array with Upgrades Names need to Available this Upgrade
      6 - [String]  Upgrade full name
      7 - [String]  Upgrade Description
    
        Can change: Supply[2], Money[3], Time[4], MustBe[5], Full name[6], Description[7]. 
    
      //Other parameters do not touch!!!
    
    
  • 13. "Gear" Data_Gear.sqf:
    
    //[ 0       , 1       , 2     , 3   , 4     , 5     ]
    //[ UpLevel , TypeName , Money , Blue , Opfor , Resis ]
    
      0 - [String]     Upgrade needed for Available this Gear
      1 - [String]     TypeName or Class frow CfgWeapons and other Cfg
      2 - [Scalar]    Money Cost
      3 - [Boolean]    Can or not Buy West Players
      4 - [Boolean]    Can or not Buy East Players
      5 - [Boolean]    Can or not Buy Resistance Players
    
    //For add new Gear from Addon you need find and use Arrays:
      _Primary        - Primary Weapons
      _Secondary      - RPG and Launchers
      _HandGun        - HandGuns
      _Muzzles        - Silencers
      _Optics         - Optics
      _Acc            - FlashLight and LaserPointer
      _Ammunition    - HandGrenade, Chemlight, Toolkit, ...
      _Uniform        - Uniforms
      _Vest           - Vests
      _Backpack       - Backpacks
      _Glasses       - Glasses
      _Helmet         - Helmet, Hats, caps, ...
      _Item           - NVGoggles, Binocular, Map, GPS, UAVTerminal, ...
      _Ammo           - Ammo for all weapons in game
    

 

Comments: 0
Add Comments can only Users