generate-image
Generate Image
Generate an image for: $ARGUMENTS
Instructions
You are generating an AI image for an existing worldbuilding entity.
Step 1: Locate the Entity
Find the entity file based on the user's input:
- If given a full path: Use that path directly
- If given just a name: Search in
Worlds/for matching entity files - If ambiguous: Ask the user to clarify which entity they mean
Read the entity file to extract the image prompt.
Step 2: Extract the Image Prompt
Look in the ## Image Prompts section of the entity file.
Entity templates have different prompt subsections. Common patterns:
- Characters:
### Portrait (Bust)and### Full Body - Settlements:
### Exterior Viewand### Interior View - Items:
### Display Viewand### In Use - Creatures:
### Natural Habitatand### Combat Pose - Geography:
### Landscape Viewand### Aerial View
Find the Prompt: field under one of these subsections. This is the filled prompt to use.
Prompt Selection Priority:
- If user specifies which prompt (e.g., "portrait", "full body", "exterior"), use that one
- If the entity has a Portrait/Bust prompt filled, prefer that
- Otherwise use the first filled prompt found
If no prompts are filled (only templates exist), inform the user that the entity needs its image prompts filled first.
Step 3: Prepare for Generation
Determine the filename:
- Use the entity name as the base filename
- Add
.pngextension - Save in the same directory as the entity file
Example: Worlds/Eldoria/Characters/Aldric the Bold.md -> Worlds/Eldoria/Characters/Aldric the Bold.png
Image Parameters for gpt-image-1.5:
- Size:
1024x1024(square, best for portraits and general use)- Or
1024x1536(portrait orientation) for full-body characters - Or
1536x1024(landscape) for geography/settlements
- Or
- Quality:
high(best detail for fantasy art) - Format:
png(best quality, supports transparency)
Step 5: Update the Entity File
After successfully generating and saving the image:
-
Add
image:field to frontmatter (if not present):image: "[[Entity Name.png]]" -
Insert image embed after frontmatter: Add
![[Entity Name.png]]on a new line immediately after the closing---of the frontmatter, before the# Title.
Example result:
---
tags: [character, protagonist]
name: "Aldric the Bold"
image: "[[Aldric the Bold.png]]"
status: complete
---
![[Aldric the Bold.png]]
# Aldric the Bold
...
Step 6: Confirm Success
Report to the user:
- Path where the image was saved
- Which prompt was used (e.g., "Portrait" or "Full Body")
- Confirmation that the entity file was updated
- Suggest opening the file in Obsidian to see the embedded image
Optional: Generate Prompt from Entity
If the image prompt section is empty but the user wants an image, offer to generate a prompt based on the entity's content:
- Read the entity's description, appearance, and other sections
- Craft an appropriate prompt following the template format
- Fill in the prompt section
- Then proceed with image generation
Image Type Selection
Ask the user which image type they want if the entity has multiple prompt options:
For Characters:
- Portrait (bust, chest-up) - good for character sheets, NPC cards
- Full Body - good for reference sheets, action poses
For Settlements:
- Exterior View - the building/settlement from outside
- Interior View - inside a key room or area
For Geography:
- Landscape View - ground-level scenic view
- Aerial View - bird's eye or map-like perspective
For Items:
- Display View - clean showcase of the item
- In Use - the item being wielded/used
Size Options:
| Orientation | Size | Use For |
|---|---|---|
| Square | 1:1 | Portraits, items, icons |
| Portrait | 2:3 | Full-body characters |
| Landscape | 3:2 | Geography, settlements, battles |
More from hopeoverture/worldbuilding-system
create-world
Create a new worldbuilding project with full folder structure. Use when the user wants to start a new world, campaign setting, or fantasy setting like "create a world called Eldoria".
3generate-world
Generate an entire world with interconnected entities. Creates 80-120 entities including continents, regions, settlements, NPCs, organizations, history, and more. Use when the user wants a complete world generated automatically.
3validate-template
Validate a template or entity file has all required sections, YAML fields, and follows the worldbuilding system conventions. Use when creating new templates or checking if entities are properly structured.
3create-template
Create a new worldbuilding template for the Obsidian vault. Use when the user wants to add a new entity type template like "tavern template", "spell template", or "dungeon template".
2populate-entity
Scan an entity file to identify mentions of people, places, organizations, and other entities in the text. Creates missing entities using appropriate templates and adds wikilinks. Use when user wants to "populate", "fill out", "create linked entities", or "auto-generate connections" for an entity.
2random-encounter
Generate random encounters appropriate for a location, party level, or situation. Creates combat, social, or exploration encounters using existing world entities. Use when user wants "random encounter", "encounter table", or "what happens at [location]".
2