Entity
- Entity:
Contais the definition of the entity type.
- YAML Key:
Entity
- Example:
City:
Sprite: ../../assets/Entities/castle.png
Symbol: c
LineOfSightRange: 5
Actions: [Spawn]
CanSpawn: [Worker]
Cost:
Prod: 10
Parameters:
Health: 200
StorageCapacity: 50
Range: 6
OnTickActions: [AddBuffAround]
#Object definitions have more properties
Key:
Sprite: ../../assets/Entities/key.png
Symbol: k
CanEquip: [Searcher] #Who can equip the object in the slots
SlotsUse: [Right hand] #empty == cant be equiped in any slot
#Source object , Target entity
#OnEquip:
#Conditions: #conditions executed when the object is added to a slot
#Effects: #effects executed when the object is added to a slot
#OnAddedInventory:
#Conditions: #conditions executed when the object is added to the inventory
#Effects: #effects executed when the object is added to the inventory
OnUseSlot:
#Conditions: #conditions executed when the object is used in the slot
Effects: #effects executed when the object is used in the slot
- "ModifyResource(Target.Player.DoorsOpened, 1)"
#OnUseInventory:
#Conditions: #effects executed when the object is used in the inventory
#Effects: #effects executed when the object is used in the inventory
# - "ModifyResource(Target.Health, Source.HealAmount)"
#OnTickActions: [] #Execute when in on slot or inventory
#Parameters:
# HealAmount: 20
# HealRange: 2
- Properties:
Property |
Required |
Data type |
Options |
Definition |
|
|
|
Path to the sprite used to render the entity in the GUI mode. |
|
|
|
|
Symbol used to parse the map board. |
|
|
|
|
Line of sight of the unit. Used to render the fog of war. |
|
|
|
|
List of actions this entity can generate. |
|
|
|
|
List of entities this entity can spawn. |
|
|
|
|
Map of parameter to cost, used to know the price to spawn this entity. |
|
|
|
|
List of parameters of the entity. Optionally you can define the min and max value of the parameter by defining it with the following template “[min,default,max]”. |
|
|
|
|
List of entities who can equip this object. |
|
|
|
|
List of slots names that use this object. |
|
|
|
|
List of conditions and effects that will be executed when the object is equiped. |
|
|
|
|
List of conditions and effects that will be executed when the object is added to the inventory. |
|
|
|
|
List of conditions and effects that will be executed when the object is used from the slot. |
|
|
|
|
List of conditions and effects that will be executed when the object is used from the inventory. |
|
|
|
|
List of actions executed every tick from this entity. |