Jump to content
Sign in to follow this  
dirtynorf

Cannot Load Texture - Config Problem

Recommended Posts

I am trying to retexture and everytime I place down the unit it throws up the "Cannot Load texture" error. I have tried multiple different path names to try and get it to work but to no avail.

 

Uniform class in cfgWeapons.hpp

class ddrf_uni_wood : UniformBase
{
	author = "DirtyDwarf";
    scope = 2;
    displayName = "K15 Woodland;
    picture = "\A3\characters_f\data\ui\icon_u_b_soldier_new_ca.paa";
    model = "\A3\Characters_F\Common\Suitpacks\suitpack_original_F.p3d";
    hiddenSelections[] = {"camo"};
    hiddenSelectionsTextures[] = {"ddrf_kanish_army\Data\Wood_Uniform.paa"};
 
    class ItemInfo: UniformItem
    {
        uniformModel = "-";
        uniformClass = ddrf_wood_rifleman;
        containerClass = Supply60;
        mass = 50;
    };
};

Soldier class in cfgVehicles.hpp

class ddrf_wood_rifleman : B_Soldier_F
{
	author = "DirtyDwarf";         // The name of the author of the asset, which is displayed in the editor.
	scope = 2;                          // 2 = class is available in the editor; 1 = class is unavailable in the editor, but can be accessed via a macro; 0 = class is unavailable (and used for inheritance only).
	scopeCurator = 2;                   // 2 = class is available in Zeus; 0 = class is unavailable in Zeus.
	scopeArsenal = 2;                   // 2 = class is available in the Virtual Arsenal; 0 = class is unavailable in the Virtual Arsenal.
	identityTypes[] =  {"LanguageENG_F","Head_NATO","G_NATO_default"};        // Identity Types are explained in the Headgear section of this guide.
	displayName = "Rifleman (Wood)";        // The name of the soldier, which is displayed in the editor.
	faction = "ddrf_kanish_army_faction";
	cost = 200000;                      // How likely the enemies attack this character among some others.
	camouflage = 1.5;                   // How likely this character is spotted (smaller number = more stealthy).
	sensitivity = 2.5;                  // How likely this character spots enemies when controlled by AI.
	threat[] = {1, 1, 0.8};             // Multiplier of the cost of the character in the eyes of soft, armoured and air enemies.
	model = "\A3\Characters_F\BLUFOR\b_soldier_01.p3d";        // The path to the model this character uses.
	uniformClass = "ddrf_uni_wood";                          // This links this soldier to a particular uniform. For the details, see below.
	hiddenSelections[] = {"camo"};                             // List of model selections which can be changed with hiddenSelectionTextures[] and hiddenSelectionMaterials[] properties. If empty, model textures are used.
	hiddenSelectionsTextures[] = {"ddrf_kanish_army\Data\Wood_Uniform.paa"};        // The textures for the selections defined above. If empty, no texture is used.
	canDeactivateMines = true;              // Can this character deactivate mines?
	engineer = false;                        // Can this character repair vehicles?
	attendant = 0;                          // Can this character heal soldiers?
	icon = "iconManEngineer";               // If a character has a special role, a special icon shall be used.
	picture = "pictureRifleman";              // The same as above, but for the squad picture.
	backpack = "B_Kitbag_mcamo_Eng";        // Which backpack the character is wearing.
	weapons[] = {arifle_MX_ACO_pointer_F, hgun_P07_F, Throw, Put};               // Which weapons the character has.
	respawnWeapons[] = {arifle_MX_ACO_pointer_F, hgun_P07_F, Throw, Put};        // Which weapons the character respawns with.
	Items[] = {FirstAidKit};                // Which items the character has.
	RespawnItems[] = {FirstAidKit};         // Which items the character respawns with.
	magazines[] = {mag_10(30Rnd_65x39_caseless_mag),mag_3(16Rnd_9x21_Mag), SmokeShell, SmokeShellGreen, Chemlight_green, Chemlight_green, mag_2(HandGrenade)};               // What ammunition the character has.
	respawnMagazines[] = {mag_10(30Rnd_65x39_caseless_mag),mag_3(16Rnd_9x21_Mag), SmokeShell, SmokeShellGreen, Chemlight_green, Chemlight_green ,mag_2(HandGrenade)};        // What ammunition the character respawns with.
	linkedItems[] = {V_PlateCarrier1_rgr, H_HelmetB, ItemMap, ItemCompass, ItemWatch, ItemRadio, NVGoggles};               // Which items the character has.
	respawnLinkedItems[] = {V_PlateCarrier1_rgr, H_HelmetB, ItemMap, ItemCompass, ItemWatch, ItemRadio, NVGoggles};        // Which items the character respawns with.
};

