World object type

From AI Product Manuals
Revision as of 13:36, 7 October 2021 by Davemark (talk | contribs) (Davemark moved page World Object Type to World object type without leaving a redirect: Capitalization)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
This page is part of the IAUS Manual.BrainBehaviorBehavior TypeDecisionAI 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.