Guide on making Custom Buildings

From Millénaire Wiki

This guide will teach you how to create custom buildings for Millénaire that will be built in the same manner as the standard buildings.

It is the first in a series of guides which lead to custom development of a whole culture:

  1. This Guide on making Custom Buildings.
  2. The Guide on making a Town Hall.
  3. The Guide on making Custom Villages.
  4. The Guide on making a Custom Culture.

Buildings in Millénaire are divided into three categories, as can be seen in the building plans folder. Core buildings are the buildings your villagers will interact with, live in and trade through. These have a variety of features, ranging from who can live there to what you can buy there to how the villagers interact with it. Core buildings are where the main part of all your buildings should go. Extra buildings are decorative buildings that add to the atmosphere of a village, making it seem more realistic. An example of an extra building is a well or fountain, a building just for looks. Lone buildings are the buildings that are found outside of villages, and are independent of villages.

It is advised that, upon updates for the mod, you make sure you have backup copies of your buildings that you have made. In some circumstances your buildings might be accidentally deleted.

In this guide, the example given will be a very simple construction, a lavoir, which was a public pool used for washing clothes in use in the Norman times Millénaire is set in.


To make a custom building, or any building for that matter, there are two parts. One part is the .png file, which is a file that is made in a program like Paint.Net. Paint.Net is free and, in my opinion, a better tool for this job then the Paint program. The other part is the .txt file, a file that is made using a program like PSPad. PSPad is, also in my opinion, the best program for the job. It should be noted here that creating a .png file is extremely easy when using the exporting/importing tool, but you still need to know how to add certain blocks to your building. The reason for this is the tool cannot transfer over the correct color for a sign, or standing position, or main chest.

.png Plans[edit]

When creating the .png file in your perferred program, you need to know the length and width of your building. Using this information, you resize your file down to whatever the width and length are of the file. If my building is 7 blocks wide by 8 blocks long and has no other higher floors, I would size the whole page down to 8 pixels long (as in up and down) and 7 pixels wide (left and right). If the building has 2 floors, the .png would still be 8 pixels long, but now it would be 15 pixels wide. This is because when buildings are built by the workers in Millenaire, they are built from the bottom floor to the top floor. So the first floor of the building is put first, next there is a separator line made of colors not being used, then there is the next floor. All in all, the picture needs to be 15 pixels wide, 7 pixels across for the first floor, 1 pixel across for the separator line, and then 7 pixels across for the 2nd floor. Using this method, you can keep making more and more floors, just remember to include a separator line between each floor.

File Organization[edit]

For each variation of a PNG-based building, there is one text file with a name of the form "<name>_<variation>.txt", which contains the parameters for all the building levels of that variation, and one PNG file with a name of the form "<name>_<variation><level>.png" per building upgrade, which contains the actual plan. To display an upgrade, you just show the building going up in numbers. For example, if you had monument_A0, the next upgrade would be monument_A1, and so forth. The only thing to remember is that a nonupgraded building is always level 0, and upgrades increase the number. When you create a building, you can include variations. A variation is another type of the same building you are building. An example is you could make a monument_A and monument_B, and monument_A could be a statue, while monument_B would be a column. You would only have to put 'monument' in the village file, and it would randomly choose to build monument_A or monument_B. For an extra example, if you design a "monument" building that has three variations, two with an initial building and two upgrades and one with only an initial building, you will have to create the following files:

The list of variations must start with 'A' and continue with consecutive letters, and for each variation, the number of the upgrade levels must start with 0 and continue with continuing numbers.


.png based plans follow exactly the same parameters as the .txt plans, with two key additions. These parameters must be added to all of this type of plans.

- width: Mandatory PNG plans only: the width of your building, in blocks/pixels.
- length: Mandatory PNG plans only: the length of your building in blocks (equal to the height of the picture in pixels).

Building Plans[edit]

With the .png plans, instead of making a text file for your plans, you draw them with one pixel representing one block. Please note, the images in this section have been scaled up 10x for easy viewing purposes, and your buildings will have to be on the pixel scale.

.png building plans are drawn next to each other, one at a time, with a line in between to distinguish between floors. To know what colour is what, you can use either the Colour Sheet.png or the blocklist.txt files in the building plans folder. So if I want my lavoir to be to start with a simple 4x6 wood pool, I can start by defining the plank layer that forms the bottom of the pool (note that I increase the picture size 10 times), going first in Colour Sheet.png to locate the colour for planks:
Custom buildings guide 2.png

Then I need to do the level above, so I extend my picture by 6 (the width of my building) plus 1 (the separation), and add a border of planks surrounding water sources:
Custom buildings guide 02.png

Upgrade Files[edit]

Now that lavoir_A0.png is finished, let's do a simple upgrade file, so lavoir_A1.png: the side blocks of both floors should now be done in cobblestone. That means we need to set blocks to cobblestone, and we need to skip blocks we are not changing: this is simply white pixels. Also, I want my lavoir to now be called "Lavoir Avançé", and to have a lesser priority for the update than for the original. For that, I have to go back to my Lavoir_A.txt files and add a second line to it:

french:Lavoir Avançé;priority:10

And this image goes into lavoir_A1.png:
Custom buildings guide 01.png

Orientation Of Blocks[edit]

Blocks that needs to be oriented (such as sign or stairs) have different colours representing what side they are facing in the colour sheet. "woodstairsTop" for instance represents a stair the player would walk toward the "top" of the picture plan on. If you had "woodstairsLeft", it would mean the wood stairs would face the left, as in you would walk up the stairs while facing left. Wall-mounted signs and ladders also have a "guess" colour, which uses the same guessing system to place them as the one used in text plans.