I've tried following different tutorials almost exactly but that hasn't helped either. I just have no idea what the problem is.

 

EDIT: my pbo folder is ddrf_kanish_army\ddrf_kanish_army\Data\texture.paa with the config.cpp and includes inside the second ddrf folder.

Share this post


Link to post
Share on other sites


class CfgPatches

{

class modname

{

units[] = {};

weapons[] = {};

icon = "path to icon paa";

requiredVersion = 0.1;

requiredAddons[] = {"A3_Characters_F","A3_Characters_F_INDEP","A3_Characters_F_BLUFOR","A3_Weapons_F"};

};

};

class CfgFactionClasses

{

class TF2031_units

{

displayName = "mod name";

icon = "icon path";

priority = 1;

side = 1;

};

};

class CfgVehicleClasses

{

class mod_units

{

displayName = "mod name";

};

};

class B_AssaultPack_Kerry;

class Bag_Base;

class CfgVehicles

{

class B_Soldier_base_F;

class I_Soldier_base_F;

class classname_F: B_Soldier_base_F

{

_generalMacro = "B_Soldier_F";

scope = 2;

displayName = "name of unit";

nakedUniform = "U_BasicBody";

uniformClass = "same as class below";

hiddenSelections[] = {"Camo","Insignia"};

hiddenSelectionsTextures[] = {"texture path"};

linkedItems[] = {};

respawnLinkedItems[] = {};

weapons[] = {};};

magazines[] = {};

respawnMagazines[] = {};

};

};


class cfgWeapons

{

class Uniform_Base;

class UniformItem;

class uniform class: Uniform_Base

{

scope = 2;

displayName = "uniform name";

picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa";

model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";

class ItemInfo: UniformItem

{

uniformModel = "-";

uniformClass = "same name as above unit class";

containerClass = "Supply80";

mass = 80;

};

};

};

Share this post


Link to post
Share on other sites

Thanks but all you've posted is a shorter version of what I've got. The problem still occurs.

 

Any help still?

 

Update: I can load the texture using setObjectTexture in a mission file but I still cannot get it to load from an addon?

Share this post


Link to post
Share on other sites

If

 

 

EDIT: my pbo folder is ddrf_kanish_army\ddrf_kanish_army\Data\texture.paa

is correct, then your

hiddenSelectionsTextures[] = {"ddrf_kanish_army\Data\Wood_Uniform.paa"};

should be

hiddenSelectionsTextures[] = {"ddrf_kanish_army\ddrf_kanish_army\Data\Wood_Uniform.paa"};

or did you epic-typo-fail?

Share this post


Link to post
Share on other sites

If

is correct, then your

hiddenSelectionsTextures[] = {"ddrf_kanish_army\Data\Wood_Uniform.paa"};

should be

hiddenSelectionsTextures[] = {"ddrf_kanish_army\ddrf_kanish_army\Data\Wood_Uniform.paa"};

or did you epic-typo-fail?

At the time I was trying it out like that. I have tried with both folders included, I've depbo'd mod's that work and everything of mine seems to be the same but obviously it isn't because mine doesn't work. As I say I can put the texture on someone using the script command in a mission but not from an addon.

Share this post


Link to post
Share on other sites

Also, it probably wont help fix your problem but use he correct texture naming conventions when converting your textures in TexView, it pains me to see the naming conventions not being used. e.g. Wood_Uniform_co.paa

Share this post


Link to post
Share on other sites

Also, it probably wont help fix your problem but use he correct texture naming conventions when converting your textures in TexView, it pains me to see the naming conventions not being used. e.g. Wood_Uniform_co.paa

Whilst I can't get the config working I am re-doing the texture that is named properly already.

 

But any thoughts on my problem? If I can't get textures on units then the whole addon falls apart.

