Welcome to Brushwood Buddies modding! Modding allows you to create:
Before we start with the actual modding for creating new scenarios, items and more, a short note about language modding. Brushwood Buddies allows you to create your own language files and if you do that, that's totally awesome! A language file contains all the text displayed in the game and is delivered as a compact XML file. Even the languages supported with the original game (English and German) come with such a language file. If you are not interested in translating the game to another language, just skip this section.
Language files are stored in the "./Content/languages/" folder of the game's installation. If you play Brushwood Buddies on Steam, right-click on the game in the Steam library and choose "Properties". Select the "Local Files" tab und click on "Browse Local Files". Then navigate to the mentioned folder "./Content/languages/". Because we don't want to change the game's installation, we copy the "language_english.xml" in the "languages" folder to the following destination of the user folder:
If the "languages" folder doesn't exist there, create it. Now rename the language file by changing the "english" part of "language_english.xml" appropriate to your language, e.g. "language_spanish.xml". The language will be available in the game's options as "Spanish" then.
To make changes to the language file, open the "language_spanish.xml" (example) with a text editor (Notepad or Notepad++). You will see, that the whole file has a simple structure like:
<?xml version="1.0" encoding="utf-8"?>
<LocalizationWrapper xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Entries>
<Entry>
<Name>... entry name ...</Name>
<Data>
<string>... some data ...</string>
<string>... some data ...</string>
... more data strings ...
</Data>
</Entry>
... more entries ...
</Entries>
</LocalizationWrapper>
A part of the English language file looks like this:
<?xml version="1.0" encoding="utf-8"?>
<LocalizationWrapper xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Entries>
... more entries ...
<Entry>
<Name>MainMenu</Name>
<Data>
<string>Campaign</string>
<string>Challenges</string>
<string>Recipes</string>
<string>Options</string>
<string>Credits</string>
<string>Exit</string>
</Data>
</Entry>
... more entries ...
</Entries>
</LocalizationWrapper>
You see, the language file is full of "entries" (<Entries></Entries>) which have an "entry name" (<Name></Name>) and a couple of "data entries" (<Data></Data>) whereas every data entry is a line of text (<string></string>).
When you are going to translate the text, don't touch the entry names like "MainMenu". They are used by the game to access the data entries. So when the main menu is shown in the game, it checks the file for the entry "MainMenu" and gathers all the strings. How the data is read and used depends on the situation. For the main menu, it expects the buttons' names which appear from left to right in the game if you place the mouse on them. Therefore, to translate the main menu texts, you have to adapt the data entries to the language you are translating to. For Western languages, special characters like ä, ö, ü and ß in German, should be fully covered. If not, let me know via mail (info@stevencolling.com). Asian languages are not supported. The encoding of the file is "UTF without BOM".
Short note: the text sometimes uses codes like [color=255,0,0][/]. Don't touch them to reach similar results. You should pay attention to spaces, too. If a data entry starts with some space like " ", there is always a reason for that. The "#" character (or "#1", "#2" etc.) are used as placeholders. Don't forget to submit your language file to the Brushwood Buddies Steam community and big thanks for taking the time!
Before we start to make our first mod, please check out the example mod which comes already with the game. You have to activate mod loading in the game first. So start the game, go to the options and scroll all the way down until you find "Load Mods". Activate that and check the "Challenges" (second button in the main menu). The example mod will appear there and can be started. It's just a small proof of concept which adds a new forest tile with little yellow flowers on it as well as trees with beehives. It also includes a couple of new items relating to bees and honey and corresponding crafting recipes, like combining a campfire with a "beehive protected by a bee" to get an "unprotected beehive". Making your own mods is super easy, so let's do that.
To create a new mod, first browse to the game's content folder. If you play Brushwood Buddies via Steam, right-click on the Brushwood Buddies entry in your game library on Steam and click on "Properties" in the appearing context menu. Then head over to the "Local Files" tab and click on the "Browse Local Files" button. This will open the game's folder. Now navigate to "./Content/mods/". If you don't own the game on Steam, you can find the same folder in something along "installation path of Brushwood Buddies/Content/mods/".
Every mod is represented as a folder with files in it. The "Example Scenario" mod is accordingly stored in the "example" folder. We don't want to make direct changes to the installation of the game. Instead, we want to use the Content folders in our user directory instead. So our first task is to copy the example mod folder we found to the following destination:
If there is no "mods" folder within "BrushwoodBuddies", just create it. After copying the example folder to this place in the user directory, rename it to anything you want, but don't let the mod folder start with an underscore "_" as folders and files starting with this character are ignored by the game (it's a convenient way to make something temporarily not able to load). Call it, for example, "myfirstmod".
Your tasks:
If you open your new mod's folder, you find a couple of files there, namely:
It's not necessary to have all the files, so if your mod doesn't add new decorations, you can remove this file. Don't change the file's name (except for changing the "x" in "texture_x.png" and "scenario_x.xml", as the file names indicate their use.
The "mod.xml" contains the mod's main data. Open it with a text editor (Notepad or Notepad++) to have a look.
Make sure that you don't mess up the tags "<...></...>" as missing brackets or typos in the identifiers within these brackets will lead to a game crash.
Your tasks:
The "items.xml" contains all the information of the items you want to add, except their visual representation, which is stored in a texture file. After opening the file, you see a hierachy of things enclosed by <...></...> tags. You will see something along this:
<?xml version="1.0" encoding="utf-8"?>
<ItemSetModDescriptor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<ItemTextureId>1</ItemTextureId>
<ItemTextureFirstSourceStart>
<X>0</X>
<Y>150</Y>
</ItemTextureFirstSourceStart>
<ItemTextureItemsPerRow>6</ItemTextureItemsPerRow>
<ItemIndexUsedForSourceOffset>0</ItemIndexUsedForSourceOffset>
<Items>
...
</Items>
</ItemSetModDescriptor>
The presented properties mean the following:
So basically the "items.xml" stores all the item information and how they are handled. It also references the texture file which stores the icons of the added items. Now let's check out how a single item is defined:
The mod can't be loaded yet, as the flags of the items (and other parts of the mod) conflict with the example mod. To solve this, let's remove all the items in the items.xml, except one, which will be replaced with your first own item. As an example, we could add an orange fruit to the game. It's item data would look like that:
<ItemModDescriptor>
<Flag>ORANGE</Flag>
<Name>Orange</Name>
<OrderIndex>0</OrderIndex>
<SoundTheme>Meat</SoundTheme>
<IsListed>true</IsListed>
<IsProtectedFromGlitchBeam>false</IsProtectedFromGlitchBeam>
<BaseScore>0</BaseScore>
</ItemModDescriptor>
Our orange fruit needs a graphic, too. Open the "texture_1.png" with the graphic editing program of your choice. GIMP, for example, is a free tool which does the job. Remove the old bee-related item icons. As defined in the "items.xml", the first item icon is expected at position (0,150) in the texture file. Some graphic programs support showing a raster. If so, set the raster size to 50x50 pixels, because that's the size of a single item icon. In GIMP, you can activate the raster by selecting "View > Show Raster" and configure it under "Image > Configure Raster" to be 50x50 pixels wide.
Draw a fancy orange fruit at the position where the beehive without a bee was.
Now let's add a second and a third item to the "items.xml". Why not something along orange juice and an orange tree?
<ItemModDescriptor>
<Flag>ORANGE</Flag>
<Name>Orange</Name>
<OrderIndex>0</OrderIndex>
<SoundTheme>Meat</SoundTheme>
<IsListed>true</IsListed>
<IsProtectedFromGlitchBeam>false</IsProtectedFromGlitchBeam>
<BaseScore>0</BaseScore>
</ItemModDescriptor>
<ItemModDescriptor>
<Flag>ORANGEJUICE</Flag>
<Name>Orange Juice</Name>
<OrderIndex>1</OrderIndex>
<SoundTheme>Water</SoundTheme>
<IsListed>true</IsListed>
<IsProtectedFromGlitchBeam>false</IsProtectedFromGlitchBeam>
<BaseScore>0</BaseScore>
</ItemModDescriptor>
<ItemModDescriptor>
<Flag>ORANGETREE</Flag>
<Name>Orange Tree</Name>
<OrderIndex>2</OrderIndex>
<SoundTheme>Wood</SoundTheme>
<IsListed>true</IsListed>
<IsProtectedFromGlitchBeam>false</IsProtectedFromGlitchBeam>
<BaseScore>0</BaseScore>
</ItemModDescriptor>
The order index only affects the order on the recipe screen and is not related to the texture file. The second item in the "items.xml" file's list will get the second icon in the corresponding texture file. Therefore, we have to make an orange juice graphic to the right of the orange fruit icon (at (50,150)) and the orange tree at (100,150). Remember, our "items.xml" defines that there are only 6 item icons in one row, so the 7th icon starts a new row at (0,200). Save the texture file and "items.xml".
Your tasks:
Recipes define how items are combined to a new item. There are certain rules you have to follow:
The "recipes.xml" represents every single recipe enclosed in
<RecipeModDescriptor></RecipeModDescriptor>, like:
<RecipeModDescriptor>
<IsProtoRecipe>true</IsProtoRecipe>
<Incomes>
<string>CAMPFIRE</string>
<string>BEEHIVEBEE</string>
</Incomes>
<Outcomes>
<RecipeOutcomeModDescriptor>
<Outcome>BEEHIVE</Outcome>
<Tokens>1000</Tokens>
</RecipeOutcomeModDescriptor>
</Outcomes>
<Protections>
<string>CAMPFIRE</string>
</Protections>
</RecipeModDescriptor>
The recipe shown above allows to combine a "campfire" and a "beehivebee" (beehive with a bee) to get a beehive "beehive" (without a bee). The campfire won't be consumed during the crafting. The appearing properties mean the following:
Let's remove all the recipes of the example mod and add our own recipes:
<RecipeModDescriptor>
<IsProtoRecipe>true</IsProtoRecipe>
<Incomes>
<string>ORANGETREE</string>
</Incomes>
<Outcomes>
<RecipeOutcomeModDescriptor>
<Outcome>ORANGE</Outcome>
<Tokens>1000</Tokens>
</RecipeOutcomeModDescriptor>
<RecipeOutcomeModDescriptor>
<Outcome>STICK</Outcome>
<Tokens>500</Tokens>
</RecipeOutcomeModDescriptor>
</Outcomes>
<Protections />
</RecipeModDescriptor>
<RecipeModDescriptor>
<IsProtoRecipe>true</IsProtoRecipe>
<Incomes>
<string>BOTTLE</string>
<string>ORANGE</string>
</Incomes>
<Outcomes>
<RecipeOutcomeModDescriptor>
<Outcome>ORANGEJUICE</Outcome>
<Tokens>1000</Tokens>
</RecipeOutcomeModDescriptor>
</Outcomes>
<Protections />
</RecipeModDescriptor>
<Protections /> is the way to indicate an empty list.
Your tasks:
We added our own items and recipes, now let's make our own tile, too. A tile is the place where items spawn. It defines which items can spawn and how the floor looks like. The tile type "FORESTTREES", for example, is a green floor with tree decoration left and right which appears in the forest environment during the main game's tutorial and generates trees only. Please open the "tiles.xml" now.
The file defines two properties TileTextureId and TileTextureTilesPerRow which are similar to the ones in the "items.xml":
After these two properties, a list of tile definitions within "<Tiles></Tiles>" adds new tile types to the game. A tile type definition can look like this:
<TileModDescriptor>
<Flag>FORESTBEES</Flag>
<DecorationReference>FORESTBEES</DecorationReference>
<FloorReference>1</FloorReference>
<HasFog>false</HasFog>
<IsProtectedFromGlitchBeam>false</IsProtectedFromGlitchBeam>
<Outcomes>
<TileOutcomeModDescriptor>
<Outcome>TREE</Outcome>
<Tokens>2000</Tokens>
</TileOutcomeModDescriptor>
<TileOutcomeModDescriptor>
<Outcome>BEEHIVEBEE</Outcome>
<Tokens>1800</Tokens>
</TileOutcomeModDescriptor>
</Outcomes>
</TileModDescriptor>
And the appearing properties mean the following:
Now let's remove the old tile type and create a new tile type which can generate our added orange trees:
<TileModDescriptor>
<Flag>FORESTORANGES</Flag>
<DecorationReference>FORESTORANGES</DecorationReference>
<FloorReference>1</FloorReference>
<HasFog>false</HasFog>
<IsProtectedFromGlitchBeam>false</IsProtectedFromGlitchBeam>
<Outcomes>
<TileOutcomeModDescriptor>
<Outcome>TREE</Outcome>
<Tokens>1000</Tokens>
</TileOutcomeModDescriptor>
<TileOutcomeModDescriptor>
<Outcome>ORANGETREE</Outcome>
<Tokens>2000</Tokens>
</TileOutcomeModDescriptor>
</Outcomes>
</TileModDescriptor>
The tile type definition above will give us a new tile type "FORESTORANGES" which will get its own decoration objects (DecorationReference is "FORESTORANGES"), uses the first tile graphic in the corresponding texture, has no fog, is not protected from a glitch beam and generates items of the type TREE and ORANGETREE, while the orange tree has a doubled chance to appear. You should also open the "texture_2.png" and change the tile's graphic if you want. Why not placing some oranges on the grass as decoration?
Your tasks:
Decorations are graphics placed on a tile, like trees, rocks or shrubs. Every tile has 4 of these decorations: two on the left side, two on the right side. The "decorations.xml" allows to define new decoration objects. Open it, so we can check out its properties:
A decoration set contains a list of sources (areas in the referenced texture file) and maps them to tile types. Here is an example from the example mod:
<DecorationModDescriptor>
<Flags>
<string>FORESTBEES</string>
</Flags>
<Sources>
<Rectangle>
<X>0</X>
<Y>0</Y>
<Width>88</Width>
<Height>124</Height>
</Rectangle>
<Rectangle>
<X>88</X>
<Y>0</Y>
<Width>98</Width>
<Height>109</Height>
</Rectangle>
<Rectangle>
<X>186</X>
<Y>0</Y>
<Width>105</Width>
<Height>113</Height>
</Rectangle>
<Rectangle>
<X>291</X>
<Y>0</Y>
<Width>88</Width>
<Height>95</Height>
</Rectangle>
</Sources>
</DecorationModDescriptor>
This DecorationModDescriptor will define which decoration objects will be available as decoration for a tile of the type FORESTBEES. The Sources are areas within the texture file. Every source is a Rectangle with a position X and Y as well as a Width and a Height. The first rectangle is therefore at (0,0,88,124). Coordinates in texture files always start at (0,0) in the top-left corner. Please open "texture_3.png" to check the decoration graphics. (0,0,88,124) refers to the leftmost tree in the texture file. The rectangle containing this tree starts at (0,0) and has a width of 88 and a height of 124. The second tree is at (88,0,98,109) and so on. You can make the texture file bigger in size and add additional decorations, which then have to be referenced in the "decorations.xml" with a corresponding source.
A generated tile will sample its decoration out of the provided sources. The source set can be smaller or bigger if you want, it doesn't have to have a size of 4 sources. So feel free to add more trees for our orange fruit mod with little oranges on them or remove the yellow beehives on the texture file provided with the example mod.
Don't forget to set the flag to FORESTORANGES, as this was the tile type we defined earlier in the tutorial. The decoration descriptor could look like this:
<DecorationModDescriptor>
<Flags>
<string>FORESTORANGES</string>
</Flags>
<Sources>
<Rectangle>
<X>0</X>
<Y>0</Y>
<Width>88</Width>
<Height>124</Height>
</Rectangle>
<Rectangle>
<X>88</X>
<Y>0</Y>
<Width>98</Width>
<Height>109</Height>
</Rectangle>
<Rectangle>
<X>186</X>
<Y>0</Y>
<Width>105</Width>
<Height>113</Height>
</Rectangle>
<Rectangle>
<X>291</X>
<Y>0</Y>
<Width>88</Width>
<Height>95</Height>
</Rectangle>
</Sources>
</DecorationModDescriptor>
...but perhaps with more sources?
Your tasks:
The final step is to setup a scenario which actually uses the stuff we created. Please open the "scenario_1.xml" of our mod. It's a bit longer than the other files, but not complicated. Let's check the properties:
The Creatures part let you decide which creatures are available and therefore control which recipes are available, as the count of creatures represents how many ingredients a performed recipe can have. Each creature definition is wrapped up in a <CreatureDescriptor></CreatureDescriptor> like this:
<CreatureDescriptor>
<Creature>WOODY</Creature>
<StartBoardIndex>0</StartBoardIndex>
<EndBoardIndex>2</EndBoardIndex>
<UseCustomConfiguration>true</UseCustomConfiguration>
<IsLovingDiscarding>true</IsLovingDiscarding>
<ResetOriginalItems>false</ResetOriginalItems>
<HappyItems>
<string>HONEY</string>
</HappyItems>
<SadItems>
<string>BEE</string>
</SadItems>
</CreatureDescriptor>
<CreatureDescriptor>
<Creature>TURNIP</Creature>
<StartBoardIndex>0</StartBoardIndex>
<EndBoardIndex>2</EndBoardIndex>
<UseCustomConfiguration>false</UseCustomConfiguration>
</CreatureDescriptor>
The example above will add Woody as creature. The properties mean the following:
So the scenario from the example mod will have Woody and the turnip lady playable right on the first board. While the turnip lady doesn't had any changes, Woody will love HONEY and hate BEEs from the example mod. As we removed these items during the tutorial, you should remove or replace them, too. Perhaps Woody likes orange juice?
After we set the creatures, let's have a look at the final part of our mod: the boards. They are defined within the Boards area and every single board is enclosed in a <BoardModDescriptor></BoardModDescriptor>. Here is an example for a single board:
<BoardModDescriptor>
<SizeX>4</SizeX>
<SizeY>3</SizeY>
<Environment>FOREST</Environment>
<IsHappinessRelevant>true</IsHappinessRelevant>
<TravelItem>HONEY</TravelItem>
<ClueItems />
<TilesAreRandomized>true</TilesAreRandomized>
<Tiles>
<string>FORESTBEES</string>
<string>FORESTBEES</string>
<string>FORESTBEES</string>
<string>FORESTBEES</string>
<string>FORESTTREESROCKS</string>
<string>FORESTTREESROCKS</string>
<string>FORESTTREESROCKS</string>
<string>FORESTTREESROCKS</string>
<string>FORESTGLADE</string>
<string>FORESTGLADE</string>
<string>FORESTGLADE</string>
<string>FORESTGLADE</string>
</Tiles>
<ItemsAreRandomized>true</ItemsAreRandomized>
<Items>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
<string>NONE</string>
</Items>
</BoardModDescriptor>
The properties of a board are:
<ClueItems>
<string>BOTTLE</string>
<string>ORANGE</string>
</ClueItems>
Your tasks:
Congratulations for making your first mod! In the next part we will test it.
Save every document you opened and start the game. If it instantly closes (sometimes without any notification), it likely crashed. There should be a crashlog generated in
Open the crashlog and check what kind of error you had. It's often related to typos in flag names or accidentally redefining an already existing flag. If the error message doesn't help, visit the Steam Brushwood Buddies forum (there's a modding subforum). It's better to submit your problem there, so everyone can see the solution.
If the game started normal, please make sure in the options that mods are allowed to load. If so, there should be two mods available after you clicked on the "Challenges" button in the main menu: the example mod and your own mod. Go and pick some orange fruits!
Short note about a common mistake: sometimes you test a mod and then make changes to it but after you reloaded the game, the changes aren't visible. If your scenario can be saved, you are likely created a save game and instead of loading a new session with your scenario changes, it justs shows you the old state. Therefore, you should delete the scenario's save game beforehand (with the little red button below the scenario's button) or set CanBeSaved in the scenario's file to "false" while testing.
Another tip: mods do save data into the player profile, for example which of the mod's recipes were discovered or if the scenario was already solved. You can reset this data by scrolling down the options and clicking on the corresponding button (more details are available in the options menu).
Mods are able to share definitions between them. Therefore, flags for created items and so on should be unique. A new item "ORANGE" will be available in other mods, so you can make additions to the creations of other creators or make a theme mod, which adds new items and recipes, but doesn't use them in a scenario, so others can utilize your mod for their own scenarios.
If your mod is ready, create an archive out of it: right click on the mod's folder and choose "Send to" and "Archive" (or similar) in the appearing context menu. It will generate a "yourfirstmod.zip" which others can extract in their mod folder to play your mod. Be sure to upload and download mods only from trusted sources!
Do whatever you want with the modding to achieve interesting puzzles others can play. If you check the style of the original game, you encounter a couple of style rules. You don't have to follow them, but if you want to have a consistent look, here they are:
Sound Themes:
Environment Types:
Creature Types:
Tile Types:
Item Types:
Thank you for being part of the modding community! Don't forget to share your mod in the Steam forums.
Cheers,
Steven