giveItem

Creates an item in a survivor’s inventory. The player does not need to be online for this to work.

Signatures

beacon.giveItem(characterId, itemPath, [quantity], [quality], [asBlueprint], [minRandomQuality], [respectStatClamps]);
beacon.giveItem(characterId, itemInfo);

Parameters

characterId

The Sentinel UUID of the survivor this item should be given to.

itemPath

The blueprint path of the item to be given.

quantity

How many of the item to give. Unlike cheat commands, is not limited to stack size. Sentinel will create the appropriate stacks.

quality

The maximum quality that can be selected, between 0 and 100. Like cheat giveitem, the game still introduces quality randomness.

asBlueprint

True will create a blueprint instead of a usable item.

minRandomQuality

The minimum quality that can be selected, between 0 and 100.

respectStatClamps

True if the created item should respect stat clamps, should the server have them configured. This will not allow creating items beyond their mathematical stat limits.

itemInfo

An object describing the item to create. Use this object instead of positional arguments when you want more control over which values to set. This object supports all of the previous parameters, except characterId, as well as these additional parameters:

Property Type Notes
itemRating Number Include to override the item rating, which can be seen on the info card in-game. This will not affect quality, which means it is possible to create a very expensive primitive item, a very cheap ascendant item, or anything in between.
stats Array An array of objects used for choosing specific stats. Each object must have index and value keys. See stat indexes below for a list of the stat indexs the game uses. The value should be a number between 0 and 255.

Examples

Give a player an assault rifle

const characterId = '305b1849-c7ac-5a4b-afe9-86628d91bf23';
const itemPath = '/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponRifle.PrimalItem_WeaponRifle';
beacon.giveItem(characterId, itemPath);

Give a player a max damage longneck rifle

const characterId = '305b1849-c7ac-5a4b-afe9-86628d91bf23';
const itemInfo = {
  itemPath: '/Game/PrimalEarth/CoreBlueprints/Weapons/PrimalItem_WeaponOneShotRifle.PrimalItem_WeaponOneShotRifle',
  stats: [
    {
      index: 3,
      value: 255,
    },
  ],
};
beacon.giveItem(characterId, itemInfo);

Give a player a cheap capped ptera saddle blueprint

const characterId = '305b1849-c7ac-5a4b-afe9-86628d91bf23';
const itemInfo = {
  itemPath: '/Game/PrimalEarth/CoreBlueprints/Items/Armor/Saddles/PrimalItemArmor_PteroSaddle.PrimalItemArmor_PteroSaddle',
  asBlueprint: true,
  itemRating: 0,
  quality: 0,
  stats: [
    {
      index: 1,
      value: 255,
    },
    {
      index: 2,
      value: 255,
    }
  ],
};
beacon.giveItem(characterId, itemInfo);

Stat Indexes

Index Stat
0 Generic Quality
1 Armor
2 Durability
3 Damage
4 Ammo
5 Hypothermal
6 Weight
7 Hyperthermal