Skip to content

feat: updated mod dependencies to make it 1.40 compatible#7

Open
MILES-FAN wants to merge 1 commit into
BSQ-VRM:mainfrom
MILES-FAN:main
Open

feat: updated mod dependencies to make it 1.40 compatible#7
MILES-FAN wants to merge 1 commit into
BSQ-VRM:mainfrom
MILES-FAN:main

Conversation

@MILES-FAN
Copy link
Copy Markdown

Description

Updated dependencies for Beat Saber 1.40.8 compatibility and migrated build scripts to the latest template.
Note: Much of the migration was assisted by Claude Code, the PR may contain some non-essential changes.

Known Issues

  • Character IK Anomalies: There is a noticeable positional offset between the upper and lower arms. (Maybe it's related to skeleton structure issues, Idk.)

Result

It compiles and runs on my quest 3, only limited tests applied to it though.

Screenshot

Hatsune Miku raising broken arms

Modifications

Rest are generated changelogs.

Dependency Upgrades (BS 1.28 → 1.40.8)

Dependency Version Change Notes
bs-cordl 3601.0.0 → ^4008.0.0
beatsaber-hook 5.1.6 → ^6.4.2
scotland2 0.1.4 → ^0.1.6 Resolves to 0.1.7
custom-types 0.17.7 → ^0.18.3 Resolves to 0.18.4
rapidjson-macros 1.2.1 → ^3.0.0 Major API changes
paperpaper2_scotland2 3.6.3 → ^4.6.4 Package renamed
bsml 0.4.26 → ^0.4.55 Source: bsq-ports/Quest-BSML
lapiz 0.2.9 → ^0.2.23 Source: raineaeternal/Lapiz
chatplex-sdk-bs 6.2.1 → ^6.4.1 Source: hardcpp/QuestChatPlexSDK-BS
fmt 10.0.0 → ^11.0.2
sombrero 0.1.40 → ^0.1.43
gif-lib ^5.2.2
mod.template.json 1.28.0_...1.40.8_7379 Updated packageVersion

Technical Details

1. rapidjson-macros v1 → v3 API Changes

Affected Files: include/config/mini-config-utils.hpp, include/config/config.hpp

  • Migrated DECLARE_JSON_CLASS(name, body) to DECLARE_JSON_STRUCT(name) { body };.
  • Removed DISCARD_EXTRA_FIELDS.
  • Fixed missing semicolons: v3 macros like VALUE() and NAMED_VALUE_DEFAULT no longer include trailing semicolons in their expansion.

2. custom-types v0.17 → v0.18 API Changes

Affected Files: Various headers including ShaderSO.hpp, MenuInstaller.hpp, VRMSpringBone.hpp, and AvatarsFlowCoordinator.hpp.

  • Updated DECLARE_CLASS_CODEGEN(ns, name, base, body) to the new syntax: DECLARE_CLASS_CODEGEN(ns, name, base) { body };.

3. Beat Saber 1.40.8 API Adjustments

  • MirrorManager.cpp: Removed VisualEffectsController as this class was removed in BS 1.40.
  • BlendShapeController.cpp: Switched from UnityEngine::Random::get_insideUnitSphere() to get_onUnitSphere().
  • AvatarsFlowCoordinator.cpp:
    • Migrated il2cpp_utils::newcsstr(...) to StringW(...).
    • Fixed System::IntPtr boolean ambiguity in bs-hook v6 by changing !ptr->m_CachedPtr to !ptr->m_CachedPtr.m_value.
  • OVRLipSync.cpp: Updated gcHandle.AddrOfPinnedObject() to ...ToPointer() to resolve similar ambiguity.

4. paperpaper2_scotland2 Migration

Updated all include path prefixes to paper2_scotland2/shared/... in:

  • src/AssetLib/modelImporter.cpp
  • src/UI/AvatarSettingsViewController.cpp
  • src/UI/modals/AvatarSelectionModal.cpp

5. bs-cordl 4008 Circular Dependency Fixes

Affected Files: include/AssetLib/generators/avatarGenerator.hpp, include/TPoseHelper.hpp

  • Explicitly included zzzz__HumanBone_impl.hpp and zzzz__SkeletonBone_impl.hpp before UnityEngine/Avatar.hpp.
  • Why: In avatarGenerator.hpp, System/String.hpp is now included before the HumanBone implementation to break a circular reference chain: IEquatable_1_def.hpptypedefs.hString.hpp → (Back-reference) IEquatable_1.
  • Without this specific include order, the compiler throws: no template named 'IEquatable_1' in namespace 'System'.
  • Warning: Any future headers referencing Avatar.hpp or HumanBone must follow this include order to prevent build failure.

6. A64HookFunction Linking (bs-hook v6 Change)

File: CMakeLists.txt

  • Added And64InlineHook.cpp, inlineHook.c, and relocate.c (from extern/includes/beatsaber-hook/shared/inline-hook/) directly to the compilation target.
  • Why: In v5, A64HookFunction was exported by libbeatsaber-hook.so. In v6, consumers must compile the source themselves, as the symbols in .debug.so are now marked LOCAL HIDDEN and are not exported.

@zwfythpnkc-art
Copy link
Copy Markdown

Download link 🥺

@CCPspy
Copy link
Copy Markdown

CCPspy commented Apr 27, 2026

Please release 🥺

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.

3 participants