Skip to content

Research: partial reloads for the primary weapons and pistols - #175

Closed
sunzenshen wants to merge 121 commits into
NeotokyoRebuild:masterfrom
sunzenshen:research-primary-reloads
Closed

sunzenshen wants to merge 121 commits into
NeotokyoRebuild:masterfrom
sunzenshen:research-primary-reloads

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #173 (review that first). It tracks the ZR68C PRs #172 and
#173. Its companion code is NeotokyoRebuild/neo#2290, which builds on NeotokyoRebuild/neo#2286.

Description

This research PR extends the ZR68C partial-reload assets to the other primary weapons. With the flag from
NeotokyoRebuild/neo#2286 set, each gun can reload tactically (round chambered, no bolt pull), resume after a weapon
switch at the unload or the load step, and keep a chambered round (+1).

Families: M41 / M41S / M41L, MPN45 (+ unsilenced), MX (+ silenced), ZR68-S, ZR68-L, Jitte (+ scoped), SRM (+ S), SRS,
AA13, PZ252. Both teams of every model are covered (32 compiled models).

Pistols: the MilSO and the Tachi track a chambered round with their shipped animations and sounds. Each gets a phases
file with one 3_cycle row per reload (reload, reloadempty) at the ammo credit (MilSO 1.667 s, Tachi 1.733 s), so a switch never leaves a loaded gun with an empty chamber,
from markers in viewmodels.blend; no new clips or sounds. The MilSO's sources are added for that; its compiled models
are not replaced. The Kyla is a revolver and stays as master.

What each family adds

  • Three transitions authored in viewmodels.blend: drawunloaded (draw with the old magazine gone, ends on the
    gun's own unload pose), drawtocycle (draw into the bolt or charging-handle pull), skipcycle (exit to idle after
    the load, no cycle).
  • Four glued clips per gun, named as for the ZR68C: drawunloaded_reload, drawtocycle_reload, reload_skipcycle,
    drawunloaded_reload_skipcycle. The shipped sequences are kept.
  • A phases file neo/scripts/weapon_<gun>_reload_phases.txt, written by the export from timeline markers: when each
    step counts its ammo and when each sound plays.
  • Sound pieces cut from the gun's reload sound (three to six per gun, see the table), so a resume plays only the
    sounds of the steps that remain. They are named <gun>_reload_<step>[_part<N>].wav (reload_unload,
    reload_load, reload_cycle, reload_load_part2, ...), as the ZR68C's in neoAssets#172.

How it is built

  • Only the transitions are new. The export glues them onto the shipped reload frames at the original pace; the shipped
    reload is not re-timed.
  • Each gun is re-exported from its decompiled shipped sequences. The SMDs match the decompile within 0.00004 u and
    0.01 deg; the compiled sequence lists, events, attachments and hitboxes of the shipped sequences are identical.
  • A transition moves the support hand at the pace of the original motion it stands in for (within about 10 %). The
    frame counts and the per-gun marker table (unload, join, seat, tap, exit, cycle) are in README_ANIMATOR.
  • Seams between clips are exact poses (0.0000 u / 0.000 deg). The export fails if a sound or an ammo time falls past a
    clip's end.
  • ZR68-S reuses the ZR68C choreography and sound pieces; ZR68-L retargets them to its own end poses and has its own
    pieces.

Fire times per gun

Seconds from the start of the sequence, until the gun may fire. "Master" is the reload length; the switch-back column is
master's draw plus a restarted reload.

