User Tools

Site Tools


arma3:terrain:separate-data-layers

ArmA 3 Terrain Separate Data\Layers into Smaller PBOs

ArmA 3 Forum, ArmA 3, ArmA 3 Config, ArmA 3 Missions, ArmA 3 3D Modeling, ArmA 3 Scripting, ArmA 3 Terrain, ArmA 3 Texturing, ArmA 3 Tools

How to separate your large ArmA 3 terrain Data\Layers PBO into individual PBO files.

First read the ArmA 2 version of separate terrain data layers for some background understanding, there are some details which we don't need to repeat.

We take the single WRP addon dir and separate it to following: WRP (it remains as is), Data, Layers (RVMATs) and Layers_00 (PAA) through how many numbers you have, however this tutorial uses 00 to 08 range.

_run_Separate_WRP_Dir.bat

This batch file does all the heavy lifting when separating your terrain addon directory. In our example we use “pmc” as our mod / group tag and “pmc_iraq_baghdad” as our addon name. Put this bat into “pmc\pmc_iraq_baghdad\Source\” directory.

You only need to edit “set MODTAG=” for mod / group tag and “set TERRAIN=” to replace our terrain name with yours, rest of the batch file is OK.

_run_Separate_WRP_Dir.bat:

@echo off
set MODTAG=pmc
set TERRAIN=pmc_iraq_baghdad
rem back out of Source and terrain directorys
cd ..\..

rem create data\ for whatever data stuff you got
md %TERRAIN%_data
echo %MODTAG%\%TERRAIN%_data >%TERRAIN%_data\$PBOPREFIX$
echo class CfgPatches{class %TERRAIN%_data{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data\config.cpp

rem create layers\ for RVMATs
md %TERRAIN%_data_layers
echo %MODTAG%\%TERRAIN%_data_layers >%TERRAIN%_data_layers\$PBOPREFIX$
echo class CfgPatches{class %TERRAIN%_data_layers{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers\config.cpp
rem move RVMATs
move %TERRAIN%\data\layers\*.rvmat %TERRAIN%_data_layers\

rem create actual satellite tile PAA directorys
md %TERRAIN%_data_layers_00
md %TERRAIN%_data_layers_01
md %TERRAIN%_data_layers_02
md %TERRAIN%_data_layers_03
md %TERRAIN%_data_layers_04
md %TERRAIN%_data_layers_05
md %TERRAIN%_data_layers_06
md %TERRAIN%_data_layers_07
md %TERRAIN%_data_layers_08
 
echo %MODTAG%\%TERRAIN%_data_layers_00 >%TERRAIN%_data_layers_00\$PBOPREFIX$
echo %MODTAG%\%TERRAIN%_data_layers_01 >%TERRAIN%_data_layers_01\$PBOPREFIX$
echo %MODTAG%\%TERRAIN%_data_layers_02 >%TERRAIN%_data_layers_02\$PBOPREFIX$
echo %MODTAG%\%TERRAIN%_data_layers_03 >%TERRAIN%_data_layers_03\$PBOPREFIX$
echo %MODTAG%\%TERRAIN%_data_layers_04 >%TERRAIN%_data_layers_04\$PBOPREFIX$
echo %MODTAG%\%TERRAIN%_data_layers_05 >%TERRAIN%_data_layers_05\$PBOPREFIX$
echo %MODTAG%\%TERRAIN%_data_layers_06 >%TERRAIN%_data_layers_06\$PBOPREFIX$
echo %MODTAG%\%TERRAIN%_data_layers_07 >%TERRAIN%_data_layers_07\$PBOPREFIX$
echo %MODTAG%\%TERRAIN%_data_layers_08 >%TERRAIN%_data_layers_08\$PBOPREFIX$
 
echo class CfgPatches{class %TERRAIN%_data_layers_00{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_00\config.cpp
echo class CfgPatches{class %TERRAIN%_data_layers_01{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_01\config.cpp
echo class CfgPatches{class %TERRAIN%_data_layers_02{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_02\config.cpp
echo class CfgPatches{class %TERRAIN%_data_layers_03{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_03\config.cpp
echo class CfgPatches{class %TERRAIN%_data_layers_04{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_04\config.cpp
echo class CfgPatches{class %TERRAIN%_data_layers_05{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_05\config.cpp
echo class CfgPatches{class %TERRAIN%_data_layers_06{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_06\config.cpp
echo class CfgPatches{class %TERRAIN%_data_layers_07{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_07\config.cpp
echo class CfgPatches{class %TERRAIN%_data_layers_08{units[] = {};weapons[] = {};requiredVersion = 1;requiredAddons[] = {};};}; >%TERRAIN%_data_layers_08\config.cpp

rem move the actual satellite tile PAA files...
move %TERRAIN%\data\layers\s_00?_?*.paa %TERRAIN%_data_layers_00\
move %TERRAIN%\data\layers\m_00?_?*.paa %TERRAIN%_data_layers_00\
 
move %TERRAIN%\data\layers\s_01?_?*.paa %TERRAIN%_data_layers_01\
move %TERRAIN%\data\layers\m_01?_?*.paa %TERRAIN%_data_layers_01\
 
move %TERRAIN%\data\layers\s_02?_?*.paa %TERRAIN%_data_layers_02\
move %TERRAIN%\data\layers\m_02?_?*.paa %TERRAIN%_data_layers_02\
 
move %TERRAIN%\data\layers\s_03?_?*.paa %TERRAIN%_data_layers_03\
move %TERRAIN%\data\layers\m_03?_?*.paa %TERRAIN%_data_layers_03\
 
move %TERRAIN%\data\layers\s_04?_?*.paa %TERRAIN%_data_layers_04\
move %TERRAIN%\data\layers\m_04?_?*.paa %TERRAIN%_data_layers_04\
 
move %TERRAIN%\data\layers\s_05?_?*.paa %TERRAIN%_data_layers_05\
move %TERRAIN%\data\layers\m_05?_?*.paa %TERRAIN%_data_layers_05\
 
move %TERRAIN%\data\layers\s_06?_?*.paa %TERRAIN%_data_layers_06\
move %TERRAIN%\data\layers\m_06?_?*.paa %TERRAIN%_data_layers_06\
 
move %TERRAIN%\data\layers\s_07?_?*.paa %TERRAIN%_data_layers_07\
move %TERRAIN%\data\layers\m_07?_?*.paa %TERRAIN%_data_layers_07\
 
move %TERRAIN%\data\layers\s_08?_?*.paa %TERRAIN%_data_layers_08\
move %TERRAIN%\data\layers\m_08?_?*.paa %TERRAIN%_data_layers_08\

rem delete existing layers\ dir including the remaining now obsolete .PNG files
rd /q /s %TERRAIN%\data\layers\
 
pause
exit

MoveObject RVMATs

You must fix the paths in layers RVMAT files, use Mikero Tools MoveObject for this task.

See how to use MoveObject for RVMATs in batch file. Put these bat files into pmc_iraq_baghdad_data_layers\ directory.

Here is our example replacement text file, you obviously need to make your own using paths to your terrain (both mod tag and addon name).

RVMAT _MASTER_paths.txt:

pmc\pmc_iraq_baghdad\data\layers\s_00 pmc\pmc_iraq_baghdad_data_layers_00\s_00
pmc\pmc_iraq_baghdad\data\layers\m_00 pmc\pmc_iraq_baghdad_data_layers_00\m_00
pmc\pmc_iraq_baghdad\data\layers\s_01 pmc\pmc_iraq_baghdad_data_layers_01\s_01
pmc\pmc_iraq_baghdad\data\layers\m_01 pmc\pmc_iraq_baghdad_data_layers_01\m_01
pmc\pmc_iraq_baghdad\data\layers\s_02 pmc\pmc_iraq_baghdad_data_layers_02\s_02
pmc\pmc_iraq_baghdad\data\layers\m_02 pmc\pmc_iraq_baghdad_data_layers_02\m_02
pmc\pmc_iraq_baghdad\data\layers\s_03 pmc\pmc_iraq_baghdad_data_layers_03\s_03
pmc\pmc_iraq_baghdad\data\layers\m_03 pmc\pmc_iraq_baghdad_data_layers_03\m_03
pmc\pmc_iraq_baghdad\data\layers\s_04 pmc\pmc_iraq_baghdad_data_layers_04\s_04
pmc\pmc_iraq_baghdad\data\layers\m_04 pmc\pmc_iraq_baghdad_data_layers_04\m_04
pmc\pmc_iraq_baghdad\data\layers\s_05 pmc\pmc_iraq_baghdad_data_layers_05\s_05
pmc\pmc_iraq_baghdad\data\layers\m_05 pmc\pmc_iraq_baghdad_data_layers_05\m_05
pmc\pmc_iraq_baghdad\data\layers\s_06 pmc\pmc_iraq_baghdad_data_layers_06\s_06
pmc\pmc_iraq_baghdad\data\layers\m_06 pmc\pmc_iraq_baghdad_data_layers_06\m_06
pmc\pmc_iraq_baghdad\data\layers\s_07 pmc\pmc_iraq_baghdad_data_layers_07\s_07
pmc\pmc_iraq_baghdad\data\layers\m_07 pmc\pmc_iraq_baghdad_data_layers_07\m_07
pmc\pmc_iraq_baghdad\data\layers\s_08 pmc\pmc_iraq_baghdad_data_layers_08\s_08
pmc\pmc_iraq_baghdad\data\layers\m_08 pmc\pmc_iraq_baghdad_data_layers_08\m_08

Then just run _run_update_rvmat_list.bat and _run_moveobject.bat files to mass change paths into all your RVMAT files.

MoveObject WRP

WRP needs its RVMAT paths changed because we moved RVMATs to a new directory / addon.

It is basically the same as what we did for individual RVMAT files, see MoveObject for WRP in batch file for file name details.

WRP _MASTER_paths.txt:

pmc\pmc_iraq_baghdad\data\layers pmc\pmc_iraq_baghdad_data_layers

If you forget to change RVMAT paths in WRP file, then none of the above works.

Re-Generating Layers

In the future when you have ran through this tutorial once, have WRP dir separated / split all nicely and then you need to generate layers again… you have to delete the existing directories created by this bat file.

It might work that you just let it overwrite dirs / files, but it is best to just delete the existing _data, _data_layers and all _data_layers_0X directories.

So store the MoveObject RVMAT batch files in your pmc_iraq_baghdad\Source\ directory for safe keeping from any deletion.

Buldozer

In this separated / split setup terrain builder + buldozer cannot find the RVMAT files, it attempts to find them from pmc_iraq_baghdad\data\layers\ directory, but instead they have been moved to pmc_iraq_baghdad_data_layers\ dir.

You can easily fix this by making a symlink “layers” directory into pmc_iraq_baghdad\data\ directory.

_run_create_layers_symlink.bat:

rem do this on WRP\data\ dir
mklink /J layers C:\armawork\PMC\pmc_iraq_baghdad_data_layers

Warning: You must delete this “layers” symlink before pboProject binarizing & packing your terrain! if you do not, then pboproject will try to copy the rvmat's into p:\temp\ and its going to be a real mess.

Howto delete symlink:

del layers

You cannot really change the path from terrain builder project settings, because it defaults to <project>\data\layers\ directory, so you cant set it to any dir which would match pmc_iraq_baghdad_data_layers\ heh.

Reference Altis PBOs

Reference from bis Altis terrain.

PBO file names:
map_altis
map_altis_data
map_altis_data_layers
map_altis_data_layers_00_00
map_altis_data_layers_00_01
map_altis_data_layers_01_00
map_altis_data_layers_01_01

PBO $PBOPREFIX$ CfgPatches Contents
map_altis a3\map_altis A3_Map_Altis WRP
map_altis_data a3\map_altis\data A3_Map_Altis_Data Skybox textures, picturemap UI stuff
map_altis_data_layers a3\map_altis\data\layers A3_Map_Altis_Data_Layers RVMATs
map_altis_data_layers_00_00 a3\map_altis\data\layers\00_00 n/a Textures
arma3/terrain/separate-data-layers.txt · Last modified: 2024/08/02 21:41 by snakeman

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki

All PMC web site download services are temporarily suspended until web site yearly fees have been recovered, want to download addons/mods? Then Support PMC.

If you are grateful for all the work PMC has done in the past 25 years, use Support PMC page.