Replace Vegetation Documentation

From Nexus Mods Wiki
Revision as of 13:34, 27 October 2019 by WarhorseStudios (talk | contribs) (Created page with "<div class="row"><div class="col-xs-12" id="xwikicontent"> == <span>Replace vegetation by brushes</span> == Imagine you need to make several different states of some area, wh...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Replace vegetation by brushes

Imagine you need to make several different states of some area, which are changing during gametime or based on player actions. You cannot use vegetation, because vegetation cannot be technicaly unloaded and loaded during game. But you can still take advantage of vegetation system (area filler, vegetation painter) and then convert vegetation to the brushes. And brushes can be easily loaded and unloaded during gameplay.

Example 1:

wh_veg_replace_by_brush_in_area prunus_spinosa_.* -d -k

  • There must be selected one EditorArea. Vegetation instances in this area according to regex are replaced by brushes. New brushes are added to the current layer.
  • (.*) is for all varieties
  • Switch -d enables debug list of all created brushes.
  • Switch -k keeps original vegetation instances (so you can verify if there is a difference)

Example 2:

wh_veg_replace_by_brush -d -k

  • There must be selected vegetation instance(s). The selected vegetation instances are replaced by brushes. New brushes are added to the current layer.
  • Switch -d enables debug list of all created brushes.
  • Switch -k keeps original vegetation instances (you can verify if there is a difference)

Replace vegetation with different vegetation

wh_veg_replace prunus_spinosa_.* prunus_spinosa_small_a -c: 0.7 -o: 0.6 -d

  • First is the name of the original instance (prunus_spinosa_.*)  and second is the instance you want to replace it with (prunus_spinosa_small_a)
  • (.*) is for all varieties but you can also swap this for the exact variety you want to replace such as _a, _b, _c etc
  • (-c: 0.7) is the argument called -maxScale: or -c so it will replace anything smaller than 0.7. you can change the number to suite your needs.
  • (-o: 0.6) should add to the scale of the replacement bush. so it adds 0.6 or whatever scale you want to the veg.
  • (-d) creates a dump file of all replaced instances into your user editor file

One more thing...

Another useful command is below. Run the command and select a vegetation instance – it will tell you the dimensions of the vegetation you have selected.

wh_ed_VegSizeDebug 1