Tabletop Minis: Original Miniature Unit Looks for Tactics Games
README.md
tabletopMinisTests
Checks the tabletopMinis package end to end in edit mode:
- Catalogue: 9 roles x 4 styles = 36 baked figures in the manifest, each with base, body and primary parts and a sane triangle count;
heavyandduelisthave body meshes of their own (not shared with another role);describegives every figure a distinct name within its style. - Unit type mapping:
Minis.ROLE_FORmaps all nine tacticsKit unit types (soldier, scout, heavy, sniper, medic, grenadier, shield, commander, duelist) to nine different roles, andMinis.roleForfalls back to a role of the same name or the given fallback. - Spawning and schemes: every style x role spawns every part its manifest lists, with the team parts tinted to the team scheme;
setSchemeswaps to another scheme, to custom colours and to adefineSchemescheme;base = falsedrops the base. - Poses: every pose samples a frame through
opts.t;restresets;attackreturns toidleandhitwithafter = "rest"ends inreston the pose driver;restartreplays. - Portraits:
Minis.portraitanswers a square texture handle with a guid (what a UIimagetakes assrc), cached per role, style, scheme, size and background, accepting unit type ids; all 36 render; the staging camera and figure are taken down;clearPortraitsfrees the cache. A portrait reads "pending" until every mesh of its figure was on the GPU and a readback shows the figure (coverage overPORTRAIT_MIN_COVERAGE, never 0 as a blank texture reads); a result that stays blank ends "failed", is never cached as finished, and the next call re-renders it into the same handle.
It does not judge how the figures or portraits look: that is checked by eye from captures. Run it alone with asset.resolve("tabletopMinisTests", "testSuite"):run() or tools.use("tests", "run", { suite = "tabletopMinisTests" }).