Skip to content

fix(npc): prepare IL2CPP client customer and dealer prefabs - #359

Merged
ifBars merged 1 commit into
betafrom
fix/beta-il2cpp-client-npc-init
Oct 9, 2026
Merged

ifBars merged 1 commit into
betafrom
fix/beta-il2cpp-client-npc-init

Conversation

@ifBars

@ifBars ifBars commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

An IL2CPP joining client reaches Customer.Awake without customerData and throws in Awake_UserLogic. Dealer conversion also leaves the donor NPC component attached: the baseline client registers two components on the same GameObject as the same dealer, producing five custom NPC entries instead of four.

Seed missing customer data on the inactive prefab using the same fallback defaults already used at runtime. Preserve existing donor data and explicit WithCustomerDefaults configuration. Remove the replaced dealer donor after rewiring, matching supplier conversion. This fixes the creation paths rather than hiding duplicate registry entries.

Fixes #357.

Validation

  • Schedule I beta 0.4.7f11, SteamCMD-validated IL2CPP build 25770926 and Mono Alternate build 25770882; MelonLoader 0.7.3.
  • Baseline IL2CPP client: customerData=False and affinity=False immediately before the Customer.Awake exception. Duplicate dealer entries share GameObject -413470 with component IDs -413474 and -413498.
  • Production fix tested independently of fix(avatar): preserve fallback portrait pose and workbench animation #358: Mono and IL2CPP native host-load/client-follow flows pass with two distinct Steam identities in the same two-member GSE lobby. Each peer has exactly four custom NPCs and one native NPC component per object. Customer data and default affinity are present before Awake, with omitted-input spending defaults 100/400. No Customer.Awake exception or duplicate dealer warning remains.
  • MonoMelon build and all 775 contract tests pass; Il2CppMelon build and all 749 pass, with local deployment disabled.
  • Copied save originated on 0.4.6f8 Alternate. With fix(avatar): preserve fallback portrait pose and workbench animation #358 and optimization PRs perf: index scene objects instead of scanning for every custom NPC #354/perf: keep derived-type scans until an assembly loads #355 included, a fresh f11 Mono save completes native character creation and two same-process loads; all four portraits and single-component roles persist, and explicit customer spending remains 250/750. The fresh IL2CPP co-op reload/rejoin check has not passed: both peers generate four portraits, but the client does not reach the harness gameplay-readiness gate before the host peer timeout. This is an unresolved validation limit, not an established S1API regression. Real Steam transport is untested. Existing client Contacts icon-refresh warnings from native NPC.get_ID remain and are also present in the baseline.
  • Disposable native diagnostics are kept outside the commit. Test processes stop after results, with an external timeout.

Compatibility

No public/protected signatures, parameter names, durable NPC IDs, save formats, or network payloads change. Fallback values are unchanged and shared between prefab preparation and runtime recovery. Non-null donor customer data is retained; explicit builder configuration still replaces it. Host authority, spawn/finalization order, and normal NPC animation are unchanged.

@ifBars ifBars added bug Something isn't working beta A game update on the beta & alternate-beta steam branches labels Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 02b538a4-06d9-4b19-8f3d-ce8bbfc81b66

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beta A game update on the beta & alternate-beta steam branches bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant