Skip to content

fix: preserve imported builds and native item properties - #1013

Merged
evrydayjunglist merged 1 commit into
LocalExile:mainfrom
nikolos89:codex/pob-native-import-20261114
Nov 15, 2026
Merged

evrydayjunglist merged 1 commit into
LocalExile:mainfrom
nikolos89:codex/pob-native-import-20261114

Conversation

@nikolos89

@nikolos89 nikolos89 commented Nov 14, 2026 •

Copy link
Copy Markdown
Collaborator

What changes

Valid external character builds could lose item crafting state, secondary ascendancy or native passive overrides, while the server had no game-owned admission check for the complete imported tree. This change preserves native state through protocol, JSON and relational saves and gives the Game module the final say on imported allocations before preview and replacement.

Native items and persistence

  • Preserve Intangibility and Memory Strands as the two trailing native Mods properties, separate from combat modifier lists.
  • Send alternate quality as its native type/amount pair in ObjectMagicProperties; ordinary quality is not sent a second time. Preserve the native foil variation.
  • Persist these properties and exported level requirements in character and stash items, including nested gems/items. Replacing modifiers or sockets invalidates a recorded requirement so subsequent crafting recalculates it.
  • Keep the current public SavedItem constructor/deconstructor and the legacy MagicProperties.Write overload. Existing Vestigial state, Heist blueprint data and ordinary one-socket item repair from main remain intact.
  • Add four pending SQL updates: crafting properties, relic variation and native tattoo/Runegraft effect definitions. Existing configured effect values are retained. The Vestigial column already supplied by main is not added again.

Whole-build admission and progress

  • Add the general IGameLogic.ValidateImportedBuild hand-over. The framework calls it during preparation and again against the latest merged save inside the replacement transaction.
  • The Game module validates ordinary allocations using the imported jewels and the same allocation-bypass calculation as live progression, plus ascendancy, secondary ascendancy and native override identities.
  • Replace or clear secondary ascendancy with the imported build; preserve unrelated module state while retiring old golem activation intent.
  • Apply a supplied bandit choice through Game-owned quest/reward flags. Preserve unrelated campaign progress and account for already-earned quest passive points instead of crediting them twice.
  • Retain native tattoos and mastery-replacing Runegrafts, their per-type limits and dormant overrides. A Runegraft replaces the ordinary mastery effect rather than stacking it; Runegrafts are separate from tattoo-count scaling. Small attribute targets use their actual native value, including 15-point travel nodes.

Item calculations and passive geometry

  • Apply catalyst effects using native modifier tags/list eligibility, with the same magnitude calculation used by the converter. Combine applicable explicit/prefix/suffix, Heist and enchantment magnitudes before rounding; retain unscalable/granted-effect handling.
  • Match native single-precision item defence rounding and use the saved base roll for Ward. For example, the native float32 result for base 150 with 137% local increase is 355, rather than decimal rounding to 356.
  • Correct the irregular 16/40-slot passive orbit angles and native-radius-to-graph coordinate conversion. Handle Foulborn Intuitive Leap's keystone-only allocation bypass and signed HASH16 values in Impossible Escape exports without accepting arbitrary disconnected trees.

Layer

Framework: native protocol/item state, persistence, catalogue/graph geometry and a general game-logic admission hook in src/.

Module: real game rules in Modules/Core/Game and Modules/Core/Item/Tattoos; native effect defaults in sql/updates/pending_world/. No POB parser, share-code registry or mod settings are added to the framework or shipped leagues.

Mod companion: LocalExile/LocalExile-Mods#43 contains the standalone converter source and frontend process cleanup. The server change is the prerequisite for the companion's new native properties and validation. Delve changes are excluded.

Issue

No separate public issue. Repairs failures found while importing native character exports and a supplied edited PoB code.

Checks

  • Base commit of main: ffb9c93e857070a95674087d78324e9ae703c6aa.
  • Head commit: ffcd505c8b3ea5432da76c7a6baed01e8c8476d3.
  • dotnet build GameServer.slnx: zero warnings and zero errors.
  • Core 438/438, Data 43/43, Gateway 500/500; one existing held-client GGPK test skipped because the isolated checkout has no client installation.
  • Prior focused checks: 45/45 Gateway regressions, including item save/wire round trips, catalyst calculations and imported bandit/secondary ascendancy state. This PR adds exactly two Gateway facts.
  • Complete local collection: 39,826 native snapshots plus one supplied code; 39,827/39,827 strict preparations and real Gateway/Game validations. No item/gem/passive loss diagnostics or guessed variable unique rolls. Invalid checksum and altered-same-UID negative fixtures were rejected.
  • Final native effect catalogue compared with the running server; supplied-code admission rechecked after SDK-compatible persistence changes.
  • Runtime smoke: the existing Gateway started and loaded POB 1.0.2 with the existing mods. No production character was imported or created, no extra server/client was started, and no client binary/archive was changed.
  • Main's reviewer/docs analyzers: no documentation findings; only the two expected character-database review warnings. SQL style and fresh auth/characters/client/world database builds passed with zero problems.

Verification limits

The large corpus was checked through strict conversion and actual server validation/encoding, not by applying every character and playing its skills. Import/persistence success is not a claim of complete combat parity: some specialized Runegraft/stat consumers still need implementation. Native snapshots/fingerprint indexes used to recover omitted raw rolls are operator-owned and excluded from both PRs.

For the reviewer

  • Adds a project, a solution entry or a package.
  • Makes a network request, opens a listener or starts a process.
  • Adds files under sql/: two pending character-schema updates and two pending world-effect updates.
  • Changes CODEOWNERS paths: src/GameServer.Gateway/Modding/GameLogic.cs and sql/updates/pending_characters/. These require the maintainers' review; no approval, merge or check bypass is requested.
  • Adds a game-data file or changes what a generator writes.

The existing local client/settings, downloaded build collection, private native indexes, accounts, keys and unrelated Delve work are not in this branch.

Retain native item crafting state and secondary progression through strict build admission, wire encoding and relational saves. Match native modifier magnitudes, defence rounding and passive radius geometry.
@evrydayjunglist evrydayjunglist added the protected-files Touches a CODEOWNERS path, so it needs that path's owner. label Nov 15, 2026
@evrydayjunglist evrydayjunglist self-assigned this Nov 15, 2026
@evrydayjunglist
evrydayjunglist merged commit 3cdb8c0 into LocalExile:main Nov 15, 2026
2 checks passed
@evrydayjunglist

Copy link
Copy Markdown
Collaborator

Merged through #1024 with two additional import corrections.

Imported tattoos now use the same native target and limit rules as ordinary tattoo application, including the total limit and applicable per-tattoo restrictions. Reimport also discards transient Game.Golems session data from the incoming build, preventing obsolete runtime summon state from being restored.

Review covered preservation of progression, secondary ascendancy, native crafting/relic/style properties, catalyst behavior, defense rounding, and passive/jewel data. Regression coverage verifies preservation and rejects invalid tattoo targets. The final build and all 1,006 tests passed, and the disposable database rebuilds succeeded.

No outstanding import defect was identified. Recommended follow-up is an end-to-end native import → play → save → reimport check using a representative build with relic/style items, catalyst quality, tattoos/runegrafts and secondary ascendancy. Those combinations were covered primarily through code/data review and automated tests rather than a complete live-client round trip.

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

Labels

protected-files Touches a CODEOWNERS path, so it needs that path's owner.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants