Skip to content

StandardGame

The StandardGame API is used to get, create, and modify base-game definitions of items, ammo, and interactables.

A table of all item groups:

  • Secondary
  • Primary
  • Grenade
  • RoleWeapon
  • RoleUtility

Copies the specified definition and applies the specified modifications.

NameTypeDefaultDescription
originalT where T = AnyItemDefinition | AmmoDefinition | InteractableDefinitionThe original definition.
modifications{[PropertyName]: PropertyValue}The modifications to apply.

T where T = AnyItemDefinition | AmmoDefinition | InteractableDefinition

Gets the specified AnyItemDefinition. Will error if the item is not found.

NameTypeDefaultDescription
namestringThe name of the item.

AnyItemDefinition

Gets all AnyItemDefinition objects.

{[string]: AnyItemDefinition}

Gets the specified AmmoDefinition. Will error if the ammo is not found.

NameTypeDefaultDescription
namestringThe name of the ammo.

AmmoDefinition

Gets all AmmoDefinition objects.

{[string]: AmmoDefinition}

Gets the specified InteractableDefinition. Will error if the interactable is not found.

NameTypeDefaultDescription
namestringThe name of the interactable.

InteractableDefinition

Gets all InteractableDefinition objects.

{[string]: InteractableDefinition}

This function can be called from within a gamemode’s OnDeath hook. This function will add highlights relating to the death.

NameTypeDefaultDescription
roundRoundThe current round.
participantParticipantThe participant that died.

This function can be called from within a gamemode’s OnIdentifyCorpse hook. This function will add highlights relating to the identification of corpses.

NameTypeDefaultDescription
roundRoundThe current round.
corpseCorpseThe corpse that was identified.
searcherParticipantThe participant that identified the corpse.

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.

NameTypeDefaultDescription
roundRoundThe current round.