Log inGet started
Package

styleRoles.package

This package holds more than this page lists. See all of its files in its world.

README.md

restyleWithRoles

Give an existing game under a styleKit look game roles, in stages that can each be undone, so players, enemies and pickups read apart under one look.

What it does

  1. Survey. Reads the look on the scene, the role set and any roles already there, and sorts the cast into roles by what each thing is: the player (the PlayerPrototype's body), enemies and the boss, pickups, usables and objectives, hazards, friendlies, props, the far backdrop, and labels or in-world HUD (asRendered). Changes nothing.
  2. Set. Picks the role set made for the look (toonGame, inkComic, watercolorStorybook, pencilSketch, paperCutout, lineAndWash, or the world's own), or takes the one asked for by name.
  3. Roles. Gives every thing its role on its root, in one pass that changes nothing when run again, and records the role each had before.
  4. Lines. Adds the set's variant lines (a copy of the stack's line drawn only on enemies, or players, in their own ink) and, only where one thing still does not read, a field set by hand, each with its old value.
  5. Check. Presented frames with roles on and with roles off (StyleKit.setRoles("none")), the groups told apart at a glance, asRendered things untouched, at most eight distinct settings drawn, and the look stack's script time with roles off and on.
  6. Report. The set before and after, every role given, every line and field added, the checks, and the undo for each stage.

It is non-destructive: roles change no material, mesh or stack entry. StyleRoles.clear() undoes the whole run; the report also gives the calls that undo one stage (the set alone, the lines alone, each hand-set field, the roles that were there before).

What it needs

styleRoles installed (it brings styleKit) and a look on the scene. The cost check uses toonBlocks' OutlineBench meter when toonBlocks is installed and styleKit's own counter otherwise.

Known limits

  • Installing a package with several dependencies can take a while (#21420).
  • ZeroMind's description of this can lag one release behind what is installed (#19258).
  • The web build was not checked from here (#20946).

The package README's Known limits lists the rest.