editoritemstxt - BEEmod/BEE2-items GitHub Wiki
To-do: Migrate vanilla EditorItems documentation to the VDC page. Going forward this page will only be used for BEE2.4-specific features/behaviors.
editoritems.txt is the config file defining items for the editor. The BEE2 splits this up into separate files for each item, and style. It is located at Portal 2/portal2_dlc2/scripts/editoritems.txt.
"ItemData"
{
"Item"
{ ... }
"Item"
{ ... }
"Renderables"
{
"Item"
{ ... }
}
}
editoritems.txt is mainly composed of a large number of Items blocks. These are contained within a top-level ItemData block. This must be included in the Style editoritems.txt files, but not in individual items. Renderables defines the model used for the placement-error icon and the connection-heart - this should not need to be altered.
"Item"
{
"ItemClass" "ClassName"
"Type" "ITEM_ID_HERE"
"Editor"
{
"SubTypeProperty" "ButtonType"
"SubType"
{
"Name" "Subtype Name"
"Model"
{
"ModelName" "model_filename.3ds"
"TextureName" "null.png"
}
"Palette"
{
"Tooltip" "PALETTE 1"
"Image" "palette/tSpen/icon_1.png"
"Position" "4 2 0"
}
"Sounds"
{
"SOUND_CREATED" "P2Editor.PlaceOther"
"SOUND_EDITING_ACTIVATE" "P2Editor.ExpandOther"
"SOUND_EDITING_DEACTIVATE" "P2Editor.CollapseOther"
"SOUND_DELETED" "P2Editor.RemoveOther"
...
}
"Animations"
{
"ANIM_IDLE" "0"
"ANIM_EDITING_ACTIVATE" "1"
"ANIM_EDITING_DEACTIVATE" "2"
...
}
}
}
"MovementHandle" "HANDLE_NONE"
"InvalidSurface" "WALL FLOOR CEILING"
"DesiredFacing" "DESIRES_ANYTHING"
"CanAnchorOnGoo" "0"
"CanAnchorOnBarriers" "0"
}
"Properties"
{
"PropertyName"
{
"DefaultValue" "0"
"Index" "1"
}
...
}
"Exporting"
{
"Instances"
{
"0"
{
"Name" "instances/p2editor/filename.vmf"
"EntityCount" "5"
"BrushCount" "5"
"BrushSideCount" "30"
}
...
}
"TargetName" "name"
"Offset" "64 64 64"
}
}
-
Type: The ID for this item, which must be unique. Must be present. -
ItemClass: Set to predefined values. This provides the special behaviors specific to items. The default class isItemBase, since the parameter is optional. -
MovementHandle: Sets the type of rotation the item will have. The default isHANDLE_NONE. The-xside of the instance is generally the 'front' of the item.-
HANDLE_NONE: Does not give a handle. The item can still be rotated in 4 directions byDesiredFacing. -
HANDLE_4_DIRECTIONS: Gives a quarter-circle handle to allow pointing in 4 directions. -
HANDLE_5_POSITIONS: Allows center-positioning, and 4 side positions. This is done by rotating the centered item, and switching to a different item when centered/offset. For this reason this type only works withITEM_LASER_CATCHER,ITEM_LASER_RELAYandITEM_LASER_EMITTER(_CENTER/_OFFSET). -
HANDLE_6_POSITIONS: Allows centering in two orientations, and offset on the 4 sides. The instance should be centered, with the sides in theyaxis. When offset, the+xside faces toward the center (and won't extend into other voxels). -
HANDLE_8_POSITIONS: Allows placement on the inner and outer quarter tiles in each direction. Instances should be centered 32 units wide. The-xside is placed flush with the voxel border. Should not be combined withCanAnchorOnBarriers, as this will cause the item to reset to the center of the voxel whenever the chamber geometry is changed. -
HANDLE_36_DIRECTIONS: Allows rotation on the floor in increments of 10°. This does not function properly on wall- or ceiling-placed items.InvalidSurfaceshould be used. -
HANDLE_CATAPULT: Special rotation handle used for Faith Plate items and their targets. Likely produces the trajectory and item links.
-
-
CanAnchorOnGoo: If enabled, the top surface of goo pits will be treated as a surface to attach to. -
CanAnchorOnBarriers: If enabled, several surfaces will be treated as attachment points: the side of Glass/Grating, tops of 90° Angled/Glass Panels, the top of Track Platforms, and the surface of Piston Platforms. Eligibility for placement is defined by the relevant item classes (ItemBarrier,ItemAngledPanel,ItemRailLiftandItemPistonPlatform). Should not be combined withHANDLE_8_POSITIONS, as this will cause the item to reset to the center of the voxel whenever the chamber geometry is changed. -
InvalidSurface: Allows prohibiting placement of the item on a surface. Defaults to "", but can be set to any combination ofWALLS,FLOORandCEILINGto disallow placement on that surface. -
DesiredFacing: Allows defaulting to a specific orientation on walls:-
DESIRES_ANYTHING: default, performing no rotation. -
DESIRES_UP: Rotate so+xis facing upright, and the rotation handle points down. -
DESIRES_DOWN: Rotate so-xis facing upright, and the rotation handle points up. -
DESIRES_HORIZONTAL: Rotate so theyaxis is vertical. Which side is upright varies depending on which wall it is placed on.
-
-
Offset: The offset applied to instances. This should always be set to64 64 64, since all items need to rotate around the center of the cube.
EmbedFace types: 4x4_checkered, 4x4, 2x2, 2x1, 1x1, Grid_Default
Collision: COLLIDE_GRATING, COLLIDE_GLASS, COLLIDE_BRIDGE, COLLIDE_FIZZLER, COLLIDE_PHYSICS, COLLIDE_SOLID, COLLIDE_NOTHING, COLLIDE_EVERYTHING.
Connection Types: CONNECTION_TBEAM_POLARITY, CONNECTION_BARRIER_ANCHOR_TO_EXTENT, CONNECTION_HAZARD_BRUSH, CONNECTION_HAZARD_MODEL, CONNECTION_HAZARD, CONNECTION_BOX_DROPPER, CONNECTION_PAINT_DROPPER, CONNECTION_STANDARD.
Animation types:
-
ANIM_REAPPEAR[Cube Dropper]: Played when the dropper is re-enabled. The first frame should start the dropper far above the origin. -
ANIM_DISAPPEAR[Cube Dropper]: Played when the dropper is disabled or deleted. The last frame should end with the dropper far above the origin. -
ANIM_GROUND_TO_FALLING_EDITING: Played when the dropper is re-enabled, and the properties menu is open. -
ANIM_FALLING_TO_GROUND_EDITING: Played when the dropper is disabled, and the properties menu is open. -
ANIM_GROUND_TO_FALLING: Played when the dropper is enabled, and the properties menu is closed. This only occurs when the item is first placed. -
ANIM_FALLING_TO_GROUND: Played when the dropper is deleted while the properties menu is closed. -
ANIM_FALLING_EDITING_DEACTIVATE: Played when the properties menu is closed, and the dropper is enabled. -
ANIM_FALLING_EDITING_ACTIVATE: Played when the properties menu is opened, and the dropper is enabled. -
ANIM_FALLING_IDLE: Position for the model when the dropper is enabled. -
ANIM_EDITING_DEACTIVATE: Played when the properties menu is closed. -
ANIM_EDITING_ACTIVATE: Played when the properties menu is opened. If subtypes are used, the new model switches to the last frame of this animation instantly. -
ANIM_IDLE: Default animation/pose, when the properties menu is closed. For cubes this is the pose without a dropper.
The following are only used on the placement-error icon, and connection heart icon:
-
ANIM_ICON_HEART_HAPPY_IDLE: Animation played when hovering over a choice in the 'remove connection' view. -
ANIM_ICON_HEART_SUCCESS: Played by itself when a connection is created. -
ANIM_ICON_HEART_BREAK: Played as the hiding animation when the antline connection is broken. -
ANIM_ICON_HIDE: Played to make the icon disappear. -
ANIM_ICON_IDLE: Played when the icon is visible. -
ANIM_ICON_SHOW: Played to bring in the icon.
Sound Types:
-
SOUND_DESELECTED: Played when the item is deselected. -
SOUND_SELECTED: Played when the item is clicked on. -
SOUND_DELETED: Played when the item is deleted. -
SOUND_EDITING_DEACTIVATE: Played when the properties menu is closed. -
SOUND_EDITING_ACTIVATE: Played when the properties window is opened. -
SOUND_CREATED: Played when the item is first placed on a surface.
"Inputs"
{
"BEE2"
{
<options>
}
}
"Outputs"
{
"CONNECTION_STANDARD" ...
"BEE2"
{
<options>
}
}
If the input BEE2 block is present instead of the normal CONNECTION_STANDARD block, new-style inputs are used - the compiler dynamically combines things. All options can be put in either BEE2 block (both are available for convenience/logical separation).
-
Type: Specifies how inputs behave. Can be swapped at runtime withChangeInputType.-
Default: Normal PeTI, via proxy. -
DUAL: Provides both a primary and secondary input, with AND functionality. -
AND: AND logic - generates a counter if 2+ inputs. -
OR: OR logic - generates a counter if 2+ inputs. -
OR_LOGIC: Treat as an invisible OR logic gate. -
AND_LOGIC: Treat as an invisible AND logic gate. -
DaisyChain: Inputs are moved to the output item, and we keep our input to them as well.
-
-
InvertVar: Does it 'start enabled'? Set toTrue,Falseto always enable,$varto lookup,!$varto use the inverse of the variable. -
Enable_Cmd,Disable_Cmd: VMF-style, required. Replaces originalCONNECTION_STANDARDvalues. -
SpawnFire: Fire theEnable/Disablecommand when the map starts, to initialize the item. This correctly handles an actual input being fired before the map start command fires. The value may be set toalwaysto always add the output, ordynamicto only add it if an input is connected to the item. -
Sec_InvertVar,Sec_Enable_Cmd,Sec_Enable_Cmd,Sec_SpawnFire: Same functionality for the secondary input. -
Default_Dual: Specify how the input behaves when it doesn't have a set A/B type.-
A: Toggle the 'A' part, and ignore B. -
B: Toggle the 'B' part, and ignore A. -
Both: Simultaneously trigger both. This will increment the connectioncount for both channels.
-
-
DualType: Outputted A/B type. This allows implementing a converter item.-
A: Target the 'A' part of the item. -
B: Target the 'B' part of the item. -
Both: Target both at the same time. - Not set: Target either, as set by the item defaults.
-
_LOGIC types are special - the instance is converted to a math_counter. If redundant (no inputs, outputs) the item is removed. If possible, outputs are redirected to the target (if it would cause the same effect). This is done repeatedly if needed.
Specifying type DUAL makes the item eligable to use the Input A/B system to accept two independent inputs. This replicates how Excursion Funnels operate - the special editor behaviour isn't functional for custom items.
These items do not use $connection_count (it's deleted). Instead they use $conn_count_a and $conn_count_b. As a special case TBeams are treated as a dual-input item, with the two channels corresponding to the two input types. Note that the item needs to be prepared to handle both channels switching in the same frame, which can happen if both are connected to the same input.
-
Out_Activate,Out_Deactivate:instance:command for output (instead ofCONNECTION_STANDARD). -
Timer_Sound_Pos: If set, this is an offset from the instance. The item should have aTimerDelayproperty. From this location, tick-tock sounds will be played for the period while it is active (the sound is set in the style). -
Timer_Done_Cmd: VMF-style outputs to fire once the timer delay has elapsed. This allows resetting the item or similar behaviors.
This feature allows a 'reverse' IO pair fired from the target to the button. It only occurs when a 1:1 connection between a Pedestal Button and a target item exists. The button stays pressed until the target item unlocks them. It may also remotely press the button.
-
out_lock,out_unlock: Present target items, theinstance:command to press and release the button, respectively. -
lock_cmd,unlock_cmd: Present on pedestal buttons, VMF-style outputs to perform these operations on the pedestal button.
Instead of using the standard countdown behaviour, an alternate version of the timer indicator panel can be used instead. This allows an item to make the timer visually count up or down, independently from the blue/orange state. To opt into the custom timer, one or more TimerCommand blocks should be present in the configuration. These specify the name of outputs on the item which will be sent to the custom timer:
"TimerCommand"
{
"output" "instance:timer_rl;OnTrigger"
"mode" "countup"
"delay" "0.0"
"delay_add_timer" "0"
"fadetime" "0.0"
"fadetime_add_timer" "1"
}-
output: Aninstance:command which will cause this output to be fired. -
mode: Determines what the timer will do.-
countdownbehaves like the standard timer, starting full and gradually emptying. -
countupis the opposite, starting empty and gradually filling. -
resetfullfades to a full timer from whatever the current state is, over the course of about 0.25 seconds. -
resetemptydoes the same, but fades to an empty panel.
-
-
delay: Like regular outputs, adds a delay before this will trigger. -
delay_add_timer: If set,$timer_delaywill be added to thedelayvalue. This allows easily firing a reset at the end of the time, or things like that. -
fadetime: The time taken for the count to occur. Does nothing for the resetting modes. -
fadetime_add_timer: If set,$timer_delaywill be added to thefadetimevalue. This should be enabled if you want it to match the configured duration.
The blue/orange background of the timer follows the regular output status of the item. Note that a style may not support this feature (but all default styles do). If that is the case, it will be approximated using the standard timer behaviour.
These properties are usable in any item class. They generally only affect the $fixup variables passed to an instance.
-
ConnectionCount($connectioncount): Required for all items accepting an input. The fixup will be set to the number of items connected to the input. This is usually passed to the "Max Value" option in amath_counter. -
Start...: These properties add a checkbox with the given name. The associated fixup variable will be set to0or1as appropriate.Property Name Editor Text Fixup StartActive"Start active" $start_activeStartDeployed"Start deployed" $start_deployedStartEnabled"Start enabled" $start_enabledStartLocked"Start locked" $start_lockedStartOpen"Start open" $start_openStartReversed"Start reversed" $start_reversedAutoDrop"Auto-drop first cube" $disable_autodropAutoRespawn"Auto-respawn cube" $disable_autorespawnNote:
AutoDropandAutoRespawnwill not be inverted on non-cube items, despite the $fixup name. On droppers, they behave correctly. -
TimerDelay($timer_delay): Adds a "Timer Delay" widget which allows selecting numbers from3-30, and "infinite". When infinite, it will be set to either0or99999999999.1or2values can be set as theDefaultValue, but cannot be chosen in the editor. -
TimerSound($timersound): Set to0when the item is infinite, and1when finite. Always set to0when no output is attached.
These few properties are used on certain specific items, which aren't placeable by users.
-
IndicatorName: Used onITEM_INDICATOR_TOGGLE. This adds a$indicator_namefixup, which is populated with the overlay's name. -
IsTimer: Used onITEM_INDICATOR_PANELandITEM_INDICATOR_PANEL_TIMER. Sets theis_timerfixup based on the item type. This does not function on Pedestal Buttons. -
HelperRadius($helper_radius): Used onITEM_PLACEMENT_HELPER, appears to always be set to64. -
UseHelperAngles($use_helper_angles): Used onITEM_PLACEMENT_HELPER, appears to always be set to0. -
ForcePlacement: Used onITEM_PLACEMENT_HELPER, appears to always set$force_placementto0.
The item class used by both Angled Panel items. This allows use of the Panel Angle property, and for Angled Panels spawns a func_brush with the surface texture. For the glass panel, the white and black models are set to the same model.
Models
- White surface, 90°
- White surface, 60°
- White surface, 45°
- White surface, 30°
- Black surface, 90°
- Black surface, 60°
- Black surface, 45°
- Black surface, 30°
- Undeployed, 90°
- Undeployed, 60°
- Undeployed, 45°
- Undeployed, 30°
Properties:
-
AngledPanelAnimation($animation): Gives a 30, 45, 60 and 90 degree subtype selection value. The fixup is set toramp_##_deg_open, with##matching the set angle. -
AngledPanelType: Presumably controls whether a surface is spawned for the panel.1is used for the Angled Panel,2is used for the Glass Panel.
Used for Fizzlers and Laserfields. Including the Barrier Type property is required to prevent random crashes on placement. Items of this type will mirror themselves to the opposing surface, and can be extended in either direction. A trigger_portal_cleanser or trigger_hurt/func_brush will be generated between the model instances.
Instances:
- Base: Positioned at the placement position of the item, and given all property values.
- Model: Placed at each end of every fizzler brush. The
$skinfixup is set to0for fizzlers, and2for laserfields (since skin1is a dirty fizzler). The instance is namedtarget123_modelStart123orfizzler123_modelEnd123. Due to a bug, inputs are sent totarget123_modelStart. This is fixed by the BEE2, setting names tofizzler123_modelEnd.
Properties:
-
HazardType: Adds dropdown for choosing between the "Fizzler" and "Laserfield" subtypes. Required to prevent crashes.
Used for Glass/Grating items. Custom items will not be generated with any frame instances or brushes. All instances use the same base name, and are passed $fixup values.
Instances:
-
0: Surface - placed at all occupied points. -
1: Left-sided section with corner model at the end. -
2: Left-sided straight section. -
3: Left-sided short section, designed to mesh with corner sections. -
4: Left convex corner piece, unused. -
5: Right-sided section with corner model at the end. -
6: Right-sided straight section. -
7: Right-sided short section, designed to mesh with corner sections. -
8: Right convex corner piece, unused.
Properties:
-
BarrierType: allows choosing between the "Glass" and "Grating" subtypes.
Used for Floor Buttons. Note that the ButtonType property is optional - if not added, instances 0 and 1 will only be used. This is useful for detecting the color of the attached surface.
Instances
-
0: Weighted, White -
1: Weighted, Black -
2: Cube, White -
3: Cube, Black -
4: Ball, White -
5: Ball, Black
Properties:
-
ButtonType: allows choosing between "Weighted", "Cube", or "Sphere" subtypes.
Used for the Faith Plate Target item. When placed, a matching ITEM_CATAPULT is generated.
Properties:
-
VerticalAlignment: Unknown function, appears to be always set to 0.
Used for Aerial Faith Plates. Items with this class also place a catapult target, and generate an appropriate trigger_catapult brush. Regardless of handle type, this will force the orientation to point in the direction of the target.
Properties
-
targetname: Present on Valve's item, appears to have no effect. -
catapultSpeed: Sets the$catapult_speedfixup to the generated speed of the catapult. -
VerticalAlignment: Unknown function, appears to be always set to 0.
Item type used by the Coop Spawn Room. This is linked to the SP ItemEntranceDoor, for swapping between.
Properties:
-
CoopDoor: Stores if the level is coop or not, and if this should be visible and invisible.
Instances:
-
0: Spawn Room, placed at the item location. -
1: 'White door frame', unused. -
2: 'Black door frame', unused. -
3: Coop Exit, the disassembly chamber. This is placed at0 0 0. -
4: Arrival and Departure Transition entities, placed at0 0 0.
Item type used by the Coop Exit Door.
Properties:
-
CoopDoor: Stores if the level is coop or not, and if this should be visible and invisible.
Instances:
-
0-3: Exit 1-4 -
4: White Door Frame -
5: Black Door Frame
Item class used for droppers. The model must have animations for disappearing and reappearing, as it is still rendered at all times.
Properties:
-
ItemFallStraightDown($item_fall_straight_down): Appears non-functional, and always set to0. In Valve's instance, this will cause the clips in the iris to be killed, so the cube directly sits on the model and interacts with the iris collision sections. -
DropperEnabled: Adds a "Dropper Enabled" checkbox. When enabled the attached dropper will be visible, and will export. When disabled the cube will export.
Item class used for Cubes. The third item is always set to HANDLE_36_DIRECTIONS, for the Reflection Cube. It also renders with a laser beam visual.
Models:
- Cube
- 'Falling' cube. (This model is unused, but must be set. It is replaced by animations on the normal model.)
Properties:
-
DropperEnabled: adds a "Dropper Enabled" checkbox. When enabled the attached dropper will be visible, and will export. When disabled the cube will export.
Item Class used by the SP Entrance Door.
Properties:
-
CoopDoor: Stores if the level is coop or not, and if this should be visible and invisible.
Item Class used by the SP Exit Door.
Properties:
-
CoopDoor: Stores if the level is coop or not, and if this should be visible and invisible.
Item class for Goo. Only model options are available to be chosen, no instances are used for Goo at all. For this reason this class is not suitable for custom items.
Item class used for Laser Emitters, to generate the laser preview in the editor.
Item class for Light Bridges. A field preview is generated in the editor. Additionally, items with the CanAnchorOnBarriers setting can be attached to the bridge surface (moving off-grid depending on the exact rotation position).
This is used for the Light Strip item. This class produces the proper collisions for items with the HANDLE_8_POSITIONS rotation type.
The class for Gel Droppers, and dropperless gel respectively. Both allow all the given properties, but paint splats only output Paint Type.
Properties:
-
PaintType: Sets the paint type used:$paint_typeLabel 0 Bounce Gel 2 Speed Gel 3 Conversion Gel 4 Cleansing Gel
Reflection Gel uses the invalid type index 4, 'after' Cleansing Gel. The default value of PaintExportType is exported here, which conditions can transform to correct values.
-
PaintFlowType: Adds a dropdown with the options "Light", "Medium", "Heavy", "Drip" and "Bomb". Bomb-type droppers use their own instance, but the other types use several$fixupvariables to configure the paint sprayer:Property Light Medium Heavy Drip $blobs_per_second5 10 20 1 $angled_blobs_per_second3 3 3 0 $streak_angle8 8 8 0 $ambient_sound2 2 3 1 $render_mode0 0 0 1 -
AllowStreaks: Adds an "Allow Streaks" checkbox, which sets the$streak_timefixup to either0or0.35. -
PaintExportType: Possibly has to do with the bomb-type instance switching. Does not have visible functionality.
Item class used for Flip Panels. When exported, a func_door_rotating brush is generated automatically. The brush is named instance_name123-flipping_panel , so entities in the instance can refer to it directly.
Properties:
-
Portalable($start_deployed): Shadows the "portalable" checkbox for the surface, setting the fixup variable (1for white,0for black). Only applies on this class.
This class is used for Pedestal Buttons. The 3-tile wide base brush is automatically generated, meaning that this cannot be used for base-less pedestal buttons.
Class for Piston Platforms. The positions are saved as a number, where 0 is flush with the floor and 4 is fully extended (512 units). OccupiedVoxel is altered based on the maximum position for the platform, taking up the full cube for each piston square and the square in front of the platform.
Properties:
-
AutoTrigger: Used to enable/disable the automatic trigger. Appears enabled only when on the floor and with no inputs. -
BottomLevel: Set to an integer between 0 and 3. This encodes the lowest position the platform will move to. It is exported as$bottom_level. -
TopLevel: Set to an integer between 1 and 4. This encodes the highest position the platform can move to. This is exported as$top_level. -
StartUp: Set to 0 or 1. If 0, the platform starts at the low position and moves to the high position. If 1, the platform starts high and moves to the low position. It is exported as$start_up.
All items with this class must use a targetnameof railLift for inputs to function. EmbeddedVoxel is ignored for this type - the area below each track segment is always used.
Properties:
-
Oscillate: Adds a checkbox for the operating mode of the platform. -
TravelDirection($travel_direction): Set to the direction angles that the platform moves in. -
TravelDistance($travel_distance): Set to the distance the platform should move (always multiples of 128). -
StartingPosition($starting_position): For oscillating platforms, set to the fraction from the start to the end that it begins at. -
Speed($speed): Sets the speed of the platform. Always set to100.
Instances:
0: Grating instance for enclosed bases of platforms. Overlayed on bottoms
1: Bottom track, with openings at +X.
2: Middle track, with openings at -X and +X.
3: Top track, with openings at -X.
4: Non-oscillating platform. Placed at one end.
5: Oscillating platform. Placed at some point on the track, with $starting_position set so the func_movelinear moves to either end appropriately.
6: Singular track, no openings.
Item class for Stairs. The main function is to switch models based on the StartOpen property.
Class for Excursion Funnels. Adds blue/orange vortex effect. Polarity inputs only work on ITEM_TBEAM items.
Properties:
-
ConnectionCountPolarity($connectioncount_polarity): Similar to$connectioncount, but for the polarity inputs.
Instances:
-
0: Main emitter instance, gets all fixup variables. -
1: White frame instance, no fixup variables. -
2: Black frame instance, no fixup variables.
Used for turret items. This adds the laser and line of sight overlay.
The item classes ItemRailPlatformExtent, ItemPistonPlatformExtent, ItemBarrierHazardExtent, ItemBarrierExtent are used for the items comprising the additional selection handles. These do not usually need to be modified (since all instance and model settings are set in the original item), unless replacing the grey arrow widgets is desired. Custom items will reuse the original extent objects without any issues.