Meeple Station mod guide v0.5.12

Documentation for Meeple Station, for those wanting to get involved in modding.

Posted by on


Read the following, to get started modding Meeple Station. We have attempted to make the sprites and rulesets as flexible as possible, and will continue to build moddability into the core of the game. We'd like to see Meeple Station converted into a Bunker, themed like your favorite shows, or even more insane ideas tried. If you'd like to join up with a team, meet some other fellow modders, you're welcome to join our official discord here. Here are some example mods we made to help get you started:

Make sure to read the welcome channel to help you get to the modding community! Everyone is welcome!

Grid Introduction

Every cell in game is located with a coordinate, X, Y and Z. Each cell can only contain one tile and one item. Tiles are objects such as hull segments, asteroid chunks or rigging. Items are more commonly referred to as furniture, such as chairs, tables, life support and cables. You can only have one chair on a cell and one ladder segment. Keep this in mind when designing furniture or tiles for the game.

Setting up

To start making a mod you will first need to create a folder. Name it whatever you like, this will be the name of your mod. When you are ready to test your mod you will need to place it into the mods folder inside the game's main directory. This directory depends on your current OS.

Windows:
C:\Users\username\AppData\LocalLow\voxGames\Meeple Station

Mac:
~Library/Application Support/voxGames/Meeple Station

Linux:
/home/[username]/.config/unity3d/voxGames/Meeple Station

Note: On Mac OS the Library folder is often hidden by default. You can locate it by holding down the option key whilst browsing the 'Go' dropdown menu from the desktop.

If there is no folder named 'mods' then create it.

If you named your mod NewMod then the directory on Windows should now look like:
C:\Users\username\AppData\LocalLow\voxGames\Meeple Station\mods\NewMod

Inside your newly created mod folder if you wish to create furniture and tiles, you will need to create another folder named 'furniture' and 'tiles' (all lower case).

Adding Tiles

When adding - or changing existing - tiles for the game, you will need to provide three things:

  1. Sprite sheets
  2. Tile Stats
  3. Construction List - refer to contents

Tile Sprite sheets

Firstly, each sprite sheet will need to have 140 individual sprites, and each tile will need 2 sprite sheets, one for the tile itself and one fo the roof overlay. These do not all have to be different, you can duplicate sprites if you desire, but all 140 sprites need to be accounted for. This is because there are 136 different ways that a tile can be viewed depending on it's surrounding tiles (4 are left blank). This can seem overwhelming at first, but you can take note of the game's already existing sprite sheets.

