agent-manifesto-kit 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -0
- package/collection/skills/art-direction-pass/SKILL.md +245 -0
- package/collection/skills/art-direction-pass/agents/openai.yaml +4 -0
- package/collection/skills/art-direction-pass/assets/presets.json +9 -0
- package/collection/skills/art-direction-pass/assets/visual_capture.gd +77 -0
- package/collection/skills/art-direction-pass/scripts/compare.py +86 -0
- package/collection/skills/art-direction-pass/scripts/metrics.py +56 -0
- package/collection/skills/art-direction-pass/scripts/test_tools.py +83 -0
- package/collection/skills/concept-scene-builder/SKILL.md +313 -0
- package/collection/skills/concept-scene-builder/agents/openai.yaml +4 -0
- package/collection/skills/concept-scene-builder/references/field-lessons.md +113 -0
- package/collection/skills/concept-scene-builder/scripts/blend.py +32 -0
- package/collection/skills/concept-scene-builder/scripts/crop.py +56 -0
- package/collection/skills/concept-scene-builder/scripts/grid_overlay.py +117 -0
- package/collection/skills/concept-scene-builder/scripts/test_tools.py +89 -0
- package/collection/skills/machine-builder/SKILL.md +222 -0
- package/collection/skills/machine-builder/agents/openai.yaml +4 -0
- package/collection/skills/machine-builder/assets/spec.example.yaml +47 -0
- package/collection/skills/machine-builder/scripts/validate.py +307 -0
- package/package.json +1 -1
|
@@ -0,0 +1,313 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: concept-scene-builder
|
|
3
|
+
description: Build a game environment scene (terrain, water, roads, vegetation, rocks, buildings, lighting; no units or vehicles) that matches a concept image or screenshot as closely as possible in style and layout, from a reusable asset kit and data-driven layout. Any genre, grid or free-form. Godot or Three.js + Blender. Use when a game needs its environment rebuilt from a concept image or screenshot.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Concept Scene Builder
|
|
7
|
+
|
|
8
|
+
You build an environment scene that matches a concept image in style AND layout, using a reusable, data-driven asset kit. The concept can be anything: a tiled board, a grid map, an isometric scene, a top-down map, a third-person or in-game screenshot. No genre or game is assumed. The output is not one pretty scene but:
|
|
9
|
+
1. a kit of parametric assets (engine-procedural + Blender scripts),
|
|
10
|
+
2. a layout format and a scene builder that turns layout data into a scene,
|
|
11
|
+
3. a "golden scene" — the concept layout rebuilt as data — used as the comparison fixture,
|
|
12
|
+
4. style documents shared with the `art-direction-pass` skill.
|
|
13
|
+
|
|
14
|
+
Units, mechs, characters and vehicles visible in the concept are NOT built. Ignore them (optionally record their positions as `spawn_hints`).
|
|
15
|
+
|
|
16
|
+
## Prerequisites
|
|
17
|
+
|
|
18
|
+
- Python 3 with Pillow and numpy: `python3 -m pip install Pillow numpy`; verify with `python3 -c "import PIL, numpy"`.
|
|
19
|
+
- Godot 4 or Three.js (Node, Playwright for captures), and Blender 4.2 or later for kit assets. Find Blender as `blender` on PATH, the `BLENDER` environment variable or the standard install location (macOS: `/Applications/Blender.app/Contents/MacOS/Blender`) and verify with `--version`; only when none works, build everything in-engine at lower fidelity.
|
|
20
|
+
- A real display/GPU for captures (`--headless` Godot does not render).
|
|
21
|
+
- Optional: the `art-direction-pass` skill. It shares the `docs/art/` format, provides `compare.py`, the capture harness and the look pass (Phase 6). Without it, use the fallbacks named in each phase.
|
|
22
|
+
- The skill's resources, installed with it under `.claude/skills/concept-scene-builder/` (other tools use their own skills directory): `scripts/grid_overlay.py`, `scripts/crop.py`, `scripts/blend.py`, `references/field-lessons.md`. Invoke the scripts by path from the project root, so relative outputs land in the project.
|
|
23
|
+
|
|
24
|
+
## Git
|
|
25
|
+
|
|
26
|
+
Follow the project's own Git rules. The workflow below names commits (a baseline tag, one commit per finished asset family and per scene iteration): if the project's instructions require approval for commits or tags, ask once at the start. Without permission, or with the user's own uncommitted changes in the tree, create no commits or tags and never commit changes this run did not make; use snapshots instead. A snapshot is a tree object written through a temporary index; it creates no commit, ref or tag and leaves the project's index alone. `docs/art/` is excluded so reverts never touch the records:
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
snap() { idx=$(mktemp); GIT_INDEX_FILE=$idx git read-tree HEAD && GIT_INDEX_FILE=$idx git add -A -- . ':!docs/art' && GIT_INDEX_FILE=$idx git write-tree; rm -f "$idx"; }
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
- Baseline: `snap` before any change; record its id and `git rev-parse HEAD` in `docs/art/kit.md`. The user's uncommitted and untracked files are part of it.
|
|
33
|
+
- Finished step: `snap` again and record the id with the files the step created or changed in `kit.md`.
|
|
34
|
+
- Revert: `snap` the current state as `<cur>`, run `git diff --binary <cur> <last kept> | git apply --binary` (this also deletes files the step added), then check that a fresh `snap` equals `<last kept>`. Never use tree-wide `checkout`, `reset`, `clean` or `stash`.
|
|
35
|
+
|
|
36
|
+
Never push.
|
|
37
|
+
|
|
38
|
+
## Stop conditions
|
|
39
|
+
|
|
40
|
+
- No `scene` image: ask if the user is present; otherwise stop and report it. Never invent the target.
|
|
41
|
+
- Captures cannot be produced (no display/GPU, e.g. a sandbox or CI): deliver the Phase 0–2 outputs (style docs, `kit.json`/`kit.md`, layout JSON and overlay), report the blocker, and do not start Phase 4.
|
|
42
|
+
- The game no longer runs or existing tests fail after a change: revert that change before anything else.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 0. Inputs and arguments
|
|
47
|
+
|
|
48
|
+
Read from the invocation text. Defaults in brackets.
|
|
49
|
+
|
|
50
|
+
- `scene` — concept image(s) or screenshot(s) of the assembled scene (required): any camera — top-down, isometric, perspective, third-person.
|
|
51
|
+
- `kit` — kit sheet(s) with individual assets (optional but strongly preferred).
|
|
52
|
+
- `engine` [auto] — `godot` or `threejs`. Detect from the project; if there is no project, ask once if the user is present; if unattended, create a minimal Godot 4 project.
|
|
53
|
+
- `space` [auto] — `hex`, `square` (the concept has a visible game grid) or `free` (no grid: positions in metres). Detect from the concept; when in doubt, use `free`.
|
|
54
|
+
- `layout_fidelity` [close] — `close`: rebuild the concept layout as precisely as the camera allows (cell by cell on grids, object by object in metres otherwise); `style`: same composition and kit, layout may differ.
|
|
55
|
+
- `max_asset_iterations` [4] per asset; scene look tuning is delegated (Phase 6).
|
|
56
|
+
|
|
57
|
+
Concepts are often AI-generated. They are the source of truth for style, palette, lighting, materials, proportions and layout intent — not for geometric consistency. Expect: buildings that overflow their cell, roads and rivers that ignore the grid, inconsistent scale between objects, more than one vanishing point, details that change between the scene and the kit sheet. Resolve each contradiction into an explicit rule (section 3.3) instead of copying it or silently ignoring it.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 1. Phase 0 — Discover
|
|
62
|
+
|
|
63
|
+
1. Read the project's agent instructions (`AGENTS.md` or the tool's own instruction file) and README. Detect engine, renderer, color space, existing map/grid format, existing `docs/art/`.
|
|
64
|
+
2. If the project already has a grid/map format, write an adapter from this skill's layout JSON to it instead of replacing it.
|
|
65
|
+
3. Check Blender (see Prerequisites for where to find it). Assets are generated headless: `blender -b --python tools/blender/kit/<id>.py -- --out <path>.glb --seed N`. If Blender is missing, say so and build everything in-engine (lower fidelity for trees/rocks/buildings); the build-time placement checks of 5.3 then apply to the in-engine builders.
|
|
66
|
+
4. If `docs/art/` exists (from `art-direction-pass` or a previous run), extend it; never overwrite it.
|
|
67
|
+
5. Record the baseline within the Git rules above: tag the current commit `scene-baseline-<date>` when tags are allowed; otherwise note `git rev-parse HEAD` and the uncommitted file list in `docs/art/kit.md`.
|
|
68
|
+
|
|
69
|
+
## 2. Phase 1 — Style deconstruction
|
|
70
|
+
|
|
71
|
+
Write or extend `docs/art/direction/00-global.md` (the `art-direction-pass` format: mood and its 5 traits, palette hex + value + screen share, value structure, lighting, atmosphere, post, camera, global material rules, readability, Uncertain).
|
|
72
|
+
|
|
73
|
+
Then add a section **Signature traits**: the 5–8 traits that make this concept recognisable, ranked by impact. Each trait gets: description, technique, owner (asset / shader / lighting / post / camera), verification. Derive them from THIS concept; the table below is only an example (a tabletop-diorama concept):
|
|
74
|
+
|
|
75
|
+
| Trait | Technique | Owner |
|
|
76
|
+
|---|---|---|
|
|
77
|
+
| Miniature look | shallow depth of field / tilt-shift focused on board centre | post + camera |
|
|
78
|
+
| Tiles as physical objects | hex prism, beveled top edge, earth/cork side band ~8–10% of width | asset |
|
|
79
|
+
| Flocked grass | high-frequency noise albedo + instanced tufts, olive→straw variation | shader + scatter |
|
|
80
|
+
| Foam-clump trees | trunk + clusters of displaced blobs, conifers as stacked noisy cones | Blender |
|
|
81
|
+
| Resin water | glossy, translucent, visible bed | shader |
|
|
82
|
+
| Soft studio light | large soft key, soft shadows, dark table backdrop | lighting |
|
|
83
|
+
|
|
84
|
+
Every signature trait must be implemented and verified before the scene counts as done.
|
|
85
|
+
|
|
86
|
+
## 3. Phase 2 — Kit and layout extraction
|
|
87
|
+
|
|
88
|
+
### 3.1 Kit inventory
|
|
89
|
+
|
|
90
|
+
`docs/art/kit.json` (+ human-readable `docs/art/kit.md`). One entry per asset:
|
|
91
|
+
|
|
92
|
+
```json
|
|
93
|
+
{
|
|
94
|
+
"id": "tile_grass",
|
|
95
|
+
"category": "terrain",
|
|
96
|
+
"build": "engine",
|
|
97
|
+
"reference": "docs/art/reference/kit/tile_grass.png",
|
|
98
|
+
"dimensions": {"relative_to": "tile", "width": 1.0, "height": 0.1},
|
|
99
|
+
"variants": 4,
|
|
100
|
+
"materials": ["flock_grass", "tile_side_earth"],
|
|
101
|
+
"tri_budget": 2000,
|
|
102
|
+
"screen_share": "high",
|
|
103
|
+
"notes": ""
|
|
104
|
+
}
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
- `build`: `engine` (tiles or terrain meshes, ground surfaces, grass/scatter, water, road and river surfaces, simple cliffs), `blender` (trees, rocks, buildings, ruins, bridges, complex props), `shader` (surface-only effects).
|
|
108
|
+
- `dimensions`: relative to the tile for grid concepts, in metres for free-form concepts.
|
|
109
|
+
- `category`: terrain / architecture / props / vegetation / vfx — same categories as `art-direction-pass`.
|
|
110
|
+
- Derive the list from the kit sheet AND the scene concept: anything visible in the scene must exist in the kit.
|
|
111
|
+
- Cut references with `crop.py` (look at the sheet, write `boxes.json`, run, check the crops). If there is no kit sheet, crop from the scene concept.
|
|
112
|
+
|
|
113
|
+
### 3.2 Layout extraction
|
|
114
|
+
|
|
115
|
+
Every scene has a ground plane. Map the concept's ground onto it first, then read the layout from that mapping. `grid_overlay.py` does both jobs.
|
|
116
|
+
|
|
117
|
+
**Grid concepts (`hex` / `square`):**
|
|
118
|
+
1. Estimate grid type, orientation (pointy/flat), columns, rows and the image pixels of the board's four corners.
|
|
119
|
+
2. Run `grid_overlay.py` and LOOK at the overlay. Adjust corners/cols/rows until cell outlines match the concept's cells. Raised tiles look shifted, the board is treated as a plane.
|
|
120
|
+
3. Read the concept cell by cell and fill the layout JSON.
|
|
121
|
+
|
|
122
|
+
**Free-form concepts (`free`):**
|
|
123
|
+
1. Find a scale reference: objects of known size (door ≈ 2.1 m, road lane ≈ 3.5 m, car ≈ 4.5 m, person ≈ 1.8 m, storey ≈ 3 m). Record which ones you used.
|
|
124
|
+
2. Pick four ground points that form a rectangle in the world (field corners, road edges, a building footprint, a plaza). Estimate its size in metres.
|
|
125
|
+
3. Run `grid_overlay.py --grid square --cell-m <size>` as a MEASUREMENT grid: each label is the metre coordinate of its cell's centre. Adjust until the grid lies convincingly on the ground (parallel to roads, square on building footprints).
|
|
126
|
+
4. Read positions, sizes and rotations of everything on the ground in metres. Elevated parts (hills, roofs, plateaus) are measured at their base.
|
|
127
|
+
5. In perspective or third-person views, measure only the ground region where the grid is reliable. Treat the horizon, skyline and distant hills as `backdrop` elements with a direction and rough distance, not as precisely placed objects.
|
|
128
|
+
|
|
129
|
+
Save the final overlay next to the layout; it is the evidence for every placement.
|
|
130
|
+
|
|
131
|
+
Layout format `docs/art/layout/<scene>.json`. The `space` block decides how positions are written.
|
|
132
|
+
|
|
133
|
+
Grid example:
|
|
134
|
+
|
|
135
|
+
```json
|
|
136
|
+
{
|
|
137
|
+
"space": {"type": "hex", "orientation": "pointy", "coords": "axial", "cell_size_m": 2.0},
|
|
138
|
+
"cells": [
|
|
139
|
+
{"q": 0, "r": 0, "terrain": "grass", "height": 0, "features": ["rock_small"], "seed": 11}
|
|
140
|
+
],
|
|
141
|
+
"paths": [
|
|
142
|
+
{"type": "road", "cells": [[4, 7], [4, 6], [5, 5]], "style": "spline_through_centres"},
|
|
143
|
+
{"type": "river", "cells": [[-1, 3], [0, 3], [1, 4]], "width": 0.45}
|
|
144
|
+
],
|
|
145
|
+
"structures": [
|
|
146
|
+
{"kit": "factory_a", "anchor": [5, 0], "footprint": [[5, 0], [6, 0]], "rotation_deg": 0}
|
|
147
|
+
],
|
|
148
|
+
"scatter": [
|
|
149
|
+
{"kit": ["tree_conifer", "tree_broadleaf"], "cells": [[10, 1], [11, 1]], "density": 0.9, "seed": 5}
|
|
150
|
+
],
|
|
151
|
+
"camera": {"preset": "concept_view"},
|
|
152
|
+
"spawn_hints": [{"cell": [3, 1], "note": "unit in concept"}],
|
|
153
|
+
"notes": ["factory_a overflows one hex in the concept -> 2-hex footprint"]
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Free-form example (metres, x right, y away from camera, height up):
|
|
158
|
+
|
|
159
|
+
```json
|
|
160
|
+
{
|
|
161
|
+
"space": {"type": "free", "units": "m", "extent": [0, 0, 120, 80], "scale_refs": ["road lane 3.5 m", "door 2.1 m"]},
|
|
162
|
+
"terrain": {
|
|
163
|
+
"heights": [{"at": [30, 20], "h": 4.0, "radius": 12, "profile": "plateau"}],
|
|
164
|
+
"regions": [{"material": "dry_grass", "polygon": [[0, 0], [40, 0], [40, 25], [0, 30]]}]
|
|
165
|
+
},
|
|
166
|
+
"paths": [
|
|
167
|
+
{"type": "road", "points": [[0, 60], [50, 45], [120, 40]], "width": 6.0},
|
|
168
|
+
{"type": "river", "points": [[0, 30], [60, 35], [120, 28]], "width": 4.0}
|
|
169
|
+
],
|
|
170
|
+
"objects": [{"kit": "factory_a", "pos": [62, 18], "rot_deg": 15, "scale": 1.0}],
|
|
171
|
+
"scatter": [{"kit": ["tree_conifer"], "polygon": [[90, 0], [120, 0], [120, 30]], "density_per_100m2": 2.0, "seed": 5}],
|
|
172
|
+
"backdrop": [{"kit": "hills_far", "direction_deg": 0, "distance_m": 400}],
|
|
173
|
+
"camera": {"preset": "concept_view"},
|
|
174
|
+
"spawn_hints": [],
|
|
175
|
+
"notes": []
|
|
176
|
+
}
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Square grids use `x, y` instead of `q, r`. If the project already has its own map format, keep this JSON as the extraction result and write an adapter.
|
|
180
|
+
|
|
181
|
+
### 3.3 Contradiction rules
|
|
182
|
+
|
|
183
|
+
Record every resolution in `layout.notes` and in `kit.md`:
|
|
184
|
+
- Building larger than a cell → multi-cell footprint, or an allowed overhang (state the max, e.g. ≤ 15% of a cell). Never scale the grid to fit one building.
|
|
185
|
+
- Road or river not aligned with the grid → path through cell centres, smoothed with a spline, keeping the concept's visual direction as closely as the grid allows.
|
|
186
|
+
- Inconsistent cell sizes → one cell size.
|
|
187
|
+
- Objects at inconsistent scales (free-form) → normalise to the scale references; note the objects that were resized.
|
|
188
|
+
- Several vanishing points or a distorted ground → pick the dominant ground plane, accept small placement errors elsewhere.
|
|
189
|
+
- Scene and kit sheet disagree on an asset → the scene wins for proportions in context, the kit sheet wins for detail and materials.
|
|
190
|
+
- The user overrides the concept ("the concept is wrong here") → record it as a rule like the ones above, so no later pass reverts it.
|
|
191
|
+
|
|
192
|
+
### 3.4 Checkpoint
|
|
193
|
+
|
|
194
|
+
If the user is present: show signature traits, the kit list, the overlay image, the scale references (free-form) and the contradiction rules; wait for approval. If unattended, continue and note it.
|
|
195
|
+
|
|
196
|
+
## 4. Phase 3 — Foundations
|
|
197
|
+
|
|
198
|
+
1. **Scene builder** — reads layout JSON + kit.json and builds the scene: tiles or a terrain mesh, surface regions, paths, objects, scatter, backdrop. No hand-placed objects: everything comes from data, so the same code builds any future map or level.
|
|
199
|
+
- Godot: `SceneBuilder` node with an `@tool` script (rebuild in editor and at runtime).
|
|
200
|
+
- Three.js: `buildScene(layout, kit)` module returning a `Group`.
|
|
201
|
+
- Instancing for repeated meshes (MultiMeshInstance3D / InstancedMesh), shared materials, deterministic seeds.
|
|
202
|
+
2. **Material presets library** — one preset per material in kit.json (`res://art/materials/<category>/` in Godot, a `materials.ts/json` registry in Three.js).
|
|
203
|
+
3. **Capture harness** — reuse the one from `art-direction-pass` if present (same `tools/visual/`). Otherwise build one: named camera presets in `tools/visual/presets.json`, a fixed RNG seed applied before generation, paused animation and particles, settle frames before each capture, a PNG plus frame time per preset, and two identical runs (mean abs diff < 1/255) before relying on it. Presets:
|
|
204
|
+
- `concept_view` — camera matched to the scene concept,
|
|
205
|
+
- `kit_<id>` — each asset alone on a neutral background in the kit sheet's angle,
|
|
206
|
+
- `gameplay_wide` — the real gameplay camera, if the game has one.
|
|
207
|
+
4. **Camera match** — render `concept_view` with debug cell outlines (or the measurement grid for free-form), overlay it on the concept with `blend.py`, adjust position/pitch/FOV until the grids coincide. Do this before any style work: a wrong camera makes every comparison misleading.
|
|
208
|
+
|
|
209
|
+
## 5. Phase 4 — Build the kit
|
|
210
|
+
|
|
211
|
+
Before the first iteration of an asset, read its section in `references/field-lessons.md` (rules and recipes from
|
|
212
|
+
real runs: grass, roads, water, trees, buildings, light, performance, porting between engines).
|
|
213
|
+
|
|
214
|
+
Order by screen share and dependency:
|
|
215
|
+
ground (tiles or terrain mesh) → surface materials → elevation (height levels, hills, cliffs) → paths (roads, rivers, bridges) → ground scatter (grass, tufts, pebbles) → vegetation → rocks → buildings → ruins and debris → backdrop.
|
|
216
|
+
|
|
217
|
+
### 5.1 Per-asset loop
|
|
218
|
+
|
|
219
|
+
For each asset, up to `max_asset_iterations`:
|
|
220
|
+
1. Build or regenerate it.
|
|
221
|
+
2. Capture `kit_<id>`.
|
|
222
|
+
3. `compare.py sheet reference.png render.png` (from `art-direction-pass`), or any side-by-side image, and LOOK at it.
|
|
223
|
+
4. Fix the biggest 1–3 differences: silhouette and proportions first, then materials, then detail.
|
|
224
|
+
- When the user says it is far from the concept: first write how the concept looks, how ours looks, and the 5 main differences with a fix each.
|
|
225
|
+
- Add a new feature at low strength and measure its share against the concept (area of dust, cracks per metre, stone count); first passes at full strength overshoot.
|
|
226
|
+
- Matching colour statistics is not matching the look: compare 3x crops and structure metrics too.
|
|
227
|
+
5. Run the defect pass (5.4) on the result. Fix what it finds before anything else; never report an iteration that has not passed it.
|
|
228
|
+
6. Log in `docs/art/kit.md`: status (draft / matched / accepted with gaps), remaining differences, which defect checks ran.
|
|
229
|
+
|
|
230
|
+
For assets with high screen share, also run a fresh blind reviewer (a subagent, or a separate session when the tool has none; reference, close crops, the defect checklist and the render only) before marking them matched; guard its verdict with metrics measured on the same crops (luminance quantiles, hue/value of the region, share of each feature such as dust or cracks, element counts). If the user reviews the renders themselves and asks for no subagents, skip the reviewer, never the defect pass.
|
|
231
|
+
|
|
232
|
+
### 5.2 Engine-procedural assets
|
|
233
|
+
|
|
234
|
+
- Tiles (grid concepts): prism with beveled top edge, side band with its own material if the concept shows one, height levels as stacked prisms; cliff sides with displaced rock material.
|
|
235
|
+
- Terrain (free-form concepts): heightmap mesh built from `terrain.heights`, surface materials blended by masks from `terrain.regions`, soft transitions; cliffs as separate meshes where slopes are steep.
|
|
236
|
+
- Ground surfaces: noise-driven albedo and roughness; break tiling at gameplay distance with world-space macro noise.
|
|
237
|
+
- Colours: sample the concept (hue/luminance quantiles of the region), not the user's words. Mind colour spaces (sRGB uniforms vs linear literals). Fade sub-pixel detail (joints, bump) with distance and cap the bump tilt.
|
|
238
|
+
- Grass and scatter: instanced cards or small meshes, density and colour range from the concept, slight per-instance hue/value jitter. For full-coverage grass use camera-following GPU blades (recipe in `references/field-lessons.md`).
|
|
239
|
+
- Water: match the concept (glossy resin, realistic, stylised flat); visible bed if the concept shows one.
|
|
240
|
+
- Roads: mesh or decal along a spline (through cell centres on grids), with edge wear and kerbs if the concept has them.
|
|
241
|
+
|
|
242
|
+
### 5.3 Blender assets
|
|
243
|
+
|
|
244
|
+
- One script per asset family: `tools/blender/kit/<family>.py`. Parameters at the top, `--seed` and `--out` from the command line, deterministic.
|
|
245
|
+
- Export GLB: metres, Y-up, applied transforms, pivot at base centre, names `<id>_<variant>`. `bpy.ops.export_scene.gltf(filepath=out, export_format='GLB', export_apply=True, export_yup=True)`.
|
|
246
|
+
- Respect `tri_budget`. Bevels and weighted normals on hard surfaces; no subdivision for its own sake.
|
|
247
|
+
- Trees: trunk/branch curves + clusters of displaced blobs (broadleaf), stacked noisy cones (conifer); vertex colours or a small gradient material for value variation.
|
|
248
|
+
- Rocks: displaced icosphere → decimate → bevel; moss via a top-facing mask.
|
|
249
|
+
- Buildings: modular parts (walls, window bands, roller doors, roof units, pipes, ladders, chimneys) assembled by parameters; ruins reuse the same parts with breaks and a debris scatter.
|
|
250
|
+
- Keep the scripts: regenerating variants must never require manual Blender work.
|
|
251
|
+
- Encode placement rules as build-time checks that fail the script (not warnings): ladders, pipes and signs never cross windows or doors; windows are derived from the same column grid as the pilasters (one opening per bay); doors and their canopies stay below window bands; parts stay inside the footprint or tile; roof equipment fits inside the parapet. Every defect found in 5.4 that a rule could have caught becomes a new check.
|
|
252
|
+
|
|
253
|
+
### 5.4 Defect pass (before every report)
|
|
254
|
+
|
|
255
|
+
The wide `concept_view` hides defects: an element of a few pixels there can be absurd up close. For every asset changed in the iteration:
|
|
256
|
+
1. **Look up close, from every side.** Crop the `kit_<id>` render at 100 % and render the asset from at least three sides (front-left, both side walls; orbit or extra kit presets), plus one close orbit view of it in the scene. Look at all of them, not only the side-by-side with the concept.
|
|
257
|
+
2. **Function and logic.** Doors at ground level and leading somewhere (no gates on upper floors, no door into a wall); ladders and stairs reach a roof or floor and do not cross windows, doors or pipes; pipes connect to something; awnings and canopies sit over openings; windows not blocked by props; openings follow the structural grid (windows and doors between columns/pilasters, never across them; pipe risers on columns, not across windows; columns stop on a lintel above wide gates); every building has a visible entrance on a side the game camera sees; attached parts (awnings, canopies, brackets, signs) touch the wall and their supports, with no gaps.
|
|
258
|
+
3. **Counts and scale against the reference.** Count repeated elements (roof units, windows, chimneys, branches, stones) and compare with the concept; extra copies read as clutter. Check sizes against neighbours (door vs storey height, ladder rung spacing, tree vs building).
|
|
259
|
+
4. **Contact and fit.** Nothing floating or sunk, no parts hanging over the tile/cell edge, no interpenetration (pipes through walls, trees through roofs), no z-fighting.
|
|
260
|
+
5. **Patterns at close range.** Procedural surfaces must not read as tiles, a mosaic or stained glass (voronoi cells with flat colour and dark outlines are the usual culprit), and must show no visible repetition or seams.
|
|
261
|
+
6. **Material logic.** Light and dark parts where the real object has them (frames, copings, caps, edges); weathering where water and dirt actually collect.
|
|
262
|
+
|
|
263
|
+
In the report, say what was checked and what was found; list anything left unfixed instead of calling the asset done.
|
|
264
|
+
|
|
265
|
+
## 6. Phase 5 — Assemble the golden scene
|
|
266
|
+
|
|
267
|
+
1. Build the concept layout with the scene builder.
|
|
268
|
+
2. Capture `concept_view`; make a side-by-side sheet and a 50% blend with the concept.
|
|
269
|
+
3. Fix LAYOUT errors first (wrong cell types or regions, heights, path routes, missing or misplaced objects), then proportions of assets in context, only then style.
|
|
270
|
+
4. Check every signature trait; list any that is not yet present.
|
|
271
|
+
5. Run the defect pass (5.4) on the assembled scene with close orbit views of each area (assets in context reveal new problems: overlaps, scale, placement on tiles).
|
|
272
|
+
|
|
273
|
+
## 7. Phase 6 — Look and light
|
|
274
|
+
|
|
275
|
+
Run `art-direction-pass` with `scope=global,environment`, the scene concept as reference and `concept_view` as the main preset (plus `gameplay_wide` if it exists). If that skill is not available, follow the same loop: one parameter group per iteration, a fresh blind A/B reviewer, keep or revert within the Git rules above, 5–12 iterations. Keep the review blind: shuffle before/after into A and B per preset, copy them with the concept into a temporary folder outside the project, keep the mapping in the project, and give the reviewer only the paths of those files.
|
|
276
|
+
|
|
277
|
+
Lighting and post tuning happen there, not inside asset building. Do not compensate for a weak asset with lighting.
|
|
278
|
+
- Faces turned away from the key go near-black: add a shadowless low fill light from the mirrored side and re-check the median.
|
|
279
|
+
- Depth of field is relative to the focus distance, weak, toggleable, and keeps gameplay objects out of the blur.
|
|
280
|
+
- Once the user starts asking for "a bit less of X", build a live tweak panel generated from the shader uniforms.
|
|
281
|
+
|
|
282
|
+
## 8. Phase 7 — Deliver
|
|
283
|
+
|
|
284
|
+
- `docs/art/kit.md` — every asset: status, how to regenerate it, remaining gaps.
|
|
285
|
+
- `docs/art/layout/README.md` — how to author a new map or level in the layout format and build it.
|
|
286
|
+
- `docs/art/scene-final.md` — concept vs golden scene sheet and blend, signature-trait checklist, remaining discrepancies and why, performance (draw calls, instance counts, frame time on `concept_view`).
|
|
287
|
+
- One commit per finished asset family and per scene iteration (or a `kit.md` record each, per the Git rules above).
|
|
288
|
+
|
|
289
|
+
## 9. Constraints
|
|
290
|
+
|
|
291
|
+
- No units, mechs, characters or vehicles.
|
|
292
|
+
- Everything reproducible from data and scripts; no manual-only steps.
|
|
293
|
+
- Performance: instancing for scatter and repeated tiles, shared materials, LOD or impostors for dense forests if needed. Report frame time. Profile by switching features off one at a time (draw calls are a poor proxy); never time while another render or agent uses the GPU. Never auto-decimate to a triangle cap: use a failing budget check.
|
|
294
|
+
- The runtime scene is interactive by default (zoom/orbit work at once); the report gives the run command and controls. Animate at runtime, freeze time in captures.
|
|
295
|
+
- Do not distort the camera, the grid or object scales to win a pixel match. Grid layouts must stay on a regular grid.
|
|
296
|
+
- Never claim a match without a render you looked at.
|
|
297
|
+
- Never report a change as done before the defect pass (5.4) has run on it.
|
|
298
|
+
|
|
299
|
+
## 10. Engine notes
|
|
300
|
+
|
|
301
|
+
**Godot 4**: MultiMeshInstance3D for grass/scatter/forests; a heightmap ArrayMesh built from the layout for free-form terrain (or the terrain plugin the project already uses); GLB import with materials replaced by presets; if the concept has a miniature look, tilt-shift via CameraAttributesPractical DOF (near/far blur around the board centre) or a screen-space shader blurring by vertical distance from a focus band; StandardMaterial3D with transparency + refraction or a custom shader for water; `--headless` does not render.
|
|
302
|
+
|
|
303
|
+
**Three.js**: InstancedMesh for scatter; PlaneGeometry displaced from a heightmap for free-form terrain; GLTFLoader; MeshPhysicalMaterial (transmission, roughness, ior) for water; miniature tilt-shift as a custom ShaderPass (vertical gradient blur) or BokehPass; capture via Playwright headed with `preserveDrawingBuffer: true`.
|
|
304
|
+
|
|
305
|
+
## 11. Templates
|
|
306
|
+
|
|
307
|
+
Invoke by path from the project root (requires Pillow and numpy). `compare.py` and the capture harness come from `art-direction-pass` when it is installed.
|
|
308
|
+
|
|
309
|
+
- `scripts/grid_overlay.py CONCEPT --grid hex|square --orient pointy|flat --cols N --rows M --corners "x,y x,y x,y x,y" [--cell-m METRES] -o overlay.png` — projects a grid through the four corner pixels (TL TR BR BL of the grid's bounding box as it appears). Labels are axial `q,r` (hex) or `col,row` (square); with `--cell-m` a square grid becomes a measurement grid whose labels are the metre coordinates of each cell's centre. Corners that are repeated, collinear or out of order are rejected. The board is a plane: raised tiles look shifted.
|
|
310
|
+
- `scripts/crop.py SHEET boxes.json -o docs/art/reference/kit/` — `boxes.json` is `{"tile_grass": [x0, y0, x1, y1], ...}` in sheet pixels; names must be plain file names, and all boxes are checked before anything is written.
|
|
311
|
+
- `scripts/blend.py CONCEPT RENDER -o out.png [--alpha 0.5]` — overlays the render (resized to the concept) for camera and layout alignment.
|
|
312
|
+
|
|
313
|
+
Tests of the tools themselves: `python3 -B -m unittest discover -s .claude/skills/concept-scene-builder/scripts` (skipped without Pillow and numpy).
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Concept Scene Builder"
|
|
3
|
+
short_description: "Rebuild a concept's game environment from a data-driven asset kit and layout"
|
|
4
|
+
default_prompt: "Use $concept-scene-builder to rebuild this concept image as a game environment scene from a reusable asset kit and a layout file."
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Field lessons (from real runs)
|
|
2
|
+
|
|
3
|
+
Each rule comes from a correction the user had to make or a fix that worked. Read the section for the asset you are
|
|
4
|
+
building before its first iteration. Short rules are repeated in SKILL.md; the recipes live only here.
|
|
5
|
+
|
|
6
|
+
## Process
|
|
7
|
+
|
|
8
|
+
- **Words before code.** When the user says an asset is "far from the concept", write how the concept looks, how ours
|
|
9
|
+
looks, and a table of the 5 main differences with one fix each; apply after approval (or, unattended, apply the
|
|
10
|
+
table and keep it in the report). Blind parameter tweaking took several rounds; the table landed in one.
|
|
11
|
+
- **"Too X" means measure first.** "Too yellow" was not too much yellow (the concept measured more yellow than ours);
|
|
12
|
+
it was hard transitions: two steep curves, two palettes, ground switching colour under patches. Check transitions
|
|
13
|
+
and contrast before changing amounts.
|
|
14
|
+
- **New feature at low strength, then measure its share** against the concept (share of ochre dust, cracks per metre,
|
|
15
|
+
foam area). Every first pass at full strength overshot: dust covered half the road, plates read as cobbles,
|
|
16
|
+
water went opaque, a ford of 52 stones read as a blockage (15 was right).
|
|
17
|
+
- **Colour numbers are not the look.** The asphalt median matched the concept to 2 RGB units and the user still said
|
|
18
|
+
"far". Add structure metrics (contrast inside the region, share of each feature) and compare 3x crops.
|
|
19
|
+
- **Colours come from the concept, not from the prompt.** The user's words ("mostly green") describe the impression;
|
|
20
|
+
sample the concept (5 hue/luminance quantiles of the region) and set the ramp from them. Fully automatic palette
|
|
21
|
+
fitting diverged; quantiles + gentle correction (strength ~0.6) worked.
|
|
22
|
+
- **User overrides beat the concept.** "Asphalt should cover the whole bridge (the concept is wrong here)": record it as
|
|
23
|
+
a contradiction rule in kit.md so no later pass reverts it.
|
|
24
|
+
- **Tweak panel early.** When the user starts asking for "3-4x fewer cracks", give every look parameter a name and a
|
|
25
|
+
live panel generated from shader uniforms and profiles (save/reset; strip runtime-only uniforms on save;
|
|
26
|
+
a self-test that a value round-trips).
|
|
27
|
+
- **Reviewers.** A blind A/B reviewer sees only the wide view and drifts from measurements (it darkened the grass
|
|
28
|
+
median from 0.45 to 0.37 because "darker looked richer"). Give reviewers close crops plus the defect checklist and
|
|
29
|
+
guard every verdict with metrics. If the user prefers to review renders personally, skip reviewers, never the defect pass.
|
|
30
|
+
|
|
31
|
+
## Iteration speed and performance
|
|
32
|
+
|
|
33
|
+
- Iterate on the single-asset preview (seconds); render the full scene last (minutes).
|
|
34
|
+
- Never time performance while another render, test or agent uses the GPU.
|
|
35
|
+
- Profile by switching features off one at a time. Draw calls fell 882 -> 198 and frame time only 19.4 -> 18.0 ms;
|
|
36
|
+
the real costs were shadows (~7 ms: atlas 8192 -> 4096, cascades 4 -> 2), grass (~6 ms: fewer, wider blades,
|
|
37
|
+
colour conversion moved to the CPU) and SSAO (1.6 ms).
|
|
38
|
+
- Never auto-decimate assets to a triangle cap: a cap removed whole walls of ruins. Use a budget check that fails.
|
|
39
|
+
|
|
40
|
+
## Runtime deliverable
|
|
41
|
+
|
|
42
|
+
- The scene is interactive by default: zoom/orbit work right away, the report gives the run command and controls.
|
|
43
|
+
- Animated effects (water flow, foam) run at runtime; captures freeze time so comparisons stay deterministic.
|
|
44
|
+
- Depth of field (tilt-shift) is relative to the focus distance (near ~0.8 d, far ~1.12 d), weak (amount ~0.03),
|
|
45
|
+
with a toggle key, and keeps gameplay objects out of the blur. A fixed band blurred the whole board on zoom.
|
|
46
|
+
|
|
47
|
+
## Light and shading
|
|
48
|
+
|
|
49
|
+
- Faces turned away from the key light render near-black (bridge walls at value 0.18). Add a shadowless fill from the
|
|
50
|
+
camera side, mirrored azimuth, low elevation (~10 deg), and re-check the global median afterwards.
|
|
51
|
+
- Fade sub-pixel detail (joints, bump) with distance and cap the bump tilt: 5 cm joints made masonry black from afar.
|
|
52
|
+
- Colour constants must be in the right colour space: in Godot `source_color` uniforms are sRGB, literals in code are
|
|
53
|
+
linear. A grey entered as a bare 0.5 rendered almost white ("white dots"). A shared effect (chips, grime) changes
|
|
54
|
+
every asset that uses it: re-check all of them after a change.
|
|
55
|
+
- Give each material role its own material (window frames shared the coping material and went dark with it).
|
|
56
|
+
- Voronoi cells with flat colour and dark outlines read as stained glass. River bed: separate dome-shaded pebbles on
|
|
57
|
+
sand (distance to the feature point), not cells.
|
|
58
|
+
|
|
59
|
+
## Recipes
|
|
60
|
+
|
|
61
|
+
### Camera-following GPU grass (Godot or three.js)
|
|
62
|
+
|
|
63
|
+
- Every blade is built in the vertex shader from a hash of its world-grid cell: stable under camera motion and LOD.
|
|
64
|
+
- Two LOD rings of fixed patches around the focus; cull patches on the CPU against the board and the view frustum.
|
|
65
|
+
- Grid sized to the normal density; rejected blades collapse to a degenerate point. ~8 vertices per blade.
|
|
66
|
+
- Back faces: reset the normal (double-sided blades flip it).
|
|
67
|
+
- One include shared by the ground shader and the blade shader, so the ground under blades has the same colour field.
|
|
68
|
+
- Keep-out (roads, rivers, structures) as a baked distance field: interpolates cleanly, edges stay sharp.
|
|
69
|
+
- Result: build 1.5 s -> 0.02 s, 27 MB of per-blade data -> 0.2 MB of tables, cost follows screen coverage, not map
|
|
70
|
+
size (100x100 board: 2.4-6.6 ms).
|
|
71
|
+
|
|
72
|
+
### Broadleaf tree
|
|
73
|
+
|
|
74
|
+
- Recursive branch skeleton (trunk -> 7-9 limbs -> 3-5 branches -> 2-3 twigs), golden-angle phyllotaxis (137.5 deg),
|
|
75
|
+
gnarl and an up force; low limbs spread 60-70 deg so the crown starts at ~30 % of the height.
|
|
76
|
+
- Foliage clusters on twig tips AND along the outer half of limbs and branches; tips only gave a flat high umbrella.
|
|
77
|
+
- Crown-centre normals and interior darkening for the foam-clump look.
|
|
78
|
+
- Bark without textures: per-vertex (around, along, circumference) coordinates on the tubes + a procedural shader
|
|
79
|
+
(furrows, plates, knots, moss low and on up-facing sides).
|
|
80
|
+
|
|
81
|
+
### Generators
|
|
82
|
+
|
|
83
|
+
- Check openings in the mesh, not only placements: an arch notch in one n-gon was triangulated across the opening.
|
|
84
|
+
Build walls with openings from strips.
|
|
85
|
+
- Every defect the user finds that a rule could catch becomes a failing build check.
|
|
86
|
+
|
|
87
|
+
### Camera match
|
|
88
|
+
|
|
89
|
+
- Do not trust a closed-form homography decomposition for the camera; fit pose and FOV by reprojection error with
|
|
90
|
+
free yaw and roll (AI concepts have inconsistent perspective; ~12 px RMS is normal).
|
|
91
|
+
|
|
92
|
+
## Porting a kit to another engine (Godot -> three.js)
|
|
93
|
+
|
|
94
|
+
- Keep one scale constant (kit unit -> game metres) and compute every pattern in kit units (`p_kit = p_world / S`);
|
|
95
|
+
never rescale shader constants by hand. Scale models at load.
|
|
96
|
+
- Uniform values live in the material files (.tres), not in the shader defaults: read both.
|
|
97
|
+
- Godot light energy E ~ three.js intensity E * pi (physically based lights); ambient colour * energy the same.
|
|
98
|
+
- Port surface shaders into the engine's standard material (three.js: onBeforeCompile) so shadows, fog and AO keep
|
|
99
|
+
working; a custom ShaderMaterial only where the vertex stage is fully custom (GPU grass), and then wire shadows yourself.
|
|
100
|
+
- Assets made for one board layout need adapting to the game's own map: multi-cell footprints, a bridge length that
|
|
101
|
+
matches the crossing, clear cell centres where units stand, heights from the game's grid. Example: the kit bridge
|
|
102
|
+
crossed a shallow stream at grade; the game's river ran 5 m below the meadow, so the bridge needed abutments and an
|
|
103
|
+
arch down to the water, an oblique plan (bank edges at 30 deg to the road) and a wider deck (units stand on it).
|
|
104
|
+
- Vertex colours: check how the source engine reads COLOR_0 before porting. Godot passes the glb values raw and the kit
|
|
105
|
+
shaders converted them from sRGB (`color_srgb`); reading them as linear made walls 2.7x too light.
|
|
106
|
+
- Light: compare against the source engine's render of the SAME surfaces in-scene (grass, forest, walls, cliffs),
|
|
107
|
+
not against isolated kit renders on a different background. Tonemapper and screen-space AO differ between engines
|
|
108
|
+
(three.js AO darkens direct light too; Godot SSAO only ambient): calibrate exposure, shadow lift and AO by
|
|
109
|
+
measurement, one preset, then fix remaining per-material gaps in the materials.
|
|
110
|
+
- Port per zone with parallel executors only after a written contract (scale, mask functions, material names,
|
|
111
|
+
ownership) and a scaffold where every zone starts as a stub on the old code, so each executor sees a complete scene.
|
|
112
|
+
With several executors on one dev server, hot reload restarts their captures: give each its own server without HMR,
|
|
113
|
+
and treat frame times as noisy (measure with/without the feature, not absolute).
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Overlay a render on the concept to check camera and layout alignment.
|
|
3
|
+
|
|
4
|
+
blend.py CONCEPT RENDER -o out.png [--alpha 0.5] (the render is resized to the concept size)
|
|
5
|
+
Requires Pillow.
|
|
6
|
+
"""
|
|
7
|
+
import argparse
|
|
8
|
+
|
|
9
|
+
from PIL import Image
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def blend(concept, render, out, alpha=0.5):
|
|
13
|
+
c = Image.open(concept).convert("RGB")
|
|
14
|
+
r = Image.open(render).convert("RGB").resize(c.size, Image.LANCZOS)
|
|
15
|
+
Image.blend(c, r, alpha).save(out)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def main(argv=None):
|
|
19
|
+
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
20
|
+
ap.add_argument("concept")
|
|
21
|
+
ap.add_argument("render")
|
|
22
|
+
ap.add_argument("-o", required=True)
|
|
23
|
+
ap.add_argument("--alpha", type=float, default=0.5)
|
|
24
|
+
a = ap.parse_args(argv)
|
|
25
|
+
if not 0.0 <= a.alpha <= 1.0:
|
|
26
|
+
ap.error("--alpha must be between 0 and 1")
|
|
27
|
+
blend(a.concept, a.render, a.o, a.alpha)
|
|
28
|
+
return 0
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
if __name__ == "__main__":
|
|
32
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Cut kit-sheet items into per-asset reference images.
|
|
3
|
+
|
|
4
|
+
crop.py SHEET boxes.json -o docs/art/reference/kit/
|
|
5
|
+
boxes.json: {"tile_grass": [x0, y0, x1, y1], ...} in sheet pixels. Requires Pillow.
|
|
6
|
+
"""
|
|
7
|
+
import argparse
|
|
8
|
+
import json
|
|
9
|
+
import pathlib
|
|
10
|
+
import re
|
|
11
|
+
|
|
12
|
+
from PIL import Image
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
NAME = re.compile(r"^[A-Za-z0-9_][A-Za-z0-9_.-]*$")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def crop(sheet, boxes, out_dir):
|
|
19
|
+
if not isinstance(boxes, dict):
|
|
20
|
+
raise ValueError('boxes must be an object: {"name": [x0, y0, x1, y1], ...}')
|
|
21
|
+
im = Image.open(sheet).convert("RGB")
|
|
22
|
+
for name, box in boxes.items(): # check everything before writing anything
|
|
23
|
+
if not NAME.match(name):
|
|
24
|
+
raise ValueError(f"box name {name!r} must be a plain file name")
|
|
25
|
+
if not (isinstance(box, list) and len(box) == 4 and all(isinstance(v, int) for v in box)):
|
|
26
|
+
raise ValueError(f"box {name} must be four integers [x0, y0, x1, y1], got {box!r}")
|
|
27
|
+
x0, y0, x1, y1 = box
|
|
28
|
+
if not (0 <= x0 < x1 <= im.width and 0 <= y0 < y1 <= im.height):
|
|
29
|
+
raise ValueError(f"box {name} {box} is outside the {im.width}x{im.height} sheet or empty")
|
|
30
|
+
out = pathlib.Path(out_dir)
|
|
31
|
+
out.mkdir(parents=True, exist_ok=True)
|
|
32
|
+
written = []
|
|
33
|
+
for name, box in boxes.items():
|
|
34
|
+
path = out / f"{name}.png"
|
|
35
|
+
im.crop(tuple(box)).save(path)
|
|
36
|
+
written.append(path)
|
|
37
|
+
return written
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def main(argv=None):
|
|
41
|
+
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
|
42
|
+
ap.add_argument("sheet")
|
|
43
|
+
ap.add_argument("boxes")
|
|
44
|
+
ap.add_argument("-o", required=True)
|
|
45
|
+
a = ap.parse_args(argv)
|
|
46
|
+
with open(a.boxes) as f:
|
|
47
|
+
boxes = json.load(f)
|
|
48
|
+
try:
|
|
49
|
+
crop(a.sheet, boxes, a.o)
|
|
50
|
+
except ValueError as e:
|
|
51
|
+
ap.error(str(e))
|
|
52
|
+
return 0
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
if __name__ == "__main__":
|
|
56
|
+
raise SystemExit(main())
|