Jump to content
Sign in to follow this  
sanctuary

The Breath commented full config 1.91

Recommended Posts

Something that had puzzled me for a so long time : the number of separate files in .hpp format that were found from the BIS commented config 1.91 archive.

Until now i never had found exactly how to use them (but at least they were very helpfull by the comment i had read in them) , and never understood how to put them together to obtain a complete full config.cpp

So to work on my personnal replacements, after failing to do what i wanted with unpbo1.3 (as it made too many errors) i finally used Binview (thanks a lot to CoC ) to obtain a config.cpp from the BIS config.bin .

The problem of a config.cpp obtained by this way was the necessity of rebinarizing it into a config.bin, else an unfamous known bug would always occur when switching from your primary weapon to your handgun, leaving you freezed ingame .

Until now, i never had the simple idea of just copy pasting the files referenced by those damned "includes" in a single .cpp ... until now

So i did it and at my great surprise it works perfectly , i have now a complete config.cpp that does not need to be transformed back into a config.bin , as the handgun bug do not exist anymore.

A bit late for me, as my personnal config replacement work are finished, but i share it with you as i noticed lot of time on the forums that such a config has been requested with no answers.

This way you will be able to start your replacement work with a complete "default" BIS config.cpp

--------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------

You can download the file by right clicking on that link and select Save...As... (geocities will certainly give you troubles if you try the usual left click)

--------------------------------------------------------------------------------------

--------------------------------------------------------------------------------------

have fun

Share this post


Link to post
Share on other sites

Do you mean I can modify that file with a word processor and use it directly after instead of the BIS config.bin?

If so, can you give me just an overview of what to do let's say to replace the BIS SoldierWB class with a HYK soldier class so all OFP standard missions can be played with the HYK soldiers without manipulating the SQM file?

Thanks in advance

Share this post


Link to post
Share on other sites

Before anything, i very strongly advice you to use the mod folders system , to never replace the original config.bin from the \res\bin\

Or if you plan on replacing the original config.bin without mod folder usage (not recommended at all) be sure to back up the config.bin first,

Yes, you can modify it like any config.cpp with a notepad/wordpad/word-like program.

The difference between this config.cpp and a config.cpp created by "unbin-ing" the config.bin will be that you will not need to convert it back to config.bin before usage to prevent the handgun bug.

Remember that in a \modfoldername\bin\ folder you can't have a config.bin and a config.cpp in the same time, so just use only this config.cpp that you will have modified.

For questions about how to replace units, i advice you to read this thread

It will help you to understand the "how to" procedure and then if you have anymore questions ask in there

Share this post


Link to post
Share on other sites

How is this config different than the one you released a while ago on the addon config board? Just wondering.

Also, how would I convert this to a config.bin? I see there are the complex defines in there that amalfi's cpp->bin program cannot handle. Forgive me for being an addon-newb, but is there another way to convert .cpp to .bin?

Share this post


Link to post
Share on other sites

Did you notice that the files cfgMoves.hpp, cfgVehicles.hpp and config.cpp are different in the commented config and the binarize download? And that manActions.hpp gets included twice but manVehActions.hpp does not get included at all?

Which version did you use and did you change anything?

Share this post


Link to post
Share on other sites
How is this config different than the one you released a while ago on the addon config board? Just wondering.

Also' date=' how would I convert this to a config.bin? I see there are the complex defines in there that amalfi's cpp->bin program cannot handle. Forgive me for being an addon-newb, but is there another way to convert .cpp to .bin?[/quote']

The beauty of this config.cpp is that you have no need at all to convert this config.cpp into a config.bin .

Unlike the one i made on the addon config board ages ago (or the one i used to make my mini mod in my signature) , this one can be used like this without any bugs .

Like i previously said, usually you had to convert .cpp into .bin to avoid the handgun bug. With this config.cpp it is no more necessary.

Actually, if you have played the FDF mod , you will notice that they use a config.cpp and not a config.bin .

They built their config like this one.

Did you notice that the files cfgMoves.hpp, cfgVehicles.hpp and config.cpp are different in the commented config and the binarize download?

Which version did you use and did you change anything?

I used the bunch of files coming with the breath commented config , not the breath binarize ones.

In fact i never noticed the files you reported were different as i never used the breath binarize.

Thanks for reporting this, i will give a look into this to see what are the difference, and what is the more up-to-dates one.

And that manActions.hpp gets included twice but manVehActions.hpp does not get included at all?

Yes i noticed that. But in the actual state, the config.cpp i put in the first post works very well like this without apparent errors.

