Skip to main content

Entity Set Size (Entity Condition Type)

Compares how many entities are stored in an apoli:entity_set power with a number.

Type ID: apoli:entity_set_size (the older apoli:set_size ID is accepted as an alias)

note

This condition also works where the client evaluates conditions, such as the condition of a render power. A set is sent to its owner and to every player who can see the owner, so a client knows the size of its own sets and of the sets of any entity in view.

note

The size counts every member, including offline players and, for a persistent set, members that no longer exist.

Fields

FieldTypeDefaultDescription
setIdentifierrequiredThe ID of the entity set power.
comparisonComparisonrequiredHow the number of stored entities is compared with compare_to.
compare_toIntegerrequiredThe number the count is compared with.

Examples

"condition": {
	"type": "apoli:entity_set_size",
	"set": "example:special_pets",
	"comparison": ">",
	"compare_to": 0
}

This checks whether the example:special_pets power (data/example/powers/special_pets.json) holds any entities, meaning it isn't empty.