Jump to content
Sign in to follow this  
General Barron

Benefits of converting config.cpp -> config.bin?

Recommended Posts

I'm sure this is an easy Q to answer, and has been answered before I'm sure, but I tried searching and couldn't find an answer... Anyway, what difference does it make when you convert a config from .cpp -> .bin? Are there any drawbacks from doing that? And if you have both a config.cpp and .bin in an addon, which one will it use? I'm assuming it will use the .bin, and most addons just leave the .cpp in for others to look at, but I could be wrong...

Share this post


Link to post
Share on other sites

I guess I'll add on to this: what are the benefits and drawbacks of compressing various files in your pbo? How does it vary from filetype to filetype?

Share this post


Link to post
Share on other sites

I don't remember all the answers of the top of my head, but from there I can tell you BIN format was likely put in place to prevent tampering/cheating, and to compress the file. I am not certain that putting a .cpp in BIN format has any benefit in terms of speed and so on.

Share this post


Link to post
Share on other sites

Afaik if there is a cpp and a bin the cpp will be used. I guess this is not what most people would expect.

Share this post


Link to post
Share on other sites

hmm not what i have encountered...

ofp gets a error at startup if u have bin and cpp.

doesnt seem to matter what file ending it has.. still the same file for ofp.

Share this post


Link to post
Share on other sites
Afaik if there is a cpp and a bin the cpp will be used. I guess this is not what most people would expect.

For addons I think yes, for main config.cpp = errors. As Bedlam said.

Share this post


Link to post
Share on other sites

Yes, i was referring to:

Quote[/b] ]And if you have both a config.cpp and .bin in an addon, which one will it use?

Although i did not know about the res\bin\config. Nice to know too.

I guess one advantage of binning that one is that the cpp is afaik supposed to make problems with pistols sometimes.

Share this post


Link to post
Share on other sites

prevents some people whom you dont want people to see your nifty scripting and people ripping apart your config and making parts of it for their own...Shame the community have got this bad to result to do this

Share this post


Link to post
Share on other sites

The ECP mod seems to be the only config that causes problems with the pistol anims in *.cpp format. Besides that I havn't seen any drawbacks to *.cpp files over *.bin. With the config that I'm working on for the Bush Fires mod I based it on the commented configs that BIS released and have not had any problems with the *.cpp format, not even with the pistol anims.

Share this post


Link to post
Share on other sites

Yeah, I heard it made it easier for the OFP engine to read .bin files (especially when they're big ones like the main config.bin). Also, I've found that some addons don't work without having a .bin file.

Share this post


Link to post
Share on other sites
The ECP mod seems to be the only config that causes problems with the pistol anims in *.cpp format. Besides that I havn't seen any drawbacks to *.cpp files over *.bin. With the config that I'm working on for the Bush Fires mod I based it on the commented configs that BIS released and have not had any problems with the *.cpp format, not even with the pistol anims.

Afaik most of the older configs (before the official commented config.cpp) were based on one single debinned config with lots of errors and all those configs should have the same problems.

Share this post


Link to post
Share on other sites

For my only released config (link in my signature) replacing East units , West units , weapons, sounds with the ones from the Marine Assault Pack , i use as a basis for this replacing work the debinarised (with the excellent Binview) 1.96 config.bin from ...\Res\Bin\ .

There is no errors or missing entries with Binview and the BIS config.bin.

Of course, when i notice that a unit or weapon i want to replace is not defined in this config, i look into the official addons config.bin to take their class definitions and add them in the main config.cpp i am working on.

If i do not binarize back the result of my replacing work , i have the problems with units using pistols (when such units switch to pistol, they can't move anymore and can't switch back to their primary weapon)

But if i binarize (with the great utility cpp2bin) it, it works perfectly.

For my other private replacement config , using other mods to replace what i want , there is the same exact problem if i do not binarize back the config.cpp i am working on.

If you use the commented BIS config (merging the segmented parts) and have no pistol problem with the .cpp, i guess it is because those segmented configs contains a lot more class definition than the BIS config.bin (lots of those classes are not in the main config.bin , but inside addons or O.pbo config.bin files).

That is why , if you use a de-binarized version of the BIS config.bin, you must binarize it back if you want to avoid the pistol problem.

If you merge the segmented part of the commented config in the breath website, you should have no such an obligation.

Share this post


Link to post
Share on other sites
I guess I'll add on to this: what are the benefits and drawbacks of compressing various files in your pbo? How does it vary from filetype to filetype?

Compressing anything but mission files is useless. Data in binarized .p3d files and .paa files is already partially compressed, so it won't give that great benefits and will only degrade performance as game has to decompress everything twice when loading an addon.

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  

×