Not enough ratings
Barony Official Models Workshop Tutorial
This tutorial will show you the tools you need to create modified models voxel files and load them into your game.
Introduction and Software
Hi all, to celebrate our updated Workshop support, here's a new tutorial to edit Barony's model files and load them up in-game!

This tutorial will cover software necessary, what files to edit, and how to load the custom model in-game. We'll be delivering a recolored boulder model as something nice and simple to get started with models.

We first need a Voxel editor to edit our .vox format models, I personally use Black Flux's VoxelShop[] to create models to play around with. Grab it from the site and install on whatever OS you're running on (compatible with Linux/Mac/Windows) before we get started.

Another program that people have used is MagicaVoxel if you're looking for an alternative to VoxelShop. I personally haven't encountered any limitations with VoxelShop as it's fairly well featured and nice to use, we'll be using VoxelShop in this tutorial.

Let's boot up Barony and jump into the Custom Content main menu option.

Standard procedure from the previous Workshop tutorial, click "new mod folder" in the new sub window that appears.

You'll be prompted for a mod folder name, since we're going to be recoloring some boulders, I've gone with RecoloredBoulders. Hit create once you're finished typing and you'll have a new directory inside the Barony mods/ folder.

Model File Locations
Now navigate to the Steam install directory of Barony. Install path on Windows should be something like C:\Program Files (x86)\Steam\SteamApps\common\Barony. You can also find this information by right clicking Barony in the Steam Library page, clicking properties and under the "LOCAL FILES" tab there is a button to "BROWSE LOCAL FILES" which will open up the install directory inside your OS file explorer.

If you open up the mods/ folder inside here, you'll see our new folder RecoloredBoulders.

All new mod directories start with a levels.txt file inside the maps/ folder. We want to delete this as we're not using custom map files for our mod.

Now we want to figure out the location of Barony's boulder model files. Go back to the base directory, and head into the models/ folder. You'll find monster limb models inside the creatures/ folder, doors and portals inside the doors/ folder, in-world item models inside the items/ folder, particles/magic effects inside the particles/ folder, and the rest of the miscellaneous in-game models like furniture/boulders/fountains/chests etc inside the decorations/ folder.

There is also a resource file called models.txt which refers to the location of all model files which you can search through inside a text editor to find the keywords you want. So in the case of boulders you can look for the search term "boulder" and you'll see this line:

The game looks for the line 246 specifically in this file to determine which file to use for the in-game model. So peeking inside the decorations/ folder we find our boulder.vox model to edit.

Now let's open up VoxelShop and import this file we just found!
VoxelShop Editing
When you boot up VoxelShop, you'll see an empty interface like this:

To import Barony's models, go to the file menu and select Import... or CTRL+I to open the dialogue. From here you'll need to navigate to the Steam install directory we found earlier (C:\Program Files (x86)\Steam\steamapps\common\Barony\models\decorations)

Open it up and you should see the pretty Boulder voxel model in front of you. There's plenty of tools in VoxelShop, the Camera or V key lets you drag around the model and zoom in/out with the mouse and holding left click or right click and dragging. You can draw new voxels with the Draw Voxel button or C key and select voxels to recolor or move/delete with the Selection tool or X key. We'll be recoloring the entire model so I'll use the CTRL+A shortcut to select all voxels. You'll see the model highlighted like this to show the selection.

Once all voxels are selected, you can recolor them all at once with the Color Adjuster toolbox in the right side of the interface. Play around with these sliders until you get a color you love. I like pink.

Once you're finished editing the selected voxels, press ESC to deselect all the voxels again and view the model without the gridlines. Now it's time to export to our mods/models/decorations folder. In the file menu once again, click the Export... button or CTRL+SHIFT+E hotkey to open the export dialogue.

Navigate to the Steam mods directory at C:\Program Files (x86)\Steam\steamapps\common\Barony\mods\RecoloredBoulders\models\decorations which is where we want to save the modded file. The location must mirror the path the game normally expects the model file to be. (models/decorations/)

From the dropdown box, select VoxLap Format (*.vox) which is the correct model format that Barony accepts. Any other selection likely won't work or may crash the game on load, so make sure this is correct! Keep the model name the same as the original (boulder.vox) as that's the filename specified inside the previous models.txt file we looked at earlier.

If we take a peek inside our mod folder now, we should see our exported boulder.vox file as below.

If you want to call it something else, you'll need to copy models.txt to your mod/models/ folder and change the name inside that copied file to match your desired name. (E.g we could call it boulderPink.vox and change the models.txt file to match at line 246.)