gun reload (master) fresh tactical after unload, dry after load, dry master switch-back sound pieces
M41 family 3.700 3.233 3.767 1.900 4.500 4
MPN45 family 3.200 2.133 4.000 2.300 4.400 3
MX family 2.867 2.333 3.100 1.900 3.667 3
ZR68-S 2.700 2.167 2.700 1.733 3.500 4 (ZR68C's)
ZR68-L 2.700 2.167 2.700 1.733 3.500 4
Jitte family 3.300 2.833 3.633 2.267 4.100 3
SRM family 3.067 2.300 3.100 1.633 3.867 3
SRS 3.700 2.400 3.967 2.100 4.500 3
AA13 4.667 4.067 4.200 2.167 5.467 4
PZ252 5.767 5.133 4.767 2.000 6.567 6

A tactical reload after an unload (drawunloaded_reload_skipcycle) ends at: M41 3.300, MPN45 2.933, MX 2.567, ZR68-S/L
2.167, Jitte 3.167, SRM 2.333, SRS 2.667, AA13 3.600, PZ252 4.133 s. A tactical reload after the load is a plain draw
(0.800 s).

Notable exceptions (the support hand is within about 10 % of the original on every transition):

  • Firing hand, forearm and gun run faster than the original in the transitions where the end poses fix the path:
    drawtocycle on the MX, SRM, PZ252 and SRS; drawunloaded on the M41, MPN45, Jitte and SRS; skipcycle on the M41,
    AA13 and SRS. Factors and peaks are in each gun's README_ANIMATOR row.
  • A pace check compares every new clip, bone by bone, with the fastest motion of that bone in any shipped clip of the
    gun. Fixes from it: 4 frames more in the MPN45 drawunloaded tilt and 2 in its drawtocycle reach, 2 in the SRS
    drawtocycle reach, the PZ252 skipcycle exit moved 2 frames later (the gun no longer stops dead in the drum-latch
    jerk), the firing thumb's curl spread over the draw on the ZR68, M41, SRM and MX families, and the M41 support thumb
    held at its shipped limit in skipcycle. Phase and sound times moved with the frames. Two parts stay over the
    shipped limit, neither a hand: the MPN45 magazine in the drawunloaded draw and the ZR68 clasp02 in the
    drawunloaded tilt.
  • Withdrawn magazines and drums (Jitte, SRM, SRS, AA13, PZ252) are off screen in the shipped reload at the moment of
    the unload; drawunloaded keeps them off screen until the glued frame that matches.
  • M41S (both teams) and the Jinrai M41L have a shipped Muzzle attachment 17.15 u off; it is left as shipped and blends
    across skipcycle.
  • ZR68-L's shipped sound runs late against its motion (tap +4.1 frames, cycle +8.2); master's offsets are kept.
  • On the MPN45 and the Jitte the cycle sound sits on the join frame, which the glue does not copy, so drawtocycle
    carries its own cycle sound marker at the same time. The PZ252 latch clicks are their own sound piece.

Reviewer flags

  • SRS 5+1 after a tactical reload (master: 5). A bolt-action rifle with a round chambered is realistic, and the
    rule applies to every primary with a closed bolt.
  • A dry reload resumed after an unload ends later than a fresh reload on some guns: MPN45 by 0.800 s, Jitte 0.333,
    SRS 0.267, MX 0.233, M41 0.067, SRM 0.033, ZR68-L and ZR68-S 0. The resume is a draw plus the rest of the reload at
    the original pace. Every one of them is sooner than master's switch-back, which restarts the whole reload after a
    draw (0.400 s sooner on the MPN45, 0.467 s on the Jitte, 0.533 s on the SRS).
  • The AA13 and PZ252 resume sooner than a fresh reload.

One source per gun

  • The NSF models compile their new clips from the Jinrai sources (jinrai_GUN/glued.qci, included by both team
    .qc files), so the transitions are authored once, on the Jinrai rig. All 17 guns share, M41 and PZ252 included,
    whose team skeletons differ. The NSF authored and glued SMDs are gone (119 files, 23.6 MB).
  • Shipped NSF clips keep their own SMDs; their compiled frames move by at most 0.0094 u, because studiomdl keeps one
    compression scale per bone across a model's sequences.
  • NSF M41L: its shipped clips put Muzzle 17 u short during reloads only; the shared clips use the Jinrai position.
    The original NEOTOKYO has no M41L to compare with.

Animator tools

  • Range-of-motion limits (rom_limits.py, rom_spec.json): every rig's bones carry Blender limit constraints
    measured from the shipped clips, so a slide moves only on its rail and a hinge turns only on its axis. Widening a
    limit for a new pose is an entry with a reason in rom_widen.json.
  • Export checks (export_viewmodels.py): the export fails on any clamped pose, then writes with the limits muted,
    so exports stay byte-identical. It fails when a shipped clip changed (naming slot, frame and bone; --edit-shipped
    allows a meant change) and restores round-off-only rewrites. It warns when an authored slot moves faster than any
    shipped clip.
  • Sidebar panel (viewmodel_tools.py, loaded with blender viewmodels.blend --python viewmodel_tools.py): slot
    kind, frame range to slot, check, mute, free, widen with a reason, export the gun. The README starts with a
    "Change a transition" recipe.

What is not in it

The Supa-7 needs no asset change: its rack uses the shipped reloadend. Only the PBK56S remains; it has no viewmodels.

Test status

  • M41 family: full. Client and headless runs, Debug, Linux listen server: all 11 cases pass (fresh tactical 14 to 16,
    fresh dry 0 to 15, dry and tactical after unload, dry and tactical after load, fire held through a resume, M41S, M41L
    and NSF M41, flag 0 as master, ZR68C unchanged, headless TDM with 12 bots: PASS, 0 asserts, 0 crashes).
  • MPN45, MX, ZR68-S, ZR68-L, Jitte, SRM, SRS: all cases pass. Fresh tactical ends magazine + 1 with
    reload_skipcycle (for example MPN45 30 to 31, SRM 34 to 51); dry after unload drawunloaded_reload; dry after load
    drawtocycle_reload. MPN45 unsilenced, MX silenced, Jitte scoped and SRM-S fresh tactical; NSF MPN45 and SRS dry after
    unload. SRS: tactical after a shot and the bolt ends 6 (5 + 1); dry reload ends 5. Flag 0 MX: reload both ways,
    no + 1. Headless TDM, 12 bots, 1 round: 0 asserts.
  • AA13, PZ252: all cases pass. Fresh tactical (AA13 13 to 17, PZ252 90 to 101), dry and tactical after unload, dry
    after load, fresh dry, NSF dry after unload; flag 0 PZ252 tactical as master. The AA13 drum and PZ252 box stay off
    screen through the unloaded draw. Headless TDM, 12 bots, 1 round: 0 asserts.
  • MilSO, Tachi (chamber only): all cases pass. Spawn 12 / 15; tactical reload 9 to 13 / 12 to 16; dry
    reloadempty 0 to 12 / 0 to 15; first shot after a dry reload at the clip end with the flag on or off (about 2.1 s);
    a switch during the dry reload recovers and fires; Kyla still loads 6. Headless TDM, 12 bots, 1 round: 0 asserts.
  • Not checked: sound by ear. Not yet run in game: the pace fixes above (export and compile checks only: seams 0.0000 u,
    every sound and ammo time on a whole frame).

How to test

  1. Build NeotokyoRebuild/neo with the companion PR and this branch's neo/ content.
  2. Before loading a map, set sv_neo_reload_experimental 1. Take a gun of one family.
  3. Fire a few rounds and press reload. Switch away after the magazine has left, then back. The draw should continue with
    the load and the cycle.
  4. Reload with a round chambered. The reload should end after the load, at magazine + 1.
  5. Set the flag to 0: the gun reloads as on master.

The SRS phases file also has a charge row: the bolt-home frame (25, 0.833 s), which the code uses to count the
chambered round.

Related

sunzenshen and others added 30 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.
Move the Jinrai and NSF arm sheets from the Tachi folder to
arms/textures so every viewmodel project loads one copy. Repoint
the two Tachi Blender projects at the new location.
Let the exporter glue parts of animation slots into one sequence
(composites.txt), write the reload timings from timeline markers
into the phases file, and stop before writing any SMD when the two
team projects place a marker on different frames. Document the
animator workflow in the README.
Add one Blender project per team with the reference mesh, QC file,
composite recipe and exported animation SMDs, plus the gun preview
textures. Both projects carry the same poses and markers.
Add the studiomdl output for the Jinrai and NSF ZR68C viewmodels:
MDL, VVD and the three VTX files each.
Add the load and cycle sounds for the ZR68C reload, and the phases
file that gives each reload step its ammo and sound times, as
written by the exporter from the Blender markers.
Discovery sketch on the MVP (not for review): phases tables for
reload_partial, resume_after_1_unload and resume_after_2_load_empty,
resume keys, composites, QC lines, and the exporter's marker range
end (M3). Animations, the unload wav and the new times are
placeholders until the markers and slots are authored.
The authored slot is a one-handed draw with the magazine out, so name
it for what it shows. The glued sequence keeps its name,
resume_after_1_unload_empty, which neo's phases rows use. The re-export
gives the same SMD bytes and the same phases file.
The firing-hand thumb curls from f18 (SRM) and f12 (MX) of
drawunloaded, ending in the same pose, under the shipped thumb's
peak speed.
The four glued clips of each gun are new assets, so both team models
now compile them from the Jinrai SMDs. The glued $sequence lines move
from the shared GUN/viewmodel.qci into jinrai_GUN/glued.qci, which
both team .qc files include. A per-variant file is needed because the
M41, MPN45 and MX variants include their base gun's qci.

Jinrai models compile byte-identical. Eight NSF models change: their
glued clips now match the Jinrai compile more closely than before,
and the shipped clips move by at most 0.0094 u / 0.0057 deg (studiomdl
re-quantizes per bone over all sequences). The NSF M41L glued clips
take the Jinrai M41L Muzzle, 17.15 u from the base M41 value its NSF
SMDs carried; the shipped NSF M41L clips are unchanged.
The NSF models now compile their glued clips from the Jinrai SMDs, so
the NSF scenes of the 17 sharing guns no longer need the authored
slots drawunloaded, drawtocycle and skipcycle. Remove them and their
markers from viewmodels.blend.

The export treats an NSF project whose .qc includes the Jinrai
glued.qci as sharing: it exports only the slots its qc compiles
(skipping any other with a SKIPPED line), compares team markers on
those slots only, and leaves composites and the phases file to the
Jinrai project. viewmodels_post_export.blend drops the NSF scenes,
which would show the same glued clips as the Jinrai ones.

The whole export (38 projects) runs clean; every shipped SMD it writes
is byte-identical.
The NSF models compile their glued clips from the Jinrai SMDs, so the
NSF authored slots, glued SMDs and composites.txt of the 17 sharing
guns are unused. Delete them: 119 SMDs, 389,743 lines, 23.6 MB.

The README and the README_ANIMATOR text block now tell the animator to
author new slots on the Jinrai rig only, and describe glued.qci.

All 38 models compile byte-identical to the previous commit; the whole
export runs clean and leaves every SMD unchanged.
Each non-free bone of the 38 rigs gets ROM:loc and ROM:rot (Local
Space, Affect Transform) at its range in the gun's shipped slots plus
0.05 u / 0.5 deg, so a pose cannot bend a finger backwards or pull a
part off its rail. Gun parts are free in the melee slot. rom_limits.py
writes rom_spec.json from the keyed poses and applies it; WIDEN covers
the M41 family skipcycle pinky 06 and thumb 3, posed about 1 deg past
the shipped range on purpose.

The export now fails before writing any SMD when a limit clamps a key,
and exports with ROM:* muted: an active Local-Space constraint changes
the numbers by float round-off. All 38 projects re-export to the
committed SMDs (the Tachi's known 1e-6 drift aside).
The export rewrote every shipped SMD from the .blend, so an edit to an
original clip (or to one team only) exported without a word, and the
Tachi SMDs churned by 1e-6 of float round-off on every run. The export
now compares each shipped SMD with the file it replaced: round-off is
put back byte for byte (KEPT), a real change puts every shipped SMD
back and fails naming slot, frame and bone. --edit-shipped lets a
meant change through (SHIPPED CHANGED).

Widened limits move from the WIDEN dict in rom_limits.py to
rom_widen.json, one entry per line with its reason, so widening a limit
is a data edit. The M41 skipcycle entries move there unchanged;
rom_spec.json changes only in its note.

Checked: full 38-project export rc 0, 8 Tachi KEPT, tree byte-identical;
a Dummy01 +0.5 key in jinrai_zr68c reload f40 fails the export and the
SMDs are restored; with --edit-shipped it passes.
The export had no pace check: the overspeed in the MPN45, SRS and ZR68
resume clips was found by an offline audit. Each authored slot is now
compared with the shipped non-fire, non-melee clips of its project, and
a bone more than 10 % faster than in any of them prints a PACE WARN
with slot, bone and frames. Hands and the gun go by world speed (the
gun also by world turn), fingers by their turn on the hand, parts on
the gun by their motion on the gun. Bones that skin no vertex of
reference.smd (Dummy01, Muzzle, Eject) are skipped. A warning does not
fail the export.

Checked: on the pre-fix SMDs of 38e88cc the check reports the audit's
findings (MPN45 hand 3.83 u/f vs 3.16, body 3.78 vs 2.95, reach 17.5
deg/f vs 13.6; SRS 16.9 vs 12.4; ZR68C thumb 16.2 vs 7.5). Full
38-project export: rc 0, tree byte-identical, 3 warnings (ZR68C/S/L
clasp02).
Widening a limit meant editing Python and running two command-line
steps with Blender closed, and nothing in Blender showed whether a slot
is shipped or authored. viewmodel_tools.py adds a 3D Viewport sidebar
tab: slot kind, Frame range to slot, Check slot (selects clamped
bones), Mute/Unmute, Free selected bones, Widen to this slot (asks a
reason, writes rom_widen.json, refreshes the limits in session) and
Export gun. It is not installed: blender viewmodels.blend --python
viewmodel_tools.py loads it from the repository. The README now leads
with a change-a-transition recipe using the panel.

Checked in a real Blender 5.2.3 window (Xvfb, simulated mouse clicks
and typing) on a work copy: every button ran on a planted ZR68C
drawunloaded finger pose; Widen took the typed reason into
rom_widen.json and left 0 clamps; Export gun exit code 0.
The clasp turned about 100 deg in 4 frames at the end of drawunloaded
(27.6 deg/f on the gun), faster than the shipped draw's flip (21.7) and
flagged by the export pace check. Frames 24-30 of the ZR68C, ZR68-S and
ZR68-L drawunloaded slots are spread over 8 frames instead of 6: the
same path and end pose, the clasp now peaks at 20.7 deg/f and the hands
move about 20 % slower in that stretch. The slot is 2 frames longer, so
the glued drawunloaded_reload clips and their phase times move 2
frames (0.067 s) later; the click-to-motion offsets are unchanged.
Without any composites.txt the rebuild removed every scene and Blender
refused to remove the last one, failing an otherwise good export. Found
by the layer-10 dry run (Tachi only).
Recompile both team models of the ZR68-S, MPN45-S, MX-S, SRM-S,
Jitte-S, M41-S and M41-L with compile_viewmodels.py. The committed
models predate family sharing (e5942cf, d2a368e), so they lacked
their base gun's glued clips.

Non-variant models compile to the same size as the committed ones and
differ only in a few uninitialized pointer bytes of the .mdl, so the
committed files stay. The Tachi .vvd also differs and stays as well.

famgate (committed vs new): ZR68, MPN45, SRM and Jitte families pass.
MX fails on the Muzzle track (0.03 u against the 0.02 u bar). The M41
family fails on the M41-S and M41-L Muzzle point, 17.2 u, the known
cost of sharing the M41's glued clips.
viewmodels.blend now holds one scene per gun: the Jinrai rig and
action, with both teams' preview meshes skinned to that rig. Each
team's mesh sits in its own collection; the NSF one starts hidden.
Editing the action moves both teams' arms.

merge_teams.py does the merge. For every NSF shipped slot at four
frames, the NSF arms posed by the kept rig match the NSF rig's pose
within 0.0123 u (M41; 12 guns 0 u). SRS Release and the MilSO arms
are re-bound for the preview only; reference.smd is untouched.
With one scene per gun, the export takes the Jinrai project only. The
NSF model compiles from its shipped SMDs on disk and the Jinrai glued
clips, so it needs no export. --edit-shipped copies a changed shipped
SMD into the NSF project, so both teams play the edited clip.

rom_spec.json has one section per gun; limits narrow by at most 0.01.
The Viewmodel panel shows which team's arms are visible and flips them
with a Team button; the post-export preview carries both meshes.

Full export of all 19 guns: rc 0, 0 clamps, no SMD changed, 4 Tachi
slots KEPT. All 38 models compile byte-identical to before.
README.md and the README_ANIMATOR text block now describe one scene
per gun with both teams' arms, the Team toggle, and the NSF model that
compiles from its shipped SMDs and the Jinrai glued clips without a
scene of its own.

Re-exported jinrai_tachi to refresh the post-export file: rc 0, no
SMD changed.
The ZR68-S, MPN45-S, MX-S, SRM-S and Jitte-S have the motion of their
base gun on the shared bones in every shipped clip, so their new slots
were copies to keep in step by hand. Each variant's team qcs now
include the base's glued.qci, and its own slots, glued clips,
composites.txt and glued.qci are gone (35 SMDs, 110,555 lines).

The export treats a project whose qc includes another gun's glued.qci
as a variant: it writes the shipped slots only, warns about a new slot
left in its scene, and fills its phases file from the base's
composites with the variant's own reload markers, failing if they move
a join. Exporting a base also exports its variants.

The ZR68-L (own reload motion) and the M41-S/L (own Muzzle point in
reload) keep their own slots.

Compile check: the 5 bases and every other model byte-identical; the
variants' shipped sequences within 0.0035 u, glued within compile
noise of the base, except the intended ZR68-S drawunloaded fix (hand
0.41 u). Export rc 0, no SMD or phases file changed.
The M41-S and M41-L have the M41's motion on the shared bones in every
shipped clip, so their new slots were copies of the M41's. Their team
qcs now include the M41's glued.qci; their own slots, glued clips,
composites.txt and glued.qci are gone (14 SMDs, 48,672 lines).

Their shipped reload carries their own Muzzle point, so in the glued
clips their Muzzle now sits at the M41's, about 17 units back along
the barrel (M41-S from the reload part on, M41-L in every frame). The
glued clips do not fire. The ZR68-L remains the only gun outside a
family.

Compile check: the other 34 models byte-identical; the variants'
shipped sequences within 0.01 u / 0.006 deg (re-quantization), glued
within 0.016 u / 0.02 deg of the M41 on the shared bones, the
suppressor bone unchanged. Export rc 0, no clamp or pace warning, no
SMD or phases file changed.
Each family base scene now shows its variants' guns (silencer, scope)
on the base rig and action, so a new slot can be checked on every gun
that plays it. The team collections keep the arms; each gun is in its
own collection (BASE_gun, VARIANT_gun), one shown at a time through
the Variant dropdown of the Viewmodel panel or the Outliner eye. The
MPN45 lists mpn_s as the game default.

variant_preview.py builds this once. Variant-only parts are weighted
to their nearest base bone at the variant's rest pose, as the game
holds them in the glued clips, so no bone is added to the base rig.
The variant gun matches its own scene within 0.025 u in every shared
shipped slot. The new objects have export off: a full export of the
19 projects leaves every SMD and phases file unchanged, and all 38
models compile byte-identical.
@sunzenshen

Copy link
Copy Markdown
Contributor Author

Split up into the PR stack starting with: #176

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