Jump to content
KokaKolaA3

costum costumizable Licenseplates (Hiddeselections)

Recommended Posts

Hey, 

I made a 3D model of a licenseplate and now I want to be able to costumize it ingame.

I've made the basic plate and 7 small plates in front of it for the numbers/letters. My idea was to make hiddenselections for those small plates, so I can apply a previously made texture to it whenever I want.

I also made a texture for all letters A-Z, Numbers 0-9 and others -/emtpy. 

 

I made named selections for the small plates in O2 and called them "first" to "seventh".

But when I try to apply a texture, nothing happens. This is my config:

 
class CfgPatches
{
class kka3_licenseplate
{
     units[] = {};
     weapons[] = {};
     requiredVersion = 0.1;
     requiredAddons[] = {};
};
};
 
class CfgVehicles
{   
class Static;
class kka3_licenseplate_F : Static
{
     scope = 2;
     model = "\kka3_licenseplate\kka3_licenseplate.p3d";
     displayName = "KKA3 License Plate";
     faction = "Empty";
     vehicleClass = "Small_items";
 
        hiddenSelections[]={"first","second","third","fourth","fifth","sixth","seventh"};
        hiddenSelectionsTextures[] =
        {   
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa"
        };
};
 
    class kka3_licenseplate_Kola : kka3_licenseplate_F
{
     scope = 2;
     displayName = "KKA3 License Plate (Kola)";
        model = "\kka3_licenseplate\kka3_licenseplate.p3d";
 
        hiddenSelections[]={"first","second","third","fourth","fifth","sixth","seventh"};
        hiddenSelectionsTextures[] =
        {   
        "\kka3_licenseplate\data\licenseplate_number_K.paa",
        "\kka3_licenseplate\data\licenseplate_number_0.paa",
        "\kka3_licenseplate\data\licenseplate_number_L.paa",
        "\kka3_licenseplate\data\licenseplate_number_A.paa",
        "\kka3_licenseplate\data\licenseplate_number_-.paa",
        "\kka3_licenseplate\data\licenseplate_number_5.paa",
        "\kka3_licenseplate\data\licenseplate_number_8.paa"
        };
};
 
    class kka3_licenseplate_Custom : kka3_licenseplate_F
{
     scope = 2;
     displayName = "KKA3 License Plate (Custom)";
        model = "\kka3_licenseplate\kka3_licenseplate.p3d";
 
        hiddenSelections[]={"first","second","third","fourth","fifth","sixth","seventh"};
        hiddenSelectionsTextures[] =
        {   
        "\kka3_licenseplate\data\licenseplate_number_C.paa",
        "\kka3_licenseplate\data\licenseplate_number_U.paa",
        "\kka3_licenseplate\data\licenseplate_number_S.paa",
        "\kka3_licenseplate\data\licenseplate_number_T.paa",
        "\kka3_licenseplate\data\licenseplate_number_O.paa",
        "\kka3_licenseplate\data\licenseplate_number_M.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa"
        };
};
};

 

And this is my model.cfg:

 
class CfgSkeletons {
 
    class Default {
        isDiscrete = 1;
        skeletonInherit = "";
        skeletonBones[] = {};
    };
    class kka3_licenseplate_skeleton : Default
    {
        isDiscrete=1;
        skeletonInherit="";
        skeletonBones[]=
        {
            "first","";
            "second","";
            "third","";
            "fourth","";
            "fifth","";
            "sixth","";
            "seventh","";
        };
    };
 
};
 
class CfgModels
{
    class Default{};
    class kka3_licenseplate: Default{}
    {
        sections[]= 
        {
            "first","";
            "second","";
            "third","";
            "fourth","";
            "fifth","";
            "sixth","";
            "seventh","";
        };
    };
};

 

Anyone has an idea why it's not working?

 

 

Btw this is what it looks like (This texture is applied in O2 directly)

?interpolation=lanczos-none&output-forma

  • Like 1

Share this post


Link to post
Share on other sites

