This tool is used to visualize the position of tilesets in the level
editor. Start with inputting your files to generate a more human
readable overview, which can then be used to generate a new JSON file.
This tool is mainly used within
the JSON file editing guide. Please note that this tool was made with the intention of being used
with the source code/assets of Super Mario Construct.
Input a JSON
This can be either files\Tile layouts\TileLayouts_SMAS1.json or
files\Tile layouts\TileLayouts_SMW.json depending on the
gamestyle you're adding a tileset for.
JSON index
This is the index of your spritesheet within the JSON file,
corresponding to the first value for your tileset in
eventSheets\Toolbar menus\Tilesets menu.json.
Input your primary tilemap
Spritesheet must be a grid of 16x16 pixels with a height and width
consisting of multiples of 16. (example: 160 width by 256 height) You
can find these in the /images/ folder inside of SMC-game. The name can
be for example tilemap_1_sewer.png for the SMAS sewer tileset.
Supplementary tilemaps (optional)
Tileset pages often contain more than 1 tilemap, you can provide these
here (multiple files supported). If you're not certain what the
supplementary tilemaps are, then leave this blank and load your main
tilemap. The names of the supplementary tilemaps will appear in the
input field at the bottom of this page, which you can use to look them
up. Format: /images/tilemap_[GAMESTYLE]_[NAME].png
Documentation
Formats
Objects/single-tiles in the layouts file have several values separated
by underscores. They are as follows for objects: objects:
o(obj)_objID_frame_extraValues_offsetX_offsetY_mirrorMode_angle_containedObjID
And for tiles: t(tile)_tilemap_tileID_offsetX_offsetY_tileStateID
And tile structures: s(structure)_tilemapName_rowLength_tileData_structureOffsetX_structureOffsetY_gridOffsetX_gridOffsetY
For values O, S & T you might have to swap to a different tilemap. Check
the resulting array in the output below the canvas for the name of this
tilemap. It will most likely be named tilemap_1_[name] or
tilemap_2_[name].
Canvas values
X - Empty space (no tile)
# - Empty space (scrollbar is located here)
numbers - ID of the tile
o/s/t - Indicates an object, structure or tile belonging in this
position
o/s/t + number - ID of the tile, which is part of an object/structure
Special characters
* = shorthand for the base tilemap, only use this value for id's start
with o/s/t. The base tilemap is defined in the
/layouts/object storage file for your tileset, so make sure it is
set to the correct one. eg. the SMAS sewer tileset has the
tilemapBaseName value set to 1_Sewer.
$ = get current palette ID (empty if default palette, only applies to
non-base tilemaps such as "SewerA" or "AirshipB")
# = same as the star (*), but this is used for additives to the tilemap
in the editor. Eg. "t_SewerA_0" is written as "t_#A$_0". The # stands
for "Sewer" in this context, and the dollar sign grabs the currently
selected palette to let the game know this tile also has different
palettes.
Multi tile structures
Multi tile structures start with an "s" as described under the formats
header, they contain multiple tile ID's per entry. When editing one,
make sure to use a reference to a different tilemap. The most important
values are the tiledata and rowlength since those decide the size and
components of the structure. The offset is mainly used in the editor to
make the structure display properly, preferably reuse values for the
same structure types.
Creating a new entry
When creating a new entry, make sure to first load a different tilemap
and its JSON id as a reference. After that you can change the values in
the output array to your liking and revisualize to preview with the new
tilemap. Once you're happy with the result, you can generate a new JSON
file to replace the one in the game files. You won't have to replace any
images since SMC automatically assigns the correct images to the tile
ID's.
Exporting
You can export either by editing the entry you inputed (the JSON index)
or by adding a new entry. If you are adding a new entry, use the pink
button on the bottom of the page after loading the canvas. Either option
will give you a new JSON to replace the old one with.