Skip to content

Repository files navigation

Character Generation Prototype

This repository contains an engine-agnostic prototype for a structured procedural character generator for a sandbox battle simulator.

Current Scope

  • Character config schema
  • Stable asset-ID registry for body bases, attachments, materials, palettes, VFX, and animation sets
  • Registry content loaded from JSON data instead of hardcoded Python lists
  • Prompt-to-config parsing via deterministic rules
  • Deterministic stat generation from tags and seeds
  • Material/color variation selection
  • Compatibility validation for slots, sockets, body family, skeleton, and animation style
  • Character assembly plan generation
  • Simple CLI for local testing

V1 Assembly Shape

  • body_base
  • head_attachment
  • right_hand_attachment
  • left_hand_attachment
  • back_attachment
  • material_theme
  • palette
  • vfx
  • animation_set
  • stats

Layout

  • src/char_gen/models.py: data model and schema types
  • src/char_gen/asset_registry.py: asset catalog and selection helpers
  • src/char_gen/registry_loader.py: loads registry assets from JSON
  • src/char_gen/prompt_parser.py: text prompt parsing into semantic tags
  • src/char_gen/resolver.py: compatibility resolver and validator
  • src/char_gen/generator.py: deterministic generation pipeline orchestrator
  • src/char_gen/demo_registry.py: starter registry loader
  • src/char_gen/data/registry_demo.json: starter asset registry data
  • src/char_gen/cli.py: command line demo
  • tests/test_generator.py: baseline tests

Adding New Assets

For most new content, edit src/char_gen/data/registry_demo.json instead of Python code.

Typical workflow:

  1. Add a new asset entry with a stable id
  2. Set its type, slot, body_family, and skeleton
  3. Add tags, requires_sockets, and attach_to_socket
  4. Set engine_path to the future Unity or Godot prefab/scene path
  5. Optionally add local_transform offsets for how it should sit on the socket

Run

python3 -m src.char_gen.cli "frost demon samurai"

Test

python3 -m unittest discover -s tests

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages