KvFxKaido avatar

profile

Generate full NPC profiles from character YAML and save JSON to sentinel-agent/generated_npcs. Nativ

作者 KvFxKaido|オープンソース

NPC Profile Generation (Native)

Generate full NPC profiles for SENTINEL using local context. Read character appearance from YAML and generate complete profiles with agenda, disposition modifiers, memory triggers, sample dialogue, secrets, and hooks. Save as JSON.

Usage

/profile <character_name>
/profile cipher
/profile elder_kara
/profile vex --context "He's been promoted recently"

How It Works

  1. Read the character YAML from assets/characters/{name}.yaml or assets/characters/{name}_detailed.yaml.
  2. Build a physical description string from the YAML fields.
  3. Add faction context and role guidance.
  4. Generate the profile JSON directly (no external agent calls).
  5. Save to sentinel-agent/generated_npcs/{name}.json.
  6. Report success with key details.

Step 1: Find and Read Character YAML

Look for the character file:

C:\dev\SENTINEL\assets\characters\{name}.yaml
C:\dev\SENTINEL\assets\characters\{name}_detailed.yaml

If not found, ask the user for basic details (name, faction, role, and a short physical description) and proceed.

Step 2: Build Physical Description

From the YAML, build an explicit physical description string.

Person Descriptor Mapping

Skin ToneGender: MasculineGender: FeminineGender: Androgynous
palepale-skinned manpale-skinned womanpale-skinned person
lightlight-skinned manlight-skinned womanlight-skinned person
mediumolive-skinned manolive-skinned womanolive-skinned person
tantan mantan womantan person
brownBlack manBlack womanBlack person
darkdark-skinned Black mandark-skinned Black womandark-skinned Black person

For elderly characters, prepend "elderly" (e.g., "elderly olive-skinned woman").

Build Order

  1. Person descriptor with build (e.g., "Black man with lean build").
  2. Hair description (length, style, color).
  3. Eye description (color or "cybernetic eyes").
  4. Facial features (comma-separated).
  5. Distinguishing marks (scars, augmentations, tattoos, other).

Step 3: Faction Context

FactionTaglineValuesCultureSpeech
nexusThe network that watchesinformation, prediction, controlAnalytical, data-drivenPrecise, clinical, uses statistics
ember_coloniesWe survived. We endure.community, survival, mutual aidTight-knit survivorsDirect, warm to friends, guarded
latticeWe keep the lights oninfrastructure, pragmatic cooperationEngineers maintaining systemsTechnical, problem-focused
convergenceBecome what you were meant to beenhancement, transcendenceTranshumanistsEnthusiastic about potential
covenantWe hold the lineoaths, sanctuary, ethical limitsKeepers of moral boundariesFormal, principled
wanderersThe road remembersfreedom, trade, neutralityNomadic tradersCasual, storytelling
cultivatorsFrom the soil, we risegrowth, patience, sustainabilityAgrarian communitiesPatient, agricultural metaphors
steel_syndicateEverything has a priceprofit, leverage, dealsCriminal-adjacent tradersTransactional, direct about costs
witnessesWe remember so you don't have to lietruth, records, accountabilityArchivistsPrecise, cites sources
architectsWe built this worldlegacy, credentials, legitimacyRemnants of old orderFormal, references procedures
ghost_networksWe were never hereanonymity, escape, protectionUnderground railroadCautious, uses code words

Step 4: Role Suggestions

RoleDescription
leaderCommands respect, burden of responsibility
fixerSolves problems, knows people, transactional
elderWisdom from experience
scoutEyes and ears, often underestimated
enforcerApplies pressure, reputation for action
medicHealer, pragmatic about triage
technicianComfortable with machines
traderDeals in goods or information
refugeeDisplaced, seeking safety
true_believerDeeply committed to faction ideology
skepticQuestions their own faction
veteranSurvived things, carries weight

Step 5: Output Format

Generate a complete NPC profile as JSON with this exact structure:

{
  "name": "{name}",
  "faction": "{faction_id}",
  "role": "{role}",
  "physical_appearance": "{physical_description}",
  "description": "2-3 sentence presence/demeanor description (NOT physical)",
  "agenda": {
    "wants": "Primary goal (specific, personal)",
    "fears": "What they're afraid of (specific)",
    "leverage": "What they could hold over the player (or null)",
    "owes": "What they might owe the player (or null)",
    "lie_to_self": "The self-deception that lets them sleep at night"
  },
  "disposition_modifiers": {
    "hostile": {
      "tone": "How they speak when hostile",
      "reveals": ["What they share at this level"],
      "withholds": ["What they hide"],
      "tells": ["Behavioral cues"]
    },
    "wary": { ... },
    "neutral": { ... },
    "warm": { ... },
    "loyal": { ... }
  },
  "memory_triggers": [
    {
      "condition": "tag like 'helped_ember'",
      "effect": "What happens",
      "disposition_shift": -2 to +2
    }
  ],
  "sample_dialogue": {
    "greeting_neutral": "...",
    "greeting_warm": "...",
    "refusal": "...",
    "bargaining": "...",
    "under_pressure": "..."
  },
  "secrets": ["Things the GM knows but player must discover"],
  "hooks": ["Plot hooks involving this NPC"]
}

Guidelines

  • Make the NPC feel like a real person with contradictions.
  • The "lie_to_self" is crucial.
  • Disposition modifiers should show meaningful progression.
  • Memory triggers should reference realistic player actions.
  • Secrets should create interesting dramatic irony.
  • Hooks should tie into faction politics and player choice.
  • Output only valid JSON when generating the file.

Step 6: Save and Report

Save to C:\dev\SENTINEL\sentinel-agent\generated_npcs\{name}.json.

Report to the user:

  • Name and faction
  • Brief description
  • Key agenda items (wants, fears)
  • One sample dialogue line
  • File path

Suggest running /portrait {name} to generate a matching portrait.

Error Handling

  • YAML not found: Ask for name, faction, role, and a short physical description.
  • Missing fields: Fill with sensible defaults and warn the user.
  • Invalid JSON: Fix and re-save.