halcyon_

Arma 3 Texture Sources Template

May 15th, 2021 (edited)
946
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class CfgPatches
  2. {
  3.         class texture_sources_example
  4.         {
  5.             units[] = {
  6.             };
  7.             weapons[] = {
  8.             };
  9.             requiredVersion = 0.1;
  10.             requiredAddons[] = {
  11.             };
  12.             name = "";
  13.             author = "";
  14.             authorUrl = "";
  15.             version ="1.0";
  16.         };
  17.    
  18. };
  19.  
  20.  
  21.  
  22.  
  23.  
  24. class CfgVehicles
  25. {
  26.     // this will be put into CfgVehicles
  27.     //for this example, we're adding two new textures to the vanilla offroad
  28.     //sometimes, new garage textures can have issues showing up, so mess around with the classnames and inheritance
  29.     //in this example, we're adding to Offroad_01_civil_base_F instead of any of its child classes
  30.     //if we add to a child class, it might not show up, but if we add to a parent class it'll show up
  31.     //the vehicles shown in the arsenal display textureSources for the specific vehicle, and any parent classes
  32.    
  33.     class Offroad_01_unarmed_base_F;
  34.     class Offroad_01_civil_base_F: Offroad_01_unarmed_base_F
  35.     {
  36.         textureList[] += {"offroad_crda",0,"offroad_police",0};
  37.         //this entry essentially adds our new TextureSources entries into the Garage so the game recognizes them
  38.         //the ''+='' means it's adding to the original TextureSources array from Offroad_01_civil_base_F
  39.         //each addition to the array is followed by a 0-1 float, i.e. it can be between 0 or 1, and this represents
  40.         //the chance of the texture appearing randomly
  41.         //in this example, the chance is 0 since these are just for missions
  42.         class TextureSources
  43.         {
  44.            
  45.             class offroad_crda
  46.             {
  47.                 displayName="CRDA";
  48.                 author="COXHOUND Modding Unit";
  49.                 textures[] = {
  50.                 "cox_factionmod_framework\textures\crda\crda_offroad.paa",
  51.                 "cox_factionmod_framework\textures\crda\crda_offroad.paa"
  52.                
  53.                 };
  54.                 //the offroad in this example has two hiddenSelections, so we're replacing its entries with two
  55.                 //other vehicles can have more than two hiddenSelections
  56.                 //both of the offroad's selections use one texture sheet, that's why the texture entry is repeated
  57.                 factions[] = {};
  58.                 //this is for if you want it to show up for a specific faction only, but in order to have it show up
  59.                 //for every faction for ease, leave it blank
  60.             }; 
  61.            
  62.             class offroad_police
  63.             {
  64.                 displayName="Police";
  65.                 author="COXHOUND Modding Unit";
  66.                 textures[] = {
  67.                 "cox_factionmod_framework\textures\crda\police1.paa",
  68.                 "cox_factionmod_framework\textures\crda\police1.paa"
  69.                
  70.                 };
  71.                 factions[] = {};
  72.             }; 
  73.        
  74.         };
  75.     };
  76. };
RAW Paste Data