Alongside Entites.blk, Level.blk can also be a file of significant importance when modding.
What is level.blk? Simply put, Level.BLK contains map config data. I have covered some of this in my Replacing vegetation and textures - Guide.
Level.BLK can be used to:
- Load level binary files (Currently has no use)
- Override LOD for Ri
- Override Microdetails such as grass for any map
- Remove the map border fog.
To use custom level.blk first download this, (or get one from the game):
levels.zip (60.9 KB)
Place the correct blkx into next to the scene.blk (or in a folder) and rename the blkx to blk.
In my case its inside level folder and has the name customLevel.blk.
Open your scene.blk, find your level entity and replace the path, so it points to your blk file:
That’s all.
Sometimes the assets or Ri (RenderInstace) placed on the map, were designed to be interior objects and will refuse render at a longer distance.
Or another example when you should do this is when a certain asset’s LOD 0 setting is too low, and it switches to a lower level of detail, resulting in subpar visuals.
LOD 0 - Highest level of detail
LOD 3 - Lowest.
Base code:
overrideRiLodRange{
render_instance_name_here{
lod0:r=0.0
lod1:r=0.0
lod2:r=0.0
lod3:r=0.0
}
}
Be wary! LODs were designed for a reason! Setting any of the levels, especially LOD 0 to a high distance can cause performance issues! Only change LOD where it’s really neccessary!
Example:
plash_pool_pipe_big_b
has short LODs and become invisible.Code for this particular example:
overrideRiLodRange{
splash_pool_pipe_big_b{
lod0:r=800.0
lod1:r=850.0
lod2:r=1500.0
lod3:r=4000.0
}
}
You can place this anywhere inside level.blk.
Most level.blks contain a grass section:
grass{
pacific_gavutu_det_tex_d:t=""
grass_grid_size:r=0.0938 //smaller the number, the denser the grass will be. Don't reduce below default value, think of console players...
grass_distance:r=120.0 //grass render distance. Set the setting too high and watch your PC explode
grassMaskResolution:i=1024
hor_size_mul:r=1.0
grass_types{
generic_grass_tall_a{
diffuse:t="grass_generic_grass_tall_a_tex_d"
normal:t="grass_generic_grass_tall_a_tex_n"
variations:i=1
height:r=0.4
ht_rnd_add:r=0.2
hor_size:r=0.5
hor_size_rnd_add:r=0.0
color_mask_r_from:c=76, 100, 43, 90
color_mask_r_to:c=130, 112, 86, 90
color_mask_g_from:c=31, 31, 31, 90
color_mask_g_to:c=121, 136, 85, 90
color_mask_b_from:c=77, 93, 50, 90
color_mask_b_to:c=111, 110, 44, 90
height_from_weight_mul:r=0.3
height_from_weight_add:r=0.7
density_from_weight_mul:r=6.0
density_from_weight_add:r=-0.5
vertical_angle_add:r=0.1
vertical_angle_mul:r=0.7
}
//and so on
Examples:
grass_distance:r
set to 30 in normandySHOULD ONLY BE INCREASED FROM DEFAULT VALUE
You can remove or replace individual vegetation types from grass generation, or you should just use the other level’s grass properties.
The following defines the border fog for every map:
volFog{
rootFogGraph:t="content/e_normandy/shaders/fog_normandy_urban_area.json"
}
Removing this from level will remove the fog. You can also add border fogs from other maps, but that has very little use.
You can load compatible level.bins by editing the first line of level.blk:
levelBin:t="PATH/level.bin"
for example:
levelBin:t="content/base/levels/normandy_urban_area_2x2.bin"
or
levelBin:t="%ugm/.../level.bin"
Only level.bin that is any interesting is the removed tunisia hangar level.
tunisia_menu_background.bin.txt (1.9 MB)
You cannot load CRSED level.bin because of missing terrain data.