vbsp_config textures - BEEmod/BEE2-items GitHub Wiki

Textures Block

The textures block defines all the materials used for the chamber itself, as well as things like standard signage and antlines.

Configuration is defined for a number of 'groups' of textures, with their own set of options. Each group can be either a regular tile group or a set of special materials. Antline configuration works differently. In each group, define the same name multiple times to allow random textures, repeating definitions to increase chances.

Note that surface lacquer materials are not defined anywhere - they're automatically generated from the normal materials.

Here's what a full configuration set looks like:

"Textures"
	{
	"Options"
		{
		"clump_length"  "5"
		"clump_width"   "2"
		}
	
	"Normal.Black.Floor"
		{
		"4x4"   "floors/black_4x4"
		}
	"Normal.Black.Wall"
		{
		"1x1"   "walls/black_128"
		"1x1"   "walls/black_128"
		"1x1"   "walls/black_128"
		"1x1"
			{
			"material" "walls/black_126"
			"rotation" "90"
			}
		"2x1"   "walls/black_vert"
		"1x2"	"walls/black_horiz"
		"2x2"   "walls/black_64"
		"4x4"   "walls/black_32"		
		"goo"   "walls/black_stained"		
		"gap"   "metal/underground_wall_metal004a"
		
		"Options"
			{
			"Algorithm" "CLUMP"
			}
		}
	
	"Special"
		{
		"Behind"        "anim_wp/framework/backpanels"
		"Edge"          "anim_wp/framework/squarebeams"
		"Panel_Edge"    "anim_wp/framework/squarebeams"
		"fizz_border"   "overlays/rubber_stripe001a"
		}
	"Overlays"
		{
		"Exit"     "BEE2/50s/exit"
		"Arrow"    "signage/signage_overlay_arrow"
		"Dot"      "signage/signage_dot"
		"Moon"     "signage/signage_moon"
		"Triangle" "signage/signage_triangle"
		"Cross"    "signage/signage_cross"
		"Square"   "signage/signage_square"
		"Circle"   "signage/signage_circle"
		"Sine"     "signage/signage_sine"
		"Slash"    "signage/signage_slash"
		"Star"     "signage/signage_star"
		"Wavy"     "signage/signage_wavy"

		"ShapeFrame"    "signage/frame_01"
		"ShapeFrame"    "signage/frame_02"
		"Bullseye" 		"BEE2/bullseye/overlays/50s_bullseye"
		}
	"Antlines"
		{
		...
		}
	}

Options

Each group has a number of options that can be set, to configure how textures are specified. These can either be set in the global options block, or overridden per-group in their own block. They're all only relevant for tile groups.

  • Algorithm: Determines how textures are chosen for any given face/overlay:
    • RAND: The default, simply pick a material independently for each face.
    • CLUMP: Tries to produce clumps of the same material, by breaking up the map into overlapping rectangular bounding boxes.
  • clump_length: The maximum direction of the 'long' sides of a clump, in voxels.
  • clump_width: The maximum size of the 'short' sides of a clump, in voxels.
  • MixTiles: If set, copy all other tile sizes to 1x1, so full voxels will mix and match.
  • ScaleUp256: Use the 1x1 at 2x scale for 256x256 voxels, in addition to the double size.
  • MixRotation: If set, randomly rotate all tiles by adding 3 copies of each. True on floors/ceilings by default.
  • Antigel_Bullseye: Specifies whether the bullseye.* groups can be converted to have antigel (surface lacquer) applied. (It needs to use the $detail overlay.) If not, the bullseye is discarded in this situation.

Material Configuration

Each material is normally a single filename, but can also be a block with additional configuration:

"TexType"
	{
	"material" "some/material"
	"offset" "32 128"
	"scale" "0.125"
	"rotation" "CW"
	"repeat" "1"
	}
  • material: The material this defines.
  • offset: X/Y offset for the material, like in Hammer.
  • scale: Texture scale for the material.
  • rotation: Allows rotation in increments of 90 degrees. Can be set to 0, 90, 180, 270, or none, cw, half, ccw.

Groups:

Tile groups: normal.white.floor, bullseye.black.ceiling, etc

Tile groups have a three-part name, composed of the type, portalablilty, and orientation.

  • Types can be one of the following:
    • Normal, Surf or Tile: A regular surface.
    • Panel: An optional alternate texture set, used on moving panel brushes. This is used in Old Aperture to apply metal surfaces here.
    • bullseye, Faithplate, Faith or Catapult: Copies of tiles with a bullseye overlay embedded in the center of each voxel. Used on moving panel brushes with a bullseye target, since overlays cannot move.
  • Portalability must be white or black.
  • Orientations can be any of floor, floors, wall, walls, ceil, ceiling or ceilings.

