dsh-game-material-master 0.7.0 → 0.9.0

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.en.md CHANGED
@@ -4,26 +4,33 @@ English | [中文](https://github.com/universe-st/dsh-game-material-master/blob/
4
4
 
5
5
  **Start from a single character sheet and batch-produce the assets your game actually needs.**
6
6
 
7
- Volcengine Ark **Seedream** handles image generation, **MiniMax** handles image-to-video, and keying,
8
- frame extraction, pixel quantization and spritesheet composition all happen locally through `ffmpeg` —
9
- no system image libraries required, and your assets are never uploaded to a third-party service.
7
+ Volcengine Ark **Seedream** handles image generation, **MiniMax** (or a local **ComfyUI**) handles
8
+ image-to-video, and keying, frame extraction, pixel quantization and spritesheet composition all happen
9
+ locally through `ffmpeg` — no system image libraries required, and your assets are never uploaded to a
10
+ third-party service.
10
11
 
11
12
  [![npm](https://img.shields.io/npm/v/dsh-game-material-master?color=blue)](https://www.npmjs.com/package/dsh-game-material-master)
12
13
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
13
14
 
15
+ > **🆕 What's new in 0.9.0**: an eighth module, [**Sound effects**](#-sound-effects-volcengine-seed-audio)
16
+ > (Volcengine Seed-Audio: one prompt → sound effects / ambience / character voices, with an optional reference
17
+ > image or audio; every run is billed; up to 120 seconds). The 0.8.0 **music generation / compose mode**,
18
+ > map editor **Generate with AI / stamps**, **local ComfyUI** backend and **DSH 0.2.1** support remain.
19
+ > See the [release notes in AGENTS.md](https://github.com/universe-st/dsh-game-material-master/blob/main/AGENTS.md#已发布版本).
20
+
14
21
  ![Game Material Master · workbench](https://raw.githubusercontent.com/universe-st/dsh-game-material-master/main/docs/images/gmm-00-workbench.png)
15
22
 
16
23
  > **Up and running in 30 seconds**: `dsh plugin --profile web add dsh-game-material-master` → restart DSH →
17
- > click "Game Material Master" in the sidebar → enter the two API keys in settings → create a project,
24
+ > click "Game Material Master" in the sidebar → enter the API keys you need (images / video; sound effects use a separate speech key) → create a project,
18
25
  > upload your character sheet → click "Generate turn video" (the default path: the character rotates steadily
19
26
  > in place for one full turn, then the eight directions are cut out automatically; switch the method in
20
27
  > stage ① if you'd rather generate each direction separately).
21
28
  >
22
- > The sidebar entry also carries a **small chevron menu button**: click it to pop up the six features and
29
+ > The sidebar entry also carries a **small chevron menu button**: click it to pop up the eight features and
23
30
  > jump straight into the one you want. Features you do not use can be turned off in settings (see
24
31
  > "Feature management").
25
32
 
26
- All six modules share the same "generate → review → re-run" workbench. Every stage can be **redone on its
33
+ All eight modules share the same "generate → review → re-run" workbench. Every stage can be **redone on its
27
34
  own**, and every asset can be **approved item by item**. The "review mode" lets an agent approve each step
28
35
  and move on automatically, or stop at every step and wait for your go-ahead.
29
36
 
@@ -33,7 +40,9 @@ and move on automatically, or stop at every step and wait for your go-ahead.
33
40
  | **② Image generation** | Prompt (optionally with reference images) → images → green-screen keying | Clean transparent PNG character art / props |
34
41
  | **③ Sequence frames** | First/last frame or a reference video → generate video → extract frames → key | A horizontally laid out, loopable sequence |
35
42
  | **⑤ Map tile generation** | Isometric tiles → assemble a whole map | A tile pack (PNGs) + map PNG + layout JSON |
36
- | **⑥ Map editor** (**fully local, zero cost**) | Pick a tileset → paint directly (rebuilt after AsLib's RPG Map Maker: one screen, icon-only, no jargon; three default layers — terrain / decor / buildings — that you can rename and reorder; a **marker layer**: one nameable marker per cell, drawn as a numbered circle) | PNG + save-file JSON (wrapping map, auto-tiling, animated tiles, markers); tick what to export and multiple files come as one ZIP download |
43
+ | **⑥ Map editor** (**fully local, zero cost**) | Pick a tileset → paint directly (rebuilt after AsLib's RPG Map Maker: one screen, icon-only, no jargon; three default layers — terrain / decor / buildings — that you can rename and reorder; a **marker layer**: one nameable marker per cell, drawn as a numbered circle; **Generate with AI** lives in the assets window: give a prompt, a name, a frame count, a method and a usage, and the plugin **opens a new chat** to generate it — it picks the tile type (plain / whole-cell / quadrant) from the prompt itself, asks the model for **one seamless tile** and assembles all 16 connections / 5 shape rows in code (so the tiles actually line up on the map). Animated assets use quadrant tiles (frames become variants, still auto-connecting) or plain tiles (flipbook), and each asset can be given its own playback speed in "Add asset" (otherwise it follows the global speed in Settings) plus a **clarity** mode for the 2K-to-32px downscale (area average / nearest / average + sharpen) , a **loop mode** (forward / reverse / ping-pong), and **stamps** (one picture stamping N x M cells at once - statues, murals, carpets - rotated with a right-click, green screen keyed to transparency, with per-cell walkability set at import), a **tile size** choice when creating a project (16 / 32 / 48 / 64 - pick 48 / 64 for sharper AI assets) and automatic trimming of the white border models like to add; whole-cell tiles are just 16 connection cases with no animation, so the dialog locks the frame count and the video model, then posts a link; click it and the image and its usage are already filled in on "Add asset") | PNG + save-file JSON (wrapping map, auto-tiling, animated tiles, markers); tick what to export and multiple files come as one ZIP download |
44
+ | **⑦ Music generation & editing** (Puyue AI) | An inspiration prompt or full lyrics → a new chat that is **not attached to any project**; the agent there reads the built-in creation guide, expands the prompt, chooses Suno / Mureka / MiniMax / ACE-Step and a mode, generates → back in the UI, trim / adjust gain / fade / normalize → save versions and export. Also **Compose mode**: analyse the idea, present a style/key/section/instrumentation plan, write MIDI with scoremill, render a local preview, revise version by version, then optionally hand it to Suno | MP3 / WAV / M4A (multiple outputs can be zipped); compose mode also exports a score bundle (MIDI / preview / plan / compose.py). The original is kept and every edit or score version is new |
45
+ | **⑧ Sound effects** (Volcengine Seed-Audio) | Describe the source / environment / intensity / duration → sound effects, ambience, UI sounds, creature roars or character voices; optionally 1 reference image or up to 3 reference audio clips (mutually exclusive); every run adds a take without overwriting earlier ones | WAV / MP3 / Ogg Opus; export one take or zip all. Up to 120 seconds per run; every generation is billed |
37
46
  | ~~④ Rigged animation~~ | Part extraction → assembly → skeletal animation → Spine / DragonBones atlas | **Experimental, not covered in this document** |
38
47
 
39
48
  > 💡 **Module ⑤ "Map tile generation" is built on one idea: geometry by code, content by AI.**
@@ -50,7 +59,10 @@ and move on automatically, or stop at every step and wait for your go-ahead.
50
59
  > are then **fixed for good -- delete the image and add it again to change them**. Leave the cell size empty and
51
60
  > it is detected from the image. The built-in set (4 autotile sheets + 1 prop grid, the water animating on 2
52
61
  > frames) is in the list by default, can be deleted just like your own, and "Restore built-ins" brings it back;
53
- > its properties cannot be edited. To animate **your own plain sheets**, pick "**Flip-book**" when adding (one
62
+ > its properties cannot be edited. Not sure how your own image should be laid out? The "**How to lay out an
63
+ > image**" button at the top right of that dialog opens three illustrated pages -- plain tiles / full-cell
64
+ > auto-connect / block auto-connect -- and the grid drawn over each example hides and reappears in a loop, so
65
+ > the columns, the rows and which tile is which are obvious at a glance. To animate **your own plain sheets**, pick "**Flip-book**" when adding (one
54
66
  > row per page); autotile sheets need no setting -- their variants are the frames, and the list shows
55
67
  > "Animates: N frames". Map size and cell size are both free-form; the map **wraps around on all four sides** at
56
68
  > the data level (auto-tiling joins the top/bottom and left/right edges). The canvas cannot be dragged off the
@@ -62,7 +74,7 @@ and move on automatically, or stop at every step and wait for your go-ahead.
62
74
  > their variants are the frames. You can also generate random terrain, a maze or a continent in one go.
63
75
  > **Not a single model call is made — so nothing is billed.**
64
76
 
65
- > 🏷️ **Creating anything in any of the six modules asks for a name first**: the field is pre-filled with the
77
+ > 🏷️ **Creating anything in any of the eight modules asks for a name first**: the field is pre-filled with the
66
78
  > default (just press Enter to keep it), and cancelling creates nothing. Map projects can also be renamed later.
67
79
 
68
80
  > ⚠️ **Module ④ "Rigged animation" is still experimental and not yet finished**: the quality of part extraction
@@ -235,9 +247,87 @@ flowchart LR
235
247
 
236
248
  ---
237
249
 
250
+ ## ⑦ Music generation & editing (Puyue AI)
251
+
252
+ This module does not produce a song from a single button click. You enter an idea or paste a full set of
253
+ lyrics and click "Generate and open chat"; the plugin creates a music job, then opens a **new chat that is not
254
+ attached to any project** and sends the job id plus your original text as the first message. The agent in
255
+ that chat:
256
+
257
+ 1. reads the built-in **music creation guide** (style-prompt structure, the 13-point lyric QC, choosing
258
+ Suno / Mureka / MiniMax / ACE-Step, generation-setting heuristics, game loops / short cues / loudness
259
+ targets);
260
+ 2. expands and structures the prompt; if you supplied full lyrics, the lyrics are authoritative and only
261
+ line breaks, section tags and pronunciation get minimal fixes;
262
+ 3. chooses an engine and mode for the use case (Suno `chirp-v6` by default; ACE-Step for instrumentals or a
263
+ fixed BPM) and submits the generation;
264
+ 4. waits for the platform, then optionally post-processes locally and for free (trim / gain / fades /
265
+ loudnorm);
266
+ 5. posts the tool's `openUrl` as a Markdown link.
267
+
268
+ Clicking the link returns to the music page: preview (the asset route supports Range, so seeking works),
269
+ waveform, trim, gain, fades, normalization to -14 LUFS / -1 dBTP, save as a new version, and export to
270
+ MP3 / WAV / M4A (multiple outputs are zipped automatically). The original is never overwritten. Generation is
271
+ billed by Puyue AI credits; the plugin does not collect payment and never re-submits just to check status.
272
+
273
+ ### Compose mode (local MIDI; composing and previewing are free)
274
+
275
+ The New Music card has a **"Compose mode (local MIDI)"** tab. It does not ask an audio model for a song.
276
+ Instead:
277
+
278
+ 1. the agent in the chat analyses your idea: use, emotional arc, style, key and tonic, BPM, meter,
279
+ section map, instrumentation, motif;
280
+ 2. it **writes the plan in your language and shows it to you first**, then saves it with
281
+ `saveMusicScorePlan` (manual review mode stops here for confirmation);
282
+ 3. it writes a `compose.py` using [scoremill](https://github.com/CharlesCNorton/scoremill) (MIT, text
283
+ notation → MIDI), and the plugin runs it locally to produce `score.mid`;
284
+ 4. the host parses the MIDI and renders a preview with **FluidSynth + SoundFont** (or the built-in synth
285
+ when those are missing);
286
+ 5. back in the UI you can preview every version, see its waveform, download the MIDI / preview, mark it
287
+ approved, and export a score bundle (MIDI + preview + `plan.md` + `compose.py`);
288
+ 6. when you say "too loud / too slow / too many drums / the second section is too long", the agent changes
289
+ only that section; **every revision is a new version**, old versions are kept;
290
+ 7. when you are happy you can click **"Generate a Suno version from this audio (billed)"**. The plugin first
291
+ **uploads this version's preview audio** to Suno as a reference (standard upload is free), then generates a
292
+ **cover**. Suno does not accept MIDI files, but it does accept audio, so the chain is
293
+ "MIDI → rendered audio → upload → cover"; this stays much closer to your instrumentation and sections than
294
+ text tags alone. If Suno flags the audio as copyrighted, you'll be asked to confirm the paid copyright
295
+ channel. The result is still a re-performance, not note-for-note.
296
+
297
+ **Dependencies** (the plugin detects them and lets you set paths under Settings → Game Material Master →
298
+ Compose mode):
299
+
300
+ - `python3 -m pip install scoremill` — required to write MIDI;
301
+ - `fluidsynth` plus a `.sf2` (looks for `~/Library/Audio/SoundFonts/FluidR3_GM.sf2` by default) — optional,
302
+ for a better preview;
303
+ - `ffmpeg` — for MP3 conversion / export (the music module already needs it).
304
+
305
+ Composing, previewing and exporting are fully local and **do not consume Puyue AI credits**; only the final
306
+ Suno handoff is billed.
307
+
308
+ ## ⑧ Sound effects (Volcengine Seed-Audio)
309
+
310
+ This module generates directly in the UI: describe the sound, choose a format and sample rate, then click
311
+ Generate (billed).
312
+
313
+ - **Write the prompt like a dubbing director's script**: source + environment + intensity/rhythm + approximate
314
+ duration, e.g. "metal impact in heavy rain, short and forceful, about 1 second, with a slight tail". Up to
315
+ **120 seconds** per run; the API has no duration parameter, so put the length in the prompt.
316
+ - **Optional references**: one reference image (image-to-audio) or up to three reference audio clips (each at
317
+ most 30 seconds / 10MB), never both. Reference audio is addressed as `@音频1…@音频3` in the prompt.
318
+ - **One take per run**: earlier takes are never overwritten; preview, export or zip them in the UI. Failures are
319
+ not retried automatically.
320
+ - **Default model** `seed-audio-1.0`, default output WAV / 24000Hz (switchable to MP3 / Ogg Opus and
321
+ 16k / 24k / 32k / 44.1k / 48k).
322
+ - **The key is the speech console API key** (header `X-Api-Key`), **not** the Ark `ARK_API_KEY`; the
323
+ `seed-audio-1.0` model must be enabled in the speech console. "Test connection" really generates one very
324
+ short sound effect, which costs a small amount.
325
+ - Billing uses the returned `original_duration`; retries are billed again, so confirm with the user first.
326
+ - v1 does not edit audio locally (trim / fade / loudness); it only generates, previews, downloads and exports.
327
+
238
328
  ## Driving it from chat
239
329
 
240
- **Every feature of all six modules** (including the experimental rigged animation and map tiles) **is available through
330
+ **Every feature of all eight modules** (including the experimental rigged animation and map tiles) **is available through
241
331
  chat**. The plugin registers the whole pipeline as `game_material_*` tools, so an agent can drive it forward,
242
332
  wait, review, and also stop at each step for you to approve.
243
333
 
@@ -269,14 +359,22 @@ dsh plugin --profile web add /path/to/dsh-game-material-master
269
359
  ```
270
360
 
271
361
  The package is published to npm: [dsh-game-material-master](https://www.npmjs.com/package/dsh-game-material-master)
272
- (currently `0.7.0`, `latest`). It has no runtime dependencies, so `dsh plugin add` is all you need.
362
+ (currently `0.9.0`, `latest`). It has no runtime dependencies, so `dsh plugin add` is all you need.
363
+
364
+ **DSH version**: `>=0.2.0-rc.2 <0.3.0` (the `engines.dsh` field; since DSH 0.2.1 the plugin manager checks it first).
365
+ When a Web deployment uses `--public-url https://host/prefix/`, deep links and asset URLs include that path prefix.
273
366
 
274
367
  After installing, **restart DSH** (the host half is loaded at startup). The browser half is read from
275
368
  `lib/client.js` on disk on each request, so refreshing the browser is enough for it to take effect.
276
369
 
277
- **Dependencies**: `ffmpeg` / `ffprobe` must be on your `PATH` (macOS: `brew install ffmpeg`), or you can
278
- point `FFMPEG_PATH` / `FFPROBE_PATH` at absolute paths. The package has **no runtime npm dependencies** —
279
- `zod`, `cordis` and friends all resolve from DSH's own installation tree.
370
+ **Dependencies**: `ffmpeg` / `ffprobe` must be reachable. They are looked up in this order:
371
+ `FFMPEG_PATH` / `FFPROBE_PATH` environment variables → the same names in the Windows registry →
372
+ common install locations (WinGet / Scoop / Chocolatey, `C:\ffmpeg\bin`) → `PATH`
373
+ (macOS: `brew install ffmpeg`). So on Windows an ffmpeg installed but never added to `PATH` still works,
374
+ and a path set with `setx` that "still cannot be found" after a restart is normal — `setx` only writes
375
+ the registry and already running processes never inherit it, so the plugin reads the registry itself.
376
+ The package has **no runtime npm dependencies** — `zod`, `cordis` and friends all resolve from DSH's own
377
+ installation tree.
280
378
 
281
379
  > When upgrading from the older `dsh-8dir-sprites`, the first startup migrates the data directory
282
380
  > automatically and your existing projects carry over seamlessly.
@@ -299,6 +397,9 @@ point `FFMPEG_PATH` / `FFPROBE_PATH` at absolute paths. The package has **no run
299
397
  | Video model | Defaults to `MiniMax-H3` (v2 protocol); Hailuo / I2V use v1; the UCloud version of H3 is selected explicitly |
300
398
  | Base URL | Host root, without `/v1` or `/v2`. `api.minimax.cn` in mainland China, `api.minimaxi.com` internationally |
301
399
  | Default parameters | Cell width and height, frame count, pixel block size, keying threshold, and so on |
400
+ | Local ComfyUI (image-to-video) | Routes image-to-video through a local **ComfyUI** instead of MiniMax; "Test connection" is read-only and free |
401
+ | Music generation (Puyue AI) | Puyue AI API key, base URL, default music model and timeouts; "Test connection" reads one page of history and does not generate anything (no generation credits). Generation is billed by platform credits; the plugin does not collect payment |
402
+ | Sound effects (Volcengine Seed-Audio) | Speech console API key (not the Ark key), base URL, default model `seed-audio-1.0`, default format / sample rate and timeout; "Test connection" really generates one very short sound effect (small charge) |
302
403
  | Feature management | Per-module switches: a disabled module disappears from the UI **and the agent cannot call it either** (see below) |
303
404
 
304
405
  Keys are written only to `<DSH_HOME>/game-material-master/config.json` on your machine, and the UI always
@@ -320,6 +421,45 @@ Local servers usually need no API key; enter the **host root** (for example `htt
320
421
  plugin appends the protocol-specific endpoint. Hit "Test connection" to really generate one test image and
321
422
  prove the whole path works.
322
423
 
424
+ ### Local ComfyUI (image-to-video)
425
+
426
+ If you would rather not use MiniMax, or you want to run your own model, **image-to-video** can be
427
+ routed to a local [ComfyUI](https://github.com/comfyanonymous/ComfyUI): tick "Local ComfyUI
428
+ (image-to-video)" in the settings, set the address (default `http://127.0.0.1:8188`) and paste a
429
+ workflow JSON — either the API format or the UI format the editor saves directly.
430
+ Image generation, keying, frame extraction and composition are unaffected — the same downstream
431
+ pipeline as MiniMax.
432
+
433
+ - **Both formats are accepted**: the API format exported by `Workflow → Export (API)` is the most
434
+ direct; the **UI format** (top level holds `nodes` / `links` arrays) can be pasted as-is — the
435
+ plugin converts it first, and the line "converted from the ComfyUI UI format (N nodes)" shows up
436
+ under "Test connection". Notes and muted / bypassed nodes are skipped; if that JSON is so old
437
+ that its widgets carry no `widget` metadata, the plugin tells you to re-export with Save (API
438
+ Format) instead.
439
+ - **Injection points are detected automatically**: which node input receives the prompt, where the
440
+ first frame goes, and which inputs override width / height / duration / seed. The detected
441
+ bindings are shown under "Test connection". If a guess is wrong, override it by hand with
442
+ `nodeId.inputName` (for example `1.text`).
443
+ - **First frame**: an existing `LoadImage` node is used when present. Otherwise the plugin reads the
444
+ node definitions from ComfyUI and inserts a `LoadImage` at any declared-but-unwired `IMAGE` input
445
+ (for example `FreeVideoGenerate.first`).
446
+ - **The built-in template is the FreeVideo chain** (`FreeVideoGenerate` + `FreeVideoMedia` plus an
447
+ empty `LoadImage`, with the first frame wired to `FreeVideoGenerate.first` — the same wiring as the
448
+ official
449
+ [FreeVideo-All-in-One.json](https://github.com/FlashML-org/FreeVideo/blob/main/example_workflows/FreeVideo-All-in-One.json)).
450
+ Broke it? Click "Restore built-in template"; the official UI-format JSON can be pasted in too.
451
+ - The output is unchanged: ComfyUI only produces the green-screen clip — **frame extraction, keying
452
+ and composition still run locally through `ffmpeg`**.
453
+ - "Test connection" only reads the ComfyUI version, device and queue length: **no queueing, no
454
+ generation, no cost**.
455
+ - **Cookies (optional)**: ComfyUI does not authenticate on its own; a Cookie is only needed when it
456
+ sits behind a login-protected reverse proxy (Cloudflare Access, Basic Auth, and the like). Copy
457
+ the whole Cookie from your browser developer tools — the plugin normalises it into a single line
458
+ and sends it on **every** request: uploading first/last frames, submitting, polling, and fetching
459
+ the finished video.
460
+ - The local backend does **not** support multimodal reference mode (reference images / videos) —
461
+ that is a MiniMax v2 capability; use first/last-frame mode with ComfyUI.
462
+
323
463
  ### Feature management (hiding modules you do not use)
324
464
 
325
465
  Turn a module off under **Settings → Game Material Master → Feature management**; turn it back on any time.
@@ -355,7 +495,7 @@ the host side (the host has no access to the locale service), so the browser hal
355
495
  along every time it reads a project or resets prompts.
356
496
 
357
497
  Scope note: **localization covers the browser half's UI text and the built-in default prompts** — the workbench
358
- title, the six module tabs, every card's buttons and notice bars, dialogs, the settings page, the review
498
+ title, the eight module tabs, every card's buttons and notice bars, dialogs, the settings page, the review
359
499
  controls, and the default prompts. Two categories remain in Chinese, because DSH currently only exposes the
360
500
  locale service to the browser half:
361
501
 
@@ -386,7 +526,9 @@ Everything in the UI that you can click, change or approve is bilingual.
386
526
  ├── sequence-jobs/<id>/ sequence frames
387
527
  ├── rig-jobs/<id>/ rigged animation (experimental: sheet / parts / layout / rig / atlas)
388
528
  ├── tile-jobs/<id>/ map tiles (template / raw / cell / decor / map / export)
389
- └── map-jobs/<id>/ map editor (project.json / map.json / tilesets / preview / export)
529
+ ├── map-jobs/<id>/ map editor (project.json / map.json / tilesets / ai / preview / export)
530
+ ├── music-jobs/<id>/ music generation & editing (songs / versions / peaks / tools / out)
531
+ └── sfx-jobs/<id>/ sound effects (refs / takes / out)
390
532
  ```
391
533
 
392
534
  > Map tiles keep the **raw generation output** in `raw/`: after changing regularisation parameters such as
@@ -442,6 +584,10 @@ The screenshots in this document were taken by Playwright against the real UI; t
442
584
  manual dragging (neither of those steps costs anything).
443
585
  - MiniMax occasionally rejects content on moderation (about 10% in practice); just reword to a more neutral
444
586
  prompt and retry.
587
+ - **Local ComfyUI timing is unpredictable**: a job may sit in your local queue for a long time, or fail
588
+ halfway through because of VRAM. The plugin only submits and polls; the failure reason (which node,
589
+ which exception) is reported back verbatim, but model and VRAM issues have to be diagnosed in the
590
+ ComfyUI console itself.
445
591
 
446
592
  ## Credits
447
593
 
@@ -459,6 +605,17 @@ The screenshots in this document were taken by Playwright against the real UI; t
459
605
  formula and the fact that "1-based index − 1 == AsLib's chip index" come from its `AsMap.hpp`.
460
606
 
461
607
  Its code is **CC0**; this plugin re-implements the behaviour in TypeScript and **does not copy its source**.
608
+ - **The music-creation methodology is distilled from
609
+ [bitwize-music-studio/claude-ai-music-skills](https://github.com/bitwize-music-studio/claude-ai-music-skills)**,
610
+ released under **CC0-1.0** (Public Domain). This plugin only absorbs the methodology (style-prompt
611
+ engineering, lyric writing and review, Suno model selection, mastering loudness targets) and rewrites it as
612
+ a bilingual built-in guide (`src/musicguide.ts`); it does not copy the repository's code or long passages.
613
+ Original rights belong to its authors. With thanks.
614
+ - **Compose mode uses [CharlesCNorton/scoremill](https://github.com/CharlesCNorton/scoremill)** (**MIT**),
615
+ a text-notation → MIDI library. The plugin does not bundle scoremill; the built-in guide absorbs its
616
+ notation and pitfalls, and the user's/agent's `compose.py` is executed by the local Python. The product
617
+ idea also references [XIAODUOLU/Midra](https://github.com/XIAODUOLU/Midra) ("prompt-to-code MIDI,
618
+ editable, then decide whether to generate audio"). All rights remain with the original authors. With thanks.
462
619
  - ⚠️ **The `Picture/MapChip/*_pipo.png` tiles shipped in the AsLib repository belong to a third party and are
463
620
  not bundled here** (its README states "Third party content is copyrighted by its respective owners").
464
621
  The built-in tileset is generated procedurally on this machine by `scripts/make-map-sample-tileset.mjs`,
package/README.md CHANGED
@@ -4,22 +4,28 @@
4
4
 
5
5
  **从一张角色设定图出发,批量做出游戏里真正要用的素材。**
6
6
 
7
- 火山方舟 **Seedream** 负责生图,**MiniMax** 负责图生视频,抠像、抽帧、像素量化、合图全部在
8
- 本机用 `ffmpeg` 完成——不需要任何系统图像库,素材也不会被传到第三方服务。
7
+ 火山方舟 **Seedream** 负责生图,**MiniMax**(或本机 **ComfyUI**)负责图生视频,抠像、抽帧、
8
+ 像素量化、合图全部在本机用 `ffmpeg` 完成——不需要任何系统图像库,素材也不会被传到第三方服务。
9
9
 
10
10
  [![npm](https://img.shields.io/npm/v/dsh-game-material-master?color=blue)](https://www.npmjs.com/package/dsh-game-material-master)
11
11
  [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE)
12
12
 
13
+ > **🆕 0.9.0 更新**:新增第八个模块 [**音效生成**](#-音效生成火山引擎-seed-audio)(火山引擎 Seed-Audio:
14
+ > 一句话描述 → 音效 / 环境音 / 角色配音,可带参考图或参考音频,每次生成真实计费,单次最长 120 秒)。
15
+ > 上一版 0.8.0 的 **音乐生成编辑 / 谱曲模式**、地图编辑器 **AI 生成素材 / 整图**、**本地 ComfyUI**
16
+ > 与 **DSH 0.2.1** 适配继续保留。
17
+ > 完整变更见 [AGENTS.md 发布记录](https://github.com/universe-st/dsh-game-material-master/blob/main/AGENTS.md#已发布版本)。
18
+
13
19
  ![游戏素材大师 · 工作台](https://raw.githubusercontent.com/universe-st/dsh-game-material-master/main/docs/images/gmm-00-workbench.png)
14
20
 
15
21
  > **30 秒上手**:`dsh plugin --profile web add dsh-game-material-master` → 重启 DSH →
16
- > 侧栏点「游戏素材大师」→ 设置里填两个 API Key → 新建项目、上传设定图 → 点「生成转圈视频」
22
+ > 侧栏点「游戏素材大师」→ 设置里填好要用的 API Key(生图 / 视频;音效另填语音 Key)→ 新建项目、上传设定图 → 点「生成转圈视频」
17
23
  >(默认路径:角色原地匀速转一圈,再自动截出八个方向;要逐方向生图就在阶段①切一下方式)。
18
24
  >
19
- > 侧栏那个入口上还有一个**小折角菜单按钮**:点它直接弹出六个功能,一步跳进要用的那个;
25
+ > 侧栏那个入口上还有一个**小折角菜单按钮**:点它直接弹出八个功能,一步跳进要用的那个;
20
26
  > 不用的功能可以在设置里关掉(见「功能管理」)。
21
27
 
22
- 六个模块共用同一套「生成 → 验收 → 重跑」工作台。每个阶段都能**单独重做**,每份产物都能
28
+ 八个模块共用同一套「生成 → 验收 → 重跑」工作台。每个阶段都能**单独重做**,每份产物都能
23
29
  **逐项打「通过」**;「审核模式」可以选 agent 自动审完就往下走,也可以选每一步停下来等你点头。
24
30
 
25
31
  | 模块 | 做什么 | 走完能拿到 |
@@ -28,7 +34,9 @@
28
34
  | **② 图片生成** | 提示词(可带参考图)→ 出图 → 抠绿幕 | 干净透明的 PNG 立绘 / 道具 |
29
35
  | **③ 序列帧生成** | 首尾帧或参考视频 → 生成视频 → 抽帧 → 抠像 | 横向排布、可循环播放的序列帧 |
30
36
  | **⑤ 45°地图地块生成**(实验性) | 45° 等距地块 → 铺成整张地图 | 地块包(PNG)+ 地图 PNG + 布局 JSON |
31
- | **⑥ 地图编辑器**(**全本地零计费**) | 选一张素材图 → 直接画(参照 AsLib 的 RPG Map Maker 重做:一屏、纯图标、零术语;默认「地理层 / 装饰层 / 建筑层」三层且可改名换序;**标记层**:每格放一个可命名的标记,画成圆圈里的数字) | PNG + 存档 JSON(地图四周环绕、自动连接、动画地块、标记点);勾几项就导几项,多个产物自动打成一个 ZIP 下载 |
37
+ | **⑥ 地图编辑器**(**全本地零计费**) | 选一张素材图 → 直接画(参照 AsLib 的 RPG Map Maker 重做:一屏、纯图标、零术语;默认「地理层 / 装饰层 / 建筑层」三层且可改名换序;**标记层**:每格放一个可命名的标记,画成圆圈里的数字;素材窗口里还有 **AI 生成素材**:填提示词 / 名字 / 帧数 / 方式 / 用法,插件会**自动开一个新对话**去生成 —— 用哪种素材(普通 / 整格 / 拼块)由它按提示词自动判断,只让模型画**一块无缝的砖**,16 种接法 / 5 种形状与断口收口都由插件用代码拼出来(这样拼到地图上才不会有缝)。会动的素材走「拼块」(帧数 = 变体,会自动连接)或「普通」(翻页图),每张素材还能在「新增素材」里单独设自己的播放速度(不设就跟设置里的全局速度走)、**清晰度**(2K 大图缩到 32px 格子时用面积平均 / 最近邻 / 平均+锐化,细节差很多)、**循环方式**(正放 / 倒放 / 来回);另有**整图**(一张画一次占 N×M 格:雕像 / 壁画 / 地毯,右键转 90°、绿幕自动抠成透明、导入时逐格点通行区域);新建项目还能选**一格多大**(16 / 32 / 48 / 64,想让 AI 素材更清楚就用 48 / 64),模型在四周留的白框会被自动裁掉;整格只有 16 种接法、没有动画,界面里会把帧数与视频模型锁住,回来点链接这张图与用法就填在「新增素材」里) | PNG + 存档 JSON(地图四周环绕、自动连接、动画地块、标记点);勾几项就导几项,多个产物自动打成一个 ZIP 下载 |
38
+ | **⑦ 音乐生成编辑**(谱乐 AI) | 灵感提示词或完整歌词 → 自动开一个**不挂靠项目**的新对话;对话里的 agent 读内置创作指南、扩写提示词、选 Suno / Mureka / MiniMax / ACE-Step 与模式并生成 → 回界面裁剪 / 调音量 / 淡入淡出 / 标准化 → 保存版本与导出。另有**谱曲模式**:先分析想法、给出曲风/调性/段落/配器方案,再用 scoremill 写 MIDI、本地渲染试听、逐版修改,满意后可选交给 Suno 生成正式版 | MP3 / WAV / M4A(多产物可打 zip);谱曲模式另有 MIDI / 试听 / 方案 / compose.py 的乐谱包。原曲保留,编辑与谱曲结果都是新版本 |
39
+ | **⑧ 音效生成**(火山引擎 Seed-Audio) | 一句话描述声源 / 环境 / 强度 / 时长 → 生成音效、环境音、UI 声、生物吼叫或角色配音;可带 1 张参考图或最多 3 条参考音频(两者互斥);每次生成新增一条 take,旧 take 不覆盖 | WAV / MP3 / Ogg Opus;可单条导出或全部打 zip。单次最长 120 秒;每次生成真实计费 |
32
40
  | ~~④ 骨骼动画生成~~ | 拆件 → 装配 → 骨骼动画 → Spine / DragonBones 图集 | **实验性功能,本文不展示** |
33
41
 
34
42
  > 💡 **模块⑤「45°地图地块生成」的核心思路是「几何交给代码,内容交给 AI」。**
@@ -43,6 +51,8 @@
43
51
  > **属性就定下来了,之后只能删掉重来**;尺寸不用你算,留空就按图片尺寸自动识别。
44
52
  > 内置素材默认就在列表里(自带 4 张自动连接图 + 1 张道具,水自带 2 帧动画),
45
53
  > 同样可以删,删错了点「恢复默认素材」一键拿回来 —— 它的属性不允许改。
54
+ > 自己的图该怎么排?窗口右上角那颗「**素材说明**」点开是三页图文:普通图块 / 整格自动连接 /
55
+ > 拼块自动连接各一页,图上的网格会循环隐藏、显现,几列几行、第几块是哪一种接法一眼就能看出来。
46
56
  > 想让**自己的普通素材**也动,新增时选「**翻页图**」—— 像手翻书,每一行是一页;
47
57
  > 拼块自动连接素材不用设,它的变体本来就是帧,列表上直接标出「会动 N 帧」。
48
58
  > 地图大小、格子大小都能随便填(宽高各填各的);
@@ -51,7 +61,7 @@
51
61
  > 还能一键生成随机地形 / 迷宫 / 大陆。
52
62
  > **一次模型调用都没有,也就不花钱。**
53
63
 
54
- > 🏷️ **六个模块的新建都先问一个名字**:输入框里已经填好默认名(直接回车就用默认值),点取消则不会创建;
64
+ > 🏷️ **八个模块的新建都先问一个名字**:输入框里已经填好默认名(直接回车就用默认值),点取消则不会创建;
55
65
  > 地图项目还能随时「重命名」。
56
66
 
57
67
  > ⚠️ **模块④「骨骼动画生成」仍是实验性功能,尚未完善**:拆件质量取决于生图模型,自动装配与骨骼推导
@@ -86,7 +96,7 @@ flowchart LR
86
96
  界面上那一排圆圈就是八个方位的截帧位置,底下的缩略条带是整圈候选帧——对着画面拖,
87
97
  松手就重切那一张(并自动作废这个方位的行走视频与序列帧,避免新旧朝向混在一起)。
88
98
  默认位置是「从正面开始、匀速转满一圈」的等分假设;模型实际转的方向或快慢不一样时,
89
- 直接拖圆圈,或点一下「转圈方向」重排。改变候选帧数(8~64)会自动重抽,并把拖过的位置按比例换算。
99
+ 直接拖圆圈,或点一下「转圈方向」重排。改变候选帧数(8~512)会自动重抽,并把拖过的位置按比例换算。
90
100
 
91
101
  ### 也可以直接用**自己电脑上的视频**(阶段①、②都能)
92
102
 
@@ -197,9 +207,66 @@ flowchart LR
197
207
 
198
208
  ---
199
209
 
210
+ ## ⑦ 音乐生成编辑(谱乐 AI)
211
+
212
+ 这一模块不靠「点按钮直接出歌」:输入一段灵感或贴一整首歌词,点「生成并打开对话」后,插件会先建一个
213
+ 音乐任务,再开一个**不挂靠任何项目**的新对话,把任务 id 与用户原文一起发进去。对话里的 agent 会:
214
+
215
+ 1. 先读内置的**音乐创作指南**(风格提示词结构、歌词 13 点 QC、Suno / Mureka / MiniMax / ACE-Step
216
+ 的选择、生成设置经验值、游戏循环 / 短曲 / 响度目标);
217
+ 2. 扩写/结构化提示词;用户给了完整歌词时**以歌词为权威文本**,只做断句、结构标签、发音的最小修正;
218
+ 3. 按用途选引擎与模式(默认 Suno `chirp-v6`;纯音乐 / 固定 BPM 可用 ACE-Step 等),提交生成;
219
+ 4. 提交后等平台返回,按需要做**本地免费**的后期(裁剪 / 音量 / 淡入淡出 / loudnorm);
220
+ 5. 把工具返回的 `openUrl` 贴成 Markdown 链接。
221
+
222
+ 点开链接就回到音乐页:歌曲可试听(路由支持 Range,能拖进度)、看波形、裁剪、调音量、淡入淡出、
223
+ 标准化到 -14 LUFS / -1 dBTP、保存成新版本、导出 MP3 / WAV / M4A(多产物自动打 zip)。
224
+ 原曲永远保留,所有编辑结果都是新版本。生成按谱乐 AI 积分计费;插件不代收,也不会为「确认状态」重复提交。
225
+
226
+ ### 谱曲模式(本地 MIDI,谱曲/试听免费)
227
+
228
+ 新建音乐卡顶部可以切到 **「谱曲模式(本地 MIDI)」**。它不直接让 AI 出音频,而是:
229
+
230
+ 1. 对话里的 agent 先分析你的想法:用途、情绪弧、曲风、调性与主音、BPM、拍号、段落表、配器、主题动机;
231
+ 2. **先用你的语言把方案输出给你看**,再 `saveMusicScorePlan` 落盘(manual 模式会停在这里等确认);
232
+ 3. 写一份 `compose.py`([scoremill](https://github.com/CharlesCNorton/scoremill),MIT 文本记谱库),
233
+ 交给插件在本机执行,产出 `score.mid`;
234
+ 4. 宿主解析 MIDI,并用 **FluidSynth + SoundFont**(没装就用内置简易合成器)渲染试听;
235
+ 5. 回界面逐版试听、看波形、下载 MIDI / 试听、打「通过」、导出乐谱包(MIDI + 试听 + `plan.md` + `compose.py`);
236
+ 6. 你提「太吵 / 太慢 / 鼓太多 / 第二段太长」时,agent 只改对应段落,**每次修改都是新版本**,旧版保留;
237
+ 7. 满意后可以点「用这首音频生成 Suno 正式版(计费)」。插件会先把这一版的**试听音频上传**给 Suno
238
+ 作为参考(标准上传免费),再走 **cover** 生成 —— Suno 不接受 MIDI 原文件,但接受音频,所以这是
239
+ 「MIDI → 渲染音频 → 上传 → cover」的链路,比只发文字标签更贴近你的配器与段落。若 Suno 判定音频有版权,
240
+ 会提示你确认后走付费版权通道。结果仍是重新演奏,不会逐音一致。
241
+
242
+ **依赖**(设置 → 游戏素材大师 → 谱曲模式里有探测与路径输入):
243
+
244
+ - `python3 -m pip install scoremill` —— 写 MIDI 必需;
245
+ - `fluidsynth` + 一个 `.sf2`(默认找 `~/Library/Audio/SoundFonts/FluidR3_GM.sf2`)—— 更好的试听,可选;
246
+ - `ffmpeg` —— 转 MP3 / 导出(已有音乐模块也需要它)。
247
+
248
+ 谱曲、试听、导出全部在本地完成,**不消耗谱乐 AI 积分**;只有最后交给 Suno 才计费。
249
+
250
+ ## ⑧ 音效生成(火山引擎 Seed-Audio)
251
+
252
+ 音效这一模块不派给对话,界面上直接生成:写一句「要什么声音」,选格式与采样率,点「生成(计费)」。
253
+
254
+ - **提示词当导演脚本写**:声源 + 环境 + 强度/节奏 + 大致时长。例如「暴雨中的金属撞击,短促有力,
255
+ 约 1 秒,带一点尾音」。单次输出上限 **120 秒**;接口没有 duration 参数,时长只能写进提示词。
256
+ - **参考素材(可选)**:1 张参考图(图生音)或最多 3 条参考音频(每条 ≤30 秒 / ≤10MB),两者不能同时用;
257
+ 参考音频在提示词里用 `@音频1…@音频3` 引用。
258
+ - **每次生成一条 take**:旧 take 永远保留,可以在界面里逐条试听 / 导出 / 打包;失败不会自动重试。
259
+ - **默认模型** `seed-audio-1.0`,默认输出 WAV / 24000Hz(可切 MP3 / Ogg Opus 与
260
+ 16k / 24k / 32k / 44.1k / 48k)。
261
+ - **Key 是语音控制台的 API Key**(请求头 `X-Api-Key`),**不是**火山方舟的 `ARK_API_KEY`;
262
+ `seed-audio-1.0` 需要先在语音控制台开通。设置页的「测试连接」会真实生成一条极短音效,
263
+ 会产生少量费用。
264
+ - 计费按返回的 `original_duration`;重试会再计费,失败/重试前请先确认。
265
+ - v1 不做本地剪辑(裁剪 / 淡入淡出 / 响度标准化),只做生成、试听、下载与导出。
266
+
200
267
  ## 用对话驱动
201
268
 
202
- 六个模块(含实验性的骨骼动画与地图地块)的**全部功能都能通过对话调用**。插件把整条流水线注册成
269
+ 八个模块(含实验性的骨骼动画与地图地块)的**全部功能都能通过对话调用**。插件把整条流水线注册成
203
270
  `game_material_*` 工具,agent 能自己推进、等待、审查,也可以在每一步停下来让你验收。
204
271
 
205
272
  | 工具 | 作用 |
@@ -229,14 +296,19 @@ dsh plugin --profile web add /path/to/dsh-game-material-master
229
296
  ```
230
297
 
231
298
  包已发布到 npm:[dsh-game-material-master](https://www.npmjs.com/package/dsh-game-material-master)
232
- (当前 `0.7.0`,`latest`)。本包没有运行时依赖,`dsh plugin add` 拉下来即可用。
299
+ (当前 `0.9.0`,`latest`)。本包没有运行时依赖,`dsh plugin add` 拉下来即可用。
300
+
301
+ **DSH 版本**:`>=0.2.0-rc.2 <0.3.0`(`package.json` 的 `engines.dsh`;DSH 0.2.1 起插件管理器优先按它判断兼容性)。
302
+ Web 部署用 `--public-url https://host/prefix/` 时,深链接与产物地址会跟着补路径前缀。
233
303
 
234
304
  装完**重启 DSH**(宿主半区在启动时装入)。浏览器半区按磁盘上的 `lib/client.js` 现取,
235
305
  刷新浏览器即可生效。
236
306
 
237
- **依赖**:`ffmpeg` / `ffprobe` 需要在 `PATH` 上(macOS:`brew install ffmpeg`),
238
- 也可用 `FFMPEG_PATH` / `FFPROBE_PATH` 指定绝对路径。本包**没有任何运行时 npm 依赖**,
239
- `zod`、`cordis` 等全部从 DSH 自身的安装树解析。
307
+ **依赖**:`ffmpeg` / `ffprobe` 得能找到。查找顺序是 `FFMPEG_PATH` / `FFPROBE_PATH` 环境变量 →
308
+ Windows 注册表里的同名变量 → WinGet / Scoop / Chocolatey 与 `C:\ffmpeg\bin` 这类常见安装位置 →
309
+ `PATH`(macOS:`brew install ffmpeg`)。于是 Windows 上「装了 ffmpeg 却没加进 `PATH`」也能直接用;
310
+ 用 `setx` 设过路径仍提示找不到也正常——`setx` 只写注册表,已经在跑的进程继承不到,插件会自己再读一遍。
311
+ 本包**没有任何运行时 npm 依赖**,`zod`、`cordis` 等全部从 DSH 自身的安装树解析。
240
312
 
241
313
  > 从旧版 `dsh-8dir-sprites` 升级时,首次启动会自动迁移数据目录,已有项目无缝接上。
242
314
 
@@ -258,7 +330,10 @@ dsh plugin --profile web add /path/to/dsh-game-material-master
258
330
  | 视频模型 | 默认 `MiniMax-H3`(v2 协议);Hailuo / I2V 走 v1;优云智算版 H3 显式选择 |
259
331
  | Base URL | 主机根,不含 `/v1` `/v2`。国内 `api.minimax.cn`,国际 `api.minimaxi.com` |
260
332
  | 默认参数 | 单格宽高、抽帧张数、像素块边长、抠像阈值等 |
261
- | 功能管理 | 逐个开关六个模块:关掉的模块界面上不再出现,**对话里的 AI 也调不到**(见下) |
333
+ | 本地 ComfyUI(图生视频) | 勾选后图生视频改走**本机 ComfyUI**,替代 MiniMax;「测试连接」只读状态、免费 |
334
+ | 音乐生成(谱乐 AI) | 填谱乐 AI API Key、Base URL、默认音乐模型与超时;「测试连接」读一页历史,不产生生成费用。生成按平台积分计费,插件不代收 |
335
+ | 音效生成(火山引擎 Seed-Audio) | 填语音控制台 API Key(不是方舟 Key)、Base URL、默认模型 `seed-audio-1.0`、默认格式/采样率与超时;「测试连接」会真实生成一条极短音效(少量费用) |
336
+ | 功能管理 | 逐个开关八个模块:关掉的模块界面上不再出现,**对话里的 AI 也调不到**(见下) |
262
337
 
263
338
  Key 只写入本机 `<DSH_HOME>/game-material-master/config.json`,界面回显始终脱敏。
264
339
  **生图后端与模型是插件级设置,所有需要生图的模块共用**,切换后任务自动对齐新档位。
@@ -277,6 +352,36 @@ Key 只写入本机 `<DSH_HOME>/game-material-master/config.json`,界面回显
277
352
  本地服务通常不需要 API Key;地址填**主机根**(例如 `http://127.0.0.1:8188`),具体端点由插件按协议拼。
278
353
  配好点「测试连接」即可真跑一张测试图确认链路通。
279
354
 
355
+ ### 本地 ComfyUI(图生视频)
356
+
357
+ 不想用 MiniMax、或想跑自己的模型时,可以把**图生视频**这一步接到本机的
358
+ [ComfyUI](https://github.com/comfyanonymous/ComfyUI):设置页勾选「本地 ComfyUI(图生视频)」,
359
+ 填上地址(默认 `http://127.0.0.1:8188`),把工作流 JSON 贴进去即可——API 格式、或编辑器里直接
360
+ 保存的界面格式都行。
361
+ 生图、抠像、抽帧、合图完全不受影响,与 MiniMax 走同一套下游流程。
362
+
363
+ - **两种格式都收**:`Workflow → Export (API)` 导出的 API 格式最直接;编辑器里直接保存的**界面格
364
+ 式**(顶层是 `nodes` / `links` 数组)也直接粘——插件会先转成 API 格式,那句「已自动转成 API 格
365
+ 式(N 个节点)」会出现在「测试连接」下面。转换会跳过便签与静音 / 旁路节点;若那份 JSON 连控件
366
+ 值都没带 `widget` 信息(很老的 ComfyUI 版本),插件会提示你改用 Save (API Format)。
367
+ - **注入点自动探测**:提示词写进哪个节点的哪个输入、首帧图从哪进、宽高 / 时长 / 种子覆盖哪几个
368
+ 输入,插件会自己认一遍,认到的结果就显示在「测试连接」下面。认错了就手工填 `节点ID.输入名`
369
+ (例如 `1.text`)覆盖。
370
+ - **首帧图**:工作流里已经有 `LoadImage` 就直接用它;没有时插件会读 ComfyUI 的节点定义,在
371
+ 「声明了 `IMAGE` 输入却没接线」的位置(例如 `FreeVideoGenerate.first`)自动补一个 `LoadImage`
372
+ 接过去。
373
+ - **内置模板就是 FreeVideo 那条链路**(`FreeVideoGenerate` + `FreeVideoMedia` + 一个空
374
+ `LoadImage`,首帧接在 `FreeVideoGenerate.first`——与官方示例
375
+ [FreeVideo-All-in-One.json](https://github.com/FlashML-org/FreeVideo/blob/main/example_workflows/FreeVideo-All-in-One.json)
376
+ 的接法一致)。改坏了点「恢复内置模板」还原;官方那份界面格式的 JSON 也可以直接粘进来用。
377
+ - 产物照旧:ComfyUI 只负责吐出那段绿幕视频,**抽帧、抠像、合图仍然是本机 `ffmpeg` 干的**。
378
+ - 「测试连接」只读 ComfyUI 的版本、显卡与队列长度,**不排队、不生成、不产生费用**。
379
+ - **Cookie(可选)**:ComfyUI 自己不做鉴权;只有当它被挡在需要登录的反向代理后面(Cloudflare
380
+ Access、Basic Auth 之类)时才用得上。从浏览器开发者工具里把 Cookie 整段复制过来即可,插件会
381
+ 先归一化成一行,再让**每个请求**都带上它 —— 上传首尾帧图、提交、查询、取回成品视频,一个都不落。
382
+ - 本地后端**不支持「多模态参考模式」**(参考图 / 参考视频)——那是 MiniMax v2 的能力,
383
+ 走 ComfyUI 请用首尾帧模式。
384
+
280
385
  ### 功能管理(隐藏不用的模块)
281
386
 
282
387
  不用的模块可以在**设置 → 游戏素材大师 → 功能管理**里关掉,随时再打开,已有项目数据不会删:
@@ -292,7 +397,7 @@ Key 只写入本机 `<DSH_HOME>/game-material-master/config.json`,界面回显
292
397
  ## 界面语言
293
398
 
294
399
  **插件界面跟随 DSH 自身的语言设置**(设置 → 通用 → 语言),中文 / 英文都是一等公民,
295
- 切换**即时生效**、不用刷新页面:工作台标题、六个模块页签、每一张卡片的按钮、提示条、
400
+ 切换**即时生效**、不用刷新页面:工作台标题、八个模块页签、每一张卡片的按钮、提示条、
296
401
  弹窗与设置页全部跟着走。
297
402
 
298
403
  实现上不猜也不复制 DSH 的语言状态,而是接 DSH 的 `locale` 服务
@@ -306,7 +411,7 @@ Key 只写入本机 `<DSH_HOME>/game-material-master/config.json`,界面回显
306
411
  所以浏览器半区每次读项目、重置提示词时把当前语言一起带过去。
307
412
 
308
413
  范围说明:**多语言覆盖的是浏览器半区的界面文案与内置默认提示词**——工作台标题、
309
- 六个模块页签、每一张卡片的按钮与提示条、弹窗、设置页、验收控件、默认提示词。
414
+ 八个模块页签、每一张卡片的按钮与提示条、弹窗、设置页、验收控件、默认提示词。
310
415
  以下两类仍是中文,因为 DSH 目前只把 locale 服务提供给浏览器半区:
311
416
 
312
417
  - **运行日志里由宿主写入的行**(「开始生成「南 · 正对镜头」」「…生成完成,用时 12.3 秒」等)
@@ -331,7 +436,9 @@ Key 只写入本机 `<DSH_HOME>/game-material-master/config.json`,界面回显
331
436
  ├── sequence-jobs/<id>/ 序列帧生成
332
437
  ├── rig-jobs/<id>/ 骨骼动画(实验性:sheet / parts / layout / rig / atlas)
333
438
  ├── tile-jobs/<id>/ 地图地块(template / raw / cell / decor / map / export)
334
- └── map-jobs/<id>/ 地图编辑器(project.json / map.json / tilesets / preview / export)
439
+ ├── map-jobs/<id>/ 地图编辑器(project.json / map.json / tilesets / ai / preview / export)
440
+ ├── music-jobs/<id>/ 音乐生成编辑(songs / versions / peaks / tools / out)
441
+ └── sfx-jobs/<id>/ 音效生成(refs / takes / out)
335
442
  ```
336
443
 
337
444
  > 地图地块的 `raw/` 会**保留原始生成结果**:改了单元格尺寸之类的规整参数后,
@@ -380,6 +487,9 @@ T("第 {n0} 帧", { n0: index + 1 }) // 带插值,英
380
487
  - **自动装配只对「部件就是参考图上整块肢体」的素材可靠**;真实立绘走生图拆件时,
381
488
  建议用 agent 视觉先验或手工拖放校正(这些步骤都不花钱)。
382
489
  - MiniMax 偶发内容审核拒绝(实测约 10%),换一版更中性的提示词重试即可。
490
+ - **本地 ComfyUI 的耗时不可预期**:任务在本机队列里可能排很久,也可能中途显存不足失败。
491
+ 插件只负责提交与轮询,失败原因(执行到哪个节点、抛了什么异常)会原样带回界面,
492
+ 模型 / 显存层面的问题要回到 ComfyUI 自己的控制台看。
383
493
 
384
494
  ## 交流与反馈
385
495
 
@@ -401,6 +511,15 @@ T("第 {n0} 帧", { n0: index + 1 }) // 带插值,英
401
511
  「1-based 序号 − 1 == AsLib 的 chip 下标」这条对应关系,都出自它的 `AsMap.hpp`。
402
512
 
403
513
  它的代码是 **CC0**;本插件是照它的行为用 TypeScript 重写的,**没有拷贝它的源码**。
514
+ - **音乐创作方法论提炼自 [bitwize-music-studio/claude-ai-music-skills](https://github.com/bitwize-music-studio/claude-ai-music-skills)**:
515
+ 该仓库以 **CC0-1.0**(Public Domain)释出。本插件只吸收了「风格提示词工程 / 歌词写作与评审 /
516
+ Suno 模型选择 / 母带响度目标」等方法论,并结合游戏音乐用法改写为中英双语内置指南
517
+ (`src/musicguide.ts`),没有搬运原仓库的代码或长段原文。原仓库版权归其作者所有,特此致谢。
518
+ - **谱曲模式使用 [CharlesCNorton/scoremill](https://github.com/CharlesCNorton/scoremill)**(**MIT**):
519
+ 文本记谱 → MIDI 的库与记谱约定;插件不打包 scoremill,只在内置指南中吸收其用法与避坑清单,
520
+ 并由本机 Python 执行用户/agent 写的 `compose.py`。产品思路另参考
521
+ [XIAODUOLU/Midra](https://github.com/XIAODUOLU/Midra) 的「prompt-to-code MIDI、可编辑、再决定是否生成音频」。
522
+ 原仓库版权归其作者所有,特此致谢。
404
523
  - ⚠️ **AsLib 仓库里的 `Picture/MapChip/*_pipo.png` 素材属于第三方,没有打包进本插件**
405
524
  (它的 README 写明 "Third party content is copyrighted by its respective owners")。
406
525
  内置素材由 `scripts/make-map-sample-tileset.mjs` 按同样的 A2 规格在本机程序化生成。