Share this post


Link to post
Share on other sites
	hiddenSelections[] = {"Camo"};
	hiddenSelectionsTextures[] = {"\ddrf_kanish_army\Data\Wood_Uniform.paa"};

Only needs to appear in the cfgVehicles entry (i.e. the Unit define, not the Uniform define). Make sure you add the '\' to the beginning (as above). I also capitalised the C in 'Camo' just in case the selection names are case-sensitive.

 

Just to clarify, your pbo is called 'ddrf_kanish_army.pbo' and in that folder you have a Data folder right? i.e.

ddrf_kanish_army > data > texturefileishere

and not 

ddrf_kanish_army > ddrf_kanish_army > data > texturefileishere

Share this post


Link to post
Share on other sites
	hiddenSelections[] = {"Camo"};
	hiddenSelectionsTextures[] = {"\ddrf_kanish_army\Data\Wood_Uniform.paa"};

Only needs to appear in the cfgVehicles entry (i.e. the Unit define, not the Uniform define). Make sure you add the '\' to the beginning (as above). I also capitalised the C in 'Camo' just in case the selection names are case-sensitive.

 

Just to clarify, your pbo is called 'ddrf_kanish_army.pbo' and in that folder you have a Data folder right? i.e.

ddrf_kanish_army > data > texturefileishere

and not 

ddrf_kanish_army > ddrf_kanish_army > data > texturefileishere

You keep suggesting things I've already fixed so I'll post the updated files.

 

cfgVehicles.hpp

//===============================================================
//notes Class Parent Names
class B_Soldier_F;
class UniformItem;

//===============================================================
//notes Custom Classes (Uniforms)
class ddrf_wood_rifleman : B_Soldier_F
{
	_generalMacro = "ddrf_wood_rifleman";
	scope = 2;
	displayName = "Rifleman";
	faction = "ddrf_kanish_army_faction";
	vehicleClass = "ddrf_kanish_army_wood";
	nakedUniform = "U_BasicBody";
	uniformClass = "ddrf_uni_wood";
	hiddenSelections[] = {"Camo","Insignia"};
	hiddenSelectionsTextures[] = {"ddrf_kanish_army\ddrf_kanish_army\data\wood_uniform.paa"};
	linkedItems[] = {};
	respawnLinkedItems[] = {};
	weapons[] = {};
	magazines[] = {};
	respawnMagazines[] = {};
};

cfgWeapons.hpp

//===============================================================
//notes Class Parent Names
class B_Soldier_F;
class UniformItem;
class Uniform_Base;
class ItemInfo;

//===============================================================
//notes Custom Classes (Uniforms)
class ddrf_uni_wood : Uniform_Base
{
	scope = 2;
	displayName = "K15 Woodland";
	picture = "\A3\characters_f\data\ui\icon_U_B_CombatUniform_mcam_ca.paa";
	model = "\A3\Characters_F\Common\Suitpacks\suitpack_blufor_diver";
	class ItemInfo: UniformItem
	{
		uniformModel = "-";
		uniformClass = "ddrf_wood_rifleman";
		containerClass = "Supply80";
		mass = 55;
	};
};

Folder systems:

ddrf_kanish_army (pbo) > ddrf_kanish_army > data > Wood_Uniform.paa

Share this post


Link to post
Share on other sites

 

You keep suggesting things I've already fixed...

Apart from the '\' prefixing the PBO path, which you haven't fixed.

    hiddenSelectionsTextures[] = {"\ddrf_kanish_army\ddrf_kanish_army\data\wood_uniform.paa"};

Share this post


Link to post
Share on other sites

Apart from the '\' prefixing the PBO path, which you haven't fixed.

    hiddenSelectionsTextures[] = {"\ddrf_kanish_army\ddrf_kanish_army\data\wood_uniform.paa"};

Still doesn't work.

Share this post


Link to post
Share on other sites

Would you mind posting a clean RPT file (with just your units and any required mods e.g. weapons/whatever running). Then try loading the unit so the error appears. Just so I can get a clearer picture if anything else is going on.

Share this post


Link to post
Share on other sites

Would you mind posting a clean RPT file (with just your units and any required mods e.g. weapons/whatever running). Then try loading the unit so the error appears. Just so I can get a clearer picture if anything else is going on.

