Skip to content

Partial reloads 09: Add the ZR68-S as a ZR68C family variant - #181

Closed
sunzenshen wants to merge 2 commits into
stack/reload-zr68c/50-cyclefrom
stack/reload-zr68c/55-zr68-family
Closed

sunzenshen wants to merge 2 commits into
stack/reload-zr68c/50-cyclefrom
stack/reload-zr68c/55-zr68-family

Conversation

@sunzenshen

@sunzenshen sunzenshen commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Description

Organizes the Blender project such that families of weapons that share the exact same animations can be synced when the animation is edited on one, with changes propagating to the others. The ZRC and ZRS share the same animation family, but the ZRL is significantly different so that one is not included.

Demos:

zr68s-tactical-keeps-chambered-round.mp4
zr68s-dry-reload-chamber-at-bolt.mp4

Partial reloads 09: add the first gun family, the ZR68C with the ZR68-S as its variant. Used by NeotokyoRebuild/neo#2295,
which gives the ZR68-S reload phases.

It is layer 09 of a stack and builds on #180 (08: the chambered round), #178 (07), #179 (06), #177 (05), #196 (04), #195 (03), #194 (02) and
#176 (01). Next: 10 (#182, the ZR68-L). The neo flag sv_neo_reload_experimental is 1 by default while the stack is
reviewed.


