Skip to content

Partial reloads 06: Add the ZR68C reload after magazine detach animation - #179

Closed
sunzenshen wants to merge 2 commits into
stack/reload-zr68c/20-zr68c-sourcesfrom
stack/reload-zr68c/30-mvp
Closed

sunzenshen wants to merge 2 commits into
stack/reload-zr68c/20-zr68c-sourcesfrom
stack/reload-zr68c/30-mvp

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

When the ZRC reload is interrupted after detaching the magazine, swapping back to the ZRC resumes the reload at the fresh magazine insert step.

Demo:

sc-3-dry-unload.mp4

Partial reloads 06. This PR adds the first reload-resume animation for the ZR68C, used by
NeotokyoRebuild/neo#2293: with sv_neo_reload_experimental 1, a ZR68C reload interrupted after the unload step
continues on the next draw. The draw brings up the fresh magazine, seats it and pulls the bolt.

It is layer 06 of a stack and builds on #177 (05: the ZR68C sources), #196 (04), #195 (03), #194 (02) and #176 (01: the Blender layout and tools).
Next: #178 (07) adds the resume after the load (drawtocycle), #180 (08) the bolt-cycle clips (skipcycle).

With the flag at 0 nothing plays the new animation, but the game loads the recompiled ZR68C models instead of the
original ones, so the flag-off change is measured below.


