Pasi 11 Posted December 17, 2015 Hello guys i have a problem with my model.cfg and my config... i want to drop 2 Textures on 1 model but i become only one texture on this 2 models... can anyone look over my model.cfg and my config ? i dont understand it..... config.cpp class CfgPatches { class PSNL { units[] = {"PSNL","PSNL_schildnew"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; }; class CfgVehicles { class Static; class PSNL : Static { scope = 2; model = "\PSNL\schild1.p3d"; displayName = "Schild 1"; vehicleClass = "small_items"; }; class PSNL_schildnew : PSNL { displayName = "Schild 2"; hiddenSelectionTextures[] = {"PSNL\testnew.paa"}; }; }; and my model.cfg class CfgModels { class Default { sectionsInherit = ""; sections[] = {}; skeletonName = ""; }; class PSNL : Default { sections[] = {"colour"}; }; }; class CfgSkeletons { }; also i have create a new selection named "colour" pls help me :( Share this post Link to post Share on other sites
Jackal326 1181 Posted December 17, 2015 Your model.cfg is wrong. Very wrong. You need to define 'colour' (the named selection) in the skeleton, otherwise hiddenselections wont work. Also, you need to have the model named in the cfgModels part (minus the .p3d extension). class CfgSkeletons { class Default { isDiscrete = 1; skeletonInherit = ""; skeletonBones[] = {}; }; class PSNL_Skeleton: Default { skeletonBones[]= { "colour","" }; }; }; class CfgModels { class schild1 { skeletonName="PSNL_Skeleton"; sections[]={"colour"}; sectionsInherit=""; }; }; Also, you need to actually define the hidden selections that the texture is applied to: class CfgPatches { class PSNL { units[] = {"PSNL","PSNL_schildnew"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; }; class CfgVehicles { class Static; class PSNL : Static { scope = 2; model = "\PSNL\schild1.p3d"; displayName = "Schild 1"; vehicleClass = "small_items"; }; class PSNL_schildnew : PSNL { displayName = "Schild 2"; hiddenSelections[] = {"colour"}; hiddenSelectionTextures[] = {"\PSNL\testnew.paa"}; }; }; Note: I haven't tested these, so they may or may not work. Also, the model.cfg entries may be inaccurate based entirely on what the model is actually supposed to be (your config is vague). Share this post Link to post Share on other sites
Pasi 11 Posted December 17, 2015 thank you i test it now :) Share this post Link to post Share on other sites
Pasi 11 Posted December 17, 2015 ok i have tested it and now the secound object is Invisible can you help me ? Share this post Link to post Share on other sites
Jackal326 1181 Posted December 17, 2015 Its probably the texture file. Try renaming the source file (either TGA or PNG, whichever you use) to testnew_co.tga (or png). Then convert it with TexView, the end result being a file called testnew_co.paa. You should always follow the texture naming rules. Share this post Link to post Share on other sites
Pasi 11 Posted December 17, 2015 its the same always invisible i have to test it the line with hiddenSelections[] = {"colour"}; change up to the PSNL class. now the first object is also invisible i dont think that the fault is the sourc file. this is the change class CfgPatches { class PSNL { units[] = {"PSNL","PSNL_schildnew"}; weapons[] = {}; requiredVersion = 0.1; requiredAddons[] = {}; }; }; class CfgVehicles { class Static; class PSNL : Static { scope = 2; model = "\PSNL\schild1.p3d"; displayName = "Schild 1"; vehicleClass = "small_items"; hiddenSelections[] = {"colour"}; }; class PSNL_schildnew : PSNL { displayName = "Schild 2"; hiddenSelectionTextures[] = {"\PSNL\testnew_co.paa"}; }; }; i think the named selection hide everything what i have markd in Oxygen or ? Share this post Link to post Share on other sites
Jackal326 1181 Posted December 17, 2015 hiddenSelections hides whatever selection(s) you name, but if you then define a texture with hiddenSelectionTextures the selection(s) use the textures you provided instead of being hidden. Using hiddenSelection without hiddenSelectionTextures WILL hide everything in that named selection...This is why in your latest example the first define has become invisible. The only reason I can think of for the model not showing is either the texture path you defined in your config is incorrect (i.e. the texture isn't in PNSL.pbo alongside the model), or the texture file is broken. Share this post Link to post Share on other sites
Pasi 11 Posted December 18, 2015 it dosnt work... i have change the path to the texture of the first object and the fault is the same anytime invisible. is that right in the Face Properies ? also i have remake the texture same same same :/ Share this post Link to post Share on other sites
Jackal326 1181 Posted December 18, 2015 Face properties seem absolutely fine (I've compared them against objects I know to work perfectly with setobjecttexture/hiddenselections) OK, I have something else for you to try. Place both items in the editor and in both of the objects' init field put: this setobjecttexture [0, "\PNSL\testnew_co.paa"]; If they're both invisible then, its possibly either the model.cfg or something else. If they work its the config. Also, for 'Schild 1' remove the hiddenselections entry from its class if it works without it. Share this post Link to post Share on other sites
Pasi 11 Posted December 18, 2015 ohhh man yes i have see it :D but i have the problem fixed im sooooo stupid -.- look at this ;D facepalm over 9000 false hiddenSelectionTextures[] = {"\PSNL\testnew_co.paa"}; right hiddenSelectionsTextures[] = {"\PSNL\testnew_co.paa"}; i hate this f shit ;DDDD thank you for help me thanks thanks thaks. sry guy for the circumstances Share this post Link to post Share on other sites
Tom_48_97 523 Posted December 21, 2015 Tools can help sometimes :292: Poseidon Tools: https://forums.bistudio.com/topic/155514-poseidon-advanced-text-editor-for-scripts-configs/ 2 Share this post Link to post Share on other sites