So i guess it is not an error from BIS in their "include" and there is a reason it is included twice , as it works very well like this.

EDIT :

Did you notice that the files cfgMoves.hpp, cfgVehicles.hpp and config.cpp are different

Making a quick comparison, i noticed that the cfgMoves included in the binarize download is missing the entry

Quote[/b] ]class CfgManActions

{

access = ReadOnlyVerified;

#define ACTION(x) x="";

#include "manActions.hpp"

#undef ACTION

(and so all the manActions.hpp entries)

but in both cfgvehicle there is

Quote[/b] ]enum ManAction

{

#define ACTION(x) ManAct##x,

#include "manActions.hpp"

#undef ACTION

ManActN // count of enum values

};

The config.cpp in the binarize download is missing some comments (not a problem), but i have not made extensive comparison there.

So it seems that the commented config is enough and more complete than the binarize one (unless BIS made the entry class CfgManActions obsolete as it does not exist in the binarize files) .

So you should be able to use it without a problem

Share this post


Link to post
Share on other sites

I actually think the commented one is more complete too. I used it as a basis for my "new dynamic range from ecp" config and it worked well, although i wasn't able to convert it into a config.bin back then. I am not sure exactly WHAT cpp2bin can't do and how much of it you can get out off the config by running it through a preprocessor. Maybe i will do a few more tests in the next days. Or is there a better tool for doing this now?

BTW the differences in the files were these:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">cfgMoves.hpp:

146,154d145

<

< class CfgManActions

< {

< access = ReadOnlyVerified;

<

< #define ACTION(x) x="";

< #include "manActions.hpp"

< #undef ACTION

< };

158d148

< vehicleActions=CfgVehicleActions;

161c151

< class NoActionsAll: CfgManActions

---

> class NoActionsAll

163a154,157

>

> #define ACTION(x) x="";

> #include "manActions.hpp"

> #undef ACTION

2109d2102

< soundEdge1=1;soundEdge2=0.5;

Besides some minor stuff like an additional soundedge1 and vehicleactions line the class seems to be/inherit differently(?).

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">cfgVehicles.hpp:

1408d1407

< isMan = true;

1992,1993d1990

< landingSpeed = 0;

< flapsFrictionCoef = 0.5;

2001d1997

< wheelSteeringSensitivity = 1.0;

Some additional stuff in this one too...

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">config.cpp:

697,700d690

< class Chat

< {

< sound[] = {ui\hint, db-10, 1};

< };

And one additional class again.

Mostly minor stuff, but what would be more interesting is the question whether the manVehActions.hpp should have been included instead of including the manActions.hpp twice. I guess i will have to compare a debinned config with the commented one to see if those actions are in it or not....

Share this post


Link to post
Share on other sites

If you want the de-binarized config.cpp from the \Res\bin\config.bin

You can download it by right clicking on that link and Save...As

