Expand description
Type definitions used for interfacing between rtsim and the rest of the game.
See the veloren_rtsim
crate for an in-depth explanation as to what rtsim
is and how it works.
The types in this module generally come in a few flavours:
- IDs like
NpcId
andSiteId
, used to address objects that are shared between both domains - Messages like
Dialogue
andNpcAction
which facilitate communication between both domains - ‘Resource duals’ like
TerrainResource
that allow physical items or resources to be translated between domains (often lossily)
Structs§
- Dialogue
- Dialogue
Id - Faction
Id - NpcId
- Personality
- Personality
Trait Iter - An iterator over the variants of PersonalityTrait
- QuestId
- Report
Id - Response
- RtSim
Controller - This type is the map route through which the rtsim (real-time simulation)
aspect of the game communicates with the rest of the game. It is analagous
to
comp::Controller
in that it provides a consistent interface for simulation NPCs to control their actions. Unlikecomp::Controller
, it is very abstract and is intended for consumption by both the agent code and the internal rtsim simulation code (depending on whether the entity is loaded into the game as a physical entity or not). Agent code should attempt to act upon its instructions where reasonable although deviations for various reasons (obstacle avoidance, counter-attacking, etc.) are expected. - SiteId
- World
Settings
Enums§
- Actor
- Dialogue
Kind - Item
Resource - Like
TerrainResource
, but for tracking inventory items in rtsim for the sake of questing, trade, etc. - NpcAction
- Represents event-like actions that rtsim NPCs can perform to interact with the world
- NpcActivity
- NpcInput
- Personality
Trait - Profession
- Role
- Terrain
Resource - Abstractly represents categories of resources that might naturally appear in the world as a product of world generation.