Back to Main

Voxel Eras Modding Tutorial - Create a mod

Creating a mod

Creating a mod for Voxel Eras is fairly simple thanks to the incredible work of the developer. It requires a very little setup :

1. Locate the game directory

You can do that by right-clicking on the game on Steam and clicking on Manage > Browse Local Files (or just find the SteamLibrary/steamapps/common folder then look for Voxel Eras).

2. Go into the mods folder and create your mod folder

I recommand following the same naming convention as the two other base mods (snake_case or kebab-case in lowercase).

3. Create a mod.toml file

This file will give the information about the mod to the game

identifier="ModNameHere:AuthorName"
name="Your Mod Name Here"
description="This is a simple description."
authors=["You", "The Neighbor"]
dependencies=[]
entry="mod_folder_name_here/entry.rhai"
version="0.1.0"
sync=false

You have a bunch of information here but the most importants are :

Once that’s done, we need to actually make the entrypoint.

4. Create your mod entrypoint

At the root of your mod, create a new file and name it entry.rhai (or whatever you set in entry in the toml file). Open the file in your editor of choice (I use Visual Studio Code with the Rhai Language Support extension), and add this :

fn setup(mod_info) {
    // Your mod content here!
}

There, your mod is technically ready! You just need to add content.

What’s next?

Before continuing I suggest adding two new subfolders: assets and scripts. We will use them in future tutorials to keep everything organized. You can also take a look into the game’s base mods voxel_eras (which contains all the game content) and wiring-destiny (which is a mod adding redstone-like elements to the game).

You can also generate the documentation for the modding api by addings --docs to the launch options in the General Settings of the game on Steam. It will create a docs folder into the game’s directory with a bunch of html files and also a api.rhai that lists all the elements (that can be helpful as sometimes stuff are not covered in the html files).

Now, I believe we can go on and create a very simple block!