User Tools

Site Tools





Defines selections on the model, which are not shown at mission startup.

This is useful for creating variations of one model, where the different selections are left out with hiddenSelections. VBS2 uses the “hiddenselections” set of parameters for varying clothing on the same model, hiding parts such as hat and scarf to give the appearance of different units from the same p3d model. Hiddenselections are also used for uniform swapping, e.g., between woodland and desert camo patterns.

hiddenSelections[] = {"swap_robe","hide_vest","hide_scarf", "hide_teamcolor"};

Selections to be hidden must be defined as sections in the model.cfg (in the sections[] array within cfgModels). Once set up,the texture of a hidden selection can be changed during run-time using scripting commands such as “setObjectTexture” and “setObjectTextureGlobal”.

To make config.cpp files easier to read and write a number of defined strings have been provided. You can use the predefined string in place of the numerical value, e.g.,

hiddenSelections[] = {"swap_robe","hide_vest","hide_scarf", STANDARD_PEOPLE_SELECTIONS};

Predefined Strings [people_defines.hpp]:

STANDARD_SOLDIER_SELECTIONS = "swap_bdu","hide_teamcolor","hide_medic"

Note: the actual selections need to be named in the p3d model, i.e., “hide_teamcolor” is the named selection in the model, not STANDARD_PEOPLE_SELECTIONS.

Known bug: After restoring a saved SP game, all hiddenSelections revert to their original texture



Allows you to assign a texture to a hidden selection which will be visible once the simulation is started (instead of being hidden). The ordering matches that of the hiddenSelections[] array. (So, the first hidden selection will take the first texture listed in the hiddenSelectionsTexture[] array, and so on. HiddenSelections elements without a corresponding entry in the hiddenSelectionsTextures array will remain hidden.).

hiddenSelections[] = {"swap_bdu", "hide_teamcolor"};
hiddenSelectionsTextures[] = {__CurrentDir__\data\civ_suit_black_co};

In the example above, the hiddenSelectionsTextures applies the first listed texture to the first selection in the hiddenSelections array, i.e., the “swap_bdu” selection is textured with the “civ_suit_black_co.paa” texture. “hide_teamcolor” remains hidden since there is only one texture listed in hiddenSelectionsTextures.

Where this parameter is powerful is the ability to now add another person class with a different colored suit, using the same p3d model, e.g.,

hiddenSelectionsTextures[] = {__CurrentDir__\data\civ_suit_greystripes_co};



Randomly assigns a texture to a hidden selection. Similar to the hiddenSelectionsTextures[] array, only it is an array of arrays of textures, each “sub” array applies to the corresponding element in the hiddenSelections array.

hiddenSelections[] = {"swap_robe","hide_vest","hide_scarf"};
hiddenSelectionsTextures[] = {__CurrentDir__\data\afg_robeblack_co,"",""};
hiddenSelectionsRandomTextures[] =
		"", //hide selection entirely - hide vest 1/2 of the time
		"" //hide scarf 1/2 of the time

Empty quotes (“”) can be used to hide the selection entirely. Each “sub” array of random textures can have a different number of different textures.

Soldier hiddenSelections

hiddenSelectionsTextures[] =
class EventHandlers: EventHandlers
	init = "(_this select 0) setObjectTexture
		select floor random 5
arma2/texturing/hiddenselectionstextures.txt · Last modified: 2011-07-01 13:47 (external edit)