You have a bunch of semicolon ; in your skeletonBones[]= and sections[]= arrays that should not be there. They're array values, not class parameters.

 

Items in the skeletonBones[] array are in pairs (second entry in each pair defines the parent for the previously named bone), and all values are separated by commas , only. No semicolons until you close the array with };
 

skeletonBones[]=
{
	"Bone1","",
	"Bone2","",
	"Bone3","",
	...
	"BoneN",""
};

Items in the sections[] array do no need to be in pairs, so you can get rid of all the blank "" entries.

Should be a simple list of values.

sections[]={"section1", "section2", "section3", ... "sectionN"};

 

  • Like 1

Share this post


Link to post
Share on other sites
47 minutes ago, da12thMonkey said:

You have a bunch of semicolon ; in your skeletonBones[]= and sections[]= arrays that should not be there. They're array values, not class parameters.

 

Items in the skeletonBones[] array are in pairs (second entry in each pair defines the parent for the previously named bone), and all values are separated by commas , only. No semicolons until you close the array with };
 


skeletonBones[]=
{
	"Bone1","",
	"Bone2","",
	"Bone3","",
	...
	"BoneN",""
};

Items in the sections[] array do no need to be in pairs, so you can get rid of all the blank "" entries.

Should be a simple list of values.


sections[]={"section1", "section2", "section3", ... "sectionN"};

 

 

I adjusted my config but it still doesn't work, this is what it looks like now:

 
class CfgPatches
{
class kka3_licenseplate
{
     units[] = {};
     weapons[] = {};
     requiredVersion = 0.1;
     requiredAddons[] = {};
};
};
 
class CfgVehicles
{   
class Static;
class kka3_licenseplate_F : Static
{
     scope = 2;
     model = "\kka3_licenseplate\licenseplate.p3d";
     displayName = "KKA3 License Plate";
     faction = "Empty";
     vehicleClass = "Small_items";
 
        hiddenSelections[]={"first1","second2","third3","fourth4","fifth5","sixth6","seventh7"};
        hiddenSelectionsTextures[] =
        {   
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa"
        };
};
 
    class kka3_licenseplate_Custom : kka3_licenseplate_F
{
     scope = 2;
     displayName = "KKA3 License Plate (Custom)";
        model = "\kka3_licenseplate\licenseplate.p3d";
 
        hiddenSelections[]={"first1","second2","third3","fourth4","fifth5","sixth6","seventh7"};
        hiddenSelectionsTextures[] =
        {   
        "\kka3_licenseplate\data\licenseplate_number_C.paa",
        "\kka3_licenseplate\data\licenseplate_number_U.paa",
        "\kka3_licenseplate\data\licenseplate_number_S.paa",
        "\kka3_licenseplate\data\licenseplate_number_T.paa",
        "\kka3_licenseplate\data\licenseplate_number_O.paa",
        "\kka3_licenseplate\data\licenseplate_number_M.paa",
        "\kka3_licenseplate\data\licenseplate_number_empty.paa"
        };
};
};

 

model.cfg

 
class CfgSkeletons {
 
    class Default {
        isDiscrete = 1;
        skeletonInherit = "";
        skeletonBones[] = {};
    };
    class licenseplate_skeleton : Default
    {
        isDiscrete=1;
        skeletonInherit="";
        skeletonBones[]=
{
           "first1","",
            "second2","",
            "third3","",
            "fourth4","",
            "fifth5","",
            "sixth6","",
            "seventh7",""
};
    };
 
};
 
class CfgModels
{
    class Default{};
    class licenseplate: Default{}
    {
        sections[]={"first1","second2","third3","fourth4","fifth5","sixth6","seventh7"};
    };
};

Share this post


Link to post
Share on other sites

try to give your model.cfg same name as your p3d

my_plate.p3d
my_plate.cfg

 

Share this post


Link to post
Share on other sites
5 hours ago, zgmrvn said:

try to give your model.cfg the same name as your p3d


my_plate.p3d
my_plate.cfg

 

Still doesn't work... nothing changes

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

×