-
Notifications
You must be signed in to change notification settings - Fork 46
Item Obj
Items define items that can appear on the palette. Each item has potentially several "variants", for each style and version option. These correspond to a folder in items/
, or a modification to another folder. The info.txt
configuration looks like the following:
"Item"
{
"ID" "ITEM_XXX"
"Description" "Description"
"AllDescLast" "0"
"needsUnlock" "0"
"unstyled" "0"
"Version"
{
"ID" "VER_DEFAULT"
"Name" "Regular"
"Styles"
{
"STYLE_ID" "folder_name"
}
}
}
-
ID
is the Item ID, which corresponds to theType
in editoritems.txt and in saved puzzles. This must be unique, and usually starts withITEM_
. -
needsUnlock
is used for the preplaced elevator and observation room items, to hide them from the items list by default. -
Description
: Items have two descriptions, one used for all versions and one for each variant. These are added one after each other in the description view in the application. This can either be a single string, or a block of "line" keys for easier formatting. Either way simple Markdown formatting is available.AllDescLast
controls if they're displace in item-variant or variant-item order. -
unstyled
can be specified for items similar to Triggers which don't need specific variants for each style. This disables the warnings for any missing styles.
Items are potentially useable in every style, and BEEMod will always provide some version of the item for use. If one is directly specified, that will be used. If not, the best matching one has to be decided. The following order is used:
- Exactly matching
- Defined for a parent style (
1950s
version for1970s
for example) - Defined for a grandparent style, etc.
- If the version is not the default (
VER_DEFAULT
), whatever is used for this style in the default version. - The first style defined for the default version - usually
Clean
.
It may be the case where "contamination" across versions is undesirable. You can then enable the "isolate" options for the version, which will use the first style defined in that version instead of checking the default version.
Often, the different style variations only differ slightly from each other. For this reason, a block can be provided for a style to reuse an existing definition with modifications:
"Item"
{
"ID" "ITEM_XXX"
...
"Version"
{
"Styles"
{
"BEE2_CLEAN" "folder_name"
"BEE2_1950s"
{
"Base" "BEE2_CLEAN"
"Description" "New *description*."
"Authors" "New Author, Other Author"
"tags" "tag1; tag2"
"Palette"
{
"0"
{
"icon" ""
"model" "first_model"
"models"
{
"" "second_model.mdl"
"" "third_model.mdl"
}
}
}
"Instances"
{
"0" "instances/BEE2/50s/items/item_inst.vmf"
"bee2_logic" "instances/BEE2/50s/items/item_logic.vmf"
}
}
"BEE2_1980s" "<BEE2_CLEAN>"
}
}
}
First, any such block must either have a Base
or Folder
property to indicate which definition is being modified. Base
should be either a Style ID, or Version_ID:Style_ID
. Folder
specifies a folder like non-block versions. All other sections are optional, and modify various aspects:
-
Description
,Authors
,url
,ent_count
andTags
overrides the matching keys inproperties.txt
. -
AppendDesc
provides additional description text, added to the end of the existing value instead of overriding it. -
Config
overridesvbsp_config
. This is either a filename initems/
, or an inline block for short configs. -
Append
adds additional options to the end of the existingvbsp_config
. -
Replace
allows altering keys or values invbsp_config
. This is a block where keys are a Regular expression for the text to find, and the value is then the replacement value. -
Palette
allows overriding options for each subtype. Each block in this section modifies a specific subtype. The name is either the numeric index of the subtype to modify (starting at zero), or"all"
to modify the grouped icon.-
icon
: The same asImage
in the editoritems file, the VTF image to use in the editor. -
bee2
: The PNG image to use inside the BEE2 application. -
pal_name
: The title for this palette icon, which is in uppercase. -
name
: The name for the subtype, displayed in the connection disconnect section. -
models
/model
: If specified, overrides the models used for this subtype (in order). Each can either be a single model or a block of models.
-
-
Instances
: If present, overrides instances used for the item. The keys can be a numeric index orbee2_xxx
name. Thebee2
prefix is not required. Each can be a simple value, the block is not required. -
IOConf
: Overrides the input and output commands that would normally be specified in the"BEE2"
connection type in editoritems.