Jump to content
Sign in to follow this  
SeriaL_KilleR

Problems with BinPBO and an existing map

Recommended Posts

Hello,

to make a certain mission work on a certain island i had to add "FlatArea" location types to this island as it doesn't have any by default. To do so i had to unRap the config.bin of the island to manually edit the "CfgWorlds.hpp".

In fact i added around 70 classes like this:

class AFlat_003 {
			name = "";
			position[] = {3058.55, 3636.69};
			type = "FlatArea";
			radiusA = 100.0;
			radiusB = 100.0;
			angle = 0.0;
		};

After that i wanted to repack the contents to a PBO again including binarizing for the "config.bin" and also singing it with a key. Now.. the problem is, BinPBO kinda binarized certain *.P3Ds inside the island's *.wrp file making it a 8KB sized file (before it was around 45MB). When the Server loads the mission this causes an error like "could not load blablabl.wrp". I already tried to add *.p3d to the files which should be directly copied but it doesn't work.

I also excluded the *.wrp from the addon's source directory so it wouldn't be packed inside this new PBO. I did this to just binarize the config files. After that i used PBOManager to unpack it and repacked it again with BinPBO but this time including the original *.wrp but without binarizing. At least it didn't binarize the *.p3d files but the server still had this "could not load blablabbla.wpr" error.

Does anyone know what's causing this? Or how i could definitly exclude the *.wrp or the *.p3d files to be binarized in the first place?

Or is there maybe an easier way to add "FlatAreas" to an existing map?

Edited by SeriaL_KilleR

Share this post


Link to post
Share on other sites
Or is there maybe an easier way to add "FlatAreas" to an existing map?

you don't really need to BinPBO things just to repack... in fact, the whole opening-and-hacking the config approach - apart from the fact it might annoy the original author - is a fairly clumsy way of altering things... everyone who wants to play the mission will need the edited terrain, etc...

It's perfectly possible to add all these FlatAreas within the mission itself - just like MSO does... that way theres no need for terrain editing at all...

Another alternative would be a simple "companion patch.pbo" for the terrain itself - all players would require that in addition to the terrain itself, of course, but it's still a lot less fuss or potentially controversial than editing the actual terrain itself...

I'm not absolutely sure how exactly to accomplish the "mission-only" FlatArea additions... that's a question best asked in the "Missions & Scripting" section... Tupolov & Wollfy.au are the experts in that field...

For the "terrain config patch" option you could use something like this....

class CfgPatches
{
class AfghanValley_Patch
{
	units[] = {};
	weapons[] = {};
	requiredVersion = 1.0;
	requiredAddons[] = {"AfghanValley"};
};
};

class CfgWorlds
{
       class CAWorld;
class Takistan: CAWorld
class AfghanValley: Takistan
{
	class Names
	{
                               class AFlat_001
                               {
			name = "";
			position[] = {3058.55, 3636.69};
			type = "FlatArea";
			radiusA = 100.0;
			radiusB = 100.0;
			angle = 0.0;
                        };

                               class AFlat_002
                               {
			name = "";
			position[] = {3058.55, 3636.69};
			type = "FlatArea";
			radiusA = 100.0;
			radiusB = 100.0;
			angle = 0.0;
                        };

                               class AFlat_003
                               {
			name = "";
			position[] = {3058.55, 3636.69};
			type = "FlatArea";
			radiusA = 100.0;
			radiusB = 100.0;
			angle = 0.0;
                        };

                   };
           };
};

... in this example I'd type that lot into notepad, save as "config.cpp", then put it in a folder called "AfghanValley_Patch" - pack it to a simple pbo file with Mikero's "Eliteness" or something so I ended up with a "AfghanValley_Patch.pbo"... There's no real need to actually binarize the config.cpp file to a config.bin, though I suppose you could if you wanted to... there's Mikero tools to cover .bin rapifying and de-rapifying too...

You'd just drop that patch in the same modfolder as the island and it should all kick in OK...

Edit the actual "AfghanValley" & inheritance details above to suit your target terrain of course...

I haven't actually tried this with "FlatAreas" etc, but I DID do a similar patch for Sahrani a while back for the CAA1 mod, adding in Civilian Spawn "CityCenter" capability to the towns and settled areas... That worked fine, so the same procedure should provide a slightly more elegant solution, should you choose not to pursue the purely mission-based option...

B

Edited by Bushlurker

Share this post


Link to post
Share on other sites

I digged a bit deeper inside the editor and by "within the mission itself" i think you mean to add locations under units/game logic?

Thats a pretty elegant way of doing this. Really didn't know that. Thanks for pointing that out.

As there are not all location types to choose...can i just put "this setType "RockAre" inside the init field to make it a RockArea?

Regarding the missionthing...In fact inside the mission is a script that calls objectives to be completed which are generated at these "FlatAreas". The Script works fine if i change this to "NameCity" i.e. but unfortunatly, some NPCs are spawned inside buildings which kinda prevents you from completing the objective. So "FlatAreas" are chosen for a reason. Unfortunatly, as written above, the island i'd like to use, doesn't have any "FlatAreas" by default...I hope doing it within the mission itself, as you suggested it, will solve this problem. If not, ill try your patch.pbo way :)

Thanks for your help!

Edited by SeriaL_KilleR

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  

×