Outils pour utilisateurs

Outils du site


en:yaml:tiles-tilemaps

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
en:yaml:tiles-tilemaps [2026/05/07 03:31] – Correction rendu syntaxe JDR-Bot dans DokuWiki cyrilfiestaen:yaml:tiles-tilemaps [2026/09/05 17:54] (Version actuelle) – 4.14 : precisions narratives et exemple de grille mixte 3x2 (FR/EN) cyrilfiesta
Ligne 11: Ligne 11:
 </code> </code>
  
-The complete form is: +The complete form is %%[[url:NxM:col:row]]%%.
- +
-<code> +
-%%[[url:NxM:col:row]]%% +
-</code>+
  
   * ''N'' is the number of columns in the spritesheet.   * ''N'' is the number of columns in the spritesheet.
   * ''M'' is the number of rows in the spritesheet.   * ''M'' is the number of rows in the spritesheet.
   * ''col'' and ''row'' are the tile coordinates, starting at 0.   * ''col'' and ''row'' are the tile coordinates, starting at 0.
 +
 +Inside text, a tile is shown at its **real size**: it is never enlarged unless you ask for it. Only a tile too large for the text area is reduced. Clicking it enlarges only the selected cell, not the whole spritesheet.
 +
 +The rule applies on every platform, including the attachment produced by Discord.
  
 ===== Building A Grid ===== ===== Building A Grid =====
 +
 +This **3×2** grid has **3 columns and 2 rows**. It mixes direct images and tiles extracted from the showcase's 8×16 tileset:
  
 <code yaml> <code yaml>
 text: | text: |
-  [[grid:3x3]] +  [[grid:3x2]] 
-  /scenarios/images/test/tiles.png:4x4:0:0 | /scenarios/images/test/tiles.png:4x4:1:0 | /scenarios/images/test/tiles.png:4x4:2:0 +  https://cyril-fiesta.fr/jdr-bot/scenarios/images/showcase/un.png | https://cyril-fiesta.fr/jdr-bot/scenarios/images/showcase/tileset-8-16.png:8x16:0:2 | https://cyril-fiesta.fr/jdr-bot/scenarios/images/showcase/un.png 
-  /scenarios/images/test/tiles.png:4x4:0:1 | /scenarios/images/test/tiles.png:4x4:1:1 | /scenarios/images/test/tiles.png:4x4:2:1 +  https://cyril-fiesta.fr/jdr-bot/scenarios/images/showcase/tileset-8-16.png:8x16:0:4 | https://cyril-fiesta.fr/jdr-bot/scenarios/images/showcase/un.png | https://cyril-fiesta.fr/jdr-bot/scenarios/images/showcase/tileset-8-16.png:8x16:3:6
-  /scenarios/images/test/tiles.png:4x4:0:2 | /scenarios/images/test/tiles.png:4x4:1:2 | /scenarios/images/test/tiles.png:4x4:2:2+
   [[/grid]]   [[/grid]]
 </code> </code>
 +
 +The dimensions after ''grid:'' describe the assembled grid; those after an image URL describe its source spritesheet. Do not put ''%%[[…]]%%'' around individual cells. Each line supplies one row, with three cells separated by ''|''.
  
 Each cell contains either an extracted tile with ''url:NxM:col:row'', or a direct picture URL. Cells are separated with ''|''. Each cell contains either an extracted tile with ''url:NxM:col:row'', or a direct picture URL. Cells are separated with ''|''.
Ligne 41: Ligne 44:
 frame: | frame: |
   [[grid:3x3]]   [[grid:3x3]]
-  /scenarios/images/test/tiles.png:4x4:{map_x}:{map_y}+  /scenarios/images/test/tiles.png:4x4:0:0 | /scenarios/images/test/tiles.png:4x4:1:0 | /scenarios/images/test/tiles.png:4x4:2:0 
 +  /scenarios/images/test/tiles.png:4x4:0:1 | /scenarios/images/test/tiles.png:4x4:{map_x}:{map_y} | /scenarios/images/test/tiles.png:4x4:2:1 
 +  /scenarios/images/test/tiles.png:4x4:0:2 | /scenarios/images/test/tiles.png:4x4:1:2 | /scenarios/images/test/tiles.png:4x4:2:2
   [[/grid]]   [[/grid]]
 </code> </code>
Ligne 50: Ligne 55:
  
   * If the grid has fewer cells than expected, missing cells are filled with white placeholders.   * If the grid has fewer cells than expected, missing cells are filled with white placeholders.
-  * If tiles with different sizes are mixed, display is normalized to one common size.+  * If tiles with different sizes are mixed, the cell takes the size of the **smallest** one: a large picture is reduced to the tile format, instead of imposing its own. 
 +  * Several cells may use the same spritesheet, including when it is already cached.
   * The linter reports incomplete grids.   * The linter reports incomplete grids.
   * On adapters that cannot display an interactive tilemap, a fallback rendering is used.   * On adapters that cannot display an interactive tilemap, a fallback rendering is used.
- 
-**Join us on [[https://discord.gg/Z63DtVV|discord Make&Play]]** 
  
en/yaml/tiles-tilemaps.1778117471.txt.gz · Dernière modification : de cyrilfiesta