Jump to content
Sign in to follow this  
ArcherGR

FAIL - Retexture Addon

Recommended Posts

Hey guys .. I've made an addon retexturing the independent's basic clothing/uniform . Before making the .pbo and stuff i checked it in the editor with the command

this setObjectTexture [0, "texture.paa"]

, and the texture worked just fine ( on an independent soldier ) ..

Well, I packed it into .pbo and loaded it in the game . I chose the uniform from a VAS loaded into the mission and the texture just looks messed up , it's like it was placed the wrong way or something , everything is misplaced.

I'm nearly certain the problem lies in my config.cpp here it is :

enum {
    //  = 2,    // Error parsing: Empty enum name
   DESTRUCTENGINE = 2,
   DESTRUCTDEFAULT = 6,
   DESTRUCTWRECK = 7,
   DESTRUCTTREE = 3,
   DESTRUCTTENT = 4,
   STABILIZEDINAXISX = 1,
   STABILIZEDINAXESXYZ = 4,
   STABILIZEDINAXISY = 2,
   STABILIZEDINAXESBOTH = 3,
   DESTRUCTNO = 0,
   STABILIZEDINAXESNONE = 0,
   DESTRUCTMAN = 5,
   DESTRUCTBUILDING = 1,
};

class CfgPatches {
   class Indep_Greek_Soldier {//SPECIFY class name of mod
       units[] = {};
       weapons[] = {};
       requiredVersion = 0.1;
       requiredAddons[] = {"A3_Characters_F_BLUFOR"};
   };
};

class CfgVehicles {

   class B_Soldier_base_F;//Base class used 

   class Indep_Greek_Clothing /*<--SPECIFY class Name of this soldier*/ : B_Soldier_base_F {
       _generalMacro = "B_Soldier_F"; //unsure what this does
       scope = 2;
       displayName = "Greek Soldier";
       nakedUniform = "U_BasicBody"; //class for "naked" body
       uniformClass = "Indep_Greek_Uniform"; //SPECIFY class name for the uniform used below ln.47
       hiddenSelections[] = {"Camo"};//SPECIFY which part you want to change
       hiddenSelectionsTextures[] = {"C:\Users\George\Documents\ArmAWork\indepgreek\template\clothing_soldier\paa's_png's\indep_greek_template.paa"};//SPECIFY path to .paa
   };

};

class cfgWeapons {
   class Uniform_Base;
   class UniformItem;

   class Indep_Greek_Uniform /*SPECIFY uniform a class name from above*/ : Uniform_Base {
       scope = 2;
       displayName = "Greek Soldier Uniform";
       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 = "Indep_Greek_Clothing"; //would be same as our made soldier class
           containerClass = "Supply20"; //how much it can carry
           mass = 85; //how much it weights
       };
   };
};

My second thought is that the image might just need some rotating around ..... but

1) It worked in the editor and

2)The placing of the parts ( which seems to be the problem ) is in complete matching between the original ****_co.paa file and my file

Any leads ??? Thanks in advance !

Share this post


Link to post
Share on other sites

You texture path isn't exactly right. You do need to define the texture path, just not in the way you're thinking. The texture path refers to the location of the texture within the addon's pbo. Both files must be within the same directory, so that when the addon is compiled, the engine will read the texture path from the config file relative to the file structure within the pbo.

Let's say I have a mod I'm making. I make a new folder called my_soldier and place my config file in there. Now within that folder, I make a new folder called textures, and place my texture in there. The config file will reference the texture file like this:

hiddenSelectionsTextures[] = {\my_soldier\textures\my_texture.paa};

Share this post


Link to post
Share on other sites
You texture path isn't exactly right. You do need to define the texture path, just not in the way you're thinking. The texture path refers to the location of the texture within the addon's pbo. Both files must be within the same directory, so that when the addon is compiled, the engine will read the texture path from the config file relative to the file structure within the pbo.

First of all thanks for the help you're providing !!

Yep, I admit I was a bit unorthodox with my path specification as I had already made the \{mod_name}\Data folder in which I placed my texture . So as you suggested I changed my path to be relative to the .pbo , so i changed it to \{mod_name}\Data\my_texture.paa . The result was exactly the same as before ( I was expecting that because the previous path had no problem at all, meaning that the file mentioned in the config was found although not relative to the .pbo structure, I mean it didn't give any problems like " my_texture.paa not found" ....)

Don't forget that the main problem is the misplacement of the actual texture with respect to the uniform ( meaning that gloves etc etc are not where they're supposed to be )

So I have in mind what would be the problem :

I'm trying to make an independent uniform so I took the independent's original uniform as my template. I suspect, I'm trying to fit a uniform on a soldier it would not fit..... check this out

requiredAddons[] = {"A3_Characters_F_BLUFOR"};

:confused: my instinct says no!

But I've failed once again because changing it to

requiredAddons[] = {"A3_Characters_F_Beta"};

or anything that would "indicate" I'm referring to an Indep unit FAILED!

Requesting Backup, in deep confusion !!

Share this post


Link to post
Share on other sites

Looks like you are inheriting model = "\A3\characters_F\BLUFOR\b_soldier_01.p3d"; from B_Soldier_base_F, try adding model = "\A3\Characters_F_Beta\INDEP\ia_soldier_01.p3d"; or model = "\A3\Characters_F_Beta\INDEP\ia_soldier_02.p3d"; to your unit.

Share this post


Link to post
Share on other sites
Looks like you are inheriting model = "\A3\characters_F\BLUFOR\b_soldier_01.p3d"; from B_Soldier_base_F, try adding model = "\A3\Characters_F_Beta\INDEP\ia_soldier_01.p3d"; or model = "\A3\Characters_F_Beta\INDEP\ia_soldier_02.p3d"; to your unit.

Ok this seems spot on, were getting there ! But I don't exactly understand what I should do :rolleyes: .

Right now I'm creating the .pbo from a folder which has the structure \filename\Data\ with one .paa file ( my texture ) and the config in \filename\config.cpp

Questions:

1)So you're saying that i should replace this line on the config :

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

with one of the ones you suggested above ?

2)Should I keep the

requiredAddons[] = {"A3_Characters_F_Beta"};

?

EDIT: Ok I figured it out! I replaced B_Soldier_base_F; with I_Soldier_base_F; which are the base models for the Indep

Once again thanks Tholozor and Surpher for your help (my problems are not over but that's one big obstacle less, I'll probably make a new thread for the other one)

Edited by ArcherGR
Solved

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  

×