Skip to content

Sketch: M41 and MilSO reload resume as data - #174

Closed
sunzenshen wants to merge 26 commits into
NeotokyoRebuild:masterfrom
sunzenshen:sketch-zr68c-m41-milso
Closed

sunzenshen wants to merge 26 commits into
NeotokyoRebuild:masterfrom
sunzenshen:sketch-zr68c-m41-milso

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Description

Sketch, not for review. This draft adds M41 and MilSO resume-after-unload assets in the ZR68C MVP layout (#172), to test whether a new weapon is data only. It has not been run in game. The Blender projects are rebuilt from research sources by a script, not animator-made, and the sounds are placeholders.

The branch contains the MVP commits. The notes below describe only what it adds.

What it adds

  • M41: jinrai_mosok41/ and nsf_mosok41/ (.blend, reference and 15 SMDs, QC +1 $sequence, one-line composites.txt), weapon_mosok41_reload_phases.txt, four placeholder wavs, compiled v_{jinrai,nsf}_mosok41.
  • MilSO: jinrai_milso/ and nsf_milso/ (.blend, 20 SMDs, QC +2 $sequence, two-line composites.txt), weapon_milso_reload_phases.txt (4 tables: tactical and dry, each with a resume), one placeholder wav, compiled v_{jinrai,nsf}_milso.
  • Exporter: unchanged. Both teams export with a 0.0000 u join gap; studiomdl compiles with no warnings.

Open items

Listed in the README "Sketch status" section and the phases-file comments:

  • Real base Blender projects with an animator pass (arm previews, a real draw-up transition).
  • Slot names for a gun with two reload families (..._transition, ..._empty_transition).
  • Ship the recompiled base models (needs the byte and skin compare done for the ZR68C), or add only the resume.
  • Replace the placeholder sounds.

Related

sunzenshen and others added 26 commits November 7, 2026 18:50
A viewmodel source folder may list sequences made of parts of other
animations, such as a transition followed by the rest of the reload.
The export writes each one as another SMD, so the .blend authors only
the new motion and the compiled sequence still plays from frame 0.
The 15 shipped sequences in the Tachi layout, plus a draw_resume_drop
slot: the draw, then the reach to the reload frame 30 pose (34 frames).
composites.txt joins it with reload from frame 31 into
draw_resume_drop_dry, the draw that resumes a reload after the
magazine has dropped.
Same 16 slots and composite as the Jinrai project, on the NSF arms.
Recompiled from the new project: the 15 shipped sequences match the
original model within 0.019 u and 0.048 deg on every frame, plus
draw_resume_drop_dry (85 frames, no activity).
Recompiled from the new project: the 15 shipped sequences match the
original model within 0.022 u and 0.047 deg on every frame, plus
draw_resume_drop_dry (85 frames, no activity).
Pieces of the ZR68 reload sound, each starting just before its first
transient, for a reload that resumes after the magazine has dropped.
Describe what draw_resume_drop_dry is, how composites.txt builds it
from the transition slot and reload, and the steps to add another
resume clip.
Add a timeline marker at reload frame 30, the pose the
draw_resume_drop slot ends on, as a note for animators. Blender Source
Tools ignores markers: all 17 exported SMDs per model are
byte-identical with and without it.
Rename the resume marker to reload:resume_insert and add timeline
markers for the reload's credit and sound frames, plus a
README_ANIMATOR text block with the rules an animator needs. The
exported SMDs are byte-identical.
composites.txt can join at a timeline marker (reload@resume_insert-).
A small pose gap at the join is eased over the last 3 frames instead of
failing; a gap over 0.5 u or 2 deg still fails. Timing markers are
shifted into each composite and written to reload_phases.txt, and
--script checks the weapon script rows against them, so an animator
only places markers and the times follow.

All ZR68C SMDs stay byte-identical; the rows in weapon_zr68c.txt pass
the check.
neo/scripts/weapon_zr68c_reload_phases.txt holds the ZR68C
ReloadPhases rows, which neo's weapon script includes with #base. The
export rewrites every credit and sound time in it from the timeline
markers, so the times follow the animation; a row without a marker, or
team projects that disagree, fail the export. It replaces the
per-model reload_phases.txt and the --script check.

The sound times move to whole frames: 1.394/1.829/2.129 become
1.400/1.833/2.133. All SMDs are byte-identical.
Move the Jinrai and NSF arm images from tachi/textures/ to
arms/textures/ so every viewmodel project loads one copy. The
Blender projects point at the new path; SMDs, QCs and compiled
models are unchanged.
Rename the reload vocabulary so every layer uses the same names: steps
1_unload, 2_load and 3_cycle (the number belongs to the step type), the
authored clip resume_after_1_unload and its glued sequence
resume_after_1_unload_empty (as in reloadempty), timing markers .ammo,
.sound and .sound2, and sound files named after their step.

A step marker reload:STEP is the default join of a resume clip;
reload:1_unload.join keeps the current join at f30. The export now fails
when a resume lists its own step or an earlier one, so a resume never
replays an earlier step's sound.

SMDs are identical apart from the file names; the models differ only in
the resume sequence name and the checksum.
Drop the reload:STEP.ammo markers: they always sat on the step
marker's frame. The export reads a row's ammo time from the step
marker, so the animator places one marker fewer per step. Exported
SMDs and the phases file are unchanged.
Mark reload:4_ready at f80, where the support hand is back on the
handguard, and end resume_after_1_unload_empty there instead of at
reload's last frame. A composite range may now end at a marker. The
resume finishes when its clip ends, so fire is allowed one frame
earlier; ammo and sound times are unchanged.
Move reload:4_ready from f80 to f68, where the bolt is released. The
support hand's return after it is silent and is left to the blend
into idle, so the resume ends, finishes and allows fire there. The
glued sequence is 72 frames; ammo and sound times are unchanged.
Glue the resume to reload's last frame again, so the support hand
returns at the original pace. The phases file gets a 4_ready key,
written by the export from the reload:4_ready marker: the reload is
done and fire is allowed there, and a shot interrupts the rest.

Retime the resume tilt (resume_after_1_unload f24-33) to 6 frames,
the pace of reload's own return to the join: support hand mean 3.70
against 3.72 units per frame. The draw part and the end pose are
unchanged; later times move 0.1 s earlier.
The export fails when a sequence's 4_ready comes before one of its
sounds has finished playing (its wav length from the time neo starts
it). The ZR68C cycle sound ends at 2.454 s into the resume, so
reload:4_ready moves from f68 to f74 (2.467 s).
Cut each piece from the original reload sound so it starts where neo
plays it: its marker's whole-frame time minus the 0.02 s lead. Every
click now plays at its time in the original sound; before, the
pieces played 24-26 ms late. The piece ends and the 10 ms edge fades
are unchanged.
Move reload:4_ready from f74 to f81, reload's last frame, where the
support hand is back on its grip: the resume allows fire when the
hands are at rest, as master's reload does at its end. The export
check (after the last sound) still holds: 2.700 s against 2.450 s.
Drop reload:4_ready, the phases file's 4_ready key and composite
range ends by marker: the resume plays to reload's last frame, where
the hands are at rest, and fire is allowed when it ends. The export
check now fails when a sound plays past its sequence's last frame.
A row's "resume" key now names the sequence the draw plays when a
switch interrupts the reload after that step, so neo no longer
hardcodes the resume name and each reload kind can name its own.
The fresh reload gets its 2_load row: the magazine counts at the
seat (f40), and a switch after it keeps the full magazine. Its sound
stays the single reload wav, as on master.

The authored slot is renamed resume_after_1_unload_transition, so the
bare name stays free for the non-empty glued clip (Source style:
_empty is the dry one). SMDs and compiled models are byte-identical.

The export now fails when a resume key sits on another step's row or
names no exported sequence, and when an ammo time is not before its
sequence's last frame.
Sketch, not a product. M41 viewmodel sources in the ZR68C MVP
layout: step markers, a placeholder transition slot taken from the
research glued draw clip, phases file, and placeholder sound pieces
cut earlier for the research branch.
Sketch, not a product. MilSO sources in the ZR68C MVP layout with
a tactical and a dry family: markers, placeholder transition slots,
phases file, a placeholder seat sound, compiled models.
@sunzenshen

Copy link
Copy Markdown
Contributor Author

Closing in favor of #192

@sunzenshen sunzenshen closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant