[Guide] Object Placer

Dynamic Placers

This guide will cover how to use the Dynamic Object Placer (DagDP) entities. These allow you to randomly place SOME RI on pre-defined surface areas/terrain.

UNSUPPORTED RI:

  • Buildings:
    kép

  • Most vegetation:

kép

Use of notepad++ is highly recommended.

I used the test blk made by one of the devs as a basis of this guide: dagdp_tesst.blk.txt (4.1 KB)

The goal in this guide will be to generate cacti on this area:

We have several entities related to object placer:

kép

To simplify the process, we will use a “complex” entity also used in the test mission and edit that. Read the comments and the in-editor remarks.

entity{
  _template:t="dagdp_rule+dagdp_placer_heightmap+dagdp_object_group_riex"
  dagdp__name:t="test_rule_shrooms" // can be named anything.
  dagdp__skip_chance:r=0.5
  dagdp__density:r=4.5938

  "dagdp__biomes:list<i>"{
    index:i=22  //biome index. We have no info about what biome belongs to which ID. 
    index:i=27 // Yes you need to guess until it works...
  }

  "dagdp__assets:object"{ //add/remove Ri from RI list here. Not all RI will work!

    "boletus_edulis_a:object"{ // RI name
      scale:p2=1.1, 0.7 //RI scale. First number must be bigger than second number.
      rot_x:p2=0.0, 10.0 //RI rotation on X axis presumably randomly between the 2 values.
      rot_z:p2=0.0, 10.0 // RI rotation on Z axis same as above
    }

    "boletus_edulis_b:object"{
      scale:p2=2.0, 1.0
      rot_x:p2=0.0, 20.0
      rot_z:p2=0.0, 20.0
    }

    "boletus_edulis_c:object"{
      weight:r=5.0
      scale:p2=3.0, 2.0
      rot_x:p2=0.0, 30.0
      rot_z:p2=0.0, 30.0
    }
  }
}

By default this will place mushrooms on certain types of desert terrain:


As you can see mushrooms are only placed on smooth sand, but not on “wavy” ones.

Let’s replace the values with cacti, and save the scene:

entity{
  _template:t="dagdp_rule+dagdp_placer_heightmap+dagdp_object_group_riex"
  dagdp__name:t="test_rule_shrooms"
  dagdp__skip_chance:r=0.5
  dagdp__density:r=0.01

  "dagdp__biomes:list<i>"{
    index:i=22
    index:i=27
  }

  "dagdp__assets:object"{

    "african_cactus_e_b:object"{
      scale:p2=1.1, 0.7
      rot_x:p2=0.0, 10.0
      rot_z:p2=0.0, 10.0
    }
	"african_cactus_a:object"{
      scale:p2=1.1, 0.7
      rot_x:p2=0.0, 10.0
      rot_z:p2=0.0, 10.0
    }
	"african_cactus_b_a:object"{
      scale:p2=1.1, 0.7
      rot_x:p2=0.0, 10.0
      rot_z:p2=0.0, 10.0
    }
	"african_cactus_f:object"{
      scale:p2=1.1, 0.7
      rot_x:p2=0.0, 10.0
      rot_z:p2=0.0, 10.0
    }
	"african_cactus_g:object"{
      scale:p2=1.1, 0.7
      rot_x:p2=0.0, 10.0
      rot_z:p2=0.0, 10.0
    }
  }
}

Now we can fine-tune our placer in the editor:

And done. You can get info of each parameter in-editor, i won’t explain it.

kép

5 Likes

thanks for the findings and effort :saluting_face:

3 Likes

@Enginya Could we perhaps get a spreadsheet or something, so that we don’t have to guess the IDs for the biomes? I saw biome_querry entities and a copule biome_xxx commands, but none of them helps unfortunetly.

2 Likes

Have you tried to leave dagdp__biomes empty as tooltip suggests?

1 Like

kép

But what if i only want to “paint” on burnt_ground or grassland for example?

1 Like

Then report to moderators, helpers or https://community.gaijin.net/ to ask related to write manual

Those biomes are really deeply hidden into terrain types definitions, so I can’t even find them easily

You can also peek into blk files in existing scenes for dagdp__biomes and ri_gpu_object__biom_indexes

3 Likes

A new discovery had been made just now.

To find each level’s biome ID, open console and enter aim_ruler 3


The number after the word mat indicates biome ID


It is also worth noting, that the areas highlighted can be dynamically be painted with RI, given that you specify an ID with DagDP

2 Likes