Jump to content
Sign in to follow this  
SKay

Help needed with config.cpp

Recommended Posts

Hi everybody!

I'm new to ArmA config world (..yes, it's seems like a whole new world to me..) smile_o.gif  and I'm having a problem with a config file.

I have already made 2 opposite teams (for BLUFOR and OPFOR) by retexturing mainly. I have also managed to add some choppers with my teams' colors. Everything was working fine and I started to believe that I had understood a main part of the configuration procedure. But..

In my next step I retextured two captives, one for each of my teams. I found where the models were, copied them and edited them in my hex editor to point to the new textures (I kept the path character count the same). The problems is that I can't make the config actually work. I have reviewed a dozen of configs but no luck. My captives don't show up in the editor..

So here is the one that doesn't work:

Quote[/b] ]

class CfgPatches

{

class GA_TRA_Captives

{

units[] = {"GA_SoldierCaptive", "TRA_SoldierCaptive"};

weapons[] = {};

requiredVersion = 0.100000;

requiredAddons[] = {"CAData", "CACharacters", "CAWeapons"};

};

};

class CfgVehicles

{

class CAManBase;

class Civilian;

class GA_SoldierCaptive : Civilian {

scope = public;

model = "\GA_TRA_Captive\ga_soldier_captive";

cost = 50000;

side = TCivilian;

nameSound = "captive";

displayName = "GA Soldier Captive";

weapons[] = {"Throw", "Put"};

magazines[] = {};

respawnWeapons[] = {"Throw", "Put"};

respawnMagazines[] = {};

class Wounds {

tex[] = {};

mat[] = {"ca\characters\data\soldier_captive_us_body.rvmat", "ca\characters\data\soldier_captive_us_body_wound1.rvmat", "ca\characters\data\soldier_captive_us_body_wound2.rvmat", "ca\characters\data\soldier_captive_hhl.rvmat", "ca\characters\data\soldier_captive_hhl_wound1.rvmat", "ca\characters\data\soldier_captive_hhl_wound2.rvmat"};

};

};

class TRA_SoldierCaptive : GA_SoldierCaptive {

model = "\GA_TRA_Captive\tra_soldier_captive";

displayName = "TRA Soldier Captive";

class Wounds {

tex[] = {};

mat[] = {"ca\characters\data\soldier_captive_body.rvmat", "ca\characters\data\soldier_captive_body_wound1.rvmat", "ca\characters\data\soldier_captive_body_wound2.rvmat", "ca\characters\data\soldier_captive_hhl.rvmat", "ca\characters\data\soldier_captive_hhl_wound1.rvmat", "ca\characters\data\soldier_captive_hhl_wound2.rvmat"};

};

};

};

I have taken the main part of the setup from the original characters pbo captives section.

Keep in mind that I want the two new captives to appear (and belong) to the "Civilians -> Men" just like the original captive units from BIS.

Please help!.. I'm trully stuck here!

Thanks in advance guys

Share this post


Link to post
Share on other sites

Don't forget the defines smile_o.gif

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">#define TEast 0

#define TWest 1

#define TGuerrila 2

#define TCivilian 3

#define TSideUnknown 4

#define TEnemy 5

#define TFriendly 6

#define TLogic 7

#define true 1

#define false 0

// type scope

#define private 0

#define protected 1

#define public 2

Share this post


Link to post
Share on other sites

Thank you Q!

Everything works perfect now!

I owe you one man!.. Maybe this kind of mistakes seem silly to experienced users but they can really ruin your nerves if you are new to this stuff..

One question though..

I have seen some addons which don't contain these defines but they work fine. Is it possible to explain what's the catch?

Anyway, thanks again m8!

Share this post


Link to post
Share on other sites

I'm starting to understand (..I think..  confused_o.gif ) the whole class definition thing and the construction logic. But what the hell are these defines?? What do these numbers mean? Why some addons don't need them and why some refer to them inside class definition statements {} with their name while others with a number???

why why why??!!!! (as my friend Michel Cretu keeps asking)

crazy_o.gif

Share this post


Link to post
Share on other sites

its actually quite simple.

each config value expects and accepts one valid (like 99%) type,

like string, integer, double, boolean etc

(you can find more info about that in the BIKI)

defines are merely a replacement function:

replace A with B

so rather than to use 0 and 1, some people prefer to use

true and false, yet those aren't known values to the engine

so you need to replace false with 0, and true with 1 through the

use of defines.

hope it helps smile_o.gif

ps:

http://community.bistudio.com/wiki/Data_Types

http://community.bistudio.com/wiki/PreProcessor_Commands

Share this post


Link to post
Share on other sites

ThankQ for the explanation and the links.

You've been very helpful. I have started to understand the way the config proccess goes. I'll make some tests from what I have learned till now and call for help if needed.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×