You are on page 1of 7

Floorplans Explained

For those that are interested I thought I would explain how our floorplan file system works
All our floorplans are basically text files.
All floorplans are located in the assets/floorplans/default/default folder within the mod zip file
If you open one up youll see something like the following:-

So what does this all mean ?
Well taking the file line by line..
v 2'builder hut, level 1 (9x8x8)

v 2 means its a version 2 floorplan file. All floorplans in use should be V2, although some of the
older ones distributed with the mod are still V1 this may mean they no longer work. Everything
after the is just a note to describe the floorplan, in this case it is the builder hut level 1 and has a
size of 9 x 9 x 8 (X, Y, Z). There is nothing here you really need to consider changing, but if you ever
create a new floorplan, good practice is to fill this in to give others info on what the floorplan is.
structure
This just means it is a structure, rather than a wall. This effects how the mod builds the floorplan
all normal buildings should use structure. See the Walls section for an explanation of non
structure floorplans
4 1 3
This is a VERY important line as it tells the mod where the building should be located in relation to
the sign.
The first figure is the number of positions from the left, the middle number is the height the sign is in
relation to the floorplan, and the third is the distance away from the sign.
All floorplans consist of a number of 2 digit codes that represent the block to be placed in that
position. These are arranged in a grid fashion that represents the X, Z axis each level of Y axis is
represented by a different level in the floorplan file
0 0 0 is considered the top left of the floorplan, so 4 1 3 will mean the building will be built with the
sign located at location 4 across and 3 down, as shown below.


So as you can see on the left, the top
left position is 0,0



Having the sign position at 4 1 3
means the building will be positioned
so the sign is 4 positions over and 3
down from the 0,0 space (i.e. at 4,3
on the grid above)

These numbers can be negative if you
want.
The 1 for the height means the sign should be at Level 1 in the floorplan file. Using a negative for
the Y value means the floorplan will be constructed above the sign by whatever the value is.
NOTE: the system always orientates the floorplan so the TOP EDGE of the floorplan is facing you
when you place the sign. Therefore it is usual to have the building entrance at the top, so when in
game the building entrance is facing you when you place the sign. For clarity its only the build sign
orientation that matters the chest itself can be placed in any orientation and has no effect on the
building orientation.
For Example
Front of Building





Direction player was facing when they
placed the sign, and therefore also the
front of the building


Location of Chest (Note the blank space)
This is at 4 0 3




Location of Build Sign above chest (Note the
blank space) This is at 4 1 3






Location directly above sign (Note it is a ..
space again)


Each floorplan is made up with a 2 didgit code in each space each separate code relates to a
different block, or block and meta data. All of these codes are registered in the default.lexicon file.
The:-
Glossary
@ include default.lexicon

Means this particular floorplan will use the codes listed in the default.lexicon file. Changing this file
reference means you can make the system use a different file if you so choose.

The inside of the default.lexicon looks like this.



So everywhere there is a CC in the floorplan, a Smoothstone block will be placed, everywhere
there is a mw then a block 139 with meta data 1 will be placed (Mossy Cobblestone Wall).

By editing the codes in this file you can change the blocks used in every floorplan. So if you dont
like white wool walls for the inn for example you can change the code oo from the block ID of
white wool to whatever block id/meta data is appropriate for the material you choose this can of
course also include blocks added from other mods. If you would rather all wooden buildings in the
game were made of spruce rather than oak, you only need to change the lexicon entries to point to
the correct block/meta data for the spruce wood.

Blocks which can have multiple orientations such as doors have multiple entries as per the below.

In this case the number after the 63 dictates the orientation of the block

There are two other special codes, which are the first two listed above.

=empty - wherever two spaces appear in the floorplan the builder will completely ignore those
locations this is essential to stop the builder destroying things like the colony chest and build sign
during the build, or chests placed in earlier floorplans that may have items in them now.

..=clear - this will make the builder replace whatever is in that block with an air block. This is useful
in the first level of every floorplan to clear out the existing terrain. The existing block removed is
retained in the builders inventory. This is why sometimes the builder can wind up with otherwise
unobtainable blocks (i.e. grass) this is due to be changed so only obtainable blocks can be
returned.

