Skip to main content

Execute_AddObjectTemplateToBag

Description

Creates a random item from the specified ObjectTemplate group and adds it to the bag.

Note

One item is randomly selected from all objects belonging to the given ObjectTemplateId and added to the bag. For example, ServedFood04_Template may include ServedRamen01 or ServedDumpling01, and one is picked at random.

Parameters

ParameterDescription
BaseObjectThe inventory owner that will receive the item
S1The ObjectTemplateId from Object.json for the template group to pick from
F1The number of items to add (minimum: 1)

Examples

DescriptionBaseObjectCommand
Add 1 random item from a food template to Self's bagSelfAddObjectTemplateToBag
Add 2 random items from a food template to Target's bagTargetAddObjectTemplateToBag
Add 1 random item from a template to Self's bagSelfAddObjectTemplateToBag