FogMS Fileparser Guide

Introduction

FogMS is the content management system of DungeonFog. It can parse file names of images so properties will be automatically applied. This helps to automate the upload process and reduce manual work in the interface when done right. All values can be adjusted afterwords in FogMS.

ℹ️ Filename parsing is purely optional and only takes effect when parameters in brackets [ ] are provided. Values inside the brackets are called parameters and are only taken into account if they are valid (see definitions bellow).

Formating

The Filename of your asset is used to automatically detect the asset name. All standard characters are allowed and underlines “_” are replaced with spaces in the filename.

The parser understands the following format and parameters:

asset_name[type=TYPES BELOW; width=X; height=Y; path=PATH NAME; light=[#rrggbb, RANGE]; tags=[abc,def, scope=tag]].png

Parameter definitions

All values in the brackets [ ] are optional and have default values when not provided. They must be precise (no typos but case insensitive) or they are ignored.

Available parameters

 

Parameter Description Default
Type Defines the type of the asset. prop
Dpi Defines default dpi for the asset and how it should be interpreted on the grid  200
Width & Height Defines the dimensions of the asset. Auto calculates dimensions.
ℹ️ Please read the details.
Path Defines to which path this asset belongs. empty
Light Defines default light settings for the BME. empty
Tags Meta information which is mainly used for organising and searching. empty

Type

Following values are valid:

Type Description Notes
Prop Used by the BME when Placing objects with the Prop tool. Default. If no type is specified in the Parameters, the asset will be interpreted as prop.
Texture Used by the BME when texturing surfaces like the stage background, rooms, brushes, shapes and token frames.  
Door Used by the BME when placing Objects on walls of the Room Tool. The images have to be oriented horizontally - facing either left/right or right/left.
Window See Door.  
Path

Used by the BME when using the Path tool.

Paths have special behaviour.
The provided image will be used as the thumbnail in the asset picker and marketplace for paths

Path centers and Path ends have to be assigned to a path.

Path center

 See Path.

 The images have to be oriented horizontally.

Ignores the width and height parameters. They get inherited from the associated Path.

ℹ️ Due the technical implementation all Path centers have to have the same dimensions.

Path end

 

See Path.

The images have to be oriented horizontally and the ending facing left.

Ignores the height parameter. They get inherited from the associated Path.

ℹ️ Due the technical implementation all Path ends have to have the same height.

Token

Used by the BME when using Tokens.

 

Background

Used by the BME when Placing special objects with the Prop tool.

In the current implementation this can be seen as a subcategory to props. A Background is a special prop that's treaded slightly differently by the tool.

Backgrounds get a special Icon in the layer list and are automatically placed at the bottom of the layer list.

 

Example
my_wood_bench[type=prop].png

Dpi

 

By changing the default dpi you can adjust how the asset will be displayed relative to the grid. Per default, our system uses 200dpi which means that a 200x200px sized asset will be displayed as 1x1 grid on the stage.
By defining a different dpi value, you can take control of this behavoir: 

Example:
my_wood_bench[type=prop; dpi=300].png

In this example the image "my_wood_bench", which has 600x300px in dimensions would be interpreted as a prop taking 2x1 grids on stage.

Other examples would be

  • 150x150px would be 0.5 x 0.5 grids
  • 300x300px would be 1 x 1 grids
  • 300x450px would be 1 x 1.5 grids

Width and height

 

Values are in grid dimensions (can have decimals) used by the editor when placing the asset.

Example:
my_wood_bench[type=prop; width=2; height=1].png

 

Special case: Paths

Both values are ignored when the type is set to Path center or partially when Path end.

ℹ️ Path centers and Path ends must be aligned horizontally

 

Auto detecting grid dimensions

If no values are provided the parser first checks if any dimensions (in pixels) of the image are divisible by 200. If that is the case it takes the pixel dimension/200 as the grid dimensions (see examples below). Else it defaults the smaller side to 1 and calculates the longer side proportionally.

 

DPI and recommendations

We internally use the definition of 200 pixel per inch for our assets. A square on a map is defined to be 1x1 inches. Hence a 1x1 sized asset must have 200x200 px. We recommend to follow these definitions. Higher resolution images are welcome and should be integer multiples of 200.

Other dimensions are valid but not recommended.

 

Examples:
Asset Grid dimensions Pixel dimensions
A round table 1x1 200x200
Another round table (high res) 1x1 400x400
Another round table (low res)
Valid but not recommended
1x1 100x100
Wide table 1x2 200x400
Large tree 2x2 400x400
Another large tree (low res)
Valid but not recommended
2x2 150x150
Seamless stone floor texture 3x3 600x600
Rock 0.5x0.5 100x100

Path

 

The name of the associated path. The name is taken from the filename of the asset with type=Path.

When no type is provided it defaults to type = Path center.

Default is empty which means the asset won't be automatically associated with a path.

Examples:
Example setup:

wood_wall[type=Path;].png

Example center:


wood_wall_1[type=Path center; path=wood wall].png

Example end:

wood_wall_end_1[type=Path end; path=wood wall].png

ℹ️ Learn more about Paths in the paths guide


Light

 

Light settings for the prop. Only taken into account if the type is prop.

Default is empty which means the prop casts no light automatically when placed in the BME.

RGB

The color of the light in the standard format #RRGGBB.

Range

The range in grids. Can have decimals.

Example:
my_torch[type=prop; width=1; height=1; light=[#ffffff, 5]].png

Tags

 

Tags are used for searching and organising. Provide them in a comma separated list. We recommend to limit your tags per asset to 3-4. Too many are a reason for rejection.

Default is empty.

 

Scope

Scopes are used for organising. A scoped tag is simply just a long tag with descriptors separated by colons : in FogMS. Due limitations the Parser has to use the equal sign = for that. You can use them to collect related asset.

 

Special scope: category

The Battlemap editor currently uses the scope category: to group assets in the asset picker in categories.

⚠️ We strongly recommend to assign a category tag.

 

Inside FogMS you can specify a hierarchy by appending /SUBCATEGORY to the category: tag. This is used by the current asset picker to organise the props in subcategories. Please do not use more than 2 subcategories or the UI will become confusing.

ℹ️ Note: This cannot be defined in the filename and has to happen after import.

Examples:
Simple:

my_wood_bench[type=prop; width=2; height=1; tags=[category=Furniture, seat, sit, chair, pew]].png

With other scopes:

my_wood_bench[type=prop; width=2; height=1; tags=[category=Furniture, seat, sit, chair, pew, material=wood]].png
Need help? Ask us directly

Automation is no easy task and this document might be overwhelming.

If you have any questions or ideas for improvement don't hesitate to ask us directly on discord.

 

Open discord
Ask in the #internal-art channel