Overview of Changes

  • Gun families (tools): the ZR68-S has the ZR68C's motion on the shared bones in every shipped clip, so it
    compiles the ZR68C's glued clips instead of copies of its own. A gun is a variant when its team .qc files include
    another gun's ../jinrai_BASE/glued.qci. export_viewmodels.py then:

    • writes the variant's shipped slots only; a new slot left in its scene prints FAMILY WARN and is not exported;
    • fills the variant's phases file from the base's composites.txt, with the base's markers overridden by the
      variant's own reload markers, and fails if a variant marker moves a join;
    • exports the variants of a base with the base.

    glue.py carries the phases part (variant_times, the after_variant hook). README: "Gun families".

  • ZR68-S (jinrai_zr68s scene, both teams' arms): shipped sources, zr68s/viewmodel.qci, team .qc files that
    include ../jinrai_zr68c/glued.qci, its reload step markers (1_unload f20, 2_load f42; the ZR68C has
    f21 / f40 on the same motion) and its phases file. It plays the ZR68C's sound pieces. No slots of its own.

  • Compiled models: v_jinrai_zr68s, v_nsf_zr68s.

  • Variant toggle (Blender preview only): the jinrai_zr68c scene also shows the ZR68-S gun on the ZR68C rig and
    action, so a new slot can be checked on both guns. The team collections keep the arms; the guns are in zr68c_gun
    and zr68s_gun, one shown at a time through the new Variant dropdown of the Viewmodel panel or the Outliner
    eye. variant_preview.py built it once: the ZR68-S's own parts are weighted to their nearest ZR68C bone at the
    ZR68-S rest pose (Silencer to zr68c, x_silenced to Dummy02), as the game holds them in the glued clips. The
    new objects have export off. README: recipe step 2, "Gun families" (Variant toggle), "Previewing the glued clips".

How to Review

  • Tools: export_viewmodels.py (family_base, the variant branch of export_project, the variant list in the main
    block) and glue.py (variant_times, after_variant, the layout and base arguments).
  • Text: the ZR68-S .qc files (one include line each), its phases file, the README section "Gun families".
  • Variant toggle: variant_preview.py (one-time build; gate below) and the Gun row of viewmodel_tools.py.
  • viewmodels.blend gains the ZR68-S scene; the SMDs are the original clips (shipped) or export output; the checks
    below cover the binary files.

Checks (measured)

check result
export jinrai_tachi jinrai_zr68c rc 0; FAMILY also exporting jinrai_zr68s; no SMD, phases file or preview changed (worktree clean, POST-EXPORT unchanged); ROM CHECK 3 projects, no clamped pose
joins SEAM 0.0000 u, 0.000 deg on all five ZR68C seams
pace ZR68C unchanged (PACE jinrai_zr68c 3 authored slots, 0 warnings)
sounds end before the clip 18 READY lines (9 per gun)
variant rules a slot added to the ZR68-S scene: FAMILY WARN, not exported, phases file unchanged; a ZR68-S join marker moved one frame: the export fails and names the clip
ZR68C and Tachi SMDs, phases file, wavs and compiled models unchanged (layer 08)
compile, 6 projects rc 0, 0 warnings; ZR68-S and ZR68C models identical across compiles
compiled ZR68-S vs the ZR68C (research build of the same sources) shipped sequences within 0.0035 u / 0.0055 deg of the ZR68-S sources (re-quantization); glued clips within 0.0068 u / 0.0084 deg of the ZR68C's on the shared bones; its own bones (Silencer, x_silenced) at its rest pose
Variant toggle build VARIANT zr68s on zr68c PASS: the ZR68-S gun on the ZR68C rig within 0.0011 u of its own scene in every shared shipped slot (53 samples; melee01 is the ZR68-S's own clip, not compared); export afterwards: no SMD or phases change; the six models compile byte-identical to before the toggle
Variant toggle in Blender (Xvfb) ZR68C -> ZR68-S -> Team NSF -> Team Jinrai -> ZR68C; the silencer shows on the ZR68-S; the .blend is not modified by toggling
in game with the layer 09 neo PR see the neo PR: tactical 30+1, dry 30 then 29+1, resumes after the unload, flag 0 = master, headless TDM PASS

How to Test

  1. Load a build with the layer 09 neo PR (the flag is 1 by default).
  2. Take a ZR68-S, fire a few rounds and reload: no bolt pull, 30+1. Fire it empty and reload: 30, then 29+1 at
    the bolt pull.
  3. Reload and switch to the secondary after the old magazine is out (about 0.7-1.4 s in), then back: the draw
    continues the reload with no pop at the joins.
  4. Optional: open viewmodels.blend, scene jinrai_zr68s: shipped slots only; add a slot and export to see
    FAMILY WARN.
  5. Optional: blender viewmodels.blend --python viewmodel_tools.py, scene jinrai_zr68c, Viewmodel panel >
    Variant > zr68s: the ZR68-S gun plays the ZR68C's slots.

Related

The ZR68-S has the ZR68C's motion on the shared bones in every shipped
clip, so it is a variant of the ZR68C family: its team qcs include
../jinrai_zr68c/glued.qci and it has no slots of its own. The export
treats a project whose qc includes another gun's glued.qci as a
variant: it writes the shipped slots only (FAMILY WARN for a new slot
left in its scene), and fills the variant's 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.

Adds the ZR68-S sources (one scene, both teams' arms), its phases
file and the compiled models.
The ZR68C scene now shows the ZR68-S gun (silencer) on the ZR68C 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
(zr68c_gun, zr68s_gun), one shown at a time through the Variant
dropdown of the Viewmodel panel or the Outliner eye.

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 ZR68-S gun matches its own scene within 0.0011 u in every shared
shipped slot. The new objects have export off: an export of the Tachi
and ZR68C projects leaves every SMD and phases file unchanged, and the
six models compile byte-identical to the previous commit.
@sunzenshen
sunzenshen force-pushed the stack/reload-zr68c/50-cycle branch from 53981be to 43a4a8d Compare November 10, 2026 02:07
@sunzenshen
sunzenshen force-pushed the stack/reload-zr68c/55-zr68-family branch from c440d7e to 46bfa3f Compare November 10, 2026 02:07
@sunzenshen sunzenshen changed the title Partial reloads 06: Add the ZR68-S as a ZR68C family variant Partial reloads 09: Add the ZR68-S as a ZR68C family variant Nov 10, 2026
@sunzenshen
sunzenshen marked this pull request as ready for review November 10, 2026 04:45
@sunzenshen
sunzenshen marked this pull request as draft November 13, 2026 03:50
@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