Converting HSR Mod Pipeline - Seris0/Gustav0 GitHub Wiki

✅ Manual HSR Mod Pipeline Convert

How convert an older-style CS pipeline (DrawCS, dynamic blend logic) into the newer Batched Pose format.


Requeriments

  • XXMI 0.6.6 and SRMI 2.1.0

image

1. [TextureOverrideBlend]

  • ❌ OLD:

[TextureOverride<ModName>Blend]
hash = <hash>
handling = skip
vb2 = Resource<ModName>Blend
if DRAW_TYPE == 1
  vb0 = Resource<ModName>Position
  draw = 4435, 0
endif

Resource<ModName>DrawCS = copy Resource<ModName>DrawCS
if DRAW_TYPE == 8
  Resource\SRMI\PositionBuffer = ref Resource<ModName>PositionCS
  Resource\SRMI\BlendBuffer    = ref Resource<ModName>BlendCS
  Resource\SRMI\DrawBuffer     = ref Resource<ModName>DrawCS
  $\SRMI\vertcount = 4435
elif DRAW_TYPE == 1
  $_blend_ = 2
endif
  • ✅ NEW:

[TextureOverride<ModName>Blend]
hash = <same hash>
handling = skip
vb2 = Resource<ModName>Blend
if DRAW_TYPE == 1
  vb0 = Resource<ModName>Position
  draw = 4435, 0
endif

if DRAW_TYPE == 8
  Resource\SRMI\PositionBuffer = ref Resource<ModName>PositionCS
  Resource\SRMI\BlendBuffer    = ref Resource<ModName>BlendCS
  $\SRMI\vertex_count = 4435
endif

Changes:

  • DrawCS and DrawBuffer references ❌ removed
  • vertcount changed to vertex_count
  • All conditional logic for DRAW_TYPE == 1 and $_blend_ ❌ removed

2. [TextureOverrideVertexLimitRaise/Draw/Limit/Draw_Limit]

  • ❌ OLD:

[TextureOverride<ModName>VertexLimitRaise/Draw/Limit/Draw_Limit]
hash = <hash>
override_vertex_count = 4435
override_byte_stride = 40
if DRAW_TYPE != 1 && DRAW_TYPE != 8 && $_blend_ > 0
  $_blend_ = $_blend_ - 1
  this = ref Resource<ModName>DrawCS
endif
  • ✅ NEW:

[TextureOverride<ModName>VertexLimitRaise/Draw/Limit/Draw_Limit]
hash = <same hash>
override_vertex_count = 4435
override_byte_stride = 40
uav_byte_stride = 4

Changes:

  • Removed $_blend_ logic and conditional blocks
  • Added uav_byte_stride = 4

Warning

💡 Reminder: If override_vertex_count or override_byte_stride is missing in your conversion, add them manually. override_byte_stride is always 40, and override_vertex_count must match the previous \SRMI\vertex_count value.

🎥 Video Example:

HSRPipeline.mp4

Example Mod Link

⚠️ Important Caveats

"The mod blinks randomly"

This usually means the $vertex_count value is too low.

You have two options to find the real value:

  1. Increment method: Start increasing the $vertex_count value in steps (e.g., by 3000). For example:

    • If your current value is 19000, try 22000, then 25000, etc.
  2. File size method: Locate the .buf file for the mesh (e.g., BodyPosition.buf), and divide its size in bytes by the stride (usually 40):

image

*Example: 930520 bytes / 40 = 23263

This final number is your true vertex_count. Always round up if needed to ensure stability.

⚠️ **GitHub.com Fallback** ⚠️