diff --git a/docs/item-data.md b/docs/item-data.md
index d107adb528..a04cc78b09 100644
--- a/docs/item-data.md
+++ b/docs/item-data.md
@@ -1610,7 +1610,7 @@ drawing hands the look.
| `kind` | `texture`: the mesh's own texture, or the layer's; `reflection`: a reflection that moves over the mesh (chrome); `flatColor`: the mesh in the light alone, without a texture |
| `motion` | How a reflection moves: `slowDrift` (left out), `fastSweep`, `followsLight`, `swirl`, `strongSwirl`, `stripes`, `verySlowDrift`, `oilSheen`, `stillShine` |
| `where` | Where a reflection goes: `over` the texture (left out), or `underHoles`: on a mesh whose texture has holes, drawn before the texture, solid and on both faces, so it fills the holes (the Magic Gladiator sets); over a texture without holes, a glowing mesh and a see-through item it goes over with its blend. A look with such a layer draws mesh by mesh, every layer of a mesh before the next mesh, and the layer leaves the light as it found it |
-| `blend` | `normal` (left out), `glow` (added to what is below), `asDrawing` (the drawing's own: a doppelganger draws see-through) |
+| `blend` | `normal` (left out), `glow` (added to what is below), `darken` (darkens what is below, the Pumpkin of Luck's reflection), `asDrawing` (the drawing's own: a doppelganger draws see-through) |
| `meshes` | Left out: every mesh, with the model's texture scripts, without the item's hidden mesh; `"allEvenHidden"`: every mesh, the hidden one too; `[0, 2]`: those meshes; `{"allBut": [2]}`: every mesh but those; `"none"`: no mesh, a layer that draws nothing, the default of a layer the values of some items turn on |
| `texture` | A texture file under `Data` (`Effect/Chrome01.jpg`) instead of the mesh's own: a `.jpg` or a `.tga`, which the game reads from its `.OZJ` or `.OZT` file |
| `light` | The light the layer is drawn in: `[red, green, blue]`, or `{"tint": [red, green, blue]}`, the item's light times those; each a number or a shape. `{"brightness": 0.8}` is the item's light scaled so its brightest channel is 0.8 (a grey for a black light). It stays for the layers after it, and `{"tint": [1, 1, 1]}` is the item's light again. Left out: the light the layer before left |
@@ -1653,7 +1653,10 @@ item's value times the shape (`"timesItem": true`), as the Phoenix Soul items
pulse their own opacity and glow strength. Its numbers give the
code's values exactly, so a look moved from code keeps them:
`{"shape": "wave", "from": -0.2, "to": 1, "seconds": 6.283185}` is the
-code's `sin(WorldTime * 0.001f) * 0.6f + 0.4f`.
+code's `sin(WorldTime * 0.001f) * 0.6f + 0.4f`. A layer's opacity, glow
+strength or scroll can also be the item's value times a fixed number,
+`{"itemTimes": 1.5}`, as the Cursed Castle Water glows at 1.5 and 0.25 of
+the item's.
| Shape | Fields | Value |
|---|---|---|
@@ -1720,6 +1723,53 @@ look (a layer's `"drawing"`; the Devil's Eye draws at 2), and
update puts on the item's object, which the ground item's next draw adds to
its light (the Devil's Eye's pulse). A field of an entry can be one each
item sets, which the model entry sets in `itemEffectValues`.
+`animationSpeed` plays the item object's animation in the update at that
+speed, as the Cursed Castle Water's ground item moves; without it the update
+plays none.
+
+`onBones` lists the **things** an item effect creates on the item's bones in
+every update, from the item's pose in that update: sprites, particles,
+lightning and effects of the effect catalogue, each by its name there (the
+**Effect Browser** lists them) with a `subType` number.
+
+```json
+{"name": "wingOfStorm", "onBones": [
+ {"sprite": "cloud64", "subType": 1, "bones": [9, 20, 19], "scale": 0.5, "rotation": {"shape": "scroll", "perSecond": 10}},
+ {"together": {"bones": [11, 21, 29], "chance": {"oneIn": 2, "per": "once"}},
+ "things": [{"effect": "fenrirThunder", "subType": 1, "color": [0.6, 0.6, 0.9], "chance": {"oneIn": 20, "draw": "plain"}}]}]},
+{"name": "wingsOfDarkness", "onBones": [
+ {"together": {"between": [[30, 22], [29, 21]], "chance": {"oneIn": 1}},
+ "things": [{"joint": "jointThunder", "subType": 14, "scale": 20},
+ {"joint": "jointSpirit", "subType": 4, "reversed": true, "scale": 25}]}]}
+```
+
+An entry is one thing, named by its kind (`"sprite"`, `"particle"`,
+`"joint"` for lightning, `"effect"`), with its places and values; or a group,
+`"together"` with the places and the chance its `"things"` share, so they
+come together (the Wings of Darkness' two lightnings strike at once).
+
+| Field | Values |
+|---|---|
+| `bones` | The bone numbers of the item's model the thing is created at, each once a frame; 0 to 199 |
+| `between` | Lightning only: pairs of bones, `[from, to]`, 0 to 199, the lightning goes from the first to the second |
+| `at` | `"origin"`: once at the item object's own place (Rena's spark) |
+| `subType` | The SubType the type is created with, 0 to 1000 (left out: 0) |
+| `scale` | A number or a shape (left out: 1) |
+| `color` | `[red, green, blue]`, each a number or a shape: a sprite's color, the light of a particle, lightning or effect |
+| `rotation` | A sprite's rotation in degrees, a number or a shape |
+| `reversed` | Lightning from the second bone of each pair to the first |
+| `chance` | `{"oneIn": N}`, N from 1 to 10000: once in N frames at the game's reference frame rate, the same at any frame rate; `"draw": "plain"`: a plain random draw each update, as the monster sounds draw theirs; `"per": "once"`: one roll for the entry instead of one for each bone or pair. A thing inside a group can roll its own chance after the group's (the Wing of Storm's thunder), once each time the group's holds, so it has no `"per"` |
+
+An entry names exactly one of `bones`, `between` and `at`. The checks:
+**fatal** a thing of an unknown kind, lightning at bones or a thing that
+isn't lightning between bones, places named twice or not at all, a bone,
+SubType or `oneIn` out of its range, a chance without `oneIn`, `"per"` on
+the chance of a thing inside a group; **error** a type the effect catalogue
+doesn't have (it is not created, and the game logs it when it loads its
+data); **warning** a bone an item's model doesn't have (about that item:
+nothing is created at it, nor lightning of a pair with it). The things are created as the game moves them, so they look as in
+the game; the Devil's Key's and Invitation's sparks sit on their bones as
+the item is scaled, as every other thing on bones.
### Shared models
@@ -2194,12 +2244,48 @@ The picked look shows:
change over time.
- The items that use the look; a click selects one.
-A picked **item effect** shows, instead of parts and layers, its entries
-**Before drawing** in their order (**Add**, **Remove**, **Move up**, **Move
-down**), each with its Only when, the item values it sets (no light), the
-drawing's opacity, the level the item glows like and Each item sets, and the
-**Object light** as the last line. Its preview runs the edited effect on the
-picked item; Apply, Revert and the problems work as for a render style.
+A picked **item effect** shows, instead of parts and layers, its lines: its
+entries **Before drawing** in their order, each with its Only when, the item
+values it sets (no light), the drawing's opacity, the level the item glows
+like and Each item sets; the **Object light**; the **Animation speed**; and
+its entries **On bones**. **Add** beside Before drawing and beside On bones
+adds an entry to that list, and **Copy**, **Move up**, **Move down** and
+**Remove** change the picked one. An entry on bones has:
+
+- where its things go: **At bones**, **Between bones** (lightning, from the
+ first bone of a pair to the second) or **At the item's place**, with its
+ bones as number fields (**+ Bone**, **+ Pair**, `x` takes one out);
+- its **Chance**: **Once in** so many frames, drawn **At the game's frame
+ rate** or **Plain**, and **Once for all** bones or pairs;
+- **Together**, a group whose things share the entry's places and chance,
+ each thing with **Its own chance**;
+- each thing's **Kind**, its **Type** from the effect catalogue (a list with
+ a filter), **SubType**, **Scale**, **Color**, a sprite's **Rotation** and
+ lightning's **From the second bone to the first**.
+
+The views of the preview show the things on bones **live**: each view runs
+its own effect (the item's, the chosen look, the edited one) in the game's
+own effect lists, so they move and fade as in the game, and the views can be
+compared. They are created at your character's place, which the world
+doesn't draw them at, and each view draws only its own. **Stop time** stops
+them too: lightning and particles hold still, sprites and lights follow the
+time slider. A view creates nothing while the game's effect lists are
+nearly full, so the game's own effects come first. The Item Model window's
+preview shows them too.
+
+**Show bones**, beside Stop time, draws the item's skeleton over each view:
+each bone a dot joined by a line to the bone it hangs on, with its number and
+name when the mouse points at it. The picked entry's bones are orange with
+their numbers, its pairs joined from start to end, and a bone the mouse
+points at in the entry's fields is ringed. **Pick in the preview**, above the
+entry's fields, makes a click on a bone's dot add the bone or take it out;
+between bones, click the start of the lightning, then its end, which adds the
+pair or, when the entry has it, takes it out. Armor has no bones of its own
+there: it is drawn on the character's skeleton, and the game creates nothing
+on bones for it.
+
+Its preview runs the edited effect on the picked item; Apply, Revert and the
+problems work as for a render style.
Each change of the looks or their folders is a step of the item undo history
and reaches the game at once. **Save Items** writes
diff --git a/docs/superpowers/specs/2026-11-01-looks-in-data-design.md b/docs/superpowers/specs/2026-11-01-looks-in-data-design.md
index 53bacfedd0..2cf9a1434a 100644
--- a/docs/superpowers/specs/2026-11-01-looks-in-data-design.md
+++ b/docs/superpowers/specs/2026-11-01-looks-in-data-design.md
@@ -98,6 +98,15 @@ Made while reviewing sven-n/MuMain#915, 2026-11-01.
| L48 | The glow values on the ground (Q-L36, 2026-11-08) | **They pulse everywhere.** `ItemObjectAttribute` sets the glow values of L27 on every drawing of a held, worn or inventory item, but once at the drop for a ground item, so a pulsing or random glow freezes on the ground at the value of the drop. As item values before the drawing (item effects, L27) they apply on every drawing, so ground items pulse like held ones: a quirk fix in its own commit, with the recorder's expected differences and an in-game before/after (L16). Rejected: a condition that keeps the drop's value on the ground, and leaving the 39 item types in code for a later step. |
| L49 | Item values before the shadow (Q-L37, 2026-11-08) | **The shadow pass applies the item effect's values first.** A held item's shadow (`RenderPartObjectEffect`, `RenderBodyShadow`) reads the hidden mesh before the item effect runs; with the hidden meshes of L27 in an item effect (the Rune Blade, Elemental Mace and Elemental Shield hide mesh 2, the Dragon Spear mesh 1), the shadow pass applies the item values first, so their shadows stay as today. Items whose item effect hides a mesh by level (the siege potion, the contract, the life stone) then hide it in a shadow too; they cast none in play. Rejected: keeping the four hidden meshes in `ItemObjectAttribute`. |
| L50 | Where part models are edited (Q-L38, 2026-11-10) | **In the Item Model window's list.** A group "Part models" after the item groups lists the 11 entries of `PartModels.json` (L28); picking one shows a note on where the game draws it, its Model file (file and texture folders), the mesh list and its render style with "Open in Style Editor", edited like a shared model, with the preview. It has no inventory, ground, glow or item effect. Rejected: listing part models with a look's users in the Style Editor only (file and folders hand-edited), and no editor in pull request 3. |
+| L51 | How the preview shows things on bones (Q-L39, 2026-11-11; FX1.7c) | **The game's own effect lists, marked for a preview.** The things a previewed item effect creates (sprites, particles, lightning, effects) are made by the game's own create calls into its effect lists and moved by its own update, so they behave as in the game. In editor builds each of them carries a mark of the view it belongs to: the world's draw loops (`RenderEffects`, `RenderParticles`, `RenderJoints`, `RenderSprites`, `RenderAfterEffects`) skip marked ones, `CullEffects` counts them as seen, and the view's capture draws only its own, with the view's camera. Not chosen: a copy of the lists per view swapped in each frame (costly, random sequences to save), sprites only (lightning, particles and the Storm's thunder missing), and showing the item on the character in the world (no side-by-side preview). |
+| L52 | Which preview views show things on bones (Q-L40, 2026-11-11) | **Each view its own.** Every view of the Style Editor's preview (as applied, as edited) keeps its own copy of the item object with its own bones, creates its own things from its own look and draws only those, so an edited look is seen next to the one applied. Two views use about twice the slots of the game's effect lists. Not chosen: only the edited view (no comparison), and a checkbox per view to turn them off. |
+| L53 | Where the preview's item stands (Q-L41, 2026-11-11) | **At the player's character.** The hidden preview item of each view is placed at the character's position, as the effect browser's world preview places its owner, so what its things read from the world (ground height, light) is real, as for the item in the game; the world does not draw them (L51). Not chosen: the map's origin corner (odd ground reads), and high above the character (falling particles fall far). |
+| L54 | Things on bones while the preview's time stops (Q-L42, 2026-11-11) | **They stop too.** While a view's time is stopped, the game's update skips that view's things and the view creates none; sprites and lights, made from the clock each frame, follow the slider; moving the slider does not wind lightning or particles back. Not chosen: running on with the game's time, and hiding them while time is stopped. |
+| L55 | How things on bones name their bones (Q-L43, 2026-11-11) | **One entry, a list of bones.** An entry of an item effect's things on bones (`"onBones"`) names its bones as a list (`"bones": [22, 23, 25]`), and lightning as a list of pairs, from and to (`"between": [[30, 22], [29, 21]]`); the entry's values hold for each of them. The 11 looks take about 25 entries. Not chosen: one entry per bone (about 200 entries), and named bone groups in the look (no two entries share a list today). |
+| L56 | Chances of things on bones (Q-L44, 2026-11-11) | **A chance per entry, and groups that share one.** A chance is `{"oneIn": N}`, once in N frames at the game's reference frame rate (`rand_fps_check`), or with `"draw": "plain"` the other draw (`Random::Rand() % N == 0`), as the monster sounds write it; `"per"` says whether it rolls for each bone or pair, or once for the entry. A `"together"` group holds bones (or pairs) and a chance that its things share, so the Wings of Darkness' two lightnings strike together; a thing inside can roll again, as the Storm's thunder does. All 11 looks are copied exactly. Not chosen: a chance per bone only (two looks change), and named chances in the look. |
+| L57 | The Devil's Key's and Invitation's sparks (Q-L45, 2026-11-11) | **On the bones, fixed.** The two items placed their sparks at bones without the model's scale (`SpawnDevilsKey`, `SpawnDevilsInvitation`), about a quarter farther from the item's center than the bones on the ground (scale 0.8). Their entries place them on the scaled bones like every other thing on bones; the old position is an expected difference with an in-game before and after, as the quirks of L16. Not chosen: an entry flag `"unscaledBones"` only these two would use. |
+| L58 | Picking bones in the Style Editor (Q-L46, 2026-11-11) | **Click them in the preview.** An entry's bones are number fields; the bone under the mouse in the list is ringed in the preview with its number, and "Show bones" draws every bone of the previewed model as a dot with its number on hover. A pick mode adds or removes a bone by clicking its dot; lightning pairs are picked by clicking two bones, from and to. Not chosen: the marks without picking, and numbers only. |
+| L59 | The item's value times a number (Q-L47, 2026-11-11) | **`{"itemTimes": 1.5}`.** A layer's opacity, glow strength or scroll can be the item's value times a fixed number, as the Cursed Castle Water glows at 1.5 and 0.25 of the item's; the Style Editor's "the item's" gets a factor field. Not chosen: a wave from 1.5 to 1.5 times the item's (a wave that doesn't wave), and keeping its drawing in code. |
## Current state
@@ -549,6 +558,76 @@ unknown glow color (L30).
- **Data Checks** (L23, L24): the new areas Render styles and Item effects;
the graphics area renamed Graphics look.
+### 7a. The live preview of things on bones (FX1.7c, step 2)
+
+From the survey of 2026-11-11 (main `9b50e946a`) and L51 to L54. In editor
+builds only; the game's own code paths stay as they are.
+
+- **Where it runs in the frame.** Sprites live one update: `UpdateActiveScene`
+ clears them first (`SceneManager.cpp:487`), and the editor's previews are
+ recorded after the world's draw (`SceneManager.cpp:1241`). So each view's
+ item creates its things in a new editor hook inside the game's update,
+ after `ClearSprites` and the world's moves, from the view's own copy of the
+ item object and its own bones (L52), at the character's position (L53),
+ through the same `SpawnPartObjectEffect` the game uses. The editor's own
+ `Update` runs before `ClearSprites` and is too early.
+- **The mark.** Each slot of the effect, particle, joint and sprite lists
+ carries the view it belongs to (none for the game). The world's draw loops
+ skip marked slots; `CullEffects` counts a marked effect as seen, so its
+ children are created as in the game (`UpdateEffectModelEffects` creates them
+ only for effects the last cull saw). Particles carry no owner, so what a
+ spawn creates is found by comparing the lists before and after it. A slot keeps
+ its mark while its view keeps the thing in it; each create call takes the
+ mark off the slot it fills, so a thing the game creates in a slot a view's
+ thing just left (the game's own lightning of the same type) stays the
+ game's.
+- **The capture.** A view draws only its own slots, after its item, with the
+ view's camera put into `g_Camera` around it (`SaveCameraPerspective` /
+ `RestoreCameraPerspective`), the draw-time frustum tests of particles and
+ lightning off, and its own sprite marks (the world's per-frame marks would
+ hide sprites the world drew).
+- **Time.** While a view's time is stopped, the game's moves skip its slots
+ from the view's draw on (so lightning that lives a frame stops as it is),
+ and it creates only its sprites; a view that has made nothing yet makes
+ its whole effect once, to stop on (L54).
+- **The Item Model window.** Its preview is a view of its own too, beside
+ the Style Editor's three (asked for on 2026-11-13), with the item effect
+ its item runs; it has no stopped time.
+- **When they go.** A view's things are removed when its look, item, level or
+ pose changes, when the view closes, when the map changes
+ (`OnWorldClearing`) and when the editor closes; as the world preview
+ does it (`EffectPreviewTracker`), with the things that follow them.
+- **Room in the lists.** The game comes first: a view creates nothing while
+ a list has fewer than a quarter of its slots free, and the views together
+ use at most a quarter of each list.
+- **Sounds and random numbers.** Things a view creates play no sound (as the
+ world preview mutes them). They draw from the game's random sequences as
+ in the game; the preview is an editor tool, and the recorder's tests pin
+ the sequences anyway.
+- **cppcheck.** `ZzzEffectJoint.cpp` and `zzzeffectsprite.cpp` are checked
+ as whole files once they change, so they are checked first.
+
+### 7b. Things on bones in the item effect file (step 3)
+
+From the survey of 2026-11-11 (main `9b50e946a`) and L55 to L57. The 9
+item effects and the bone parts of `pumpkinOfLuck` and `cursedCastleWater`
+(L29) move; `helperNpcPlate` lights the helper NPC, not an item, and moves
+with the monsters' looks (MN8).
+
+- **Kinds.** `"sprite"`, `"particle"`, `"joint"` (lightning) and
+ `"effect"` (the Storm's `fenrirThunder`), each by its FX1 name with a
+ `"subType"` number (D30); all names the 11 looks use are in the catalogue.
+- **Values.** Scale, color (`"light"` for effects), sprite rotation; each a
+ number or a shape of section 2 (wave, bounce, scroll are used). Offsets
+ from the bone are allowed (none of the 11 uses one).
+- **Places.** `"bones"` or `"between"` (L55), or `"at": "origin"` for the
+ item object's own place (`rena`).
+- **Copied as they are, no special fields:** the Wing of Illusion's last light
+ sits at bone 33 (the old code reused the last loop's bone); the Pumpkin of
+ Luck's sprites repeat the wave of the object light the look sets (both come
+ from the same clock); the Cursed Castle Water's animation speed is a field
+ of the item effect (L29).
+
### 8. The move and its proof
Looks move by building block (L17), in the pull requests of section 9. Each
@@ -611,7 +690,7 @@ Answered one by one, each with the current state, every option with an
example, and a recommendation.
Answered: Q-L1 (L7), Q-L2a (L8), Q-L2b (L9, L10), Q-L2c (L11), Q-L3 (L12),
-Q-L4a (L13), Q-L4b (L14), Q-L4c (L15), Q-L5a (L16), Q-L5b (L17), Q-L6a to Q-L6c (L18 to L20), Q-L7a and Q-L7b (L21, L22), Q-L8 (L23), Q-L12 (L24), Q-L9 (L25), Q-L10 (L26), Q-L11 (L27), Q-L13 (L28), all on 2026-11-01; Q-L14 (L29), Q-L15 (L30) and Q-L16 (L31) on 2026-11-03; Q-L17 (L32) on 2026-11-04; Q-L18 (L33) and Q-L19 (L34) on 2026-11-05; Q-L20 (L35), Q-L21 (L36), Q-L25 (L37), Q-L22 (L38), Q-L23 (L39) and Q-L24 (L40) on 2026-11-06; Q-L26 and Q-L27 (L41), Q-L28 to Q-L30 (L42) and Q-L31 (L43) on 2026-11-07; Q-L32 (L44), Q-L33 (L45), Q-L34 (L46), Q-L35 (L47), Q-L36 (L48) and Q-L37 (L49) on 2026-11-08; Q-L38 (L50) on 2026-11-10. All questions are answered.
+Q-L4a (L13), Q-L4b (L14), Q-L4c (L15), Q-L5a (L16), Q-L5b (L17), Q-L6a to Q-L6c (L18 to L20), Q-L7a and Q-L7b (L21, L22), Q-L8 (L23), Q-L12 (L24), Q-L9 (L25), Q-L10 (L26), Q-L11 (L27), Q-L13 (L28), all on 2026-11-01; Q-L14 (L29), Q-L15 (L30) and Q-L16 (L31) on 2026-11-03; Q-L17 (L32) on 2026-11-04; Q-L18 (L33) and Q-L19 (L34) on 2026-11-05; Q-L20 (L35), Q-L21 (L36), Q-L25 (L37), Q-L22 (L38), Q-L23 (L39) and Q-L24 (L40) on 2026-11-06; Q-L26 and Q-L27 (L41), Q-L28 to Q-L30 (L42) and Q-L31 (L43) on 2026-11-07; Q-L32 (L44), Q-L33 (L45), Q-L34 (L46), Q-L35 (L47), Q-L36 (L48) and Q-L37 (L49) on 2026-11-08; Q-L38 (L50) on 2026-11-10; Q-L39 (L51), Q-L40 (L52), Q-L41 (L53) Q-L42 (L54), Q-L43 (L55), Q-L44 (L56), Q-L45 (L57), Q-L46 (L58) and Q-L47 (L59) on 2026-11-11.
## Tasks
@@ -622,9 +701,9 @@ The design, then the pull requests of L26 and L27:
2026-11-03.
2. [x] Pull request 0, the design: this document, for review (#954).
3. [x] Pull request 1, the mesh list (L21, L22) and the names of L24 (#970).
-4. [ ] Pull request 2, step 1 part 1: the machinery, the Style Editor, L17's
+4. [x] Pull request 2, step 1 part 1: the machinery, the Style Editor, L17's
groups 1 and 2 without the six render styles of L33.
-5. [ ] Pull request 3, step 1 part 2: L17's groups 3 to 5 (#915 is
+5. [x] Pull request 3, step 1 part 2: L17's groups 3 to 5 (#915 is
merged), with `ItemObjectAttribute`'s glow values (L27), and the part
models with the 3 looks of `RenderModelWithoutStyle` (L28), and the
shines below +3 and the Deadly Staff's glow pass as glow data (L30),
diff --git a/src/Localization/Editor.de.resx b/src/Localization/Editor.de.resx
index cd343e486a..a4a6e04b54 100644
--- a/src/Localization/Editor.de.resx
+++ b/src/Localization/Editor.de.resx
@@ -673,6 +673,12 @@
Addiert ihr Licht zu dem, was vor ihr gezeichnet wurde: Helles leuchtet, Dunkles bleibt durchsichtig.
+
+ Abdunkeln
+
+
+ Dunkelt ab, was vor ihr gezeichnet wurde, nach ihrem Licht: eine dunkle Ebene wirft einen Schatten.
+
Überblendet, wie die Zeichnung des Gegenstands es wählt, wie seine eigene Textur.
@@ -5383,4 +5389,145 @@
Ein Gesprächsschritt nennt diesen Satz: er bleibt.
+
+ Auf Knochen
+
+
+ Jeder Eintrag erzeugt seine Dinge in jedem Update auf den Knochen des Items: an jedem Knochen, zwischen jedem Knochenpaar (Blitze, vom ersten zum zweiten) oder am Ort des Items selbst. Die Ansichten der Vorschau zeigen sie live, jede aus ihrem eigenen Look.
+
+
+ Animationsgeschwindigkeit
+
+
+ Wie schnell das Update die Animation des Items abspielt, wie sich das Bodenitem Cursed Castle Water bewegt; ohne spielt es keine.
+
+
+ Sprite
+
+
+ Partikel
+
+
+ Blitz
+
+
+ Effekt
+
+
+ Was erzeugt wird: ein Sprite (lebt ein Bild lang), ein Partikel, ein Blitz zwischen zwei Knochen oder ein Effekt.
+
+
+ Typ
+
+
+ Der Typ mit seinem Namen im Effektkatalog (der Effekt-Browser listet sie).
+
+
+ Typ wählen
+
+
+ Filter
+
+
+ Der SubType, mit dem der Typ erzeugt wird; der Code des Typs liest ihn.
+
+
+ Die Größe des Dings, eine Zahl oder eine Form.
+
+
+ Die Drehung des Sprites in Grad, eine Zahl oder eine Form.
+
+
+ Vom zweiten Knochen zum ersten
+
+
+ Der Blitz läuft vom zweiten Knochen jedes Paars zum ersten.
+
+
+ An Knochen
+
+
+ Zwischen Knochen
+
+
+ Am Ort des Items
+
+
+ Wo die Dinge des Eintrags erzeugt werden: an jedem seiner Knochen, zwischen jedem seiner Knochenpaare oder einmal am Ort des Item-Objekts.
+
+
+ Ein Knochen des Item-Modells mit seiner Nummer; die Vorschau umkreist ihn, solange die Maus hier ist.
+
+
+ + Knochen
+
+
+ + Paar
+
+
+ x
+
+
+ In der Vorschau wählen
+
+
+ Ein Klick auf den Punkt eines Knochens in einer Ansicht fügt den Knochen hinzu oder nimmt ihn heraus; zwischen Knochen erst den Anfang des Blitzes klicken, dann sein Ende.
+
+
+ Jetzt das Ende des Blitzes ab Knochen {0} klicken.
+
+
+ Knochen zeigen
+
+
+ Zeichnet jeden Knochen des gezeigten Items als Punkt; zeigt man auf einen, erscheinen seine Nummer und sein Name.
+
+
+ Dieses Item wird auf dem Skelett des Charakters gezeichnet: das Spiel erzeugt keine Dinge auf Knochen dafür.
+
+
+ Chance
+
+
+ Ohne Chance kommt das Ding in jedem Update.
+
+
+ Einmal in
+
+
+ Einmal in so vielen Bildern.
+
+
+ Ziehung
+
+
+ Bei der Bildrate des Spiels
+
+
+ Einmal in N Bildern bei der Referenz-Bildrate des Spiels, gleich bei jeder Bildrate.
+
+
+ Einfach
+
+
+ Eine einfache Zufallsziehung in jedem Update, wie die Monstergeräusche ziehen: bei höherer Bildrate öfter.
+
+
+ Einmal für alle
+
+
+ Würfelt einmal für den Eintrag, nicht für jeden Knochen oder jedes Paar.
+
+
+ Zusammen
+
+
+ Die Dinge des Eintrags teilen seine Orte und seine Chance, sodass sie zusammen kommen (die zwei Blitze der Wings of Darkness); ein Ding darin kann danach eine eigene Chance würfeln.
+
+
+ + Ding
+
+
+ Eigene Chance
+
diff --git a/src/Localization/Editor.en.resx b/src/Localization/Editor.en.resx
index 66b55681da..c2eb9945e6 100644
--- a/src/Localization/Editor.en.resx
+++ b/src/Localization/Editor.en.resx
@@ -760,6 +760,12 @@
Adds its light to what is drawn before it: bright places glow, dark ones stay see-through.
+
+ Darken
+
+
+ Darkens what is drawn before it by its light: a dark layer makes a shadow.
+
Blends as the item's drawing chooses, as the item's own texture does.
@@ -5665,4 +5671,145 @@
A talk step names this set: it stays.
+
+ On bones
+
+
+ Each entry creates its things on the item's bones in every update: at each bone, between each pair of bones (lightning, from the first to the second) or at the item's own place. The preview's views show them live, each from its own look.
+
+
+ Animation speed
+
+
+ How fast the update plays the item's animation, as the Cursed Castle Water's ground item moves; without one it plays none.
+
+
+ Sprite
+
+
+ Particle
+
+
+ Lightning
+
+
+ Effect
+
+
+ What is created: a sprite (it lives one frame), a particle, lightning between two bones, or an effect.
+
+
+ Type
+
+
+ The type by its name in the effect catalogue (the Effect Browser lists them).
+
+
+ Pick a type
+
+
+ Filter
+
+
+ The SubType the type is created with; the type's code reads it.
+
+
+ The thing's scale, a number or a shape.
+
+
+ The sprite's rotation in degrees, a number or a shape.
+
+
+ From the second bone to the first
+
+
+ The lightning runs from the second bone of each pair to the first.
+
+
+ At bones
+
+
+ Between bones
+
+
+ At the item's place
+
+
+ Where the entry's things are created: at each of its bones, between each of its pairs of bones, or once at the item object's own place.
+
+
+ A bone of the item's model by its number; the preview rings it while the mouse is here.
+
+
+ + Bone
+
+
+ + Pair
+
+
+ x
+
+
+ Pick in the preview
+
+
+ A click on a bone's dot in a view adds the bone or takes it out; between bones, click the start of the lightning, then its end.
+
+
+ Now click the end of the lightning from bone {0}.
+
+
+ Show bones
+
+
+ Draws every bone of the previewed item as a dot; pointing at one shows its number and name.
+
+
+ This item is drawn on the character's skeleton: the game creates no things on bones for it.
+
+
+ Chance
+
+
+ Without a chance the thing comes in every update.
+
+
+ Once in
+
+
+ Once in this many frames.
+
+
+ Draw
+
+
+ At the game's frame rate
+
+
+ Once in N frames at the game's reference frame rate, the same at any frame rate.
+
+
+ Plain
+
+
+ A plain random draw in each update, as the monster sounds draw theirs: more often at a higher frame rate.
+
+
+ Once for all
+
+
+ Rolls once for the entry, not for each bone or pair.
+
+
+ Together
+
+
+ The entry's things share its places and its chance, so they come together (the Wings of Darkness' two lightnings); a thing inside can roll a chance of its own after it.
+
+
+ + Thing
+
+
+ Its own chance
+
diff --git a/src/MuEditor/Core/MuEditorCore.cpp b/src/MuEditor/Core/MuEditorCore.cpp
index 73fcec83e6..35bf5e725e 100644
--- a/src/MuEditor/Core/MuEditorCore.cpp
+++ b/src/MuEditor/Core/MuEditorCore.cpp
@@ -19,6 +19,7 @@
#include "Core/Input/SyntheticInput.h"
#include "../Config/MuEditorConfig.h"
#include "../MuEditor/UI/Colors/MuColorsUI.h"
+#include "../MuEditor/UI/StyleEditor/BoneThingsPreview.h"
#include "../MuEditor/UI/StyleEditor/MuStyleEditorUI.h"
#include "../MuEditor/UI/Common/MuEditorCenterPaneUI.h"
#include "../MuEditor/UI/DataChecks/MuDataChecksUI.h"
@@ -57,6 +58,7 @@
#include "GameLogic/Monsters/MonsterModelChanges.h"
#include "Render/Items/ItemEffects.h"
#include "Render/Items/ItemRenderStyles.h"
+#include "Core/Utilities/EffectSpawnHook.h"
#include "Core/Utilities/WorldClearing.h"
#include "Core/Utilities/StringUtils.h"
#include "World/MapInfra/MapManager.h"
@@ -495,9 +497,17 @@ void CMuEditorCore::ConnectGameHooks()
// The effect browser shows what loaded each model and texture; the
// records take the map of the moment from the map manager.
Core::AssetLoadWorld::SetSource([] { return gMapManager.WorldActive; });
- // The effect browser's world preview removes its objects before the game
- // clears its pools.
- Core::WorldClearing::SetListener([] { g_MuEffectBrowserUI.OnWorldClearing(); });
+ // The effect browser's world preview and the Style Editor's views remove
+ // their objects before the game clears its pools.
+ Core::WorldClearing::SetListener(
+ []
+ {
+ g_MuEffectBrowserUI.OnWorldClearing();
+ MuEditor::Looks::g_BoneThingsPreview.OnWorldClearing();
+ });
+ // The Style Editor's views create their items' things on bones in the
+ // game's update (design section 7a).
+ Core::EffectSpawnHook::SetListener([] { MuEditor::Looks::g_BoneThingsPreview.Update(); });
// The game's key reads leave out what is pressed in the editor's own windows.
Core::Input::SetOtherWindowQuery([](int virtualKey) { return g_MuEditorCore.IsWithEditorWindow(virtualKey); });
// The cloth of worn pants keeps data of its model's slot: it goes before
diff --git a/src/MuEditor/UI/EffectBrowser/EffectPreviewScene.cpp b/src/MuEditor/UI/EffectBrowser/EffectPreviewScene.cpp
index f8bd118224..81b24bcc17 100644
--- a/src/MuEditor/UI/EffectBrowser/EffectPreviewScene.cpp
+++ b/src/MuEditor/UI/EffectBrowser/EffectPreviewScene.cpp
@@ -135,7 +135,8 @@ PreviewFraming EffectPreviewScene::Prepare(const EffectPreviewRequest& request)
return {CenterOf(min, max), std::max(RadiusOf(min, max), MinFramingRadius)};
}
-void EffectPreviewScene::Draw(const EffectPreviewRequest& request, const EffectPreviewCamera& camera, float aspect)
+void EffectPreviewScene::Draw(const EffectPreviewRequest& request, const EffectPreviewCamera& camera, float aspect,
+ const std::function& afterItem)
{
const SavedGameRenderState savedState;
mu::IMuRenderer& renderer = mu::GetRenderer();
@@ -154,6 +155,8 @@ void EffectPreviewScene::Draw(const EffectPreviewRequest& request, const EffectP
DrawBase(request, RadiusOf(extent.min, extent.max));
if (request.showOn == PreviewShowOn::Item)
DrawItem(request);
+ if (afterItem)
+ afterItem();
DrawSubject(request, camera);
CoverAlpha(camera, aspect);
@@ -262,28 +265,23 @@ void EffectPreviewScene::DrawBase(const EffectPreviewRequest& request, float sub
// the scale it has on the ground: turned as it lies on the ground, or upright
// as the inventory turns it, facing the camera. The item's own sprites,
// particles and effects are removed again.
-void EffectPreviewScene::DrawItem(const EffectPreviewRequest& request)
+PreviewItemModels PreviewItemModelsOf(const EffectPreviewRequest& request)
+{
+ return request.modelSlot >= 0 ? PreviewItemModels{request.modelSlot, request.modelSlot, 0}
+ : GetPreviewItemModels(request.itemType, request.itemLevel);
+}
+
+void PosePreviewItem(const EffectPreviewRequest& request, const PreviewItemModels& models, float turnDegrees, OBJECT& o,
+ vec34_t* bones)
{
- const PreviewItemModels models = request.modelSlot >= 0 ? PreviewItemModels{request.modelSlot, request.modelSlot, 0}
- : GetPreviewItemModels(request.itemType, request.itemLevel);
- if (!models.CanDraw())
- return;
- // Armor is drawn with its own meshes on the bones of the skeleton; both
- // keep their fields.
BMD& b = Models[models.skeleton];
- const ScopedModelState savedSkeleton(b);
- const ScopedModelState savedModel(Models[models.model]);
const Render::Items::Display::GroundDisplay ground = Render::Items::Display::GetGroundDisplay(models.model);
-
- CHARACTER item;
- OBJECT* o = &item.Object;
- o->Type = models.model;
- ItemObjectAttribute(o);
- o->LightEnable = false;
- item.Class = CLASS_ELF;
+ o.Type = models.model;
+ ItemObjectAttribute(&o);
+ o.LightEnable = false;
if (ground.scale)
- o->Scale = *ground.scale;
- Vector(0.0f, 0.0f, 0.0f, o->Position);
+ o.Scale = *ground.scale;
+ Vector(0.0f, 0.0f, 0.0f, o.Position);
b.CurrentAction = 0;
if (request.itemPose == PreviewItemPose::Inventory)
{
@@ -296,20 +294,37 @@ void EffectPreviewScene::DrawItem(const EffectPreviewRequest& request)
float sceneMatrix[3][4];
float root[3][4];
AngleMatrix(inventoryAngle, inventoryMatrix);
- InventoryViewToScene(m_turnDegrees, sceneMatrix);
+ InventoryViewToScene(turnDegrees, sceneMatrix);
R_ConcatTransforms(sceneMatrix, inventoryMatrix, root);
b.BodyHeight = inventory.bodyHeight;
- b.Animation(BoneTransform, 0.0f, 0.0f, 0, o->Angle, o->HeadAngle, true, false, root);
+ b.Animation(bones, 0.0f, 0.0f, 0, o.Angle, o.HeadAngle, true, false, root);
}
else
{
- Vector(ground.rotation[0], ground.rotation[1], ground.rotation[2] + m_turnDegrees, o->Angle);
+ Vector(ground.rotation[0], ground.rotation[1], ground.rotation[2] + turnDegrees, o.Angle);
b.BodyHeight = ground.bodyHeight;
- b.Animation(BoneTransform, 0.0f, 0.0f, 0, o->Angle, o->HeadAngle, false, false);
- if (request.itemGroundPlane)
- {
- DrawGroundUnderItem(models.model);
- }
+ b.Animation(bones, 0.0f, 0.0f, 0, o.Angle, o.HeadAngle, false, false);
+ }
+}
+
+void EffectPreviewScene::DrawItem(const EffectPreviewRequest& request)
+{
+ const PreviewItemModels models = PreviewItemModelsOf(request);
+ if (!models.CanDraw())
+ return;
+ // Armor is drawn with its own meshes on the bones of the skeleton; both
+ // keep their fields.
+ BMD& b = Models[models.skeleton];
+ const ScopedModelState savedSkeleton(b);
+ const ScopedModelState savedModel(Models[models.model]);
+
+ CHARACTER item;
+ OBJECT* o = &item.Object;
+ item.Class = CLASS_ELF;
+ PosePreviewItem(request, models, m_turnDegrees, *o, BoneTransform);
+ if (request.itemPose == PreviewItemPose::Ground && request.itemGroundPlane)
+ {
+ DrawGroundUnderItem(models.model);
}
vec3_t light = {1.0f, 1.0f, 1.0f};
diff --git a/src/MuEditor/UI/EffectBrowser/EffectPreviewScene.h b/src/MuEditor/UI/EffectBrowser/EffectPreviewScene.h
index 480dea8263..337113a667 100644
--- a/src/MuEditor/UI/EffectBrowser/EffectPreviewScene.h
+++ b/src/MuEditor/UI/EffectBrowser/EffectPreviewScene.h
@@ -3,11 +3,14 @@
#ifdef _EDITOR
#include "EffectPreviewCamera.h"
+#include "EffectPreviewItems.h"
#include "EffectPreviewSubject.h"
+#include "Core/Globals/_types.h"
#include "Data/GameData/EffectData/EffectKind.h"
#include
+#include
#include
class OBJECT;
@@ -71,6 +74,15 @@ struct EffectPreviewRequest
bool turn = true;
};
+// The models the scene draws the item of `request` with.
+PreviewItemModels PreviewItemModelsOf(const EffectPreviewRequest& request);
+
+// Poses the item of `request` as the scene draws it, turned by `turnDegrees`: its object at the origin (the model's
+// type, ItemObjectAttribute, the scale and angle of the pose) and the bones of `models.skeleton` in `bones`. The model
+// fields it sets (the action, the body height) are the caller's to keep (ScopedModelState).
+void PosePreviewItem(const EffectPreviewRequest& request, const PreviewItemModels& models, float turnDegrees, OBJECT& o,
+ vec34_t* bones);
+
// Where the camera looks and the size of what it shows.
struct PreviewFraming
{
@@ -91,8 +103,16 @@ class EffectPreviewScene
PreviewFraming Prepare(const EffectPreviewRequest& request);
// Draws `request` as `camera` sees it, at the aspect width / height of
- // the view. Leaves the game's render state as it was.
- void Draw(const EffectPreviewRequest& request, const EffectPreviewCamera& camera, float aspect);
+ // the view, running `afterItem` (if set) right after the item, with the
+ // view's matrices. Leaves the game's render state as it was.
+ void Draw(const EffectPreviewRequest& request, const EffectPreviewCamera& camera, float aspect,
+ const std::function& afterItem = {});
+
+ // How far the turn has turned the item, in degrees.
+ float GetTurnDegrees() const
+ {
+ return m_turnDegrees;
+ }
// The PreviewNote flags of the effect's object.
std::uint16_t GetObjectNotes() const
diff --git a/src/MuEditor/UI/EffectBrowser/EffectPreviewTracker.cpp b/src/MuEditor/UI/EffectBrowser/EffectPreviewTracker.cpp
index 153ce5d223..ddefcfde4f 100644
--- a/src/MuEditor/UI/EffectBrowser/EffectPreviewTracker.cpp
+++ b/src/MuEditor/UI/EffectBrowser/EffectPreviewTracker.cpp
@@ -4,6 +4,8 @@
#include "EffectPreviewTracker.h"
+#include "Render/Effects/ZzzEffect.h"
+
#include
#include
#include
@@ -75,6 +77,12 @@ int SlotOf(std::span