Jump to content
Gazzamc

Quick question about config.cpp

Recommended Posts

I'm I correct in saying that it's not possible to edit or create a new magazine class? I've been trying for two days now and i can't even change the image, let alone create an entirely new class.

 

Any clarification on this would be greatful, so i can move on to other things :P

Share this post


Link to post
Share on other sites

Hey,

 

Do you try to look at this page ?

=> https://community.bistudio.com/wiki/CfgMagazines_Config_Reference

 

Maybe there's what you search  ;)

I've read almost everything on the subject and i still can't seem to get it to work.. Thanks for the reply.

 

Edit:

 

I get premium item in my inventory when i spawn it now.. (Only in my units inventory)

 

letxh62r.jpg

Share this post


Link to post
Share on other sites

 

 

I've read almost everything on the subject and i still can't seem to get it to work.. Thanks for the reply.

 

No problem for the reply. What did you try to do exactly ?

 

Do you want to make a new magazine class to define your own parameters for this new class ?

 

 

 

I get premium item in my inventory when i spawn it now

 

Because it's surely a content from a DLC, and you need to buy this DLC to get this object available. I own all DLC (ArmA III + DLC Bundle and pro-order APEX Expansion) and I've never ever get this kind of item.

 

If you don't own all the content for ArmA III, don't search anymore.

Share this post


Link to post
Share on other sites

Because it's surely a content from a DLC, and you need to buy this DLC to get this object available. I own all DLC (ArmA III + DLC Bundle and pro-order APEX Expansion) and I've never ever get this kind of item.

Its a classname he's created...

 

Post your (broken) config and we might be able to ffer further assistance. Chances are you're getting the Premium DLC popup due to class-inheritance.

Share this post


Link to post
Share on other sites

Its a classname he's created...

 

Post your (broken) config and we might be able to ffer further assistance. Chances are you're getting the Premium DLC popup due to class-inheritance.

You are correct! i'll post it below:

class CfgPatches {
	class shipwreck_Config
	{
		units[] = {};
		weapons[] = 
		{
			
		};
		requiredVersion = 0.1;
		requiredAddons[] =
		{
			
		};
		magazines[]=
		{
			"16Rnd_9x21_Mag_B"
		};
};

class cfgMagazines
{
	class CA_Magazine; // External class reference
	class 16Rnd_9x21_Mag; // External class reference
	
	class 16Rnd_9x21_Mag_B : 16Rnd_9x21_Mag
	{	
		scope = 2;
		displayName = "9 mm 30Rnd Mag";
		ammo = "B_9x21_Ball";
		count = 30;
		mass = 10;
		initSpeed = 370;
		tracersEvery = 0;
		descriptionShort = "Caliber: 9x21 mm<br />Rounds: 30<br />Used in: PDW2000, P07, Rook-40";
		picture = "images\9mm.paa";	
	};
};

No problem for the reply. What did you try to do exactly ?

 

Do you want to make a new magazine class to define your own parameters for this new class ?

 

 

Because it's surely a content from a DLC, and you need to buy this DLC to get this object available. I own all DLC (ArmA III + DLC Bundle and pro-order APEX Expansion) and I've never ever get this kind of item.

 

If you don't own all the content for ArmA III, don't search anymore.

 

 

I do own all content so i've no idea why i would receive this message. I tried to inherit a class of said magazine and just create a custom one with a different inventory image (I was later going to modify further but it wouldn't work initially).

Share this post


Link to post
Share on other sites

The only thing I can see that is out of the ordinary is your cfgPatches section that lacks a few things, the rest of the config seems fine.

 

As you're referencing classes defined in the default weapon pbos, maybe add the following: 

requiredAddons[] = {"A3_Weapons_F","A3_Weapons_F_Acc","A3_Weapons_F_beta"};

Also, if I'm not mistaken your cfgPatches section is missing a };

class CfgPatches {
	class shipwreck_Config
	{
		units[] = {};
		weapons[] = {};
		magazines[]=
		{
			"16Rnd_9x21_Mag_B"
		};
		requiredVersion = 0.1;
		requiredAddons[] ={"A3_Weapons_F","A3_Weapons_F_Acc","A3_Weapons_F_beta"};
	};
};

However, I doubt these tweaks will fix the Premium DLC issue...

Share this post


Link to post
Share on other sites

I made the changes to reflect your code and i still have the same issue.

 

Here's the error from RPT if it's any use..