Alternative way to create .png plans[edit]

Instead of manually creating the .png plan pixel by pixel, you can also export creations from within the game. To learn how to do this, please visit Guide on exporting buildings from the game

.txt Plans[edit]

The original method of making buildings, some of the standard buildings are still in this format.

File Organization[edit]

When making a building, you only need one .txt file for that building, regardless of number of upgrades. If you have a variation, you need another .txt file. Creating the .txt file goes like the form of the .png file, without the upgrade number, like this: "<name>_<variation>.txt". For instance, if you design a "monument" building that has three variations, two with an initial building and two upgrades and one with only an initial building, you will have to create the following files:

Notice how even though monument_A and monument_B have two upgrades, they still only have one .txt plan, just like the monument_C.


The parameters of your building are how the villagers know how to build the plan, how many times and how often they should make it, or what to do with it. There are three levels of parameters for .txt plans.


First Variation (_A0) only[edit]

- max: the maximum number of buildings of that type to be built. Defaults to 1

First Level Only (_*0)[edit]

- around: the "margin" to put around a building (grass/dirt surface). Defaults to 1.

- orientation: What side your building faces. 0 means the entrance of the building will face "north" in the text file, 3 that it faces toward the left of the text file (which is the case of most of the default buildings). Defaults to 1.

- male: The male occupant of the building, for creating custom occupied buildings. Format is "ml_[villager]". Defaults to none.

- female: The female occupant of the building, for creating custom occupied buildings. Format is "ml_[villager]". Defaults to none.

- shop: Whether a building can act as a shop, and which type. Defaults to none.

- maxDistance: The buildings maximum distance from the town center. It is as a percentage of the village radius. (Optional)

- minDistance: The buildings minimum distance from the town center. It is as a percentage of the village radius. (Optional)

- reputation: The reputation level required with a village before the Town Leader will sell you a player-specific building/lot. Format is xx*xx*xx, where xx is a number of Denier, going from Or to Argent to basic from left to right. If you wish to have a value lower than 1 Denier Or, do not put the first xx*. Defaults to none, making the building a standard, non-bought plan.

-price:The price in Denier to purchase a player-specific building/lot. Format is the identical to reputation. Defaults to none.

Any Level[edit]

- startLevel: How "deep" the first floor of the building is. 0 will mean the first floor will be just above the ground, -1 (most common) that it replaces the last level of earth. Defaults to 0.

- priority: how important building this is for the villagers. Higher priority buildings or upgrades have a higher chance of being picked, proportionally to their priority score (so a building with priority 10 have twice as much chance to get picked than one with priority 5). For level 0 (construction of a new building), only the priority set in the A0 building is used. Defaults to 1.

- french: the name of the building in French, or, if you are very good, in Medieval Norman.

- english: the name in English, if the French one is not guessable by an English speaker.

- signOrder: for buildings with multiple signs, a comma-separated list for matching the order of signs in the plan (going line by line from left to right) with the "in game" order. So far, only used in Archives and Town Halls. In Archives, the number displays information on the villagers, starting from 0. For Town Halls, see the . Defaults to 0, the proper setting for buildings with 0 or 1 sign.

-tag: a special parameter to set one or more tag for a building level. Used for special features, such as adding an alembic to the tavern to allow it to produce calva, or if a guard will visit it on patrol, etc. Check the current building plans to see which tags are available, or see Building Tags. Defaults to none.

Orientation Of Blocks[edit]

For blocks that need to be "oriented", such as signs or stairs, Millénaire will attempt to "guess" the proper orientation. For ladders or signs, it will put it against the first opaque block it finds in an immediately neighbouring block, looking for neighbouring blocks in this order: north, south, west, east. If there are more than one possibilities (such as a sign in the corner of a room, or a ladder in a 1x1 hole) the result will thus vary according to the random orientation of the building. For stairs, the current setup is broken. Expect them to behave weirdly.

Both automated behaviours will hopefully be improved in a future update.

Cost Of Buildings[edit]

The cost of a building level is automatically calculated by Minecraft according to the blocks present in a building plan. Blocks "derived" from one of those (such as cobblestone stairs from cobblestone) are priced in the base resource. "Rare" blocks that are not derived from the four types of building goods always being bought by the Town Hall will be sellable if needed for the current building goal. If you have blocks in an upgrade that were already there in the previous level, their cost will be counted again. A village also does not get resources back from previous levels; in the example of the lavoir above, building the upgraded version will not give the planks replaced by cobblestones back.


While not essential, sub-buildings can be a useful way to add functionality and variety to your buildings. To create a sub-building, you need to generate a new level of the parent building and then convert it.

For example: To add a sub-building to parent townhall_A, generate a new level townhall_AΧ.png, then rename it with the format townhall_A_subbuilding_A0.png.

A new text file then needs to be created townhall_A_subbuilding_A.txt.

In the parent file townhall_A.txt:


will cause the building to start with the sub-building already built, while:


will cause the sub-building to be built when the main building reaches the specified upgrade.

In townhall_A_subbuilding_A.txt the building parameters for .length, .width, and .orientation must match the parent building.


tells the building it is a sub-building, while:


lets the game know where in the upgrade plan of the main building it goes. It's not required, but when importing with the import table will decide what level of the main building appears.

Sub-buildings otherwise are free to have their own set of upgrades, variations (E.g. townhall_subbuilding_B,C), can add villagers or tags, anything that a normal building can do.

Custom Villages and Town Halls[edit]

Guide on making custom villages and Town Halls to be found here.