(The game's current tile sprite sheets can be found in the main directory for reference).

For example, there are 10 cells surrounding each tile. 4 adjacent, 4 diagonally adjacent, 1 above and 1 below. Any of these cells could have another tile on it which can change how the centre tile appears. You do not have to create 140 unique sprites, you may create a handful of sprites that you duplicate where needed.

Sprite sheets need to be named precisely the way you want them to be used, and need to be in the 'tiles' folder.

For example the following:

tile_1_100_200.png
roof_1_100_200.png

The first sprite sheet will be for the tile ID 1, in this case a Hull Segment. It will then cut each sprite according to the dimensions given, 100 pixels by 200 pixels. You can then do the same for the roof sprite sheet, by starting the name with 'roof'.

You can also add the PPU (Pixels per unit) at the end of the file name, 32 is default. If you want to create a high res texture you can increase this, eg to double the resolution of a sprite, you might write: tile_1_200_400_64.png' (using 200_400 dimension because your sprite would obviously be larger).

Tile Stats

In order to set the stats of a tile, such as a ladder, or producing power etc, you will need to create a new text file named 'tileStats.txt' (case sensitive) and place it in your 'tiles' folder.
(It is important that all text files are done in plain text. It's recommended that you use a proper text editor.)

After creating this file you can set up the stats (You can refer to one of the example mods to view a working example of this file)

Here is an example of the Hull Segment tile in game:

[1,Hull Segment]
{WALKABLE,BUILDALLOW,INTERIOR}
{RECIPE:0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}


Inside of the square [ ] brackets, there are two values which are very important, separated by a comma. The first is the ID number of the tile that you are adding or editing. Make sure you check the currently used ID's if you do not wish to overlap or change the game's current tiles. The second value is the tile name, which can be whatever you like.

After the square brackets you can set the tile recipe and it's associated tags. The order of these tags does not matter. Refer to Tile Tags in the documentation for a full list of supported tags and their function.
The recipe is made up of 20 numbers, one for each type of resource. Refer to Resource Types in the documentation for their order.

Adding Furniture

Similar to tiles, to add furniture you will need:

  1. Sprite sheets
  2. Furniture Stats
  3. Construction List - refer to contents

Furniture Sprite sheets

Each Furniture ID can have three sprite sheets. They are distinguished by their second integer in their name, eg the Bulkhead sprite sheets are named:

1_0_100_200.png
1_1_100_200.png
1_2_100_200.png

The first integer is the furniture ID, in this case it is 1 for the Bulkhead. The second integer is the type of animation.

0, the idle animation of the furniture
1, the interaction animation, such as doors opening
2, the icon used for the GUI and ghost icon when placing

The last two integers are the dimensions for cutting the sprites.

You can also add the PPU (Pixels per unit) at the end of the file name, 32 is default. If you want to create a high res texture you can increase this, eg to double the resolution of a sprite, you might write: 1_0_200_400_64.png' (using 200_400 dimension because your sprite would obviously be larger).

Note: All sprite sheets need to be divisible by 4. This is because each sprite sheet needs to contain all four possible rotations. Refer to some of the example mods. the order of these rotations are NW, NE, SW, SE. (The only exception is items with the DYNAMIC tag)

Dynamic Furniture

Dynamic furniture doesn't have an interactive animation, instead it's default idle animation is used as a sprite sheet to determine it's possible orientations depending on surrounding tiles of the same ID or same circuit/line (Such as cables). If you've noticed in game, cables will change their appearance based on surrounding cables, or furniture that connects to power. Any furniture with the DYNAMIC tag will be treated like this. The following sprite sheet should serve as an example (21_0_100_120.png):

21 0 100 120

As you can see, it is split into two. The second half of the sprite sheet is the same as the first, with the exception that it is connected to another item above it. There may also be some confusion on the 1st, 7th, 8th, 9th and 10th sprite. The 1st sprite has no adjacent items to connect to, the others (7 - 10) have only one, in order; NW, NE, SW, SE.

Furniture Stats

To set the stats for furniture you will need to create a text file named 'furnitureStats.txt' (case sensitive) in your 'furniture' folder.

(It is important that all text files are done in plain text. It's recommended that you use a proper text editor.)

Furniture stats are very similar to the tile stats file, with a few more advanced exceptions. Let's look at the following example:

[1,Bulkhead,0]
{WALKABLE,LARGESCAFFOLD,INTERACTIVE,ROOMSPLIT,LOCKABLE}
{RECIPE:0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
{CONNECTED:-1,-1,-1,-1,-1,-1,-1,-1}
{BANNED:()()()()()()()()}
{REQUIRED:()()()()()()()()}

Here you will notice a few extra lines named BANNED, REQUIRED and CONNECTED. We will explain these in a moment, but if you do not wish to use them, you can leave these lines out completely.

There are three values first defined in the square [ ] brackets, separated by commas. The first value is the item ID that you are adding or editing. Refer to the list of currently used ID's if you do not wish to overwrite existing items. The second is the name of the furniture, and the third is the beauty value (This can be a negative integer). Beauty determines how appealing your station is, and the room value it adds to individual quarters.

After the square brackets you can set the furniture recipe and it's associated tags. The order of these tags does not matter. Refer to Furniture Tags in the documentation for a full list of supported tags and their function.

The recipe is made up of 20 numbers, one for each type of resource. Refer to Resource Types in the documentation for their order.

CONNECTED has 8 integers that determine which pieces of furniture are connected. For example, a refinery is actually two pieces of furniture joined together. Leaving the number as -1 will mean nothing is connected. Otherwise the number will determine the furniture ID of the connected furniture that will be created/ removed along with the current item.

Note: If you do not wish to use these advanced settings (connected, banned, required) you can leave them out. But if you do want to use any one of these advanced settings, you must include all three lines, and they must be in the order given; connected, banned, required.

Here is an image to help show the adjacent indexes:

grid layout (X being centre)

             2
      1      -      4
0     -      X      -      7
-     3      -      6      -
      -      5      -                    8 - UP
             -                           9 - DOWN

Note: Make sure connected furniture also has the same respective furniture id connected, so removing either will remove both. For example, the refinery furnitures connected lists look like so:

{CONNECTED:-1,-1,-1,-1,-1,-1,15,-1}

And

{CONNECTED:-1,14,-1,-1,-1,-1,-1,-1}

BANNED and REQUIRED are the same but with opposite effect. Each bracket ( ) determines a list of required/blocking tiles on adjacent cells (note: Tiles, not furniture). For example, the outdoor large turret is an outdoor furniture, and requires that one adjacent cell have a hull segment or ladder tile present. The required list looks like so:

{REQUIRED:(),(),(),(),(),(),(1,2),()}

As you can see, each set of brackets can hold multiple IDs. Likewise, you could write it so that all of it's surrounding tiles must cannot have any solar panel or rigging, like:

{BANNED:(3,4),(3,4),(3,4),(3,4),(3,4),(3,4),(3,4),(3,4)}

This would mean, if any cell surrounding it contained rigging or a solar panel, it would block construction (Of course we don't actually want this).

Construction List

If you have added any furniture or tile, it is likely you will want to add that new item to the player's construction list. You will need to create a new text file named 'constructionList.txt' inside your new mod folder. You can refer to other mods for more examples of these files.

(It is important that all text files are done in plain text. It's recommended that you use a proper text editor.)

The construction list has four categories (Which you can rename). Here is an example of how to add a newly made furniture to the FURNITURE category in the construction menu:

[CATEGORY=2,FURNITURE] {
    (43,1,-1)
}

As you can, similar to tileStats and furnitureStats, the category starts with square [ ] brackets. The first value determines which category you are editing (1,2,3,4). In this case, the second category which is currently named 'FURNITURE'. The second value I've written 'FURNITURE', because I want to keep the name of the category the same. You can write whatever you like to change the name of the category, such as 'Items' or 'ITEMS' (case sensitive). You do not have to include a name for the category, if you leave this section out, it will keep the name it currently has. Such as:

[CATEGORY=2] {
    (43,1,-1)
}

Next, we have another set of { } brackets, everything inside of these brackets will determine the tiles/furniture to add to the category. Each new tile/furniture is defined with regular ( ) brackets. Inside of these brackets there are three values, the first is the ID, and the second is the type. For example, a Bulkhead's ID is 1, but a Hull Segment's ID is also 1, therefore if we want to define it as a bulkhead (furniture) we write '1', else we write '0' for tiles. So to add a bulkhead to this category we would write (1,1,-1), but for a Hull Segment we would write (1,0,-1).

The last value, seen above as '-1' determines the technology that needs to be researched in order to unlock it. If the word 'CLEAR' appears anywhere in the { } brackets, it will erase all existing tiles and furniture in the category before adding your own. Refer to Technologies in the documentation for the Tech IDs.

Another example, if we wanted to re-create the current STRUCTURES category, it would look like so:

[CATEGORY=3,STRUCTURES] {
      CLEAR
      (1,0,-1)
      (2,0,-1)
      (1,1,-1)
      (2,1,-1)
}


If you cannot remember the slots in this category they are Hull Segment, Ladder Segment, Bulkhead, Airlock.

Tile Tags

There are several tags that can be used for tileStats. More tags will be made available over time, but currently the existing ones are as follows:

CLEARTAGS
Clears all existing tags before adding your own (This tag will always be read first no matter the order)

BUILDALLOW
Allows the construction of furniture inside/on top of this tile.

DYNAMICALLOW
Allows the construction of dynamic furniture items, such as cables and pipes.

HIGHCIRCUIT
Conducts advanced power.

CIRCUIT
Conducts regular power, like rigging and solar panels.

CLIMB
Can be used like a ladder tile for entities to move between layers.

INTERIOR
Can be built from indoor tiles if there is no outdoor route, or it is replacing an existing WALKABLE tile.

EXTERIOR
Can only be built from outdoors.

WALKABLE
Does not block indoor movement, can be walked through.

FLYABLE
Does not block outdoor movement, meaning entities can fly through it.

POWER
Produces power like a solar panel.

NONDEMAND
When an officer makes a demand, this tile is exempt from possibly being demanded.

QUICK
Gets built much quicker, rigging for example.

VERTICAL
Can connect channels (Circuits, fuel lines etc) vertically.

OVERWRITE
If you include this tag it will overwrite any existing tile that has already been loaded into the game with the ID you have given. Whether it is from another mod or the original content.

Furniture Tags

There are several tags that can be used for furnitureStats. More tags will be made available over time, but currently the existing ones are as follows:

CLEARTAGS
Clears all existing tags before adding your own (This tag will always be read first no matter the order)

WALKABLE
Does not block movement (consider FIXEDZ as well if a floor item)

LOCKABLE
Can be locked with clearance levels to block movement (like a bulkhead)

FLYABLE
Does not block outdoor movement, so entities can fly through it if outdoors.

INTERACTIVE
Has an interactive animation that executes when walked on.

SUIT
Used as a suit rack.

STORAGE
Adds 250 to maximum storage.

LARGESTORAGE
Adds 500 to maximum storage.

DYNAMIC
Has a unique sprite sheet, such as cables and pipes, that changes based on the surrounding tiles of the same circuit/fuel line/advanced circuit.

CIRCUIT
Can be a part of a regular power circuit, to help conduct power.

POWERUSE
Uses power, will display a lacking power icon if none is present.

BATTERY
Stores power, like a Power Cell (adds 50 k/w storage to it's connected circuit).

HIGHCIRCUIT
Can be part of an advanced circuit, to help conduct power.

HIGHPOWERUSE
Uses power, will display a lacking power icon if none is present.

HIGHBATTERY
Stores power for its connected high circuit, like an Advanced Power Cell.

CONVERTER
Transfers power into advanced power, like a Transformer.

SHIELDGENERATE
Generates shields by absorbing advanced power in its circuit.

FUEL
Can be a part of a fuel line to help move fuel around, like a pipe.

FUELSTORAGE
Stores fuel for its connected fuel line, like a Fuel Tank.

FUELCREATE
Creates fuel (D3) by consuming advanced power and dilithium.

ENTRANCE
Used as an outdoor entrance, like outdoor airlocks.

EXIT
Used as an indoor exit to space, like indoor airlocks.

SLEEP
Used like a bed, for sleeping.

TABLE
Used like a table.

CHAIR
Used as a chair, for dining at a table.

REFINERY
Used to fulfil refinery job tickets.

RESEARCH
Used like a laboratory, to research.

HOLDFOOD
Holds 100 units of food on this cell.

GOODFOOD
Food on this tile is considered healthy plant food (Food hold becomes 500 units).

CREATEFOOD
Slowly generates food like a fish tank.

NOROTATE
Cannot rotate this item, it remains fixed in the SE position.

OXYGEN
Consumes regular power to produce oxygen for your station.

FIXEDZ
Does not change the sprite rendering depth based on rotation. For example, a suit rack on two of it's rotations sits on the North side of a cell, where the other two sit on the South side of the cell, so for two of it's rotations it appears in front of entities on the same cell. If you DONT want this feature, opt for FIXEDZ, like cables and other floor items.

ROOMSPLIT
Acts as a divider for rooms and oxygen flow, like a bulkhead door.

QUICK
Gets built much quicker, cables for example.

LARGESCAFFOLD
The default scaffold sprite when being built is small, like for chairs and such. Use this tag to make it use a larger scaffold sprite (This is only a visual difference).

OUTDOOR
This is an outdoor item and needs to be built outside.

NONDEMAND
This item cannot be created as a demand from an officer.

OVERWRITE
If you include this tag it will overwrite any existing furniture that has already been loaded into the game with the ID you have given. Whether it is from another mod or the original content.

PRODUCTIVE
This item has the capability to produce and/or consume specified values, such as food, oxygen, credits, resources, or types of power.

note: tags with the colon (:) at the end require a value as well, eg, OUTPUTRATE:0.2 would mean the output rate for productive items would be every 0.2 seconds.

OUTPUTRATE:
This determines the rate at which a productive tagged item, with output type 0, produces or consumes the specified values. This is 0.1s by default, and the minimum rate is 0.01s.

OUTPUTTYPE:
There are currently only two types of output, (0) will make it on a timer, and produce or consume specified values at the rate specified by the output rate tag. (1) Will make it produce or consume specified values whenever it is interacted with (Currently this only happens when it is walked over).

POWEROUTPUT:
Determines the amount of power a productive tagged item will produce or consume at the rate and type specified.

HIGHPOWEROUTPUT:
Determines the amount of advanced power a productive tagged item will produce or consume at the rate and type specified.

FUELOUTPUT:
Determines the amount of fuel a productive tagged item will produce or consume at the rate and type specified.

RESOURCEOUTPUT:
Determines the resource ID that will be produced with each production cycle, at the specified rate and type. Only one unit of the specified resource will be produced per production cycle. (This has to be from 0 to 19)

RESOURCECONSUMPTION:
Determines the resource ID that will be consumed with each production cycle, at the specified rate and type. Only one unit of the specified resource will be consumed per production cycle. (This has to be from 0 to 19)

OXYGENOUTPUT:
Determines the amount of oxygen a productive tagged item will produce or consume at the rate and type specified. Each tile holds 100 units of oxygen, thus a room holds 100 x the number of tiles it is made up of. If this value is positive, it will operate like life support, prioritising the room it resides in and then oxygenating other rooms. If this value is negative it will only affect the room is resides in, no others.

CREDITOUTPUT:
Determines the amount of credits a productive tagged item will produce or consume at the rate and type specified.

SHIELDOUTPUT:
Determines the amount of shield power a productive tagged item will produce or consume at the rate and type specified.

FOODOUTPUT:
Determines the amount of food a productive tagged item will produce or consume at the rate and type specified. (Currently food containers are fixed at 100 unit holding capacity)

note: Productive tagged items will not produce or consume any of the specified values if one or more values cannot be achieved. Eg, if an item consumes 10 credits, but you only have 0, the production cycle will be skipped.

note: All output tags can be positive or negative values, if it is negative it will consume instead of produce.

Resources

Resources are indexed in the following order:

0 - Steelium
1 - Brothium
2 - Morilium
3 - Dilithium
4 - Steelite
5 - Brothite
6 - Morilite
7 - Titanite
8 - Cocilite
9 - Durathite
10 - Croalite
11 - Lazerite
12 - Plurathite
13 - Viscerite
14 - Voxite
15 - Globomite
16 - Jeelia
17 - Glueblia
18 - Moxilia
19 - Dolithia

Technologies

Technologies are indexed in the following order:

0 - Advanced Refining
1 - Advanced Circuits
2 - Botany
3 - Shield Generator
4 - Body Armour
5 - Fuel Processing
6 - Quantum Engines
7 - Large Turrets
8 - Clearance Levels
9 - null
10 - null
11 - null

Tile IDs

1. Hull Segment
2. Ladder Segment
3. Rigging
4. Solar Panel
5. Steelium Asteroid
6. Brothium Asteroid
7. Morilium Asteroid
8. Dilithium Asteroid

Furniture IDs

1. Bulkhead
2. Airlock (inner)
3. Airlock (Outer)
4. Table
5. Chair
6. Bed
7. Suit Rack
8. Small Container
9. Null (don't use this)
10. Null (don't use this)
11. Null (don't use this)
12. Large Container
13. Life Support
14. Refinery
15. Refinery (Supplementary)
16. Fish Tank
17. Fish Tank (Supplementary)
18. Office Desk
19. Office Desk (Supplementary)
20. Power Cell
21. Cables
22. Pot Plant
23. Planting Bay (Empty)
24. Planting Bay (Full)
25. Food Dispenser
26. Laboratory
27. Laboratory (Supplementary)
28. Transformer
29. Large Cables
30. Shield Generator
31. Shield Generator (Supplementary)
32. Shield Generator (Supplementary)
33. Shield Generator (Supplementary)
34. Fuel Processor
35. Pipe
36. Engine Core
37. Injector
38. Ignitor
39. Advanced Power Cell
40. Fuel Tank
41. Large turret
42. Cabinet

Furniture Example Sprite sheets

1_0_100_200.png

1 0 100 200

1_1_100_200.png

1 1 100 200

1_2_100_200.png

1 2 100 200

Comments