(to save you time if you don't have binview, as i made this one with binview)

That is the one i used as basis for my mini replacement mod in my signature.

Unlike the commented config.cpp , this one -has to be- converted back in config.bin to be bug free (works very well with cpp2bin ).

It has no comment at all, and i think it is less complete that the config.cpp created from the commented config (and the structure is not the same, certainly why this one has to be binarized back).

example :

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

{

access=3;

Stop="";

StopRelaxed="";

TurnL="";

TurnR="";

TurnLRelaxed="";

TurnRRelaxed="";

ReloadMagazine="";

ReloadMGun="";

ReloadAT="";

ReloadMortar="";

ThrowGrenade="";

WalkF="";

WalkLF="";

WalkRF="";

WalkL="";

WalkR="";

WalkLB="";

WalkRB="";

WalkB="";

SlowF="";

SlowLF="";

SlowRF="";

SlowL="";

SlowR="";

SlowLB="";

SlowRB="";

SlowB="";

FastF="";

FastLF="";

FastRF="";

FastL="";

FastR="";

FastLB="";

FastRB="";

FastB="";

Down="";

Up="";

Lying="";

Stand="";

Combat="";

Crouch="";

Civil="";

CivilLying="";

FireNotPossible="";

Die="";

WeaponOn="";

WeaponOff="";

Default="";

JumpOff="";

StrokeFist="";

StrokeGun="";

SitDown="";

Salute="";

BinocOn="";

BinocOff="";

PutDown="";

Medic="";

Treated="";

LadderOnDown="";

LadderOnUp="";

LadderOff="";

LadderOffTop="";

LadderOffBottom="";

GetInCar="";

GetOutCar="";

GetInTank="";

GetOutTank="";

TakeFlag="";

HandGunOn="";

};

and

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

{

class NoActionsAll:CfgManActions

{

access=3;

};

class NoActions:NoActionsAll

{

ladderOnDown="LadderDownStart";

ladderOnUp="LadderUpStart";

turnSpeed=1;

upDegree=-1;

limitFast=5;

};

Share this post


Link to post
Share on other sites

What you don't get with the BINview'd configs, that you do with the raw commented configs, is the #defines in use. One of the things the binpacker does of course is if you have something like this in the commented configs

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

#define default 1

...

default = default;

// grossly simplified defect in a particular build, not in 1.91.

in the BINview extract you will only have

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

default = 1;

So that gives a significant advantage to using the commented configs, as you can trace #define variables much easier than the equivelent absolute values.

Now I don't recommend that anyone just start dancing through some 30-odd-k lines of code without a plan. Comment all your changes, and better yet, put a unique change ID in the comments so that you can find it in your editor quicker.

One thing that this doesn't address, which you may also want to look at the binarize data and compare to the BINview extracts, is the resource.bin/cpp data. I haven't had the chance to go through it in OFP and run the two together to make a commented resource.cpp for 1.96, my prior split pack was solely a redivision of BINview output.

Personally, I prefer the sorted pile of lots of includes, easier for me to manage imho. I wasn't aware of the bug you mentioned, I'll have to go back and check to see if it repros. I wouldn't be suprised though, there are all sorts of little weird nigglies squirreled away in there.

Share this post


Link to post
Share on other sites

The bug occurs when you use a de-binarized BIS config.bin.

When you have a unit ingame that have a primary weapon and a handgun , switching from his primary to handgun will paralyse the unit , and he will not be able to shoot from the handgun (actually it is a bit funny as it the primary that is on the back that will shoot to the sky).

Binarizing (with cpp2bin) back such config.cpp will solve totally the problem.

That does not occur with a config.cpp created with the breath commented files.

Maybe it has to do with the define you are talking about, but why simply binarizing back such config.cpp solve the problem is a bit beyond my understanding.

Share this post


Link to post
Share on other sites
Quote[/b] ]I am not sure exactly WHAT cpp2bin can't do

cpp2bin cannot do "Include" statements, for one thing. Also, it can only do very basic "define" statements... numbers, one-line strings, and lists {blah, blah}. An example of the useful defines that it cannot do:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE"> #define StandTimedMove(Name,anim1,time1,anim2,time2,anim3,time3,loop) \

class StandTo##Name: Default \

{ \

actions = StandActions; \

file=anim1.rtm; \

speed=time1; \

looped=false; \

disableWeapons=true; \

soundEnabled=false; \

connectFrom[]={Stand,1}; \

interpolateTo[]={StandDying,0.1,StandDyingVer2,0.1}; \

}; \

class Name: Default \

{ \

actions = Name##Actions; \

file=anim2.rtm; \

speed=time2; \

looped=loop; \

disableWeapons=true; \

disableWeaponsLong=true; \

soundEnabled=false; \

aiming=aimingNo; \

connectFrom[]={StandTo##Name,2}; \

connectTo[]={Name##ToStand,2}; \

interpolateTo[]={StandDying,0.1,StandDyingVer2,0.1}; \

}; \

class Name##ToStand: Default \

{ \

actions = StandActions; \

file=anim3.rtm; \

speed=time3; \

looped=false; \

disableWeapons=true; \

soundEnabled=false; \

connectTo[]={Stand,1}; \

interpolateTo[]={StandDying,0.1,StandDyingVer2,0.1}; \

};

StandTimedMove(StandTakeFlag,bezstanipoloz1,-0.7,bezstanipolozstat,-2.5,bezstanipoloz2,-1.0,true)

StandTimedMove(StandPutDown,bezstanipoloz1,-0.7,bezstanipolozstat,SPEED_STATIC,bezstanipoloz2,-1.0,tru

e)

Essentially that kind of define lets you create a template with certain blanks that you fill in with a single line statement. Might seem useless, but I have wanted to use it before.

There may be some other things that I am forgetting or do not know about as well.

I also have yet to hear what the difference is between a .bin and a .cpp config. I get the impression that no one really knows...

Still, I'd like to know if there are any other programs to convert config.cpp to config.bin. Is that what BIS's "Binarize" program does? I always thought that had to do with modelling...

Share this post


Link to post
Share on other sites
Quote[/b] ]I also have yet to hear what the difference is between a .bin and a .cpp config. I get the impression that no one really knows...

Before touching the FDF mod (and so its config in only cpp format) , i always thought a config in bin version was what used OFP to work, then after tweaking myself some config.cpp created by "binviewing" the main BIS config.bin i thought a config.cpp was not read right by OFP (due to the handgun bug)

But there i remembered the FDF mod again.

So at the end, i don't know at all the difference between playing with a main config.bin or a main config.cpp (at least if it is created from the commented config, as a binviewed config.cpp will have the handgun bug). OFP seems to work very well with both.

Quote[/b] ]Still, I'd like to know if there are any other programs to convert config.cpp to config.bin. Is that what BIS's "Binarize" program does? I always thought that had to do with modelling...

From what i understood, it has to do with the model binarization, it is not a config binarizing tool.

At least i never succeeded to use it for a config.cpp

But i can be wrong of course.

Share this post


Link to post
Share on other sites
Quote[/b] ]I am not sure exactly WHAT cpp2bin can't do

