Use when adding or changing Tiny World Builder tile/object repeat-click behavior, terrain stacking, floors/intensity, fences, rocks, walls, crops, or Monument Valley-like height/detail growth.
64
75%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.codex/skills/tinyworld-tile-variation/SKILL.mdUse separate terrain and object layers:
terrainFloors: ground height only.floors: object/building intensity only.Expected behavior:
floors up to MAX_FLOORS.terrainFloors.terrainRiseAt.kind unless a schema change is explicitly requested.textures/terrain-variants/ and are regenerated by
tools/slice-terrain-variants.mjs from
textures/terrain-variants/source/tw.png. Keep crop changes in the slicer
manifest so the source sheet, crop coordinates, and runtime texture keys stay
reviewable. Runtime terrain mixing is render-only: terrainSheetVariantMaterial()
chooses a deterministic per-cell texture variant from x,z and does not add
saved world fields. Do not stretch one crop over a whole board cell; repeat
authored crops at voxel scale (typically 4x4 for grass/dirt/water, 2x2 for
path/stone/wood) so the texture reads as surface material, not a big tile
sprite.terrainVisualRiseForCell; water sits one top-cap height lower via WATER_SURFACE_DROP = TOP_H while its rim/shore strips stay at the tile edge, and dirt can sit slightly raised through the same terrainSurfaceOffset path. Do not store these visual offsets in terrainFloors or saved world data.sameTerrainEdgeFamily for path/stone joins so continuous paths, roads, and plazas do not get brick strips across the travelled surface.topY after terrainSurfaceOffset), not from the tile rim height.Fence levels:
1: normal wood fence.2: taller wood fence.3: wire fence.4: stone/rock wall.5+: steel wall.Implementation guardrails:
floors. Per-cell visual-only overrides may use appearance when the user explicitly needs immediate editable colours (e.g. tower bodyColor / topColor).kind.cell.extras as { kind: 'fence', fenceSide: 'n|e|s|w' }, so a square can
have 0-4 fenced sides while keeping its terrain/object identity. Legacy
primary kind: 'fence' cells may still render, but do not make them the new
authoring path.appearance.fenceStyle: 'gate' edge with taller posts and a
red marker, facing a path. The gate hinge line belongs on the fenced cell
border; only the open leaves swing inward. Crop and animal components stay
separate; shared crop/animal boundaries should be fenced, not treated as
gates. Do not let
ordinary farm enclosures automatically score as a Defensive Ring; that trait
belongs to edge, stone/high-ground, watchtower, or spotlight security context.
Do not emit empty/random fence-only cells as field scatter or generic defense;
fence extras should belong to the enclosed crop/animal cell unless the user is
manually authoring a fence.+z; random-island towers
should set transform.rotationY so that face points inward toward the island
center/core rather than adding a separate saved door-side field.addEnhancementBits double-scale a kind that now handles its own levels internally.floors to raise ground. Old saves may overload floors; migrate object cells to terrainFloors: 1.Validation:
terrainFloors unchanged and alter only the object.setCell when the renderer supports the property; do not fake direct controls by only writing prompts.path or water must preserve that terrain and render on an underpass/stilt base; do not coerce those tiles back to grass.kind: 'house' cells with no buildingType.
Forced variants such as manor, tower, turret, and skyscraper are
visual cluster boundaries; do not let linear/composite/square cluster
detection traverse through them, or the merged house mesh can overlap the
separate forced-variant mesh.The board can render terrain in two main visual styling modes:
renderVoxelTerrain is false, the ground renders as smooth flat-shaded panels.renderVoxelTerrain is true, the terrain is subdivided and rendered as voxel columns based on the resolution in renderTerrainVoxelResolution (e.g., '4', '6', '8', '12', or 'mixed').The Generate Modal includes a "Terrain style" selector that maps these options to global rendering variables and persists them before generating the world, allowing the user to easily switch and view the generated world in their preferred style.
When useLandscapeEngine is true (the world data is generated from or compatible with the LandscapeEngine seed), the engine can render in two visual modes, toggleable via the "Continuous landscape mesh" setting:
landscapeMeshMode = true): The normal tile grid is hidden, and the high-fidelity continuous terrain mesh is rendered. Ray picking, objects, vehicles, and crowd sprites sit on the mesh using landscapeHeightAtCell(globalX, globalZ).landscapeMeshMode = false): The terrain is rendered as standard discrete tiles (low-poly panels or voxel columns). To match the continuous mesh, vertical heights are scaled up: terrainRiseForLevel(level) returns (level - 1) * 1.12 units per floor (matching the mesa levels of the LandscapeEngine) instead of the standard 0.20. Object placement is not flattened (flattening guards are skipped when useLandscapeEngine is true), allowing all trees, houses, fences, and roads to render at their correct three-dimensional canyon elevations.Fences and houses must not change automatically based on neighbours.
CASTLE_AUTO_PROMOTION = false in 16-drop-anim-adjacency.js gates
isTurretHouse() and isCastleFence() (both early-return false), so:
makeFence(side, level).Unaffected: the explicit Castle house variant (buildingType: 'turret'
-> makeTurret) and fence levels (1-2 wood, 3 wire, 4 stone wall,
5+ steel boundary) which come from makeFence, not the castle path. To
re-enable the old auto-castle behaviour, flip the flag to true.
f21f84b
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.