chore(meta): add asset-gen skill for visual asset generation

Skill for generating CK3-native art assets using the Nano Banana
(Gemini 2.5 Flash Image) MCP tool. Includes style guide, category
prompt templates, and DDS conversion reference. Encodes learnings
from first batch: no circular frames, no vector art, no text,
dark backgrounds edge-to-edge, consistent orientation within trait
families, max 3 parallel generation calls.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-07 20:26:46 +01:00
co-authored by Claude Opus 4.6
parent 541b474c36
commit b088e0471d
4 changed files with 376 additions and 0 deletions
+126
View File
@@ -0,0 +1,126 @@
---
name: asset-gen
description: >
Generate themed visual assets for the Lords of Ash CK3 total conversion mod
using the generate_image MCP tool (Nano Banana / Gemini 2.5 Flash Image).
Use when generating any mod art: trait icons, modifier icons, decision
illustrations, event backgrounds, loading screens, bookmark art, coat of arms
emblems, religion icons, building icons, MaA icons, lifestyle assets, scheme
icons, focus icons, activity assets, workshop thumbnail, or frontend art.
Also use when the user asks about visual identity, art direction, asset
pipeline, or DDS conversion. Triggers on: "generate icons", "make trait art",
"create loading screen", "asset pipeline", "convert to DDS", "art style",
"generate assets", "batch generate".
---
# Asset Generation — Lords of Ash
Generate visually consistent, CK3-native art assets using the `generate_image`
MCP tool.
Asset descriptions, filenames, resolutions, and directory paths are documented
in `docs/REQUIRED_ASSETS.md`. This skill provides the visual identity, prompt
system, and workflow.
## Prompt Assembly
Every `generate_image` call uses three parts:
```
[STYLE PREFIX] + [CATEGORY TEMPLATE] + [ASSET DESCRIPTION from docs/REQUIRED_ASSETS.md]
```
Never call `generate_image` with just the asset description. Always prepend the
style prefix and matching category template.
- **Style prefix and color palette**: Read `references/style-guide.md`
- **Category templates**: Read `references/category-templates.md` and match by
asset type (trait icon, modifier icon, decision illustration, etc.)
- **Asset description**: Look up the specific asset in `docs/REQUIRED_ASSETS.md`
## Aspect Ratio Mapping
| Asset Type | Pixel Size | `aspect_ratio` |
|------------|-----------|----------------|
| All square icons | various | `1:1` |
| Decision illustrations | 1100x440 | `5:2` (fallback: `16:9` + crop) |
| Event backgrounds | 1592x848 | `16:9` |
| Loading screens | 3840x2160 | `16:9` |
| Bookmark art | 1920x1080 | `16:9` |
| Frontend art | 3840x2160 | `16:9` |
| Activity headers | 1100x440 | `5:2` (fallback: `16:9` + crop) |
| Lifestyle strips | 480x160 | `3:1` (fallback: `16:9` + crop) |
| Perk tree backgrounds | 348x812 | `9:16` + crop |
| Lifestyle sidebars | 608x1552 | `9:16` + crop |
If the tool doesn't support an exact ratio, generate at the nearest standard
ratio and resize/crop with ImageMagick.
## Single Asset Workflow
1. Find the asset in `docs/REQUIRED_ASSETS.md` — note filename, resolution,
directory, DDS format, and description.
2. Read `references/style-guide.md` for the style prefix.
3. Read `references/category-templates.md` for the matching template.
4. Assemble the full prompt and call `generate_image` with correct `aspect_ratio`.
5. Save the PNG to `lords_of_ash/` at the correct `gfx/` path.
6. Report what was generated.
## Batch Workflow
When generating multiple assets of the same type:
1. Read the style prefix and category template once.
2. Iterate through assets in `docs/REQUIRED_ASSETS.md` for that category.
3. Use the same style prefix and template for every asset.
4. Call `generate_image` in batches of **no more than 3 parallel calls** at a
time. Wait for each batch to complete before starting the next. This avoids
overwhelming the image generation API.
5. Save PNGs to correct paths after each batch.
6. Report summary: count generated, failures, paths written.
## DDS Conversion
CK3 requires DDS format. After generating PNGs, convert using the format
mapping and commands in `references/dds-conversion.md`.
All output paths are under `lords_of_ash/gfx/`. The full directory structure is
documented at the end of `docs/REQUIRED_ASSETS.md`.
## Critical Rules
- Always prepend the style prefix — without it, images drift in style.
- Icons need dark/near-black backgrounds — light backgrounds break CK3 UI.
- Trait icons are 120x120, NOT 60x60. Modifier icons are 60x60.
- Trait icons MUST be uncompressed ARGB in DDS, not DXT5.
- CoA emblems MUST be uncompressed ARGB for the color mask system.
- Modifier icons need mipmaps; trait icons do not.
- Decision illustrations: weight composition right (left side has UI overlay).
- Filenames are case-sensitive on Linux — match mod code exactly.
- Append "absolutely no text, no letters, no words, no labels, no titles, no
captions, no watermarks" to icon prompts — the model tends to add text despite
weaker phrasing.
- Never use circular medallion/coin framing for icons — the model defaults to
round compositions which leave white/light corners on a square canvas. Enforce
"flat square, dark background edge-to-edge" in the prompt.
- Icons must be symbolic motifs only, not scenes or landscapes. If the model
generates an environment instead of an icon, the prompt needs stronger
"this is an icon, not a scene" language.
- Enforce painterly style explicitly — the model sometimes drifts to vector/flat
graphic/mobile game art. Add "painterly style only — NOT vector art, NOT flat
graphic design, NOT mobile game art" when this happens.
- For trait families that form a progression (e.g. weak/strong/savant), describe
the same base motif in each prompt and only vary the intensity/effects. Specify
orientation ("horizontal", "not tilted") to keep compositions consistent.
- Allomantic energy uses cyan-blue, never green or purple.
## Quality Checklist
After generating, verify:
- Colors match the palette (no oversaturated neons, no pastels)
- Composition matches the category template
- No unwanted text, labels, or signatures
- Dark/near-black background for icons
- Resolution correct (or needs crop/resize)
- Visually distinguishable from similar assets in same category
- Ash, mist, or metallic elements present where appropriate
@@ -0,0 +1,153 @@
# Category Templates
Insert between the Style Prefix and asset-specific description. Match by asset type.
## Icons
### Trait icons (120x120, 1:1)
```
CK3 trait icon: a single centered symbolic motif on a very dark, near-black background
that fills the ENTIRE square canvas edge-to-edge. Do NOT use circular medallion, coin,
or round frame compositions — the image must be a flat square with dark background
reaching all four corners. No white, no light-colored backgrounds anywhere. This is an
icon, not a scene — no landscapes, no environments, just the symbolic motif. Do NOT
render as a 3D object, canvas, or painting on a wall — this IS the flat image. Clean bold
silhouette that reads clearly at small sizes. No text, no letters, no words, no labels,
no titles, no captions whatsoever. No border frame, no outer decoration. The symbol fills
roughly 70% of the canvas. Subtle inner glow and metallic sheen on the motif. One clear
visual concept — dramatic but simple.
```
### Modifier icons (60x60, 1:1)
```
CK3 modifier icon: a tiny, highly simplified symbol on a very dark background. Extremely
clean and minimal — must be readable at 60x60 pixels. Maximum one or two visual elements.
Bold shapes only, no fine detail. Strong color contrast against the dark background.
```
### Faith icons (100x100, 1:1)
```
CK3 faith icon: a single sacred or institutional symbol centered on a dark background.
Clean iconographic style with metallic sheen. Slightly more ornate than trait icons but
still readable at small sizes. Communicate the faith's identity in one glance.
```
### Building icons (60x60, 1:1)
```
CK3 building icon: a tiny simplified architectural silhouette on a dark background. One
building shape with one or two distinguishing features. Must read at very small sizes.
```
### MaA / regiment icons (60x60, 1:1)
```
CK3 regiment icon: a tiny simplified warrior or creature silhouette on a dark background.
Single figure shown from chest up or in action pose. Bold shapes, convey the unit type
through silhouette alone.
```
### Focus icons (140x140, 1:1)
```
CK3 focus icon: a symbolic motif for an area of study or training. Dark background. More
detailed than trait icons but still iconographic. Visually related to its parent lifestyle.
```
### Scheme icons (120x120, 1:1)
```
CK3 scheme icon: a symbolic motif suggesting covert or political action. Dark background.
Suggests secrecy, manipulation, or hidden intent. Clear silhouette at small sizes.
```
### Casus belli icons (60x60, 1:1)
```
CK3 casus belli icon: a tiny bold symbol of conflict or claim on a dark background.
Aggressive, assertive motif. Sword, fist, crown, or territorial symbol.
```
## Illustrations
### Decision illustrations (1100x440, 5:2)
```
CK3 decision illustration: wide cinematic panoramic scene. Painterly with dramatic lighting.
Composition weighted slightly right (left side gets UI overlay in-game). Atmospheric depth
with mist, ash particles, and volumetric light. Characters at mid-distance. Dark vignetting.
```
### Event scene backgrounds (1592x848, 16:9)
```
CK3 event background: a wide atmospheric environment with no characters in the scene — this
is a backdrop only. Rich environmental detail, strong mood lighting. Ash, mist, or
candlelight depending on setting. A place where dramatic events unfold.
```
### Activity header backgrounds (1100x440, 5:2)
```
CK3 activity header: wide panoramic scene of the activity in progress. Painterly, dramatic
lighting. Dynamic composition with multiple figures. Atmospheric environmental storytelling.
```
## Large Format
### Loading screens (3840x2160, 16:9)
```
CK3 loading screen: an epic sweeping landscape or cityscape at maximum visual quality.
Painterly, cinematic framing. Grand sense of scale — the viewer feels small. Rich
atmospheric perspective with layers of mist and ash. The first art players see — make it
striking and immediately communicate the world.
```
### Bookmark background (1920x1080, 16:9)
```
CK3 bookmark background: a dramatic wide scene establishing a moment in history. Painterly.
Leave space in the lower-center and sides for character portrait overlays. Dark, moody,
atmospheric establishing shot.
```
### Bookmark character overlay (1920x1080, 16:9)
```
CK3 bookmark character: a single character from the waist up on a dark/transparent background.
Painterly, dramatic side-lighting. Clear readable features and distinctive clothing. Facing
slightly toward camera. Edges fade to darkness for compositing over a background.
```
### Frontend background (3840x2160, 16:9)
```
CK3 main menu background: a grand, atmospheric Scadrial landscape at 4K. Painterly. The
scene should work as a static backdrop behind menu UI elements. Dramatic but not too busy.
```
## Specialty
### Coat of Arms emblems (128x128, 1:1)
```
Heraldic emblem: a single bold crest motif on a transparent background. Flat graphic style
with clean edges — NOT painterly. Uses simple flat color fills. Bold silhouette, medieval
heraldry adapted to a dark industrial-fantasy world of metals and ash. Think sigil, not
painting.
```
### Lifestyle strips (480x160, 3:1)
```
CK3 lifestyle strip: a wide horizontal banner in three visual sections showing a triptych
related to the lifestyle theme. Dark atmospheric background. Painterly with metallic accents.
```
### Perk tree backgrounds (348x812, 9:16 + crop)
```
CK3 perk tree background: a tall narrow vertical atmospheric illustration. Moody and ambient
without strong focal points (UI overlays this). Gradual tonal shift from dark at top to
slightly lighter at bottom. Subtle thematic elements — mist, metal, ash.
```
### Lifestyle sidebar illustrations (608x1552, 9:16 + crop)
```
CK3 lifestyle sidebar: a very tall vertical scene related to the lifestyle. Painterly.
Strong vertical composition — the eye travels bottom to top. Main visual interest centered
horizontally (this appears as a sidebar panel).
```
### Workshop thumbnail (512x512, 1:1)
```
Mod logo thumbnail: a striking square composition with the mod's key visual identity. Must
read at small sizes (Steam Workshop browsing). Dark background with signature crimson and
cyan accents. Central iconic motif — a Mistborn silhouette or metallic arts symbol.
```
@@ -0,0 +1,58 @@
# PNG to DDS Conversion
The `generate_image` tool outputs PNG. CK3 requires DDS. Convert after generation.
## DDS Format by Asset Type
| Asset Type | DDS Format | Mipmaps |
|------------|-----------|---------|
| Trait icons (120x120) | B8G8R8A8_UNORM (uncompressed ARGB) | No |
| Modifier icons (60x60) | B8G8R8A8_UNORM (uncompressed ARGB) | Yes (6 levels) |
| Faith icons (100x100) | B8G8R8A8_UNORM | No |
| CoA emblems (128x128) | B8G8R8A8_UNORM (Linear) | No |
| Building icons (60x60) | B8G8R8A8_UNORM | No |
| MaA icons (60x60) | B8G8R8A8_UNORM | No |
| Decision illustrations | BC1_UNORM (DXT1) | No |
| Event backgrounds | BC1_UNORM (DXT1) | No |
| Loading screens | BC1_UNORM (DXT1) | No |
| Bookmark backgrounds | BC1_UNORM (DXT1) | No |
| Bookmark overlays | BC3_UNORM (DXT5) | No |
| Tenet icons (260x400) | BC3_UNORM (DXT5) | No |
| Portrait textures | BC3_UNORM (DXT5) | Yes |
| Frontend art | BC1_UNORM (DXT1) | No |
## Conversion with ImageMagick (Linux)
ImageMagick 7 with the `dds` delegate can write DDS files:
```bash
# Uncompressed ARGB, no mipmaps (trait icons, faith icons, CoA emblems)
magick input.png -define dds:compression=none -define dds:mipmaps=0 output.dds
# DXT1 opaque, no mipmaps (decisions, events, loading screens)
magick input.png -define dds:compression=dxt1 -define dds:mipmaps=0 output.dds
# DXT5 with alpha, no mipmaps (bookmark overlays, tenet icons)
magick input.png -define dds:compression=dxt5 -define dds:mipmaps=0 output.dds
# Uncompressed ARGB with mipmaps (modifier icons)
magick input.png -define dds:compression=none -define dds:mipmaps=6 output.dds
```
## Resize / Crop with ImageMagick
```bash
# Resize to exact pixel dimensions
magick input.png -resize 120x120! output.png
# Center-crop from a wider source
magick input.png -gravity center -crop 1100x440+0+0 +repage output.png
```
## Common Pitfalls
- Trait icons MUST be uncompressed ARGB, not DXT5 — wrong format = invisible in-game
- CoA emblems MUST be uncompressed ARGB or the color mask tinting system breaks
- Modifier icons need mipmaps; trait icons do not
- Filenames are case-sensitive on Linux — match exactly what mod code references
- Check `magick identify` output to verify format and dimensions after conversion
@@ -0,0 +1,39 @@
# Style Guide — Lords of Ash Visual Identity
## Style Prefix
Prepend to **every** `generate_image` prompt:
```
Dark fantasy digital painting. Palette: deep charcoal blacks (#1a1a2e), muted ash greys,
burnt orange embers (#c44b28), blood-red crimson skies (#6b0f1a), with electric cyan-blue
(#00d4ff) magical energy accents. Metallic elements in cool steel-silver and warm aged-gold.
Perpetually overcast world with falling volcanic ash particles and thick ground-level mist.
Mood: gritty and oppressive but not grimdark — defiant hope underneath. Painterly brushwork
with dramatic chiaroscuro lighting. Inspired by Brandon Sanderson's Mistborn aesthetic.
```
## Color Palette
| Role | Hex Examples |
|------|-------------|
| Primary darks | `#1a1a2e`, `#16213e`, `#0f0f23` |
| Atmosphere (ash grey) | `#4a4a5a`, `#6b6b7b`, `#8a8a8a` |
| Accent warm (ember) | `#c44b28`, `#8b2500`, `#e85d26` |
| Sky / danger (crimson) | `#6b0f1a`, `#8b1a2b`, `#4a0a12` |
| Allomantic energy (cyan) | `#00d4ff`, `#4fc3f7`, `#80deea` |
| Steel / iron | `#8a9bae`, `#b0bec5`, `#546e7a` |
| Gold / brass | `#c4a35a`, `#b8860b`, `#daa520` |
| Pewter | `#71797E`, `#8a8a8a`, `#a9a9a9` |
| Atium (iridescent) | `#e8e8f0`, `#c0c0d0`, `#f0f0ff` |
| Corruption / Ruin | `#3d0c0c`, `#5c1a1a`, `#2b0a0a` |
| Hope / Preservation | `#d0dfe6`, `#e0ecf0`, `#f0f5f8` |
## Moodboard Anchors
- Silhouetted Mistborn on rooftop against crimson sky with oversized pale moon
- Koloss as dark hulking shapes in mid-ground
- Falling ash/snow particles in every scene
- Electric cyan glow for all Allomantic effects (lines, auras, coin trails)
- House crests as embossed dark metal badges on deep crimson with vignette
- CK3-style chrome framing (beveled metal borders, riveted edges, parchment textures)