Voxel Plugin
1.2 Legacy
1.2 Legacy
  • Getting Started
    • Quick Start
      • Examples
    • World Generation
      • C++ World Generators
      • Voxel Graph Quick Start
      • Floating Islands
  • Core Systems
    • VoxelWorlds
      • Import Content
      • Voxel Data Items
      • Collisions and Navmesh
      • World Size and Level Of Details
      • Save and Load
      • Multiplayer
      • Easy Systems RPG
    • Voxel Graphs
      • Voxel Graph General Concepts
      • Voxel Graphs Tips and Tricks
      • Voxel Graph Nodes Reference
      • Voxel Graph Outputs
      • Voxel Graph Parameters
      • Custom Graph Nodes
    • Voxel Spawners
    • Materials
      • Multi Index Materials
  • Technical Notes
    • Performance and Profiling
    • Console Commands
    • Blueprint API
    • Release Notes
      • Release Notes 1.1
      • Release Notes 1.2
    • UE5.1 - Material Crash
Powered by GitBook
On this page
  • Digging voxels
  • Building on top of voxel worlds
  • Save support
  • Falling through the world

Was this helpful?

  1. Core Systems
  2. VoxelWorlds

Easy Systems RPG

PreviousMultiplayerNextVoxel Graphs

Last updated 1 year ago

Was this helpful?

Easy Systems RPG is a paid pack available on the marketplace.

Digging voxels

Result

How to

  • Add a Position parameter to Game/EasySurvivalRPG/Blueprints/Interfaces/BPI_DiggingActor (note: this might not be needed in future ESRPG releases)

  • In Game/EasySurvivalRPG/Blueprints/Characters/Base/BP_Character_Player, in the Complete Digging Server function, add the following (note: this might not be needed in future ESRPG releases)

  • Make sure you have the plugin installed: https://free.voxelplugin.com

  • Add a new voxel world to your scene

  • Add a blueprint to that voxel world

  • In the BP class settings add the BPI_DiggingActor interface

  • Implement the Try to dig function in 4.26, just double click the function

  • Add the following node. Make sure the radius is set to 50 (that's for a voxel size of 20 - for a larger voxel size, you'll want a larger radius)

  • Go back to your level. If the voxel world is invisible, try clicking the Toggle button in the voxel world details panel.

  • Set the Voxel Size to 20, the generator Color to orange and the Voxel Material to M_VoxelMaterial_Colors

  • Go to your voxel world blueprint and do the same. Set the Voxel Size to 20, the generator Color to orange and the Voxel Material to M_VoxelMaterial_Colors

  • Grab a shovel, and start digging!

Building on top of voxel worlds

Buy default, you won't be able to build on top of voxel worlds.

Result

How to

  • Add the isLandscape tag to your voxel world and voxel world blueprint.

  • Enable Simulation Generate Overlaps Events and Generate Overlaps Events

Save support

Result

Initial Voxel World setup

  • Make your voxel world blueprint implement the BPI_SaveData interface:

  • Add a SaveID variable to your voxel world, of type Integer:

  • Implement the Set Save ID function, making sure to tick Success: in 4.26, just double click the function to implement it

  • Implement Get Save ID: in 4.26, just double click the function to implement it

  • Implement Init Save ID: in 4.26, just double click the function to implement it

Setting up the GameSave interface

  • Open /Game/EasySurvivalRPG/Blueprints/Interfaces/BPI_GameSave

  • Add a new SetVoxelSaveData_BPI function, with the following settings (SaveData has type Compressed Voxel World Save):

  • Add a new GetVoxelSaveData_BPI function, with the following settings (SaveData has type Compressed Voxel World Save):

  • Make sure to compile and save the interface

Setting up STR_SaveData_Level

  • Open /Game/EasySurvivalRPG/Blueprints/Structures/SaveData/STR_SaveData_Level

  • Add a new variable named Voxels of type Map from Integer to Voxel Compressed World Save:

Setting up the GameSave Session

  • Open /Game/EasySurvivalRPG/Blueprints/Game/GameSaves/BP_GameSave_Session

  • Duplicate SavedMinesData and rename it SavedVoxelsData

  • Change its type to be a map of Integer -> Compressed Voxel World Save

  • Open the Save Current Level Data function, and connect the Voxels pin:

  • Do the following in ClearTemporaryLevelData:

  • In LoadTemporaryLevelData:

Set Voxel Data

  • Implement the Set Voxel Save Data BPI function: in 4.26, just double click the function to implement it

  • Add the following nodes, making sure to tick Success:

Get Voxel Data

  • Implement the Get Voxel Save Data BPI function: in 4.26, just double click the function to implement it

  • Add the following nodes:

Finalizing the Voxel World setup

  • Open your voxel world blueprint again

  • Add the following nodes to Save Data BPI:

  • Add the following nodes to Load Data BPI:

Wrapping up

The edits you make to your voxel world are now saved!

You will get the following errors:

These will be fixed in the next plugin release - nothing to worry about!

Falling through the world

  • Open /Game/EasySurvivalRPG/Blueprints/Characters/Base/BP_Character_Player

  • Add a Voxel No Clipping component

  • Place it near the feet of the player (but not below!)