Implement prototype: venue-driven simulation core, scenarios, tests, and playable entrance scene
CI / headless-tests (push) Canceled after 49s
CI / headless-tests (push) Canceled after 49s
- Godot 4.3 project scaffold with first-person guard, procedural world, interaction HUD, access inspection, radio forms, debug overlay, shift review - Simulation core: ShiftCoordinator, VenueScenario, EventScheduler, NPCController/FSM, AccessVerifier, EscalationManager, RadioSystem, IncidentRecorder, ReputationEvaluator, CrowdSystem, EventBus - Three authored scenarios (Hollywood Blvd building, The Joke Shop, TV studio) - Custom headless test runner (25 tests) replacing editor-dependent GUT, plus GitHub Actions CI - Documentation workflow live: README, PLAN (tech stack), TODO/DONE, MEMORY
This commit is contained in:
1 parent
e23f284ad4
commit
439e0a4281
45 files changed
+4368
-7
No files matched your search
@@ -0,0 +1,70 @@
|
||||
class_name NpcProfile
|
||||
extends Resource
|
||||
|
||||
const Rules := preload("res://src/core/rules.gd")
|
||||
## Authorable behavior profile for one kind of NPC (PLAN.md: NPC Behavior Types).
|
||||
|
||||
@export var id: String = ""
|
||||
@export var display_name: String = ""
|
||||
@export var npc_type: int = Rules.NpcType.TOURIST
|
||||
|
||||
## How difficult temperament is (0 = very calm, 1 = very hot-headed).
|
||||
## Affects how likely the NPC is to argue, point, or threaten at each level.
|
||||
@export_range(0.0, 1.0) var temperament: float = 0.25
|
||||
|
||||
## Base compliance: probability the NPC obeys a level-1 polite direction.
|
||||
## Venue/scenario recalculates effective compliance from profile + tone + level.
|
||||
@export_range(0.0, 1.0) var base_compliance: float = 0.8
|
||||
|
||||
## Probability weighting of the NP C's reaction per player escalation level.
|
||||
## keys: escalation level int -> { ReactionEnum: weight }
|
||||
## Missing entries fall back to the profile's `default_reactions`.
|
||||
@export var reactions_by_level: Dictionary = {}
|
||||
|
||||
@export var default_reactions: Dictionary = {
|
||||
Rules.Level.SIMPLE_DETERRENCE: {
|
||||
Rules.Reaction.COMPLY: 80,
|
||||
Rules.Reaction.IGNORE: 12,
|
||||
Rules.Reaction.ARGUE: 8,
|
||||
},
|
||||
Rules.Level.FORMAL_WARNING: {
|
||||
Rules.Reaction.COMPLY: 70,
|
||||
Rules.Reaction.LEAVE: 10,
|
||||
Rules.Reaction.ARGUE: 12,
|
||||
Rules.Reaction.RECORD: 8,
|
||||
},
|
||||
Rules.Level.BLOCKING: {
|
||||
Rules.Reaction.COMPLY: 55,
|
||||
Rules.Reaction.LEAVE: 15,
|
||||
Rules.Reaction.ARGUE: 20,
|
||||
Rules.Reaction.RECORD: 10,
|
||||
},
|
||||
Rules.Level.RADIO_ASSIST: {
|
||||
Rules.Reaction.LEAVE: 65,
|
||||
Rules.Reaction.ARGUE: 15,
|
||||
Rules.Reaction.FORCE_ENTRY: 20,
|
||||
},
|
||||
Rules.Level.EMERGENCY: {
|
||||
Rules.Reaction.FORCE_ENTRY: 30,
|
||||
Rules.Reaction.THREATEN: 40,
|
||||
Rules.Reaction.LEAVE: 30,
|
||||
},
|
||||
}
|
||||
|
||||
@export var tone_modifiers: Dictionary = {
|
||||
Rules.Tone.FRIENDLY: 0.10, # + compliance
|
||||
Rules.Tone.PROFESSIONAL: 0.00,
|
||||
Rules.Tone.FIRM: -0.05,
|
||||
Rules.Tone.SUSPICIOUS: -0.15,
|
||||
}
|
||||
|
||||
## Delay the NPC waits before reacting to the player (frames/seconds scaled).
|
||||
@export_range(0.1, 5.0) var reaction_delay: float = 0.6
|
||||
|
||||
## Dialogue lines per tone and intent. Falls back to generic lines when empty.
|
||||
@export var dialogue_lines: Dictionary = {}
|
||||
|
||||
func pickup_reactions_per_level(level: int) -> Dictionary:
|
||||
if reactions_by_level.has(level):
|
||||
return reactions_by_level[level]
|
||||
return default_reactions.get(level, {})
|
||||
Reference in new issue
Block a user