Skip to content

vbsp_config dropperitems

TeamSpen210 edited this page Aug 2, 2024 · 2 revisions

DropperItems is a block in vbsp_config describing various properties for cubes and cube droppers that may exist in the map. This allows cubes to be synthesised by the compiler, and allows different droppers and cubes to seamlessly be mixed and matched. The block has 3 different subtypes - Cube, Dropper, and CubeAddon. Each must have a unique ID value.

Cube

The Cube block represents a type of cube which can spawn. It has the following syntax:

"Cube"
	{
	"ID"          "UNIQUE_ID"
	"ItemID"      "<ITEM_ID>"
	"CubeType"    "STANDARD"
	"HasName"     "UniqueCube"
	"isCompanion" "0"
	"Offset"      "20"
	"baseTint"    "255 255 255"
	
	"Pack"      "PACKLIST_ID"
	"Model"     "models/props/metal_box.mdl"
	"PackColor" "PACKLIST_ID"
	"Model"     "models/props/metal_box_color.mdl"
	
	"Outputs"
		{
		"OnSpawn" "..."
		"OnFizzle" "..."
		"OnFinishedDrop" "..."
		}
	}

The options are as follows:

  • ID: A unique name for this type, used to refer to it elsewhere. The following names are specially handled for Valve's cube types:
    • VALVE_CUBE_STANDARD
    • VALVE_CUBE_COMPANION
    • VALVE_CUBE_REFLECTION
    • VALVE_CUBE_SPHERE
    • VALVE_CUBE_FRANKEN
  • ItemID: A lookup value which should point to the instance used for the dropperless cube variant. This will automatically handle the various interactions and generate instances. This instance name will never appear in the final map.
  • CubeType: Defines the type of cube it will behave as. This determines which buttons it presses, interactions with lasers, and the skins desired for gel. Valid values are WEIGHTED, COMPANION, REFLECTION, SPHERE, ANTIQUE (for an Old Aperture cube), and FRANKEN. Franken-type items are not able to switch model.
  • HasName: The name used in voice attributes. This should also be unique.
  • isCompanion: If True, the item will be treated as 'special' for the purposes of voicelines and other logic. This is provided to allow Companion Spheres, for example.
  • Offset: The distance from the origin of the model to below its base. This allows cubes to be generated at a consistent height above the floor.
  • BaseTint: If set, applies a rendercolor tint to the model.
  • Model, ModelColor: If set, switch to a custom model for the cube. The color variant is used when the cube has been colorized with the Cube Colorizer.
  • Pack, PackColor: Packlists to use for the matching models.
  • Outputs: Allows triggering IO events when certain things occur. The name is the type of output, and the value is processed like in VMF or AddOutput syntax. !self can be used to refer to the cube.
    • OnSpawn: Fired when the cube is created.
    • OnFizzle: Fired when the cube is fizzled, or otherwise destroyed.
    • OnFinishedDrop: Fired when the cube has left the dropper completely. This should be used to make the cube 'active' and begin doing things. For dropperless cubes, this is fired shortly after OnSpawn.

Dropper

The dropper block allows for defining custom items which can drop any type of cube. It has the following syntax:

"Cube"
	{
	"ID"             "UNIQUE_ID"
	"ItemID"         "<ITEM_ID>"
	"Cube_Dir"	     "+x"
	"Cube_Pos"       "0 0 -64"
	"OutStartDrop"   "instance:spawn_man;OnUser2"
	"OutFinishDrop"  "instance:close_trig:OnStartTouch"
	"InputRespawn"   "instance:spawn_man;SetStateATrue""
	}

The options are as follows:

  • ID: A unique name for this type, used to refer to it elsewhere.
  • ItemID: A lookup value which should point to the instance used for the dropper. This will register it as the dropper, and apply the various transformations.
  • Cube_Dir: The direction the 'front' of cubes should point. This allows ensuring laser cubes and FrankenTurrets point in the correct direction.
  • Cube_Pos: Specifies the position of the floor under the generated cube.
  • OutStartDrop: An instance proxy output which will be fired when the dropper starts the spawning process. This should be triggered at the same time as the dropper fizzles already-spawned cubes.
  • OutFinishDrop: An instance proxy output which will be fired when the cube has completely left the dropper. This dropper should arrange to fire this output with the cube as the !activator.
  • InputRespawn: An instance proxy input which will make the dropper respawn a cube.
Clone this wiki locally