22:23:45 Warning Message: No entry 'bin\config.bin/CfgMagazines.16Rnd_9x21_Mag_B'.
22:23:45 Warning Message: No entry '.picture'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.scope'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: Error: creating magazine 16Rnd_9x21_Mag_B with scope=private
22:23:45 Warning Message: No entry '.displayName'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.displayNameShort'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.nameSound'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.Library'.
22:23:45 Warning Message: No entry '.libTextDesc'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.type'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.count'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.maxLeadSpeed'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.initSpeed'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.reloadAction'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.modelSpecial'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.ammo'.
22:23:45 Warning Message: '/' is not a value
22:23:45 Warning Message: No entry '.model'.
22:23:45 Warning Message: '/' is not a value 

No matter what changes i make it won't apply them.

 

 

The only thing I can see that is out of the ordinary is your cfgPatches section that lacks a few things, the rest of the config seems fine.

 

As you're referencing classes defined in the default weapon pbos, maybe add the following: 

requiredAddons[] = {"A3_Weapons_F","A3_Weapons_F_Acc","A3_Weapons_F_beta"};

Also, if I'm not mistaken your cfgPatches section is missing a };

snip

However, I doubt these tweaks will fix the Premium DLC issue...

 

Share this post


Link to post
Share on other sites

Might be nothing, but try removing the space between your new classname and : that separates it from the parent class:

	class 16Rnd_9x21_Mag_B: 16Rnd_9x21_Mag
	{

Share this post


Link to post
Share on other sites

Hey,

 

If you already done the PBO file, can you send it to me for I can extract it and see exactly what's going bad please ?

 

I'll don't use it or keep it, don't worry, I respect the work from other authors, I've already been confronted to disrespect of mods distribution and use so I'm not the one that will do the same.

 

Like that, I can see your config' file and have all the elements you included to really identify and fix the issue. After that, I'll send you back the corrected one.

 

Keep me informed if you want. I have a Skype info in my profil if you want. That will be easier than here.

Share this post


Link to post
Share on other sites

Sorry for the late reply, I haven't been able to check back. I've removed the space between the parent class and the colon and it's still producing the same error.

 

 

Might be nothing, but try removing the space between your new classname and : that separates it from the parent class:

	class 16Rnd_9x21_Mag_B: 16Rnd_9x21_Mag
	{

 

I haven't actually implemented this into my mod yet, I've create the folder with the config file in it and I'm using a simple script to spawn in the magazine via the Eden Editor. I've used the same method on a vest and it worked just fine. I've also tried via the PBO and it's still producing the same thing, I'm at a loss as to what is causing this.

 

script:

_box = "Box_NATO_Ammo_F" createVehicle position player;
clearItemCargo _box;
clearWeaponCargo _box;
clearMagazineCargo _box;

player addMagazine ["16Rnd_9x21_Mag_B",1];
_box addMagazineCargo ["16Rnd_9x21_Mag_B",1];
sleep 20;
hint str getItemCargo _box;

calling this via an addaction.

 

Hey,

 

If you already done the PBO file, can you send it to me for I can extract it and see exactly what's going bad please ?

 

I'll don't use it or keep it, don't worry, I respect the work from other authors, I've already been confronted to disrespect of mods distribution and use so I'm not the one that will do the same.

 

Like that, I can see your config' file and have all the elements you included to really identify and fix the issue. After that, I'll send you back the corrected one.

 

Keep me informed if you want. I have a Skype info in my profil if you want. That will be easier than here.

Share this post


Link to post
Share on other sites

Just going to add a little update here, I managed to solve my config issues.. I didn't realize you needed to pack the config file into a pbo file in order for it to be read by the game, It's solved the error message and the DLC message.. Now my only issue is the image not showing.. 

 

my path to the image in the config file is : "pics\9mm" and I packed the pbo with the same structure, so the config file is in the root of the footer and then i have a separate folder named "pics" with the image inside... I didn't add the extension as it seems to add it automatically. I'll keep trying maybe I"ll solve it..

 

I'd like to thank everyone that helped me out thus far, really appreciate it :P

Share this post


Link to post
Share on other sites

The path needs the PBO name (minus the pbo extension) in it too, its not relative to the config file

e.g.

YOURPBO\pics\whatever_ca.paa
  • Like 1

Share this post


Link to post
Share on other sites

okay, i tried it a few ways and i'm still getting errors.

 

tried 

picture = "mags\images\9mm_ca.paa"; 

Got this error:

Picture equip\m\m_mags\images\9mm_ca.paa.paa not found 

Then tried 

picture = "\mags\images\9mm_ca.paa";  

And got this:

Picture \mags\images\9mm_ca.paa not found 

even tried

picture = "mags\mags\images\9mm_ca.paa"; 

given that there was folder called mags, got similar errors with or without the \ in front as above.

 

 

The path needs the PBO name (minus the pbo extension) in it too, its not relative to the config file

e.g.

YOURPBO\pics\whatever_ca.paa

Share this post


Link to post
Share on other sites

Is mags the full name of your PBO (i.e mags.pbo is the filename)?

Share this post


Link to post
Share on other sites

Is mags the full name of your PBO (i.e mags.pbo is the filename)?

yes thats correct.

Share this post


Link to post
Share on other sites

OK, well your original post is contradicted by some of your later posts so I'm going to need a bit of clarification in order to help further.

In your first few posts the new icon file is referenced as "9mm.paa" yet in later posts its "9mm_ca.paa" - which is it?

Also, your folder structure changes from "mags\pics\" to "mags\images" - which is it?

 

Best bet, post a screenshot of the folder with the file in and the windows nav bar (with the full path) visible...

  • Like 1

Share this post


Link to post
Share on other sites

Sorry I have been changing some of the names throughout but they give me the same error.. I'll post a screenshot of the current folder and won't change it anymore ;P

 

PBO file / Path

rvZRmin.png

 

Image file/path

sXVlY8S.png

Mags file/path

rjII8RL.png

Config file

dBkujQc.png

I appreciate all the help and the patience, Thanks

 

OK, well your original post is contradicted by some of your later posts so I'm going to need a bit of clarification in order to help further.

In your first few posts the new icon file is referenced as "9mm.paa" yet in later posts its "9mm_ca.paa" - which is it?

Also, your folder structure changes from "mags\pics\" to "mags\images" - which is it?

 

Best bet, post a screenshot of the folder with the file in and the windows nav bar (with the full path) visible...

Share this post


Link to post
Share on other sites

I've already said that we surely can help more easily and faster if you send us the original file, but visibly, you don't take care of my advices and propositions for help.

 

I let you between the hands of Jackal326. Good chance for solving your issue, don't desesperate, there's always a solution and oftenly, it's a little detail  ;)

 

EDIT : Create a new magazine class is fully functionnal on my side, I don't encounter any problem and all is good ingame.

  • Like 1

Share this post


Link to post
Share on other sites

I've already said that we surely can help more easily and faster if you send us the original file, but visibly, you don't take care of my advices and propositions for help.

 

I let you between the hands of Jackal326. Good chance for solving your issue, don't desesperate, there's always a solution and oftenly, it's a little detail  ;)

 

EDIT : Create a new magazine class is fully functionnal on my side, I don't encounter any problem and all is good ingame.

Will i send you the pbo? I understand you could fix it faster, but it's a nice learning experience if i find errors myself... But of course i don't want to waste too much time trying to figure this out when i've loads more to do regarding the mod.

Share this post


Link to post
Share on other sites

The config file is correct as it stands with regard to your file structure. The only two possibilities I can think of now are:

i) either the tool you are using to pack the PBO is for some reason omitting packing the .paa - what tool are you using to pack it?

or

ii) there is an issue with the .paa file itself (either the dimensions are not ^2 or similar) - What tool did you use to create the .paa and what are its dimensions?

Share this post


Link to post
Share on other sites

The config file is correct as it stands with regard to your file structure. The only two possibilities I can think of now are:

i) either the tool you are using to pack the PBO is for some reason omitting packing the .paa - what tool are you using to pack it?

or

ii) there is an issue with the .paa file itself (either the dimensions are not ^2 or similar) - What tool did you use to create the .paa and what are its dimensions?

1. I'm using the pbo tool that comes with arma 3 tools. (I've unpacked the pbo after and it contained the image file)

2. The size is 512 x 512, Is there a specific size needed? I used PS and then converted the TGA to PAA using the tool in Arma 3 tools

Share this post


Link to post
Share on other sites

512x512 is absolutely fine - as long as both dimensions are to the power of 2 (^2 - i.e. 16, 32, 64, 128, 256, 512, 1024 or 2048 etc.) there shouldn't be an issue. Try using TexView (within the ArmA toolset) to open the texture file (the .paa not the source TGA), just to clarify if it can be opened. If it opens fine I'm officially out of ideas - the path is correct, the file is present within the PBO and if the file opens fine, I can't think of why you're getting the error...

Share this post


Link to post
Share on other sites

512x512 is absolutely fine - as long as both dimensions are to the power of 2 (^2 - i.e. 16, 32, 64, 128, 256, 512, 1024 or 2048 etc.) there shouldn't be an issue. Try using TexView (within the ArmA toolset) to open the texture file (the .paa not the source TGA), just to clarify if it can be opened. If it opens fine I'm officially out of ideas - the path is correct, the file is present within the PBO and if the file opens fine, I can't think of why you're getting the error...

It's opening just fine in texview :(

Share this post


Link to post
Share on other sites

Just to update this thread, I finally got the image to show up.. When i used AddonBuilder to pack the pbo it worked perfectly.. Thanks for all the help.

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

×