StandardGame
The StandardGame API is used to get, create, and modify base-game definitions of items, ammo, and interactables.
Properties
Section titled “Properties”ItemGroups
Section titled “ItemGroups”A table of all item groups:
SecondaryPrimaryGrenadeRoleWeaponRoleUtility
Functions
Section titled “Functions”CopyModify
Section titled “CopyModify”Copies the specified definition and applies the specified modifications.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
original | T where T = AnyItemDefinition | AmmoDefinition | InteractableDefinition | The original definition. | |
modifications | {[PropertyName]: PropertyValue} | The modifications to apply. |
Returns
Section titled “Returns”T where T = AnyItemDefinition | AmmoDefinition | InteractableDefinition
GetItem
Section titled “GetItem”Gets the specified AnyItemDefinition. Will error if the item is not found.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
name | string | The name of the item. |
Returns
Section titled “Returns”AnyItemDefinition
GetItems
Section titled “GetItems”Gets all AnyItemDefinition objects.
Returns
Section titled “Returns”{[string]: AnyItemDefinition}
GetAmmo
Section titled “GetAmmo”Gets the specified AmmoDefinition. Will error if the ammo is not found.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
name | string | The name of the ammo. |
Returns
Section titled “Returns”AmmoDefinition
GetAllAmmo
Section titled “GetAllAmmo”Gets all AmmoDefinition objects.
Returns
Section titled “Returns”{[string]: AmmoDefinition}
GetInteractable
Section titled “GetInteractable”Gets the specified InteractableDefinition. Will error if the interactable is not found.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
name | string | The name of the interactable. |
Returns
Section titled “Returns”InteractableDefinition
GetInteractables
Section titled “GetInteractables”Gets all InteractableDefinition objects.
Returns
Section titled “Returns”{[string]: InteractableDefinition}
Module Functions
Section titled “Module Functions”Highlights.OnDeath
Section titled “Highlights.OnDeath”This function can be called from within a gamemode’s OnDeath hook. This function will add highlights relating to the death.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
round | Round | The current round. | |
participant | Participant | The participant that died. |
Highlights.OnIdentifyCorpse
Section titled “Highlights.OnIdentifyCorpse”This function can be called from within a gamemode’s OnIdentifyCorpse hook. This function will add highlights relating to the identification of corpses.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
round | Round | The current round. | |
corpse | Corpse | The corpse that was identified. | |
searcher | Participant | The participant that identified the corpse. |
Highlights.OnFinish
Section titled “Highlights.OnFinish”This function can be called from within a gamemode’s OnFinish hook. This function will add highlights that should be calculated at the end of the round.
Parameters
Section titled “Parameters”| Name | Type | Default | Description |
|---|---|---|---|
round | Round | The current round. |