Signage Obj - BEEmod/BEE2-items GitHub Wiki

Signage (and SignageLegend)

The signage item allows users to place customisable square pictograms to communicate information about a puzzle, optionally with an arrow. Each is defined independently allowing users to select which they have available for each timer values. During export, the app also automatically generates the texture for the editor model to provide a live cheat-sheet in-editor.

If a sign is placed without an arrow, it can optionally place a second preset 'secondary' sign. These additional signs are defined as objects too, just hidden from the UI. In addition to the configurable sign, a second 'Connection Signage' item allows selecting from the shapes used for antlines. This automatically pulls from the style configuration, so does not require individual definitions.

A definition looks like the following:

"Signage"
	{
	"ID" "FANCY_DANCING"
	"Name" "Fancy Dancing"
	"Hidden" "0"
	"Primary" "FIRST_DANCE"
	"Secondary" "SECOND_DANCE"
	"Styles"
		{
		"FANCY_STYLE"
			{
			"type" "square"
			"overlay" "signage/dance_overlay"
			"world" "signage/dance_world"
			"icon" "BEE2_FANCY:signages/dance.png"
			}
		"BORING_STYLE" "FANCY_STYLE"
		}
	}
  • ID: The unique ID to identify this sign. SIGN_ARROW is a special definition used for the arrow.
  • Name: The name of the sign to display in the app.
  • Hidden: If true, the sign will not be selectable in the app UI. This is used for primary/secondary alternates, and the arrow sign.
  • Primary: If a dual sign is placed, this replaces the left sign with this sign ID. If unset, this definition is used here. This is mainly useful to add the "1" only when "2" is present.
  • Secondary: If specified, dual signs can be placed, with this sign ID in the right position.
  • Styles: Defines the appearance for each style. The keyvalue name should be a style, and the value can either be a block of configuration, or the name of another definition block, to use the same config multiple times.
  • type: Specifies the shape of the overlay:
    • square (default): The standard 32x32 unit sign.
    • tall: A 16-wide, 32-tall sign.
    • wide: A 32-wide, 16-tall sign.
  • overlay: Name of the signage material, suitable for use as an overlay.
  • world: Name of a material which can be used directly on brushes. This isn't currently used for anything, but may be useful in the future to allow signage on moving brushes and the like.
  • icon: A UI image used to preview the sign in the application. If not provided, the app will look for a texture named the same as the overlay material.

Legends

The legend texture generated for signs is rather complex, and themed according to the style. To construct this, an additional SignageLegend object should be present, with the same ID as a style. The legend is built out of a few composited layers:

  • A background texture inserted in the top-left, to provide a backing behind signs.
  • Each sign is added, a provided 'blank' sign, or left unchanged.
  • An overlay texture is then added, in the existing styles to texture the model potion.
  • A numbers spritesheet is then used to add numbers to each defined sign.

The texture itself is always 512 wide, 1024 high, with 102×102 signs, or 128×128 for connection shapes.

That configuration looks like so:

"SignageLegend"
	{
	"ID" "FANCY_STYLE"

	"Symbol"
		{
		"numbers" "FANCY_PAK:signage/fancy_numbers.png"
		"num_left" "4"
		"num_bottom" "12"

		"overlay"    "FANCY_PAK:signage/fancy_sym_over.png"
		"background" "FANCY_PAK:signage/fancy_back.png"
		"blank"      "FANCY_PAK:signage/fancy_sym_blank.png"
		}
	"Antline"
		{
		"numbers" "FANCY_PAK:signage/fancy_numbers.png"
		"num_left" "8"
		"num_bottom" "16"

		"overlay"    "FANCY_PAK:signage/fancy_ant_over.png"
		"background" "FANCY_PAK:signage/fancy_back.png"
		"blank"      "FANCY_PAK:signage/fancy_ant_blank.png"
		}
	}
  • ID: Should be the same as a style.
  • Symbol: Defines the configuration for standard signs. For backwards compatibility, the contents can be specified inline in SignageLegend.
  • Antline: Defines the configuration for antline signs. If unset, no textures are used.
  • numbers: A spritesheet to define the number images to use. The width must be a multiple of 10 - the image is then split up for the numbers 0 then 1-9.
  • num_left: Determines the pixel offset from the left to place the first numeral.
  • num_bottom: Determines the pixel offset from the bottom to place the numerals.
  • overlay: If specified, overlaid on top of the legend. Resized to 512×1024.
  • background: Placed first in the legend. This is not resized, and is instead placed aligned to the upper-left in the image.
  • blank: If set, this replaces any missing sign. If not supplied, the background is left unchanged.
⚠️ **GitHub.com Fallback** ⚠️