Home   Help Search Login Register  

Author Topic: problems with config.cpp in ArmA CWA 1.99 (default config.bin)  (Read 3582 times)

0 Members and 1 Guest are viewing this topic.

Offline stanalonis

  • Members
  • *
I recently dug up the serial key and grabbed the arma cold war assault, since I wanted to get back into flashpoint again.  looks like it's patched up to 1.99

I've been wanting to modify the vehicles a bit and set up an addon that will overwrite the config.bin that was placed with the rest of the game.

I used CoC binview, love the way the tool does it's best to beautify the cpp text for easy readability.  after studying it for a bit, I tried to start the game using the unrapified cpp since it would take priority over any .bin but I get some obscure error message popping up.
No Entry 'config.cpp/CfgMimics.combat'

as I understand it, the CfgMimics class is supposed to have a combat class in it?  my C++ is a bit rusty, and I don't know how to fix it.

I did add the enum to the start of the cpp as I read from this 1.96 thread.  I haven't installed GotY and patched it up on my machine yet, with Arma cold war crisis now sitting on my computer.

Is there something in that class which is missing or corrupt?  does CoC Binview provide all the info in the cpp and I only need to make a few chances?  I'm fairly new to cpp files, and this is stopping me from making edits to the standard vehicles.  thanks in advance to any and all help.


EDIT:
Okay, I discovered something that might be useful, I tried creating an empty class combat{}; and received a message config.cpp/CfgMimics.39: Member already defined.

at the top of the defines, this one stood out for me:
Code: [Select]
#define combat 39
and now I don't know what to do with this one.  deleting that definition takes care of error messages, but when I go into mission editor and preview after putting down a soldier that I control, my soldier appears half buried in the ground and facing sideways, unable to fire.  I suppose I should show all the defines that are in my cpp:

Code: [Select]
// Defines
#define cpcommander 2
#define 69
#define turnr 3
#define walkr 15
#define slowl 22
#define strokegun 50
#define medic 56
#define manposnoweapon 11
#define destructengine 2
#define reloadmgun 7
#define reloadat 8
#define firenotpossible 43
#define default 47
#define ladderofftop 61
#define getoutcar 64
#define getintank 65
#define manposhandgunstand 9
#define destructdefault 6
#define fastrb 33
#define fastb 34
#define crouch 40
#define ladderondown 58
#define getouttank 66
#define manposcrouch 6
#define destructtree 3
#define destructtent 4
#define walkf 11
#define fastlf 28
#define fastr 31
#define strokefist 49
#define stop 0
#define walklb 16
#define salute 52
#define manposhandgunlying 5
#define manposhandguncrouch 7
#define manposbinocstand 13
#define slowb 26
#define combat 39
#define ladderoff 60
#define manposdead 0
#define manposcombat 8
#define unitinfocar 2
#define cpcargo 3
#define destructno 0
#define stoprelaxed 1
#define slowr 23
#define fastf 27
#define fastrf 29
#define getincar 63
#define unitinfoship 3
#define unitinfohelicopter 5
#define turnrrelaxed 5
#define reloadmagazine 6
#define walkrb 17
#define slowlb 24
#define putdown 55
#define manposbinoclying 2
#define manposstand 10
#define unitinfosoldier 0
#define walklf 12
#define weaponon 45
#define binocon 53
#define treated 57
#define manposweapon 1
#define turnl 2
#define walkl 14
#define slowf 19
#define civil 41
#define civillying 42
#define weaponoff 46
#define turnlrelaxed 4
#define slowrb 25
#define stand 38
#define manposlying 4
#define unitinfotank 1
#define walkrf 13
#define slowlf 20
#define down 35
#define die 44
#define takeflag 67
#define cpgunner 1
#define destructman 5
#define fastl 30
#define sitdown 51
#define binocoff 54
#define ladderonup 59
#define handgunon 68
#define manposlyingnoweapon 3
#define manposbinoc 12
#define unitinfoairplane 4
#define nunitinfotype 6
#define cpdriver 0
#define throwgrenade 10
#define up 36
#define lying 37
#define jumpoff 48
#define ladderoffbottom 62
#define destructbuilding 1
#define reloadmortar 9
#define walkb 18
#define slowrf 21
#define fastlb 32


for reference, here is the code that I saw in CfgMimics class:

