Skip to content

Easy Systems RPG

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

Video

Digging voxels

Result

Video

How to

  • Add a Position parameter to Game/EasySurvivalRPG/Blueprints/Interfaces/BPI_DiggingActor (note: this might not be needed in future ESRPG releases)
Image
  • 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)
Image
Image
  • Add a blueprint to that voxel world
Image
  • In the BP class settings add the BPI_DiggingActor interface
Image
  • Implement the Try to dig function in 4.26, just double click the function
Image
  • 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)
Image
  • 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
Image
  • 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

Video

How to

  • Add the isLandscape tag to your voxel world and voxel world blueprint.
Image
  • Enable Simulation Generate Overlaps Events and Generate Overlaps Events
Image

Save support

Result

Video

Initial Voxel World setup

  • Make your voxel world blueprint implement the BPI_SaveData interface:
Image
  • Add a SaveID variable to your voxel world, of type Integer:
Image
  • Implement the Set Save ID function, making sure to tick Success: in 4.26, just double click the function to implement it
Image
  • Implement Get Save ID: in 4.26, just double click the function to implement it
Image
  • Implement Init Save ID: in 4.26, just double click the function to implement it
Image

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):
Image
  • Add a new GetVoxelSaveData_BPI function, with the following settings (SaveData has type Compressed Voxel World Save):
Image
  • 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:
Image

Setting up the GameSave Session

  • Open /Game/EasySurvivalRPG/Blueprints/Game/GameSaves/BP_GameSave_Session
  • Duplicate SavedMinesData and rename it SavedVoxelsData
Image
  • Change its type to be a map of Integer -> Compressed Voxel World Save
Image
  • Open the Save Current Level Data function, and connect the Voxels pin:
Image
  • Do the following in ClearTemporaryLevelData:
Image
  • In LoadTemporaryLevelData:
Image

Set Voxel Data

  • Implement the Set Voxel Save Data BPI function: in 4.26, just double click the function to implement it
Image
  • Add the following nodes, making sure to tick Success:
Image

Get Voxel Data

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

Finalizing the Voxel World setup

  • Open your voxel world blueprint again
  • Add the following nodes to Save Data BPI:
Image
  • Add the following nodes to Load Data BPI:
Image

Wrapping up

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

You will get the following errors:

Image

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
Image
  • Place it near the feet of the player (but not below!)
Image