cpp2bin cannot do "Include" statements, for one thing. Also, it can only do very basic "define" statements... numbers, one-line strings, and lists {blah, blah}.

I already noticed that the last time i tinkered with it. From what i have heard cpp2bin is line-orientated and can't do stuff that stretches more than one line. It also does not seem to like some kind of comments.

But even if i run the the config.cpp through a precompiler (which should solve any #defines and #includes), cpp2bin can't convert the config. I even removed all comments that the precompiler left (or put there in the first place). Still no go.

I guess i have to check the config manually for any "strange stuff", but with some 30000 lines that is not much fun. I guess i'll check for line continuation ("\" at the end of a line) first, or multiline comma-separated lists maybe it's still the old "multiline problem".

Maybe it has something to do with the signed integer bug that unpbo 1.3 produces, ie signed integers aren't converted correctly?!?

Quote[/b] ]Still, I'd like to know if there are any other programs to convert config.cpp to config.bin. Is that what BIS's "Binarize" program does? I always thought that had to do with modelling...

I'd like to know that one too...

Share this post


Link to post
Share on other sites
So at the end, i don't know at all the difference between playing with a main config.bin or a main config.cpp

In practice the only difference is that the linux dedicated server has a bug with the cpp parsing, requiring to keep the config (and resource) cpp files in the server root directory. This is also why the FDFmod configs are parsed into a single file for each public release, so you dont need to have all those dozens of files in the server root.

Share this post


Link to post
Share on other sites

Thank you for this precision, it is interesting to learn a bit more how things are working inside OFP.

Share this post


Link to post
Share on other sites

@Kegetys,

Thanks for the info. I don't know anything about running a server, much less a linux server, but I get the gist of it. Does this affect addons with config.cpp's as well?

@Benu

I seem to remember having some other problems with cpp->bin, but I don't remember specifically. For one, I think comments can't be added on to the end of a "code" line/statement. I.e. comments must be in their own lines. I also seem to remember having some difficulty with multi-line lists of some sort, which may be your problem. But again, I don't remember specifically.

From the sounds of it, though, it isn't even worth the hassle of compiling a config, since there aren't really any benefits, and you lose out on lots of useful syntax.

Share this post


Link to post
Share on other sites

Yeah, if it was really important to me i would have tried harder the last time ;)

Yesterday i did a few more changes out of curiositiy. I had removed all comments already and executed all includes and defines. Cpp2bin was complaining about some enum, so i replaced all enums in the config by corresponding ints. Still no go. The next error was about some speed property. I noticed some had scientific/engineering notation (1e9) and i converted those to standard numbers. But that didn't work either.

The next thing would be to put multiline lists onto one line i guess. But i don't know if i really want to do this.

Share this post


Link to post
Share on other sites

I am not sure to clearly understand : why do you want to convert this kind of config.cpp into a config.bin ?

Share this post


Link to post
Share on other sites

Greetings and hello everybody!

After years of abstinence i decided to revive some memories of my glorious youth (hurhur), to said end i installed Operation Flashpoint again so i could get into modding once more.

But i am an old man by now and alas, i have forgotten a few things.

In particular, i wanted to revisit my project of writing a config file to replace all original OFPRES-units with corresponding units from the Ballistig Addon Studios units and the likes.

I remember having gotten it to work quite nicely (all men units and some vehicles) but the wretched HDD crashed its head and now i stand dumbfounded before the config.bin and can't get it to work at all.

i used the pbo decryptor 1.3 back then, to make an config.cpp and edit that one. i do not have that program anymore. i just tried out EliteNess 2.23 but the resulting cpp-file is faulty and the error is very hard to find it seems.