In each group, a number of 'tile sizes' are defined:

  • 1x1: A full 128x128 voxel.
  • 2x2: 64x64 tiles.
  • 2x1: 64x128 tiles, like standard white tiles.
  • 1x2: 128x64 tiles, horizontal.
  • 4x1: 32x128 tiles, long vertical strips.
  • 1x4: 128x32 tiles, long horizontal strips.
  • 4x4: 32x32 tiles, the smallest size.
  • double: Optional, 256x256 tiles, occupying multiple voxels.
  • gap: If the 'clump' algorithm is used and this is defined, it will be used in irregular 'gaps'.
  • goo: Used on surfaces touching goo. If not defined, 4x4 is used.

4x4 tiles must always be defined. All other AxB sizes will inherit smaller sizes if not defined.

Overlays

The overlays group defines the materials used for automatic overlays, aside from antlines:

  • exit, arrow: Placed automatically next to the exit door.
  • square, cross, dot, moon, slash, triangle, sine, star, circle, wavy: These are the 10 shape signages placed for connections, which are used in this order.
  • shapeFrame: If enabled in options, these are placed over shape signages to allow more than 10 unique sign pairs. Not randomised - each is used in order for a group of 10 signs, after the first unframed group, then it repeats.
  • bullseye: 64x64 overlay used for catapults, on any static surface. Moving surfaces use the bullseye tile group mentioned above.
  • tideline: 32-high tideline overlay used around the edge of goo pits. Only used if the generate_tidelines style option is set.

Special

The 'special' group holds a number of miscellaneous materials which don't fit in another category:

  • behind: Used on the backside of panels, or inside EmbeddedVoxel spaces.
  • edge: Border texture used on the side of all tiles. If your material doesn't match squarebeams, the _tiling_template_ style option can be used to override the shape, though use caution there.
  • panel_edge: If set, an alternate border used on panel-type moving brushes.
  • goo: Material used for goo surfaces.
  • goo_cheap: Alternate material used for goo, with no reflection/refraction. This intended to allow the largest goo pit to have real-time reflections, but Portal 2's render doesn't actually handle multiple pits properly.
  • fizz_border: If set, this border overlay is placed above and below all fizzlers. See the fizz_border_* style options for more configuration.

Antlines

Antlines have a special configuration block. This first defines the materials used, but also the configuration and logic for indicator checkmarks/timers.

"Antlines"
	{
	"Floor"
		{
		"Straight"
			{
			"Tex"   "signage/indicator_lights/indicator_lights_floor"
			"Scale" "0.25"
			}
		"Corner"
			{
			"Tex"   "signage/indicator_lights/indicator_lights_corner_floor"
			"Scale" "1"
			}
		}
	"Wall"
		{
		"Straight" "-1|signage/indicator_lights/indicator_neon_straight"
		"Broken_Straight" "+1|signage/indicator_lights/indicator_neon_straight_broken|static"
		"Broken_Straight" "-1|signage/indicator_lights/indicator_neon_straight_broken|static"

		"broken_chance" "8"
		"broken_min"     "4"
		"broken_max_run" "3"
		}
	// Or:
	"antline"
		{ ... }
	// Or inline.

	"Check"
		{
		"inst" "instances/BEE2/fancy/indicator_check.vmf"
		"switching" "external"
		}
	"Timer"
		{
		"inst" "instances/BEE2/fancy/indicator_timer.vmf"
        "switching" "custom"

        "basic_start_cmd" "pan,Start,,0.00,-1"
        "basic_stop_cmd"  "pan,Reset,,0.00,-1"

        "adv_countup_cmd"    "pan,RunScriptCode,CountUp($time),0.00,-1"
        "adv_countdown_cmd"  "pan,RunScriptCode,CountDown($time),0.00,-1"
        "adv_resetfull_cmd"  "pan,CallScriptFunction,SetFull,0.00,-1"
        "adv_resetempty_cmd" "pan,CallScriptFunction,SetEmpty,0.00,-1"
        "blue_cmd"    "pan,Skin,0,0.0,-1"
        "oran_cmd"    "pan,Skin,1,0.0,-1"
		}
	}

Depending on the style, antlines can vary in a number of ways.

  • If wall/floor blocks are present, each define their own texture set. Alternatively, the texture set is defined in a single antline block shared by both, or lastly the set is defined in the main block.
  • A straight type must always be present, but a corner variant can also be used - if not, one of the straight segments extends to cover each corner position.
  • broken_straight and broken_corner enable the 'broken' mode, where some antlines in longer strings are non-functional.

For each texture, it can be defined in the following shorthand one-line syntax, or a more clear block form:

  • path/to/material: Defines a standard antline, with 0.25 scale.
  • 0.5|path/to/material: An antline with altered scaling.
  • 0.5|path/to/material|static: A static antline with scaling. The block form has the following options instead:
  • tex: The material to use.
  • scale: Amount of texture to use per dot. Can be negative to flip horizontally, used in most styles for additional variation.
  • static: If true, this antline is made un-named, so it doesn't create an info_overlay_accessor entity. Useful on broken antlines.

