Jump to content
Sign in to follow this  
bad benson

hiddenselections replacement config

Recommended Posts

i'm trying to add some hiddenselections to an existing unit. the selection names i'm using for testing are common and should be present in every human model. for some reason it doesn't work. i have not much experience with this so maybe someone else can spot a problem in my config or provide an explaination why this might not work.

#define _ARMA_

class DefaultEventhandlers;
class CfgPatches
{
       class babe_A3_Characters_F_BLUFOR
       {
               units[] = {};
               weapons[] = {};
               requiredVersion = 0.1;
               requiredAddons[] = {"A3_Characters_F","A3_Characters_F_BLUFOR"};
       };
};

class CfgVehicles
{
       class B_Soldier_base_F;
       class B_Helipilot_F: B_Soldier_base_F
       {
               hiddenSelections[] = {"Camo","injury_hands","injury_body","injury_legs"};
       };
};

Share this post


Link to post
Share on other sites

Don't quote me on this, but I think you must define hidden selection as a selection in the model as well as defining it in the model.cfg, so unless both of them have already been done you will not be able to add new ones to existing models.

Share this post


Link to post
Share on other sites

that's what i meant by this.

the selection names i'm using for testing are common and should be present in every human model.

besides i was checking the config entry ingame. it should have them added even, if they aren't inside the model.cfg. they just wouldn't work. all i want to do is basically change the array in the config. the rest i know how to do.

but thx for the answer anyways.

Share this post


Link to post
Share on other sites

I only do vehicles but I assume the same rules apply .....

"B_Helipilot_F" is a vanilla unt

	hiddenSelections[] = {"Camo"};
	hiddenSelectionsTextures[] = {"\A3\Characters_F\Common\Data\coveralls_sage_co.paa"};

I don't think you can overwrite an existing unit.

Have you tried making your own derivative class?

Share this post


Link to post
Share on other sites

are you saying, if i change the hiddenselections that i need a hiddenselectionsTextures entry too?

because i'm not trying to change the textures. i'm trying to use the injury selections of the model and turn them into hiddenselections to make dismemberment for explosion damage via setobjecttexture [x, ""].

Share this post


Link to post
Share on other sites

He meant that you need to inherit from the B_Helipilot_F class I guess (you are writing on top of it atm and there must be a conflict when the game launches between the Helicopter pilot in your addon ). So you need to make your own class:

...class My_B_Helipilot_F: B_Helipilot_F {...};

With your code, my guess is that the game launch randomly one of the addons (either the BIS helicopter pilot either yours) and that the original one has the priority, so that you have the hidden selection gnat wrote ( hiddenSelections[] = {"Camo"}; ) and not the 2 others. So you would be able to hide only the torso.

Edited by super-truite

Share this post


Link to post
Share on other sites

sorry gnat. i was tired and didn't even really read your post. what i don't understand is, how can you make a replacement config that replaces the model path property but not one that replaces the hiddenselection one. i mean there are lots of replacement configs out there. makes no sense to me. but i guess certain properties are locked down or something. yet another unnecessary limitation that makes one of my projects impossible :(

With your code, my guess is that the game launch randomly one of the addons (either the BIS helicopter pilot either yours) and that the original one has the priority, so that you have the hidden selection gnat wrote ( hiddenSelections[] = {"Camo"}; ) and not the 2 others. So you would be able to hide only the torso.

i always thought that addons load after the game pbos. that's why replacement packs work.

Share this post


Link to post
Share on other sites

Hmm, you are probably right. It would be nice to understand what can be overwritten and what cannot...But did you try your texture replacement with a custom unit class as proposed by gnat? Just to be sure there is nothing else fishy going on, like selection names that have been changed since the release of the character samples or what not.

Share this post


Link to post
Share on other sites

that's a good idea. i will try that. the thing is though that no matter if the selections are present, the addon should only edit an array inside the config. if that array is functional is another story. i've been checking ingame and the array was still the same. but i should try it. the thing is that an inherited unit won't help me much since i'm trying to globally add gore effects for all vanilla units.

anyways. i'll try and report back.

Share this post


Link to post
Share on other sites

To Supers' point, prove that it can work in a copied class unit, then, if that works, try then a replacement config (which I will never understand lol)

Are you sure sections/faces called "injury_legs" are defined within the "sections[]" part of the model.cfg ?

If it is, in theory what youre doing should work ......

Oh! remembering something, part of the problem could be the parent-child definitions of sections. Sometimes when 1 sub-section of a model is also part of another main sections definition, you can't drive that sub--section with its own animation or texture definition. Not 100% on the work-around.

Edited by [APS]Gnat

Share this post


Link to post
Share on other sites

dont forget in A3 you must do this for the different stages

in A3 you now have

Underwear model

Uniform Model its possible thes may affect your goal and if you do the new sections for these your idea should work?

p.s also you wont be able to add an Hide animation therefore using setobjecttexture wil still elave the rvmat on the model too ? (more complex if the rvmat adds nw wound texture on Hit)

Edited by Sealife

Share this post


Link to post
Share on other sites

there's a new command called setobjectmaterial. haven't tried it yet though.

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  

×