Code: [Select]
class CfgMimics
{
access=1;
combat[]={"Sad",0.1,"Surprised",0.1,"Cynic",0.3,"Angry",0.1,"Normal"};
aware[]={"Angry",0.2,"Normal"};
safe[]={"Smile",0.1,"Surprised",0.1,"Normal"};
neutral[]={"Surprised",0.1,"Sad",0.1,"Normal"};
danger[]={"Surprised",0.4,"Sad"};
dead[]={"Hurt"};
hurt[]={"Hurt"};

class HeadPreview
{
microMimics="Micro";
};

class Micro
{
lBrow[]={0.002,0.002,0.001,0.6,3};
mBrow[]={0.002,0.002,0.001,0.6,2.5};
rBrow[]={0.002,0.002,0.001,0.6,3};
lMouth[]={0.001,0.002,0.001,0.6,2};
mMouth[]={0,0,0,0.6,3};
rMouth[]={0.001,0.002,0.001,0.6,2};
};

class NoMicro
{
lBrow[]={0,0,0,0.6,3};
mBrow[]={0,0,0,0.6,2.5};
rBrow[]={0,0,0,0.6,3};
lMouth[]={0,0,0,0.6,2};
mMouth[]={0,0,0,0.6,3};
rMouth[]={0,0,0,0.6,2};
};

class States
{

class Default
{
lBrow[]={0,0};
mBrow[]={0,0};
rBrow[]={0,0};
lMouth[]={0,0};
mMouth[]={0,0};
rMouth[]={0,0};
};

class Normal
{
lBrow[]={0,0};
mBrow[]={0,0};
rBrow[]={0,0};
lMouth[]={0,0};
mMouth[]={0,0};
rMouth[]={0,0};
};

class Smile
{
lBrow[]={0,0.25};
mBrow[]={0,0.25};
rBrow[]={0,0.25};
lMouth[]={-0.5,0.6};
mMouth[]={0,0};
rMouth[]={0.5,0.6};
};

class Hurt
{
lBrow[]={0,-0.35};
mBrow[]={0,-0.5};
rBrow[]={0,-0.6};
lMouth[]={0.5,-0.3};
mMouth[]={0,0.3};
rMouth[]={-0.5,-0.6};
};

class Ironic
{
lBrow[]={0,-0.35};
mBrow[]={0,-0.35};
rBrow[]={0,-0.35};
lMouth[]={0.1,0.3};
mMouth[]={0,0.9};
rMouth[]={-0.1,0.3};
};

class Sad
{
lBrow[]={0,0.2};
mBrow[]={0,0.2};
rBrow[]={0,0.2};
lMouth[]={0.1,-0.5};
mMouth[]={0,-0.5};
rMouth[]={-0.1,-0.5};
};

class Cynic
{
lBrow[]={0,-0.35};
mBrow[]={0,0};
rBrow[]={0,0.05};
lMouth[]={0.2,-0.9};
mMouth[]={0,-0.2};
rMouth[]={0,0};
};

class Surprised
{
lBrow[]={0,0.5};
mBrow[]={0,0.5};
rBrow[]={0,0.5};
lMouth[]={0,-0.3};
mMouth[]={0,0.3};
rMouth[]={0,-0.2};
};

class Agresive
{
lBrow[]={0,-0.25};
mBrow[]={0,-0.4};
rBrow[]={0,-0.3};
lMouth[]={0.4,0.5};
mMouth[]={0,0.5};
rMouth[]={-0.4,-0.5};
};

class Angry
{
lBrow[]={0.4,-0.5};
mBrow[]={0.1,-0.4};
rBrow[]={-0.4,-0.5};
lMouth[]={0.4,-0.9};
mMouth[]={0,-0.2};
rMouth[]={-0.4,-0.8};
};
};
};


« Last Edit: 09 Sep 2011, 05:13:05 by stanalonis »
"There is no knowledge that is not power" - Ralph Waldo Emerson

Offline stanalonis

  • Members
  • *
okay, I did find a config.cpp that works for ArmA CWA (version 1.99) and even got the aspect ratio adjusted for a 16:9 monitor.  nice bonus, huh?  anyway if no one else knows what I did wrong in my attempts to edit default config files for my modding use, feel free to use this for reference if you still wanna take a crack at it.

oh, here's the site where I found a solution.  Faguss gets all the credit here, just have a look at OFP Aspect Ratio, I'm tired of trying to figure out what worked and what didn't.
"There is no knowledge that is not power" - Ralph Waldo Emerson

Offline Mikero

  • Former Staff
  • ****
  • ook?
    • Linux Step by Step
ofp enums are only present in the one and only config.bin. They could be used in any addon too, but they aren't.

the problem is that the enum list as present in the config.BIN cannot be converted back to 'proper' enum lists, plural, in text. They are in fact a composite of (from memory)  a dozen separate enums scattered in various sections of the config.cpp master.

there are various tools around that rapify or binarise text.CPP back to binary. Most of them(if they handle them at all), 'understand' how to present the unitary (and quite wrong) enum list back to a binary form.

the engine does not.

for the engine, there is no such thing as

manactposwpn= ANYTHING

manactposwpn is simply the next item in an iterated list and it's value is assigned by the engine, hence the = anything is complete nonsense.

consequently, you can't properly use a bin\config.cpp

the #define alternatives, while helpful, do not fix the problem. Enums in the Bis world are global constants used, not only in THIS config, but everywhere.

thus, some other config.bin (or cpp) than uses manactposwpn has no idea what that value should be, because it isn't global

https://dev-heaven.net/projects/mikero-pbodll/files

contains a series of enum hpp files that can REPLACE the wrong enum declared in any deconstructed config.bin
Just say no to bugz