NOTE: the double space and double dot codes are not changeable they are hard coded.

Using a text editor you can change any aspect of the floorplan or lexicon to make buildings appear as
you wish.

Within the floorplan youll see each level of the building from base, level1, level 2 etc. which is
basically one level higher each time. All the way up to the top of the roof. Its easy to add additional
levels, just ensure they contain the same number of locations (i.e. 9 x 8 in our example above).

SCANNING

Within the mod is also a scan feature where you can ask the builder to scan an area in game and it
will generate a text file in the format above that you can re-use.

The syntax for this is to place a sign with:-

scan on the top row
<Floorplan name> on the second row (this can be anything you wish but should be unique)
x y z size of the plot you wish to scan.

The x y z is taken from the location of the sign, but as the scan feature is currently broken, I cant
verify whether it assumes the sign is at location 0,0,0 or in the centre of one side. Once we fix it Ill
do a full tutorial on this feature.

What this feature does provide (when working) is an easy way to save structure you construct for
use in future games, or even distribute them to your friends and other minecolonies players.

Dont forget any floorplan can be built at any time by manually placing a sign with the following
syntax

build on line 1
floorplan name on line 2

So for example build townhall4 will build the 4
th
level of townhall at the location specified
(note the building will be positioned as if the manual sign you have placed was on top of the
townhall chest, so in this instance if you want the base of the floorplan to be level with the ground
you will want to place the sign up a couple of blocks) no townhall chest will be placed of course,
and the building will serve no active function in the game.

WALLS

The only exception to the above is the various different wall type floorplans.

Wall type floorplans look like the following :-



You will notice the Structure entry of a normal floorplan has been replaced with gwoc It took me
ages to realise this means Great Wall Of China When the mod sees this instead of Structure it
knows to treat the floorplan as a wall.

With a wall build you can specify a length for the wall to be built by adding a number to the third line
of the sign.

You will also notice the defaultHeight entry With this you can amend the height of the wall. (Note
it MAY be possible to override the default height on the sign (number on the 4
th
row perhaps?) I
have never tried this before so I dont know a Cookie to the first person to figure it out.

There is also an Adjust_to_land_height_interval number. When walls are built, they do not plough
through the land automatically, but can follow the natural contour of the land. This number sets the
frequency in length that the wall will change its base height by 1 block to try and match the existing
ground level. So with this default figure of 2, every other block the wall can adjust its own build
height by 1 block to try and best match the ground level.

Note I think if you set this to a number greater than the length you want to build it effectively means
it will never change height and will go straight through any ground that might be in the way.

In the various wall floorplans themselves there is a layout similar to the following :-


This is built similar to a normal structure,
however the base level is always the lowest level
and is usually the level directly below the sign
(the 0 1 0 is telling the mod the sign is 1 level
higher than this level

The middle level is repeated as many times as
necessary in the Y axis to create the Overall
height specified in the defaultHeight number,
and is always built at least once. (the 0 0 0) is
telling the mod the sign is on the same level as
this level

The top level, and any additional levels above
this is built above the last middle level.

I dont actually understand the 0 2 0 here as this
would indicate the sign should be 2 levels ABOVE
this, but its not and the mod does built these
levels above the middle levels needs
investigating as to how this actually works.



You will notice this floorplan is 4 long (has 4 rows per level) if you specify a length less than 4 it will
only build the required number of rows, starting with the top. If you specify a length in excess of 4,
it will repeat the plan as necessary to create the required length. You can see in the example above,
the top level has a single t5 *which is a torch) so if you built this particular wall say 40 long, there
would be a torch repeated every 4 blocks along the top of the wall.

Wall floorplans do not have to be 4 rows, they could be any number of rows, the mod will always
repeat the rows if it cant find enough, so if you are designing a wall that is identical all the way
along, you only need to make the floorplan with 1 row.

SUMMARY

So although our building system looks complicated, its actually fairly simple and highly customisable
once you understand how it works. I hope this has explained things sufficiently to let you go ahead
and play around with the floorplans / lexicon, and to create some new and exciting variations on the
buildings.

If you come up with any great amendments, please consider sharing them on our forums at
www.minecolonies.com and the best ones will make it into the mod!

You might also like