World object type
This page is part of the IAUS Manual. ♦ Brain ♦ Behavior ♦ Behavior Type ♦ Decision ♦ AI Entity ♦
Concept
The World Object Type (WOT) is what specifies the type of game object that an AI Entity is.
This may reflect a type of player or NPC game agent (e.g. "Human Warrior", "Elf Wizard", "Orc Grunt"), it may refer to a tangible object in the world that the AI can have knowledge of any may need to reason about (e.g. "torch", "campfire", "coin") or it may refer to an intangible conceptual object in the world (e.g. "startling sound", "patrol point").
WOTs need to be assigned to a game object in design—either using the same types in the AI system or through some sort of translation from a game object to the AI version—so that when they are instantiated in the world, the AI Entity can be created with the correct type.
The WOT has all of the data for the entity tags that the object is "born with" which describes what properties it has and what it means to the AI agents.
Code
World Object Types are held in the enum WorldObjectType in the Enums File. They are exported from the Data Tool along with other enums.
enum class WorldObjectType { None = 1, // Basically nothing Character = 2, // Something that is a game character Gold = 3, // A chunk of gold Landmark = 4, // A landmark for large scale navigation HumanWarrior = 5, // A human warrior HumanCleric = 6, // A human cleric ElfArcher = 7, // An elf archer ElfWizard = 8 // An elf wizard Campfire = 9 // A lit campfire };
They are originally passed in to the initialization of the AI Entity class (AiEntity::InitAiEntity) in which any relevant instantiation happens such as initializing the entity tags associated with that WOT.
Data
WOTs are defined in the database through the Data Tool and are exported along with the other enums. Additionally, one or more Tag Sets can be assigned to the WOT in the tool so that the entity tags that describe the object are connected.