feat: define action completion costs

This commit is contained in:
Rijad Zuzo
2026-07-10 10:36:08 +02:00
parent 39989002ca
commit 0f7b12080e
19 changed files with 213 additions and 45 deletions
+12 -7
View File
@@ -20,15 +20,18 @@ Each executable action definition contains:
- default duration;
- optional preferred profession ID;
- target type: resource, activity, or free movement;
- resource action ID when the action targets a ResourceNode.
- resource action ID when the action targets a ResourceNode;
- optional completion-cost resource ID and amount.
The current actions are gather food, gather wood, deposit food, withdraw food,
patrol, study, eat, rest, and wander. Idle and dead are stable state sentinels,
not executable action definitions.
The current actions are gather food, gather wood, deposit food, deposit wood,
withdraw food, patrol, study, eat, rest, sleep, and wander. Idle and dead are
stable state sentinels, not executable action definitions.
SimNPC reads default duration and preferred-profession metadata from these
definitions. WorldViewManager reads target type and resource-action metadata
instead of maintaining a separate gather-action map.
instead of maintaining a separate gather-action map. ActionSelectionSystem and
SimulationManager share the same completion-cost metadata, so patrol and study
both require one stored wood without duplicating that rule.
## Current profession contract
@@ -49,6 +52,7 @@ The registry rejects:
- non-positive action durations;
- invalid target types;
- resource actions without a resource-action ID;
- incomplete, non-positive, or unknown completion-cost resources;
- references to unknown professions or resource actions;
- definition resources that fail to load.
@@ -59,10 +63,11 @@ round-tripping.
## Deliberate boundary
Definitions currently own identity and the static metadata already proven by
the prototype. They do not yet own:
the prototype, including the patrol/study completion-cost contract. They do not
yet own:
- utility thresholds and consideration curves;
- preconditions or costs;
- general preconditions beyond stored-resource completion costs;
- completion effects;
- interruption and failure policy;
- reservation strategy;