Chat with locally hosted LLMs inside Foundry VTT, pull context from your Journals, and now generate NPCs directly onto the scene—no external paid APIs required.
- Local LLM first: Works with Ollama (default) and other compatible endpoints.
- Modern UI (v13-ready): Uses the ApplicationV2 APIs and the new v13 scene control structure, with legacy fallback for v12.
- Context-aware answers: Lightweight RAG over Journal entries for in-world responses.
- NPC Generator: One-click prompt to create an NPC actor and drop a token on the map.
- Custom personas: Tune the system prompt, model, and context window per world.
- Foundry VTT → Add-on Modules → Install Module.
- Manifest URL:
https://raw.githubusercontent.com/Gizmo3030/LLM-Helper-FoundryVTT/refs/heads/main/module.json - Install and enable in your world.
- Install Ollama and pull a model, e.g.
ollama pull llama3.2. - Allow cross-origin requests:
- Linux/Mac:
OLLAMA_ORIGINS="*" ollama serve - Windows: set env var
OLLAMA_ORIGINS="*"before starting Ollama.
- Linux/Mac:
- Ensure Ollama is running (default
http://localhost:11434).
- Provider:
ollama(or other configured backends). - API Endpoint: defaults to
http://localhost:11434/api/generate(auto-normalized if you give a base URL). - Model: the pulled model name (e.g.
llama3.2). - System Prompt / Context Window: shape the assistant.
- NPC Template: edit the JSON-format prompt used for NPC generation.
- Click Connect to test.
- Open the LLM control on the left toolbar (brain icon).
- Tools:
- Open LLM Chat: chat window with journal-aware context.
- Open LLM Settings: quick access to settings UI.
- Generate NPC: prompt → actor creation → optional token drop at view center.
- If Ollama rejects requests, re-run with
OLLAMA_ORIGINS="*" ollama serve. - Endpoint flexibility: you can supply base
http://host:11434or full/api/generate; the module normalizes it. - If JSON parsing fails for NPC generation, check the LLM response formatting and the template you provided.
- Foundry VTT: v12+, verified on v13
- System: system-agnostic (NPC creation assumes D&D 5e fields; adjust template for other systems)
MIT
Gizmo3030