ArmA 2 Forum, ArmA 2 Home, ArmA 2 Config, ArmA 2 File Formats, ArmA 2 Missions, ArmA 2 3D Modeling, ArmA 2 Scripting, ArmA 2 Terrain, ArmA 2 Texturing, ArmA 2 Tools
ArmA 2 Terrain, HOWTO Separate Data\Layers into Smaller PBOs
Why to separate your terrain's pbo file(s) into smaller ones? Well its good method overall, its also used in Chernarus and Takistan for data and layers, but in Take On Helicopters its taken to a whole new level separating the Layers into smaller pbo's.
Also it helps you to update your pbo's easier with smaller downloads. But yes, this is very high tech style method and “you don't need to do it” in normal addon making. As long as your addon is less than 2gb in size, it works (but is very much not recommended). The larger your terrain is, the more reason you have to split it up to several pbos. And hey, having your terrain separated to individual data layer pbos is cool :)
What it means is you separate your terrain into:
WRP
Data
Layers
Layers_<NUMBER> (as many you need, usually 4)
And of course its commonly used method to have config.cpp in its own pbo too.
Lets get started, we use example names/dirs of PMC\PMC_Rugen where PMC is namespace and PMC_Rugen is terrain directory. Also we use Layers configuration which has 000 to 021 numbered textures, this came out from using 1024 as Satellite Grid Segment Size with 20480 resolution satellite, yours may not be the same, for example Charnarus has 000 to 031.
First you need to change the paths in your PEW file using Visitor 3. Go to the Tools → Project Preferences, change the texture directory there. Its suggested to use “<TerrainName>_data_layers” as directory name.
Now you have to create the first new directory, it uses _Data suffix, for example PMC\PMC_Rugen_Data
In the new directory create of course $PBOPREFIX$ and config.cpp with just the cfgPatches. In our case these are:
$PBOPREFIX$
pmc\pmc_rugen_data
config.cpp
class CfgPatches { class PMC_Rugen_data { units[] = {}; weapons[] = {}; requiredVersion = 1; requiredAddons[] = { }; }; };
Now move all the rvmat/paa (tga/png etc) files from your <terrainName>\Data\ directory into this new directory. The sub directory <TerrainName>\Data\Layers can be moved there also. Once you have cleared out all the data contents, you can simply delete the empty <TerrainName>\Data\ directory.
In the <TerrainName>_Data\ directory you must repath the rvmat files which are used in the close / clutter ground textures. Use MoveObject to do this.
Then change paths in your <TerrainName>\Source\layers.cfg file to point out into the new location of the ground textures.
Create new directory called <TerrainName>_Data_Layers\ and create $PBOPREFIX$ and config.cpp as mentioned earlier with _Data dir. Then move the existing Layers contents into this directory. You should have now <TerrainName>_Data_Layers\Layers directory.
Now you can and should re-import satellite in Visitor 3 so it goes nicely into this new directory.
Create dos batch file into <TerrainName>_Data\ directory, call it something like “Create_Data_Layers_Directories.bat” etc.
The bat file looks like this:
@echo off cd .. md pmc_rugen_data_layers_00 md pmc_rugen_data_layers_01 md pmc_rugen_data_layers_02 echo pmc\pmc_rugen_data_layers_00 >pmc_rugen_data_layers_00\$PBOPREFIX$ echo pmc\pmc_rugen_data_layers_01 >pmc_rugen_data_layers_01\$PBOPREFIX$ echo pmc\pmc_rugen_data_layers_02 >pmc_rugen_data_layers_02\$PBOPREFIX$ move pmc_rugen_data_layers\layers\s_00?_0*.* pmc_rugen_data_layers_00 move pmc_rugen_data_layers\layers\m_00?_0*.* pmc_rugen_data_layers_00 move pmc_rugen_data_layers\layers\s_01?_0*.* pmc_rugen_data_layers_01 move pmc_rugen_data_layers\layers\m_01?_0*.* pmc_rugen_data_layers_01 move pmc_rugen_data_layers\layers\s_02?_0*.* pmc_rugen_data_layers_02 move pmc_rugen_data_layers\layers\m_02?_0*.* pmc_rugen_data_layers_02
Please note if you don't use the “s_00?_0*.*” move file selection, then dos cmd move command somehow fails to move all files properly (long story, trust me on this).
Run the batch file which moves the paa/png files into the new separated layers directories.
Now you can use MoveObject to repath the <TerrainName>_Data_Layers\Layers\ directory RVMAT files into the new paths.
pmc\pmc_rugen_data_layers\layers\s_00 pmc\pmc_rugen_data_layers_00\s_00 pmc\pmc_rugen_data_layers\layers\m_00 pmc\pmc_rugen_data_layers_00\m_00 pmc\pmc_rugen_data_layers\layers\s_01 pmc\pmc_rugen_data_layers_01\s_01 pmc\pmc_rugen_data_layers\layers\m_01 pmc\pmc_rugen_data_layers_01\m_01 pmc\pmc_rugen_data_layers\layers\s_02 pmc\pmc_rugen_data_layers_02\s_02 pmc\pmc_rugen_data_layers\layers\m_02 pmc\pmc_rugen_data_layers_02\m_02
Remember that in our example we have satellite texture files from 000 to 021, yours may differ.
All done, ready for binarization.