Easy Systems RPG

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)

  • 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!)

Last updated