Along with the materials, the following options can be set:

  • broken_chance: For each antline, the 0-100 percentage chance that it is broken.
  • broken_min: Must be positive. A straight antline section must have more than this many dots to be allowed to have broken sections. (Corners require at least one straight neighbour to be functional.)
  • broken_max_run: If this many consecutive antlines are broken, the next is forced to be functional.

Checkmarks and Timers

The Check and Timer blocks configure the timer and check/cross 'panel' instances, allowing optimising logic in a few situations and allowing the advanced timer control feature to function. Both have the following options:

  • inst: Required, the filename to use. If set to blank, they're removed.
  • switching: Describes how the instance performs switching, to allow for certain optimisations:
    • custom: Default, entirely custom behaviour and no optimsations available.
    • internal: The panel instance contains texturetoggle functionality (like a prop_indicator_panel). Where possible, the compiler will use one panel's $indicator_name, instead of creating a texturetoggle itself.
    • external: The panel instance contains overlays, named $indicator_name. The compiler will ensure a texturetoggle is created to toggle these overlays alongside the regular antlines.
  • XXX_cmd: A VMF-style command in local_name,input,parameter,delay,times format, used to control the panel. Multiple can be defined to output multiple times.

For checkmarks, the following commands are defined:

  • check_cmd: Switch the checkmark to check/on mode.
  • cross_cmd: Switch the checkmark to cross/off mode.

Timers have two command groups, first the basic normal mode:

  • basic_start_cmd: Starts the timer with the default duration.
  • basic_stop_cmd: Stop and reset the timer. Secondly the advanced mode which allows fine control:
  • blue_cmd: Switch the timer to show a blue/off state.
  • oran_cmd: Switch the timer to show an orange/on state.
  • adv_countup_cmd: Start the timer counting from empty to full.
  • adv_countdown_cmd: Start the timer counting from full to empty.
  • adv_resetfull_cmd: Fade directly from the current state to full.
  • adv_resetemtpy_cmd: Fade directly from the current state to empty.

The panel instances have the following fixup values set:

  • $is_timer: Default Puzzlemaker fixup, 1 for timers and 0 for check/cross signs.
  • $timer_delay: Default Puzzlemaker, the (basic) timer duration, or 99999999999 for "infinite".
  • $indicator_name: The name of the antline overlay, or - if none is present. Behaviour depends on the switching option.
  • $advanced: On timers, set to 1 if the advanced mode is used For the advanced timer outputs, the following fixup values are also available:
  • $time: The duration of the timer or fade.
  • $playback: 30 / duration, giving the appropriate SetPlaybackRate value for a 30s timer animation.

Options for custom antlines

Some items (like Sendificators) have special antline functionality. For this purpose, the configuration also allows overriding the appearance of Antlasers, and overriding the texture toggle I/O. This takes the form of an additional set of options in the outermost Antlines block:

`Antlines`
	{
	"antlaser_model" "models/bee2/props_clean/antlaser_emitter_sendtor.mdl"
	"States"
		{
		"set_indicator_idle_rl"
			{
			"tex_frame" "0"

			"antlaser_skin" "0"
			"antlaser_beam_colour" "170 170 170"
			"antlaser_glow_colour" "200 200 200"
			}
		"set_indicator_success_rl"
			{
			"tex_frame" "1"
			"antlaser_skin" "1"
			"antlaser_beam_colour" "20 240 20"
			"antlaser_glow_colour" "80 255 80"
			}
		"set_indicator_fail_rl"
			{
			"tex_frame" "2"
			"antlaser_skin" "2"
			"antlaser_beam_colour" "250 170 0"
			"antlaser_glow_colour" "255 192 64"
			}
		}
	"Initial_state" "set_indicator_idle_rl"
	}
  • antlaser_model: Overrides the model used for the antlaser emitter.
  • States: Defines a set of named 'states' Each state generates a comp_relay for the outputting item to trigger, which will do the appropriate outputs.
    • tex_frame: Sets the overlay to use this texture frame.
    • antlaser_beam_colour / color: The RGB colour to use for the antlaser's beams, if the item style uses those. If not set, uses pure white.
    • antlaser_glow_colour / color: The RGB colour to use for the antlaser's glow sprite, if the item style uses those. If not set, matches the beam colour.
    • antlaser_skin: The skin to set the antlaser model to.
  • initial_state: The name of one of the defined states, which sets the appearance at the start of the map.

If states are not defined, the standard 0/1 frames and default antlaser design (set in that item's configuration) are used. If they are, the checkmark/timer switching optimisations cannot be used and are ignored.

⚠️ **GitHub.com Fallback** ⚠️