Asset pack structure#
Locations for asset packs#
At the start of the game, Tabletop Club will scan a set of given folders for asset packs. If you want the game to import your asset pack, it needs to be put into one of the following locations:
<TABLETOPCLUB_INSTALL_FOLDER>/assets/
<DOWNLOADS>/TabletopClub/assets/
<DOCUMENTS>/TabletopClub/assets/
<DESKTOP>/TabletopClub/assets/
Creating an asset pack#
Creating an asset pack is really easy! All you need to do is create a folder in one of the folders mentioned above, and you’re done! The name of the folder will be the name of the asset pack.
Sub-folders#
Every asset pack divides its assets into different sub-folders, depending on what type of asset it is, and what the file type needed for that asset type is. Note that asset packs don’t need to have all of these sub-folders.
Sub-folder |
File Type |
Asset Type |
Object Type |
---|---|---|---|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
N/A |
||
|
N/A |
||
|
|||
|
N/A |
||
|
N/A |
||
|
|||
|
N/A |
||
|
Image, Text |
N/A |
|
|
|||
|
|||
|
Configuration files#
config.cfg#
Every sub-folder can have this file, which allows you to modify the properties of assets in the subfolder.
Here is an example of a config.cfg
file:
; The following properties are applied to every object in the subfolder.
[*]
; Setting the description of an object.
desc = "This is an object you can spawn!"
; Setting the mass of an object in grams (g).
mass = 5.0
; Setting the size of an object in centimeters (cm).
scale = Vector3(3.5, 0.5, 5.0)
; The following properties apply only to objects whose name start with
; "Heavy". These properties take precedence over the properties under [*].
; The wildcard * can either be at the beginning and/or at the end.
[Heavy*]
; This is equivalent to 100g.
mass = 100.0
; Similar to [Heavy*] this applies only to objects whose name end with "Info.png".
[*Info.png]
; Descriptions can be on multiple lines.
desc = "This is one line,
and this is another!"
; The following properties apply only to the given object.
[Temporary.png]
; You can tell the game to not import certain objects.
ignore = true
; You can create new objects that inherit the properties of another object,
; which you can then overwrite.
[Light Object]
parent = "Heavy Object"
mass = 1.0 ; = 1.0g
Here is the full list of properties you can modify in config.cfg
:
Property Name |
Data Type |
Used By |
Default Value |
Description |
---|---|---|---|---|
|
Text |
All |
|
The name of the author(s) of the asset. |
|
Text |
Cards |
|
The file name of the back face of the card. The texture must be in the same folder. If blank, no back face texture is applied. |
|
Number |
Tables |
|
Defines how high objects bounce off the table. Must be a value between |
|
Number |
Objects, Tables |
|
Determines the collision shape of the object. See 3D Model for more details. |
|
String |
Objects |
|
Multiply the color of the texture by this value. |
|
String |
Objects, Tables |
|
Defines how the centre-of-mass of the object is automatically adjusted, if at all. See 3D Model for more details. |
|
Boolean |
Skyboxes, Tables |
|
If |
|
Text |
All |
|
Describes the asset in more detail. |
|
Dictionary |
Dice |
|
Specifies which rotations correspond to what values on the faces of the die. See Dice for more information. |
|
Array |
Tables |
|
The positions of player’s hands around the table. See Table for more information. |
|
Boolean |
All |
|
If |
|
Text |
All |
|
The license the asset is distributed under. |
|
Boolean |
Music, Objects |
|
If |
|
Number |
Objects |
|
The mass of the object in grams (g) when it is spawned in-game. It is recommended to set this value for more realistic physics collisions. |
|
Text |
All |
|
The name(s) of the people who have modified the asset. |
|
Text |
All |
|
The name of the asset. Must be unique among its type. |
|
Vector2 |
Tables |
|
The length and width of the plane in which players can paint on the table. The centre of the plane is at the origin. |
|
Vector3 |
Skyboxes |
|
Rotates the skybox a number of degrees in the X, Y and Z axes. |
|
Vector3 |
Objects (except Cards) |
|
Scales the object in the X (width), Y (height) and Z (thickness) axes in centimeters (cm). Note that for objects that use custom 3D models, this value most likely won’t reflect the final size of the object. |
|
Vector2 |
Cards |
|
Scales the card in the X (width) and Z (height) axes in centimeters (cm). |
|
Text |
Objects |
|
Determines what the object sounds like when it collides with the table. Possible values are: |
|
Boolean |
Containers |
|
If |
|
Number |
Skyboxes |
|
The strength of the ambient light coming from the skybox. |
|
Number, Text |
Cards, Tokens |
|
A value given to a stackable object that allows it to be sorted in a stack. |
|
Dictionary |
Templates |
|
Used to set up textboxes for image templates. See Template for more information. |
|
Text |
All |
|
The URL where the asset originally came from. |
stacks.cfg#
For Card and Token objects, you can add this file to add pre-filled stacks of those objects to the asset pack. A good example of this is for adding pre-filled decks of cards to the game.
Here is an example of a stacks.cfg
file:
; This is the name of the stack.
[My Stack]
; You can also give stacks descriptions.
desc = "This is my stack. It's awesome!"
; You then specify which objects are in the stack.
; Note that all of the objects need to be the same size.
items = [
"Card 1",
"Card 2",
"Card 3"
]
; This is the name of another stack.
[My Friends Stack]
desc = "My friend's stack isn't as good as my stack!"
; It doesn't matter if each object is on a new line.
items = ["Trading Card 1", "Trading Card 2"]
Translations#
You can also provide translations for the names and descriptions of assets in
the asset pack! This is done using separate configuration files for each
language. The name of the file should be config.<locale>.cfg
, where
<locale>
is the locale code for your
language.
Note
The list of languages supported by the game is shown in the README file of the project.
If the language you are translating to is not on this list, unfortunately you will not be able to see the results in-game. However, you can help to translate the project as a whole so your languages does become supported! See Translating the project for more information.
Note
These translation files are treated differently to other configuration files.
You can only edit the name
and desc
properties of assets in these
files. You also cannot apply translations to multiple assets at the same
time with wildcards.
Here is an example of a Norwegian translation file, called config.nb.cfg
:
; The name here refers to the name of the asset in-game, NOT the name of
; the file. This should just be the file name, without the extension.
[Chess]
; The name "Chess" in Norwegian.
name = "Sjakk"
; A description in Norwegian, "A game for two people."
desc = "Et spill for to personer."