Home   Help Search Login Register  

Author Topic: Simple unit config  (Read 1655 times)

0 Members and 1 Guest are viewing this topic.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Simple unit config
« on: 28 Dec 2008, 19:32:06 »
I was trying to write a config.cpp that would simply add a Civilian 19 under the west side, without creating the need for a dependent addon. Is that even possible? It would simply do the work of me replacing "CIV" in the mission.sqm with "WEST" for a "Civilian19" unit all the time. Here's what I got, and it works to the extent that the unit is placed in the Civilian side instead of West.
Code: [Select]
#define _ARMA_

class CfgPatches
{
class Civilian19West
{
units[] = {"Civilian19"};
weapons[] = {};
requiredVersion = 1;
};
};
class CfgVehicleClasses
{
class WestCivilian
{
displayName = "WestCivilian";
};
};
class CfgVehicles
{
class All{};
class AllVehicles: All{};
class Land: AllVehicles{};
class Man: Land{};
// class Soldier: Man{};
class CAManBase: Man{};
// class SoldierWB: Soldier{};
class SoldierWB: CAManBase{};
class SoldierWSaboteur: SoldierWB{};
class Civilian19: SoldierWSaboteur
{
vehicleClass = "WestCivilian";
displayName = "$STR_DN_CIVILIAN19";
model = "\ca\characters\civil_7_tshirt";
scope = 2;
nightVision = 1;
camouflage = 0.7;
Icon = "\Ca\characters\data\map_ico\i_komandos_CA.paa";
weapons[] = {"AKS74UN","Throw","Put"};
magazines[] = {};
respawnweapons[] = {"AKS74UN","Throw","Put"};
respawnmagazines[] = {};
class Wounds
{
tex[] = {};
mat[] = {"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl.rvmat","ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound1.rvmat","ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound2.rvmat","ca\characters\data\civil_tshirt_kapsy_body.rvmat","ca\characters\data\civil_tshirt_kapsy_body_wound1.rvmat","ca\characters\data\civil_tshirt_kapsy_body_wound2.rvmat"};
};
};
};

Note: the added AKS74UN is just for me to distinguish between my unit and the BIS Civilian19 in case things go south.
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Simple unit config
« Reply #1 on: 28 Dec 2008, 21:07:43 »
Thing is class Civilian19 is already defined under Civilian side.

Try CivilianW19 instead

Code: [Select]
#define _ARMA_

class CfgPatches
{
class Civilian19West
{
units[] = {"CivilianW19"};
weapons[] = {};
requiredVersion = 1;
};
};
class CfgVehicleClasses
{
class WestCivilian
{
displayName = "WestCivilian";
};
};
class CfgVehicles
{
class SoldierWSaboteur;

class CivilianW19: SoldierWSaboteur
{
vehicleClass = "WestCivilian";
displayName = "$STR_DN_CIVILIAN19";
model = "\ca\characters\civil_7_tshirt";
scope = 2;
nightVision = 1;
camouflage = 0.7;
Icon = "\Ca\characters\data\map_ico\i_komandos_CA.paa";
weapons[] = {"AKS74UN","Throw","Put"};
magazines[] = {};
respawnweapons[] = {"AKS74UN","Throw","Put"};
respawnmagazines[] = {};
class Wounds
{
tex[] = {};
mat[] = {"ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl.rvmat","ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound1.rvmat","ca\characters\data\civil_1_tshirt_shorts_klapky_ksiltka_hhl_wound2.rvmat","ca\characters\data\civil_tshirt_kapsy_body.rvmat","ca\characters\data\civil_tshirt_kapsy_body_wound1.rvmat","ca\characters\data\civil_tshirt_kapsy_body_wound2.rvmat"};
};
};
};


Planck
I know a little about a lot, and a lot about a little.

Offline Tyger

  • Former Staff
  • ****
  • I was at OFPEC when it still had dirt floors...
    • OFPEC
Re: Simple unit config
« Reply #2 on: 29 Dec 2008, 00:26:18 »
Okay that works...

The only problem with that is, the addon will be required, correct? I suppose it's no big problem though, since it's only a couple kBs.

Thanks...
"People sleep soundly at night only because rough men stand ready to do violence on their behalf." - George Orwell

MSG Mike Everret - We Will Never Forget - '75-'08

Offline Gnat

  • Addons Depot
  • Moderator
  • *****
  • I Bite!
    • Gnats
Re: Simple unit config
« Reply #3 on: 01 Jan 2009, 04:35:31 »
"be required" ??
Not sure I understand your point, ArmA will always include the civilians on startup anyway.