Module rtsim

Module rtsim 

Source
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 and SiteId, used to address objects that are shared between both domains
  • Messages like Dialogue and NpcAction 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
DialogueId
FactionId
NpcId
Personality
PersonalityTraitIter
An iterator over the variants of PersonalityTrait
QuestId
ReportId
Response
RtSimController
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. Unlike comp::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
WorldSettings

Enums§

Actor
DialogueKind
ItemResource
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
PersonalityTrait
Profession
Role
TerrainResource
Abstractly represents categories of resources that might naturally appear in the world as a product of world generation.

Functions§

distributed 🔒

Type Aliases§

RtSimEntity