Editing the models.txt file is not recommended as it'll conflict when loading 2 or more mod files that edit the models.txt file. So if you want to name your exported models with descriptive filenames, I recommend just making a new directory somewhere else on your computer where you can keep all of your VoxelShop project files. You can manually copy/paste from here into the Steam directory which is a better workflow than just directly exporting from VoxelShop. You can name your revisions boulderV1, boulderV2 as you progress in your voxel artistry skills and play around with what works best, then finally renaming them to the proper boulder.vox filename in the Steam directory once you're ready to test in game.

Time to load this model in game!
Loading the Model In-Game
From here, the hard work is done. All that's left is selecting your local mod folder to load from the Custom Content window. Click "local mods" inside this window to look for all mod folders inside the Steam Directory, and hit "Load Item" to prepare the file for loading.

Now click "start modded game" to load the files up in Barony (You'll see a flicker of a black screen while this happens.). Shouldn't take too long to reload this single model, but could be a couple seconds if there is a lot of changed model files to load. Note that loading mods with just edited models will not affect your Steam Achievements.

The only thing that disables Steam Achievements is having content inside the mods/RecoloredBoulders/maps/ directory, which I mentioned before you should delete the levels.txt file when you first create the folder! So if you are at the Character Select window and in the bottom right there is a Steam Achievement disabled warning, check that the maps/ folder is empty inside your mod. It'll look like this if disabled:

Now we can run around the mines and look for a shiny boulder!

Looks fantastic.
That's all for this tutorial, hope it helps some of you along!

To upload the mod on Steam, I recommend reading my previous Workshop primer guide to show the selection of mod files for Workshop upload. The process is identical for all sorts of Workshop content, doesn't matter if it's models or maps inside your mod. Remember to choose the models tag on the Workshop upload screen to let everyone know you've got some custom models to show off!

You can look up some guides online for VoxelShop if you'd like to know more about some editing features and tools available.

And some final notes explaining how model files are handled:
  • Their size does not change the collision box as that is entirely handled in the source code.
  • Changing total voxel model height sizes can make models float or sink into the ground. Their center point is expected to be fixed in the source code to determine how much to move the model around in the world. If the model is suddenly smaller, then it'll likely appear floating as the code anticipated a larger model to push up higher vertically into the world.
  • When editing monster limbs, you'll also see a limbs.txt file inside the monster folder e.g models/creatures/skeleton/limbs.txt which tells the game how much to offset each of the limbs for the monster.
  • For example, the text
    "# head 0 0 0 -1.5" says the model index 0 (head) should move 0 voxels horizontally, 0 voxels forward/backward and -1.5 voxels up/down. The head model skeleton_head.vox in this case is raised 1.5 voxels since it's higher up on the monster's body, otherwise it'd appear embedded inside the torso.
  • The limbs.txt file is not currently supported by the Workshop file loading, but you can play around yourself with the base game directory contents to see the effects. It's a lot of trial and error if you get around to resizing monster limbs, results will definitely vary when things start rotating and such.
  • To reload limbs files in-game, use the command /reloadlimbs between saving the limbs.txt file to better see the movement for yourself.

    Any comments/questions/concerns let me know how you go!

< >
WALL OF JUSTICE  [author] Jul 26, 2020 @ 5:10pm 
Hey Nibiki, in MagicaVoxel you must export as 'slab6' type for it to work. The actual file format is still .vox
Nibiki Jul 26, 2020 @ 1:27pm 
Hey, thanks for the well organized tutorial. I followed the instructions a couple of time with the one exception that I used MagicaVoxel to edit the boulder instead of VoxelShop. (VoxelShop is crashing on launch after the splash screen.) But I'm just changing the color of existing voxels, and exporting as a .vox file. I don't see what would be different between the two editors.

But upon enabling the local mod and clicking Start Modded Game, the game crashes to desktop.
Lyiusa Eterna Jun 22, 2018 @ 2:14am 
Always remember that making models, as said towards the end of the guide is alot of trial and error - Can say this myself too!

Remember that by adding something like a veil, a cloak, or any fork of back acessory to any model, you have to accompany it by voxels infront aswell
The threshold should be 3 voxels, if you want it to look good, but 2 if you want to be precise.
But it's absolutely important for it to be under 5, if you plan to make a model, otherwise it will look disfugred or dis-jointed.

So if I add 5 voxels to the back of the model, for say a cloak. The center of the model will now be placed 4.5~ voxels backwards... Not idea. However, if I add two voxels upfront now, that will make it 2.5/3.5~ voxels backwards. Which is far more ideal, for making the model look natural and nice!
Lyiusa Eterna Jun 22, 2018 @ 2:14am 
Always remember, that you should experiment around, and test to get the desired result - Never give up because it fails to work on the first attempt. Rework it, until you get the desired result. After all, you're eventually going to be good enough, to understand the off-sets by adding cloak voxels, and how much you need to "add" to the front, to compensate - Work based off of black offset voxels at first if you must, but it's great to learn how to do that!
Always remember, it's not simple to get into, but once you get it down, it's hard to lose!