Jump to content
sheepster

Beginner question - creating a config.cpp for a retexturing project

Recommended Posts

Hello,

 

I hope I am in the right place here. I would like to make a few reskin variants for the Titus for a community I am playing in.

 

I have made the first set of .paa-files now (there are 6 files required per color) for the first color now. Having made reskins for other games, I thought this was already the hard part 😄

 

But now I am completely lost. I cannot wrap my mind around how the creation of the config.cpp is done. I have, however, found some other threads here, and some (for me incomprehensible) tutorials around the net...

 

Based on what I found, I have made this (my questions are behind the "<--"s):

class CfgPatches
{
	class sheepster_MSOGTitus
	{
		ammo[] = {};
		units[] = {};
		weapons[] = {};
		vehicles[] = {"SHEEP_MSOGTitus_01"};
		requiredVersion = 1.1; <-- which version is meant here? mine? the one from the original mod?
		requiredAddons[] = {"quin_titus"}; <-- this is what the pbo from the original mod is called
		author = "sheepster";
	};
};

class WeaponFireGun;
class WeaponCloudsGun;
class WeaponFireMGun;
class WeaponCloudsMGun;

class CfgVehicles
{
	class LandVehicle;
	class Car: LandVehicle
	{
		class HitPoints;
		class NewTurret;
	};
	class Car_F: Car <-- what is required here? is "car_f" correct?
	{
		class Turrets;
		class HitPoints;
		class EventHandlers;
		class AnimationSources;
	};
	class Offroad_01_base_F; <-- what do I have to put here?
	class Offroad_01_armed_base_F; <-- what do I have to put here?
	class C_Offroad_01_F; <-- what do I have to put here?

	class SHEEP_MSOGTitus_01: S_Titus_01_F
	{
		//INHERITS EVERYTHING THAT ISN'T OTHERWISE DEFINED BELOW FROM THE DEFAULT CIVILIAN OFFROAD
		author = "sheepster"; 
		displayName = "MSOG Titus"; // the name it should appear as in the editor
		hiddenSelections[] = {"?????","?????"}; <-- what do I have to put here/where can i find these names? How do i find out which of the .paa-textures goes on which selection?
		hiddenSelectionsTextures[] = {"\MSOG_Titus_Reskin\grey\karoserie1_grey.paa","\MSOG_Titus_Reskin\grey\karoserie2_grey.paa","\MSOG_Titus_Reskin\grey\karoserie3_grey.paa","\MSOG_Titus_Reskin\grey\arx20_grey.paa","\MSOG_Titus_Reskin\grey\interier1_grey.paa","\MSOG Titus\MSOG_Titus_Reskin\grey\interier2_grey.paa"}; <-- I made the first color which is in a subfolder "grey" within my folder "MSOG_Titus_Reskin"
	};	
};

 

 

For the question about "which texture goes on which selection", maybe this helps - it is the script I used to try the skin in the editor:

titus setObjectTexture [0, "karoserie1_grey.jpg"];
titus setObjectTexture [1, "karoserie2_grey.jpg"];
titus setObjectTexture [2, "karoserie3_grey.jpg"];
titus setObjectTexture [3, "arx20_grey.jpg"];
titus setObjectTexture [4, "interier1_grey.jpg"];
titus setObjectTexture [5, "interier2_grey.jpg"];

 

 

And this is my folder tree for the folder "MSOG_Titus_Reskin":

MSOG_Titus_Reskin
│   config.cpp
│
└───grey
        arx20_grey.paa
        interier1_grey.paa
        interier2_grey.paa
        karoserie1_grey.paa
        karoserie2_grey.paa
        karoserie3_grey.paa

 

Can some of you give me some pointers how to proceed further? Also, what modifications do I have to make if I want to add a few more color options to my retexture?

 

One additional question: Since the author of the original Titus-mod allows retextures if his mod is kept as a dependency: is that dependency created/registered by the game automatically, based on the following line?

 

requiredAddons[] = {"quin_titus"};

Or do I have to put in something in addition to that?

 

 

Thanks and have a nice weekend everyone!

 

sheepster

Share this post


Link to post
Share on other sites
Posted (edited)

requiredAddons needs the cfgPatches name of any other config that you're inheriting from, not the pbo name (unless they're identical to each other). When done right this will prevent your mod from working if the parent mod is not also working. It might even prevent you from loading the game at all, if I remember correctly.

 

hiddenSelections[] = , you need to find what the hiddenSelections are from the original config. It tells the hiddenSelectionsTextures line what goes where and in what order. What does the config from the Titus have for that? 

 

Try to get that working before you move on to get some of your other questions answered.

 

 

 

 

Edited by BadHabitz
added info

Share this post


Link to post
Share on other sites

Ok, so in the original mod I can only find a "config.bin", not a .cpp.

 

How do I get that opened? Or am I looking in the wrong place?

Share this post


Link to post
Share on other sites
On 8/4/2019 at 11:53 AM, sheepster said:

Ok, so in the original mod I can only find a "config.bin", not a .cpp.

 

How do I get that opened? Or am I looking in the wrong place?

Arma 3 tools has a tool called CfgConvert to "debinarize" the config.bin into a normal readable config.cpp

Share this post


Link to post
Share on other sites

Big Edit: sooo .... after a few "shower-thoughts" and an approach of not over-optimizing my code on my first ever project, I actually made it! I created a working mod-file! (It only throws one little error message right now, but I will try to polish that out on my own of course, before asking further questions.)

 

Thanks guys for your help and the push in the right direction! 🙂

Share this post


Link to post
Share on other sites

Okay, so I have one remaining question right now:

 

How do I get my vehicles to show up in the virtual garage?

I have now put things together so that the vehicles show up as individual Vehicles in the editor, so I can place them and choose my different skins on them there, but in the garage they are not in the vehicle list.

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

×