Fields
All fields for the Entity UserData are read only access, this means that you can not mutate their value assigning a new value to them. Mutation is only available through specialized methods exposed by the Entity object itself.
id
Offers read only access to the entity's unique ID
-- let's assume e is an already defined and initialized entity elsewhere
print(e.id)
-- will output something similar to: 8138674e-ca8c-458d-aa4f-c766a05fac02
blueprint
Offers read only access to the entity's blueprint identification. The blueprint identification is an arbitrary unique string.
-- let's assume e is an already defined and initialized entity elsewhere
-- let's also assume that the entity blueprint is NPC#MINOTAUR#001
print(e.blueprint)
-- will output: NPC#MINOTAUR#001
template
Template is an alias for blueprint
name
Offers read only access to the entity's name.
-- let's assume e is an already defined and initialized entity elsewhere
-- let's also assume that the entity's name is Minotaur_NPC_001
print(e.name)
-- will output: Minotaur_NPC_001
description
Offers read only access to the entity's human friendly description.
-- let's assume e is an already defined and initialized entity elsewhere
-- let's also assume that the entity's description is "Some entity description"
print(e.description)
-- will output: Some entity description
attributes
Offers read only access to the entity's attributes table.
-- let's assume e is an already defined and initialized entity elsewhere
for k, v in e.attributes do
print(k, v)
end
-- will print each attribute name and human readable representation
properties
Offers read only access to the entity's properties table.
-- let's assume e is an already defined and initialized entity elsewhere
for k, v in e.properties do
print(k, v)
end
-- will print each property name and human readable representation
buffs
Offers read only access to the entity's attached buffs as a map buff_id: buff_data
-- let's assume e is an already defined and initialized entity elsewhere
for k, v in e.buffs do
print(k, v)
end
-- will print each buff unique ID and human readable representation
version
Offers read only access to the entity's version as a string
-- let's assume e is an already defined and initialized entity elsewhere
print(e.version)
-- will output: v0.0.1 or whatever version the entity is