to revive this five-year-old thread now my main question: does someone have this 191config.zip file still lieing around? Geocities has vanished long ago, and searching the web didn't turn up anything usefull.

Share this post


Link to post
Share on other sites

welcome back, but BAS is way behind when it comes to whats out now. but hey, anything that advances the community gets my attention. hopefully this can be used to some extent we haven't witnessed yet.

Share this post


Link to post
Share on other sites

I don't have the file anymore and because indeed yahoo killed geocities, every files that were hosted there are gone definitively.

But in term of config.cpp, you can just use Binview

Launch Binview click File then Open the original OFP config.bin located in

....\Codemasters\Operation Flashpoint\Res\Bin

Then click File then Save then Ok, select where to save then Ok.

Binview will create then an editable config.cpp version of the original 1.96 config.bin, so you can take this newly created config.cpp and put it into you

\ownmodfolder\bin\

To not have any need to rebinarize the config.cpp before usage, open it, scroll a bit down until you see

// Class definitions

class CfgExperience

Just BEFORE this, copy paste the following :

enum
{
DestructNo,
DestructBuilding,
DestructEngine,
DestructTree,
DestructTent,
DestructMan,
DestructDefault
};

enum
{
ManPosDead,
ManPosWeapon,
ManPosBinocLying,
ManPosLyingNoWeapon,
ManPosLying,
ManPosHandGunLying,
ManPosCrouch,
ManPosHandGunCrouch,
ManPosCombat,
ManPosHandGunStand,
ManPosStand,
ManPosNoWeapon,
ManPosBinoc,
ManPosBinocStand
};

enum
{
CPDriver,
CPGunner,
CPCommander,
CPCargo
};

enum
{
UnitInfoSoldier,
UnitInfoTank,
UnitInfoCar,
UnitInfoShip,
UnitInfoAirplane,
UnitInfoHelicopter
};

enum
{
ManActStop,
ManActStopRelaxed,
ManActTurnL,
ManActTurnR,
ManActTurnLRelaxed,
ManActTurnRRelaxed,
ManActReloadMagazine,
ManActReloadMGun,
ManActReloadAT,
ManActReloadMortar,
ManActThrowGrenade,
ManActWalkF,
ManActWalkLF,
ManActWalkRF,
ManActWalkL,
ManActWalkR,
ManActWalkLB,
ManActWalkRB,
ManActWalkB,
ManActSlowF,
ManActSlowLF,
ManActSlowRF,
ManActSlowL,
ManActSlowR,
ManActSlowLB,
ManActSlowRB,
ManActSlowB,
ManActFastF,
ManActFastLF,
ManActFastRF,
ManActFastL,
ManActFastR,
ManActFastLB,
ManActFastRB,
ManActFastB,
ManActDown,
ManActUp,
ManActLying,
ManActStand,
ManActCombat,
ManActCrouch,
ManActCivil,
ManActCivilLying,
ManActFireNotPossible,
ManActDie,
ManActWeaponOn,
ManActWeaponOff,
ManActDefault,
ManActJumpOff,
ManActStrokeFist,
ManActStrokeGun,
ManActSitDown,
ManActSalute,
ManActBinocOn,
ManActBinocOff,
ManActPutDown,
ManActMedic,
ManActTreated,
ManActLadderOnDown,
ManActLadderOnUp,
ManActLadderOff,
ManActLadderOffTop,
ManActLadderOffBottom,
ManActGetInCar,
ManActGetOutCar,
ManActGetInTank,
ManActGetOutTank,
ManActTakeFlag,
ManActHandGunOn,
ManActN
};

And save the change, you have now a fully working config.cpp that will not have the infamous handgun bug of old, and can begin to modify the config and replace stuff to fits your needs.

Share this post


Link to post
Share on other sites

Thanks a lot Sanctuary, that will do nicely! Now the hard part: getting into it again ;)

BronzeEagle, BAS was pretty much top of the line the time i "left" OFP. Has there been any significant development since then? I hear OFP is not dead yet, despite ArmA and ArmA2. But the community life is deffinitely not as thriving anymore and there do not seem to be many active OFP-websites left.

My motivation is basically, that i really enjoyed the OFP and RES campaign and would like to replay them, but graphically updated.

On the other hand, i might just go and buy ArmA(2) and see what i can contribute there. I still have my unpublished Fabz_Modular_Markers addon lying around, for example. Or a little ambience soundpack and stuff like that.

oh, and a little addition: i am an ears man, sound is generally more important to my than graphic. and i quite dislike the chatter in ArmA2. So inhomogeneous and confusing. :P

Edited by FabzSinceOld

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  

×