Overview of Changes

  • Tool: glue.py, which the export from Partial reloads 01: Move the Tachi animation sources into a consolidated Blender project #176 runs when present: it writes the glued clips of a project's
    composites.txt, sets the reload phase times from the timeline markers, rebuilds the preview
    viewmodels_post_export.blend (both teams' arms, relative image paths). NSF compiles its new clips from the
    Jinrai project's glued.qci; no sharing code remains.
  • New slot: drawunloaded in the jinrai_zr68c scene, a one-handed 33-frame draw (f0-32) with the magazine
    out, ending on the pose of reload at f30 (marker reload:1_unload.join). The one scene serves both teams.
  • Markers: on reload in the jinrai_zr68c scene: 1_unload f21, 1_unload.join f30, 2_load f40 with its two
    sounds (f39, f52), 3_cycle f68 with its sound (f61).
  • Resume sequence: drawunloaded_reload = drawunloaded + reload f31-81, 84 frames (2.767 s), written by the
    export from the one line of jinrai_zr68c/composites.txt. Both team QCs include jinrai_zr68c/glued.qci, so both
    models compile the Jinrai clip.
  • Phases file: neo/scripts/weapon_zr68c_reload_phases.txt, the ReloadPhases rows neo's weapon script includes
    with #base. reload: 1_unload 0.700 s (resume drawunloaded_reload), 2_load 1.333 s.
    drawunloaded_reload: 2_load 1.400 s (sounds 1.367 s, 1.800 s), 3_cycle 2.333 s (sound 2.100 s).
    The export writes every time from the markers.
  • Sounds: zr68_reload_load.wav, zr68_reload_load_part2.wav (the tap after loading) and
    zr68_reload_cycle.wav, cut from the reload sound at its quiet gaps, for the neo entries
    weapon_zr68.reload_<step>[_partN]. The resume plays them as pieces, because the single reload sound cannot
    start part way.
  • Compiled models: v_jinrai_zr68c and v_nsf_zr68c, the 15 shipped sequences plus drawunloaded_reload.
  • README: the Team toggle, glued clips, the resume section (naming, markers and times, preview) and the
    neo-side files; the README_ANIMATOR text block gains the ZR68C marker table.

How to Review

  • The text carries the change: glue.py, composites.txt, glued.qci, the two QC lines, the phases file and the
    README. The SMDs, models and both .blend files are generated or binary; the gates below check them.
  • viewmodels.blend changes only in the drawunloaded slot and the ZR68C markers; the Tachi scenes are as in Partial reloads 01: Move the Tachi animation sources into a consolidated Blender project #176.
  • Commits: glue.py; the resume clip with its sources, phases file, sounds and README; the compiled models; "Drop the team sharing code from glue.py".

Why one glued resume sequence, not a runtime join

A runtime join (a transition clip, then reload started at the resume frame) showed a hold of about 85 ms and then a
skip at the join, from how the engine updates a predicted viewmodel's sequence, and saved only about 3.9 KB per model.
The resume sequence duplicates the reload frames instead.

Checks (measured)

Blender 5.2.3 with Blender Source Tools, Source SDK Base 2013 MP studiomdl.exe under Wine.

check result
export jinrai_tachi jinrai_zr68c rc 0; no shipped SMD changed; 4 KEPT; 0 clamps; the post-export blend is unchanged on a second export
join SEAM drawunloaded_reload seam gap 0.0000 u, 0.000 deg: the ease changes nothing; f33-83 are reload's own frames
pace of drawunloaded against the shipped clips PACE jinrai_zr68c 1 authored slots, 0 warnings
sounds end before the clip READY for all three pieces (ends 1.617 s, 1.867 s, 2.517 s; clip 2.767 s)
compare with the layer before the merge no SMD, QC, phases, wav or model differs
compile all four projects rc 0; the models equal the committed ones byte for byte
compiled ZR68C vs the original NEOTOKYO models 52 / 52 bones; the 15 shipped sequences keep frames and fps; Jinrai max 0.0185 u / 0.048 deg, NSF 0.0216 u / 0.047 deg (as in #177)
in game, layer 06 assets in the neo#2293 build (flag 1) drawunloaded_reload after the unload: clip 0 to 30 at +1.815 s, fill at +3.225 s (draw +1.410), end at draw +2.83; load, part2 and cycle pieces once each; cancel before the unload: plain draw; flag 0: plain draw, fresh reload 0 to 30 (master); HUD dim 30, Tachi 15, dim 30, bright 30 with 2 magazines; 1 baseline assert
phases file in neo#2293 headless dedicated server, 1-round TDM with flag 1: PASS, 0 asserts, no ReloadPhases warning (a bad row in a test copy does print one)
in game, neo#2293 flag 1 (models equal to these, bone compare 0.0000 u) switch after the unload: drawunloaded_reload, clip 0 to 30 at 1.41 s after the draw, fire allowed at its end; switch before the unload, flag 0, fire held: as on master's code paths

Flag-off change

  • The 15 shipped sequences keep their frame counts, fps, activities, fades and events, within the bone numbers above.
  • Bones, attachments, hitboxes, textures, materials and skins are unchanged.
  • The models are MDL v48 recompiles of the original v44 files. The .vvd stores a different bind pose, which the
    bind matrices offset; the posed frames match as above. There is no .xbox.vtx, which the PC game does not load.

How to Test

  1. Load a build with Partial reloads 06: Resume a ZR68C reload after the magazine is unloaded neo#2293.
  2. With sv_neo_reload_experimental 0 (set it before loading a map), take a ZR68C on each team. Draw, fire, reload and idle should look as
    they do today.
  3. With the neo PR's default (sv_neo_reload_experimental 1 while the stack is reviewed), take a ZR68C, press reload, switch to the secondary
    after the magazine drops out (about 0.7 s in), and switch back. The draw should run into the magazine insert
    without a pop, then seat and pull the bolt with sound.
  4. Optional: open viewmodels_post_export.blend, scene jinrai_zr68c, slot drawunloaded_reload, to see the clip
    as the game plays it. The Team toggle shows the NSF arms.

Known limits

  • One resume point (after 1_unload). Layers 07 and 08 add the resume after 2_load and the cycle clips.
  • The resume ends at 2.767 s, 0.067 s after master's reload (2.700 s): drawunloaded (33 frames) is 2 frames
    longer than the reload f0-30 it replaces, for a slower magazine clasp flip.

Related

glue.py adds glued clips, the reload phases file, the post-export
preview and team sharing to the export. The ZR68C gains the authored
drawunloaded slot and the glued drawunloaded_reload clip (Jinrai
source, shared by NSF through glued.qci), its phases file, three
sound pieces cut from the reload sound, and compiled models for both
teams.
With one scene per gun there is no NSF scene to compare, skip or
share: the NSF model compiles the Jinrai glued clips through
glued.qci. glue.py loses the team checks and the SKIPPED and SHARED
paths. The post-export preview now holds both teams' arms, like
viewmodels.blend, and keeps its image paths relative.

Export jinrai_tachi jinrai_zr68c: rc 0, no clamp, seam 0.0000 u, no
SMD or phases change. The models compile byte-identical to the
committed ones.
@sunzenshen sunzenshen changed the title Partial reloads 03: Add the ZR68C reload-resume clip Partial reloads 03: ZR68C after unloading magazine, interrupt and resume reload Nov 9, 2026
@sunzenshen sunzenshen changed the title Partial reloads 03: ZR68C after unloading magazine, interrupt and resume reload Partial reloads 03: Add the ZR68C reload after magazine detach animation Nov 9, 2026
@sunzenshen
sunzenshen force-pushed the stack/reload-zr68c/20-zr68c-sources branch from 51ab288 to 8977e66 Compare November 10, 2026 02:07
@sunzenshen
sunzenshen force-pushed the stack/reload-zr68c/30-mvp branch from dfc322d to 48197ed Compare November 10, 2026 02:07
@sunzenshen sunzenshen changed the title Partial reloads 03: Add the ZR68C reload after magazine detach animation Partial reloads 06: Add the ZR68C reload after magazine detach animation Nov 10, 2026
@sunzenshen
sunzenshen marked this pull request as ready for review November 10, 2026 04:44
@sunzenshen
sunzenshen marked this pull request as draft November 13, 2026 03:51
This was referenced Nov 13, 2026
@sunzenshen

Copy link
Copy Markdown
Contributor Author

Closing to clear the board in favor of the PR stack of sunzenshen#25

@sunzenshen sunzenshen closed this Nov 14, 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