RPT? I tried it with one of the default textures and that worked fine, no issues. The error is:

 

"Cannot load texture ddrf_kanish_army\ddrf_kanish_army\data\Wood_Uniform.paa"

Share this post


Link to post
Share on other sites

Also you need to have the full path from your P drive to the texture. I was having similar issues and that fixed it.For example I used to have my mod texture path as mod_name/sub_mod/data/textures/item.paa Now I have to use /projects/mod_name/sub_mod/data/textures/item.paa

Share this post


Link to post
Share on other sites

Also you need to have the full path from your P drive to the texture. I was having similar issues and that fixed it.For example I used to have my mod texture path as mod_name/sub_mod/data/textures/item.paa Now I have to use /projects/mod_name/sub_mod/data/textures/item.paa

P drive? How would that work when it's shared out?

 

I also tried it from my P drive and that still didn't work. This is confusing the hell out of me.

Share this post


Link to post
Share on other sites

what program did you use to "create" your new texture, and what did you save it as for texview to convert it to a .paa file?

 

Was your new texture showing up in O2 when you were testing it?

 

I had similar issues and all it took was to rename the texture in the "data" folder, keep the texture names simple as well.

Share this post


Link to post
Share on other sites

what program did you use to "create" your new texture, and what did you save it as for texview to convert it to a .paa file?

 

Was your new texture showing up in O2 when you were testing it?

 

I had similar issues and all it took was to rename the texture in the "data" folder, keep the texture names simple as well.

I used photoshop to make it into a png and then TexView into .paa

I never use O2 because it crashes before it opens.

I've checked the name about 9 times so unless I'm being really dumb I'm sure it's not the name.

Share this post


Link to post
Share on other sites

I used photoshop to make it into a png and then TexView into .paa

I never use O2 because it crashes before it opens.

I've checked the name about 9 times so unless I'm being really dumb I'm sure it's not the name.

Your P:\ drive and overall tools setup sounds FUBAR. Depending on what tool you're using to pack the PBO it could be related.

Share this post


Link to post
Share on other sites

Your P:\ drive and overall tools setup sounds FUBAR. Depending on what tool you're using to pack the PBO it could be related.

I'm using Arma Tools Addon Builder. I might try reinstalling it.

 

So I found out that it would crash because I tried opening binarized default BIS models. But that means i cannot view my texture in oxygen as I cannot open the default model. However, I have used setObjectTexture in a mission and the texture does in fact work.

Share this post


Link to post
Share on other sites

So I found out that it would crash because I tried opening binarized default BIS models. But that means i cannot view my texture in oxygen as I cannot open the default model. However, I have used setObjectTexture in a mission and the texture does in fact work.

Awesome. So we can most certainly rule out the texture being the issue (or at least the file itself anyway). Did you path to the texture in the PBO when you used setobjecttexture, or did you just put it in the mission folder and do it that way? I ask only because it may be an issue with the packing process of the addon pbo (e.g. it not packing the texture(s) properly for some random reason).

Share this post


Link to post
Share on other sites

Awesome. So we can most certainly rule out the texture being the issue (or at least the file itself anyway). Did you path to the texture in the PBO when you used setobjecttexture, or did you just put it in the mission folder and do it that way? I ask only because it may be an issue with the packing process of the addon pbo (e.g. it not packing the texture(s) properly for some random reason).

It was in a mission folder. I packed and then depbo'd the file and the textures seem to be in the right place. Should I be checking "Binarize all textures" on Addon builder?

 

Edit: I tried checking that box but that didn't help.

Share this post


Link to post
Share on other sites

To be honest I've never really used addon builder and instead solely use Mikero's tools. I've never experienced any issues with Mikero's tool suite, but have had several issues with Addon Builder - hence why I avoid using it.

Share this post


Link to post
Share on other sites

To be honest I've never really used addon builder and instead solely use Mikero's tools. I've never experienced any issues with Mikero's tool suite, but have had several issues with Addon Builder - hence why I avoid using it.

Maybe i'll give it a go then.

 

So using Mikero's I fixed a few errors it through up the first time around which I got rid of using the full P:\ path but nope still get the same "cannot load error".

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  

×