Setting Textures for Wrecks – Arma 3
(Added description of the Skins for wrecks technology that is going to hit dev-branch for Arma 3 soon) |
Lou Montana (talk | contribs) m (Text replacement - "[[Arma 3 " to "[[Arma 3: ") |
||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Eden Update comes with a new functionality allowing setting of hiddenSelections textures (skins) even for wrecks of vehicles. This allows content creators to have the same texture used for both main model and the wreck when they want to switch different texture options. | [[Arma 3: Main Updates#1.56 - Eden Update|Eden Update]] comes with a new functionality allowing setting of hiddenSelections textures (skins) even for wrecks of vehicles. | ||
This allows content creators to have the same texture used for both main model and the wreck when they want to switch different texture options. | |||
== Setting up the model == | |||
Model for the wreck with changeable skins needs to have two things done in order to work correctly: | Model for the wreck with changeable skins needs to have two things done in order to work correctly: | ||
Line 7: | Line 9: | ||
* The wreck model needs to have its own model.cfg with defined '''sections''' | * The wreck model needs to have its own model.cfg with defined '''sections''' | ||
<syntaxhighlight lang="cpp"> | |||
class Heli_Light_01_wreck_F : Default | |||
{ | |||
sections[] = { "camo1" }; | |||
}; | |||
</syntaxhighlight> | |||
Things go a bit harder with the config of the wreck proxy as it needs to be properly defined in '''cfgNonAIVehicles''' | == Setting up in config == | ||
Things go a bit harder with the config of the wreck proxy as it needs to be properly defined in '''cfgNonAIVehicles''': | |||
* The class name should match the '''proxy''' prefix and '''p3d name''' suffix (e.g. if the wreck proxy is called myLittlePlaneWreck.p3d, the config class needs to be called "proxyMyLittlePlaneWreck" - case doesn't matter) | * The class name should match the '''proxy''' prefix and '''p3d name''' suffix (e.g. if the wreck proxy is called myLittlePlaneWreck.p3d, the config class needs to be called "proxyMyLittlePlaneWreck" - case doesn't matter) | ||
* This class needs to have the '''model''' property with path to proxy model defined | * This class needs to have the '''model''' property with path to proxy model defined | ||
* There needs to be proper '''hiddenSelections''' property defined | * There needs to be proper '''hiddenSelections''' property defined | ||
<syntaxhighlight lang="cpp"> | |||
class CfgNonAIVehicles | |||
{ | |||
class ProxyRetex; | |||
class ProxyHeli_Light_01_wreck_F : ProxyRetex | |||
{ | |||
hiddenSelections[] = { "camo1" }; | |||
model = "\A3\Air_F\Heli_Light_01\Heli_Light_01_wreck_F.p3d"; | |||
}; | |||
}; | |||
</syntaxhighlight> | |||
== Actual use of the technology in game == | |||
This is actually the easiest part - once the wreck model is properly defined, changing textures for the main model (both via hiddenSelectionsTextures in config and setObjectTexture / setObjectTextureGlobal via script should work even for the wreck). | |||
Easy as that ;-) | |||
{{GameCategory|arma3|Editing}} | |||
{{GameCategory|arma3|Tutorials}} |
Latest revision as of 10:38, 6 May 2024
Eden Update comes with a new functionality allowing setting of hiddenSelections textures (skins) even for wrecks of vehicles. This allows content creators to have the same texture used for both main model and the wreck when they want to switch different texture options.
Setting up the model
Model for the wreck with changeable skins needs to have two things done in order to work correctly:
- The changeable selections in object should be named the same way as they are for the main model (e.g. camo in standard models)
- The wreck model needs to have its own model.cfg with defined sections
class Heli_Light_01_wreck_F : Default
{
sections[] = { "camo1" };
};
Setting up in config
Things go a bit harder with the config of the wreck proxy as it needs to be properly defined in cfgNonAIVehicles:
- The class name should match the proxy prefix and p3d name suffix (e.g. if the wreck proxy is called myLittlePlaneWreck.p3d, the config class needs to be called "proxyMyLittlePlaneWreck" - case doesn't matter)
- This class needs to have the model property with path to proxy model defined
- There needs to be proper hiddenSelections property defined
class CfgNonAIVehicles
{
class ProxyRetex;
class ProxyHeli_Light_01_wreck_F : ProxyRetex
{
hiddenSelections[] = { "camo1" };
model = "\A3\Air_F\Heli_Light_01\Heli_Light_01_wreck_F.p3d";
};
};
Actual use of the technology in game
This is actually the easiest part - once the wreck model is properly defined, changing textures for the main model (both via hiddenSelectionsTextures in config and setObjectTexture / setObjectTextureGlobal via script should work even for the wreck). Easy as that ;-)