Jump to content
Sign in to follow this  
TurboJet

Overwrite base game .pbo files with patched version

Recommended Posts

I am trying to make a basic mod and replace some of the .pbo files used by the game. Replacing the files directly results in a "data file too short" error, and I have heard that the best way is to make a mod/addon that will do this instead. Currently I am trying to make some changes in dubbing_f_epa.pbo that will appear when I play the campaign (i.e., be loaded by the engine instead of the original data).

I have added "-mod=@dubmod" to the Steam launch parameters, and inside the root Arma 3 folder I have put @dubmod/addons/dubbing_new_epa.pbo, with the new sound files. Before repacking the pbo, I placed a config.cpp file inside. This wiki article seems to suggest using a "class CfgPatches {...};" code block to configure the mod, but is not very clear for this purpose. My code is below, but it does not seem to work:

class CfgPatches
{
	class dubbing_new_epa
	{
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] = {}; //this line might be a problem...
	};
};

The .cpp file was not "binarized."

I think I also might need something in my userconfig folder, but after a few hours searching the internet and the forums, I cannot seems to find any tutorials on this specific problem.

Any specific advice on replacing the dubbing_f_epa.pbo, or similar task? Thanks for any assistance.

P.S. Is setting up the P: drive needed for this? I have just been using the BankRev/FileBank tools without that, but would do it if necessary.

Share this post


Link to post
Share on other sites

What you did there, was not much. You told the game you want to patch it, and the name of the patch would be "dubbing_new_epa". But you didn't actually add/replace any content. I'm not 100% sure, but i think in order to overwrite those audio files, you should unpack "missions_f_epa.pbo", since "dubbing_f_epa.pbo" contains no config of it's own, it's just a bunch of sound and lipsync files. Find missions_f_epa's config.bin and use cfgConvert to turn it into ASCII form. Then start your config like this:

class CfgPatches
{
class YOURTAG_YOURPATCHNAME
{
	units[]={};
	weapons[]={};
	requiredVersion=0.1;
	requiredAddons[]=
	{
		"A3_Missions_F_EPA"
	};
};
};

Then copy over the needed cfgSentences entries from the game config.cpp and change the file paths to point to your PBO, something like this:

class CfgSentences
{
class A_hub
{
	class 000_a_m01_intro
	{
		priority=0;
		file="\a3\missions_f_EPA\kb\A_hub\A_hub_000_a_m01_intro.bikb";
		class Sentences
		{
			class a_hub_000_a_m01_intro_ALP_0
			{
				text="$STR_A3_a_hub_000_a_m01_intro_ALP_0";
				speech[]=
				{
					"dubbing_new_epa\a_hub\000_a_m01_intro\a_hub_000_a_m01_intro_ALP_0.ogg"
				};
				actor="BIS_AlphaLead";
				variant="";
				variantText="";
				class Arguments
				{
				};
			};
			class a_hub_000_a_m01_intro_ALP_1
			{
				text="$STR_A3_a_hub_000_a_m01_intro_ALP_1";
				speech[]=
				{
					"dubbing_new_epa\a_hub\000_a_m01_intro\a_hub_000_a_m01_intro_ALP_1.ogg"
				};
				actor="BIS_AlphaLead";
				variant="";
				variantText="";
				class Arguments
				{
				};
			};
			class a_hub_000_a_m01_intro_ALP_2
			{
				text="$STR_A3_a_hub_000_a_m01_intro_ALP_2";
				speech[]=
				{
					"dubbing_new_epa\a_hub\000_a_m01_intro\a_hub_000_a_m01_intro_ALP_2.ogg"
				};
				actor="BIS_AlphaLead";
				variant="";
				variantText="";
				class Arguments
				{
				};
			};
		};
		class Arguments
		{
		};
		class Special
		{
		};
		startWithVocal[]=
		{
			"hour"
		};
		startWithConsonant[]=
		{
			"europe",
			"university"
		};
	};

Do this for all the files you want to swap out, then put your config.cpp in your PBO\s root directory.

Share this post


Link to post
Share on other sites

Well, my current config file is below, but it does not seem to work. I even converted it to .bin format. Obviously, there is a steep learning curve to modding. (dubbing_new_epa.pbo is the name of the file in \Arma 3\@dubmod\addons)

class CfgPatches
{
	class dubbing_new_epa
	{
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] =
	{
		"A3_Missions_F_EPA"
	};
	};
};
class CfgSentences
{
class A_in
{
	class 01_Wave
	{
		priority=0;
		file="\a3\missions_f_EPA\kb\A_in\A_in_01_Wave.bikb";
		class Sentences
		{
			class a_in_01_wave_ICO_0
			{
				text="$STR_A3_a_in_01_wave_ICO_0";
				speech[]=
				{
					"\dubbing_new_epa\a_in\01_Wave\a_in_01_wave_ICO_0.ogg"
				};
				actor="BIS_leader";
				variant="";
				variantText="";
				class Arguments
				{
				};
			};
		};
		class Arguments
		{
		};
		class Special
		{
		};
		startWithVocal[]=
		{
			"hour"
		};
		startWithConsonant[]=
		{
			"europe",
			"university"
		};
	};
};
};

Anyway, thank you for trying to help, teaCup. I appreciate your detailed response.

Share this post


Link to post
Share on other sites

I think in order to overwrite a3 sound files u will need to find the class that calls them then do something like this.

class yourclassname;
class arma3name : yourclassname{all the defines};

Now it will overwrite those entries when your pbo is active.

Share this post


Link to post
Share on other sites

Well, I may drop this idea, as I still can't get it to work. Below is my final effort, but I really do have to move on. Thanks for the tips. This has given me a sense of the effort that the community modders put in. :)

[inside dubbing_new_epa.pbo, placed in Arma 3\@dubmod\addons\]

class CfgPatches
{
	class dubmod
	{
		units[] = {};
		weapons[] = {};
		requiredVersion = 0.1;
		requiredAddons[] =
	{
		"A3_Missions_F_EPA"
	};
	};
};
class CfgSentences
{
class patchAin; //perhaps I should have replaced 01_Wave, or even a_in_01_wave_ICO_0? Didn't try those....
class A_in : patchAin
{
	class 01_Wave
	{
		priority=0;
		file="\a3\missions_f_EPA\kb\A_in\A_in_01_Wave.bikb";
		class Sentences
		{
			class a_in_01_wave_ICO_0
			{
				text="$STR_A3_a_in_01_wave_ICO_0";
				speech[]=
				{
					"\dubmod\a_in\01_Wave\a_in_01_wave_ICO_0.ogg"
				};
				actor="BIS_leader";
				variant="";
				variantText="";
				class Arguments
				{
				};
			};
		};
		class Arguments
		{
		};
		class Special
		{
		};
		startWithVocal[]=
		{
			"hour"
		};
		startWithConsonant[]=
		{
			"europe",
			"university"
		};
	};
};
};

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  

×