Foliage Plugin

What is the Foliage Plugin?

The foliage Plugin enables you to interact with Foliage Instances that are placed in your level, be it Trees, Rocks, Bushes, Vehicles, Buildings, doesn’t matter. The Foliage Plugin can convert anything into whatever you want.

Features

  • Convert Instance Foliage into Actors
  • Full Replication Support
  • Support for Tiled Landscapes, World Composition and Level Streaming
  • Saving and Loading of instances
  • Respawning and Removing Instances
  • Different Damage Types (eg, require to use an Axe to harvest trees)
  • Support for Destructible Meshes
  • Works on both Listen and Dedicated Servers

Demonstration Video

Additional Links and Information

Getting Started

Tutorials

Plugin Settings

Foliage

  • Enable Debugging
    Print errors and warnings to log
  • Foliage Actor
    This actor will replace the Foliage Instance that you interact with
  • Foliage DataTable
    Data Table containing information on what Foliage Instances the foliage plugin will interact with
  • Hidden Foliage Move Distance
    Hidden Foliage will be moved away on the Z axis once it’s replaced with a Foliage Actor (if respawning is enabled)

Settings

  • Foliage Respawn Rate
    How often we try and respawn Foliage Instances (in seconds)
  • Block Foliage Despawn Radius
    The Foliage Plugin will perform a sphere trace determined by this radius, if any object is found within this radius it will not despawn the Foliage Actor (useful to prevent players from seeing Foliage popping up in front of them)
  • Block Foliage Respawn Radius
    Same as above, but will block respawning (useful to prevent players from seeing Foliage popping up in front of them)
  • Blocked Respawn Object Types
    Determines what object types that will block despawn / respawn, related to the settings above

Saving and Loading

  • Enable Persistent Data
    The Foliage Plugin can save your data between gaming sessions for all foliage instances that have been modified
  • Auto Saving Rate
    How often to auto save (in seconds)
  • Save Game Name
    Save game file name

Replication

  • Enable Replication
    Enable / Disable Replication of the Foliage Plugin
  • Replicate Physics Movement
    Disabled by Default to save on bandwidth, replication of physics movement is something you want to avoid unless it’s gameplay important

Foliage Plugin Data Table Settings

Settings

  • Resource Name
    Human readable, friendly usable resource name
  • Rewards on Harvest
    If you want to reward the player with any resources on harvest, you set this here
  • Foliage Meshes
    For simplicity, this is an array which can contain several meshes for the same resource
  • Destructible Meshes
    If you want to use a Destructible Mesh for your Resource, it’s important that your Foliage Mesh has the same ID in the Data Table as the Destructible Mesh!
  • Max Uses
    How many times this resource can be “harvested”
  • Foliage Actor Max Life Time
    The spawned foliage actor will be removed from the game world after X amount of seconds. Despawning will be renewed if any player is nearby (configurable in the Project Settings)
  • Depleted Foliage Actor Life Time
    Once this actor has been depleted (been harvested enough), this is how long we keep the actor live
  • Enable RespawningCan this foliage respawn?

Damage

  • Require Damage Type
    If the player is required to use a certain damage type to harvest this resource
  • Damage Type
    You can create new damage types by creating a new blueprint class that inherits from DamageType
  • Damage Amount
    The minimum amount of damage required to harvest this resource

Physics

  • Simulate Physics on Depletion
    Should the foliage actor simulate physics when depleted? Eg, a tree falling over when harvested? (Disabled if any Destructible Mesh is set)
  • Apply Impulse on Depletion
    Apply a physics impulse on depletion (making trees fall over for example)
  • Physics Impulse Multiplier
    How much force should we apply?
  • Physics Collision Profile Name
    If set to something other than “None”, the Foliage Mesh collision profile will be set to this before we start simulating physics