Skip to content

Support OpenPF2 across Unreal Engine 5.3 through 5.8 - #72

Open
GuyPaddock wants to merge 19 commits into
mainfrom
codex/ue-5.6-compile-fixes
Open

GuyPaddock wants to merge 19 commits into
mainfrom
codex/ue-5.6-compile-fixes

Conversation

@GuyPaddock

@GuyPaddock GuyPaddock commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

OpenPF2's runtime and spec code used APIs that differ across Unreal Engine 5.3 through 5.8. Add narrow engine-version guards for ability asset/spec tags, array shrinking and map iteration, replication frequency, PIE identifiers, and automation flags. Retain AddDefaultAbilityTag and its constructor-safe tag composition behavior.

Preserve inventory item interfaces, correct game-framework module registration, and defer dice-regex initialization until use. Add required includes and generated enum declarations, expose the inline proficiency getter to callers, and detach the active-effect owner during UE 5.8 teardown to prevent a shutdown access violation. Module rules inherit the target's explicit include order.

Dependency

Validation

The combined Playground matrix passed on Win64 with UE 5.3.2, 5.4.4, 5.5.4, 5.6.1, 5.7.4, and 5.8.3. Every engine passed Development Editor and Game builds, all 1,886 OpenPF2 and 71 EnhancedUnrealSpecs cases, compilation of 257 Blueprints, Soul Cave packaging, delayed rendered startup with normal shutdown, and a loopback server/client connection. No compiler/linker warnings, failed/skipped tests, Blueprint errors, or load failures were observed.

Offscreen validation uses D3D11 on UE 5.3.2 and D3D12 on the other patches. The installed UE 5.3.2 D3D12 offscreen path still triggers an engine ensure. Remaining asset/editor/runtime warning categories are documented in the Playground compatibility guide. UE 5.7.4 and 5.8.3 report two instant-effect stacking Blueprint warnings each. Shared asset authoring remains on UE 5.3; other platforms and patch releases require separate validation.

Copyright follow-up

Brought the existing upstream CONTRIBUTING.md onto this branch without changing its contents, and updated 55 touched project-owned copyright notices through 2026. Exact byte comparisons verified that the source edits change only project-owned copyright year fields, preserve original start years and owners, and leave third-party notices unchanged. The engine matrix above records the earlier tested snapshot; it was not rerun for this comment and documentation follow-up.

Store loaded inventory entries as reflected script interfaces and convert them to a directly initialized const snapshot when calculating changes.

UE 5.6 requires reflected interface storage, and initializing the snapshot at declaration avoids assigning to a const TArray.
Keep AddDefaultAbilityTag as a function that returns combined default tags, and apply the result through SetAssetTags in the interactable ability constructor. Cover preservation of existing tags, unchanged inputs, and duplicate prevention in automation specs.

UE 5.6 restricts SetAssetTags to derived classes during construction, so the utility must compose the container without calling the protected setter itself.
Register OpenPF2GameFramework with the same module name used by its build rules and plugin descriptor.

The old OpenPF2Core registration can prevent the runtime module from being linked and found in monolithic packaged games. The Win64 Development game target now builds successfully.
Use constructor-safe ability asset tags, actor-instanced boosts, explicit array shrinking enums, and internal map indices. Remove a skeletal-mesh cast that cannot succeed for the collision delegate class.

These updates retain the existing behavior while using the supported UE 5.6 APIs. The editor target builds without the previous runtime deprecation warnings.
Use the scoped automation flag type and mask constants in both spec macros and all existing specs. Read and update ability-spec source tags through the supported accessor, and run the tag-library suite through the compact macro.

The old compact macro would not compile on UE 5.6 and was previously unexercised. Both macro forms now compile, and all 1,886 OpenPF2 automation cases pass.
Use supported ability-tag, PIE ID, replication-frequency, and map-iterator accessors. Reflect the weapon interface through its item-interface parent, include the complete game-state type, and accept gameplay-tag containers by reference.

UE 5.6 tightens reflection, include, and temporary-value requirements. These migrations pass editor and game builds, Blueprint compilation, and all 1,886 OpenPF2 automation cases.
Remove module-level UE 5.3 include-order overrides and enable explicit or shared PCHs for the Blueprint nodes module.

Modules must follow the enclosing UE 5.6 target settings. The updated rules have passed both editor and game builds.
Construct the dice expression pattern on the first parse call and keep its regex dependency private to the implementation.

The monolithic game previously constructed this pattern before Unreal initialized ICU, causing a static initialization assertion before logging started. Editor and game builds, all 1,886 OpenPF2 tests, and packaged Soul Cave startup now pass.
Use the public ability tag container on UE 5.3 and 5.4 and the supported asset-tag accessors on newer engines. Preserve constructor-only tag writes and the shared default-tag composition utility.

The UE 5.6 migration introduced accessors that do not exist in older supported engines. The version-gated implementation passes the UE 5.6 editor build.
Select Boolean shrinking arguments on UE 5.3 and EAllowShrinking on UE 5.4 onward. Obtain reflected map indices through the iterator API provided by each engine.

The newer container signatures and map index accessor are absent in UE 5.3. The compatibility branches preserve queue and map behavior and pass the UE 5.6 editor build.
Select the UE 5.3 and 5.4 replication-frequency field and PIE identifier where the newer accessors are unavailable.

The UE 5.5 accessors removed deprecation warnings on newer engines but broke older engine builds. Version guards preserve the existing update rate and log prefix, and the UE 5.6 editor build passes.
Reuse the EnhancedUnrealSpecs flags adapter in both OpenPF2 spec macros and all spec declarations. Select the available dynamic ability-spec tag API at the UE 5.5 boundary.

The previous test declarations required newer flag masks and tag accessors. Both macro forms now compile in the UE 5.3 and UE 5.6 editor builds, and all 1,886 OpenPF2 cases pass on UE 5.6.
Include complete ability-system, player-state, character-interface, and interface-conversion declarations at their use sites.

Unity builds hid these existing dependencies. UE 5.4 adaptive compilation exposed incomplete-type casts and an undeclared namespace; the editor build now passes without compiler warnings.
Define FPF2TemlCalculation::GetValue in its header so every translation unit that calls it can inline the body.

The old cpp-only force-inline definition was omitted from a monolithic non-unity link, leaving proficiency calculations unresolved. The UE 5.4 Game target now links successfully.
Include the generated declarations for the three reflected enums so StaticEnum specializations are visible to every caller. UE 5.8 deletes the unspecialized template and exposes the missing includes; enum values and Blueprint types stay unchanged.

Validated Development Editor and Game builds with UE 5.8.3 on Win64.
Clear the active-effect container owner in the ability system component destructor on UE 5.8. Keep the normal pending-effect cleanup and its diagnostics enabled.

UE 5.8 adds a pending-effect deletion log that calls Owner->GetFullName during container destruction. The outer actor can already have been purged, causing a packaged shutdown access violation.

Validated the UE 5.8.3 Development Game build and a relocated packaged Soul Cave startup with normal zero-code shutdown.
Document the six tested Win64 engine patches, the matching automation dependency, and the UE 5.3 shared asset baseline. Record D3D11 offscreen validation on UE 5.3.2 and D3D12 on the other tested patches.

The compatibility range must describe the engines and rendering paths actually exercised by Playground, with further validation required for other platforms and patch releases.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-19T04:42:55.713286Z efe76e0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5658dd9d-8a92-44c3-a720-bbc1c8eed26b
📥 Commits

Reviewing files that changed from the base of the PR and between b2cbddc and efe76e0.

📒 Files selected for processing: 57
  • README.md
  • Source/OpenPF2BlueprintNodes/OpenPF2BlueprintNodes.Build.cs
  • Source/OpenPF2EditorSupport/OpenPF2EditorSupport.Build.cs
  • Source/OpenPF2GameFramework/OpenPF2GameFramework.Build.cs
  • Source/OpenPF2GameFramework/Private/Abilities/PF2InteractableAbilityBase.cpp
  • Source/OpenPF2GameFramework/Private/Abilities/Tasks/PF2AbilityTaskBase.cpp
  • Source/OpenPF2GameFramework/Private/Actors/Components/PF2AbilitySystemComponent.cpp
  • Source/OpenPF2GameFramework/Private/Actors/Components/PF2RootCollisionDelegateComponent.cpp
  • Source/OpenPF2GameFramework/Private/CharacterStats/AbilityBoosts/PF2AbilityBoostBase.cpp
  • Source/OpenPF2GameFramework/Private/CharacterStats/PF2TemlCalculation.cpp
  • Source/OpenPF2GameFramework/Private/Commands/PF2CommandQueueComponent.cpp
  • Source/OpenPF2GameFramework/Private/Items/PF2InventoryComponent.cpp
  • Source/OpenPF2GameFramework/Private/Libraries/PF2AbilitySystemLibrary.cpp
  • Source/OpenPF2GameFramework/Private/Libraries/PF2DiceLibrary.cpp
  • Source/OpenPF2GameFramework/Private/Libraries/PF2MapLibrary.cpp
  • Source/OpenPF2GameFramework/Private/Libraries/PF2TagLibrary.cpp
  • Source/OpenPF2GameFramework/Private/OpenPF2GameFramework.cpp
  • Source/OpenPF2GameFramework/Private/PF2GameModeBase.cpp
  • Source/OpenPF2GameFramework/Private/PF2LogUtilities.cpp
  • Source/OpenPF2GameFramework/Private/UPF2Party.cpp
  • Source/OpenPF2GameFramework/Public/Abilities/PF2AbilityAllowedTargetSelectionType.h
  • Source/OpenPF2GameFramework/Public/Abilities/PF2TargetSelectionType.h
  • Source/OpenPF2GameFramework/Public/Actors/Components/PF2AbilitySystemComponent.h
  • Source/OpenPF2GameFramework/Public/CharacterStats/PF2TemlCalculation.h
  • Source/OpenPF2GameFramework/Public/Items/PF2InventoryComponent.h
  • Source/OpenPF2GameFramework/Public/Items/Weapons/PF2WeaponInterface.h
  • Source/OpenPF2GameFramework/Public/Libraries/PF2DiceLibrary.h
  • Source/OpenPF2GameFramework/Public/Libraries/PF2TagLibrary.h
  • Source/OpenPF2GameFramework/Public/ModesOfPlay/PF2ModeOfPlayType.h
  • Source/OpenPF2GameFramework/Public/PF2GameModeBase.h
  • Source/OpenPF2GameFramework/Public/PF2MonetaryValue.h
  • Source/OpenPF2GameFramework/Public/Utilities/PF2GameplayAbilityUtilities.h
  • Source/OpenPF2GameFramework/Public/Utilities/PF2MapPairIterator.h
  • Source/OpenPF2Tests/OpenPF2Tests.Build.cs
  • Source/OpenPF2Tests/Private/Tests/Abilities/Attacks/PF2AttackAttributeSet.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/Abilities/Attacks/PF2SpellAttackRollCalculation.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/ActorComponents/PF2CharacterInitiativeQueueComponent.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/AbilityBoosts/PF2AbilityBoost.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/AbilityBoosts/PF2AbilityBoostRuleOptionValidator.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/AbilityModifiers/PF2AbilityMod.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/AbilityModifiers/PF2PerceptionModifierCalculation.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/AbilityModifiers/PF2SavingThrowModifierCalculation.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/PF2AncestryFeatCapCalculation.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/PF2ArmorClassCalculation.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/PF2CharacterAttributeSet.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/PF2ClassDifficultyClassCalculation.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/PF2SpellDifficultyClassCalculation.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/CharacterStats/Skills/PF2SkillModifierCalculation.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/Libraries/PF2CharacterStatLibrary.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/Libraries/PF2DiceLibrary.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/Libraries/PF2TagLibrary.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/ModesOfPlay/Encounter/Conditions/PF2ConditionsDyingRecoveryByCheck.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/ModesOfPlay/Encounter/Conditions/PF2ConditionsDyingRecoveryByHealing.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/ModesOfPlay/Encounter/Conditions/PF2ConditionsKnockoutAndDeath.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/PF2KeyAbilityBoost.spec.cpp
  • Source/OpenPF2Tests/Private/Tests/PF2SpecBase.cpp
  • Source/OpenPF2Tests/Public/Tests/PF2SpecBase.h
💤 Files with no reviewable changes: 2
  • Source/OpenPF2GameFramework/Public/Libraries/PF2DiceLibrary.h
  • Source/OpenPF2GameFramework/Private/CharacterStats/PF2TemlCalculation.cpp

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The plugin updates its documented Unreal Engine support range to 5.3–5.8 and adds version-specific framework APIs, gameplay tag and item-interface changes, utility updates, and automation-test compatibility changes.

Changes

Unreal Engine compatibility and framework updates

Layer / File(s) Summary
Compatibility and module setup
README.md, Source/OpenPF2BlueprintNodes/*, Source/OpenPF2EditorSupport/*, Source/OpenPF2GameFramework/*, Source/OpenPF2Tests/*
The README lists six validated Win64 engine patches and related validation details. Module rules remove fixed UE 5.3 include-order settings, and selected headers and module registration are updated.
Versioned framework APIs
Source/OpenPF2GameFramework/Private/Actors/Components/*, Source/OpenPF2GameFramework/Private/Commands/*, Source/OpenPF2GameFramework/Private/Libraries/PF2MapLibrary.cpp, Source/OpenPF2GameFramework/Private/PF2LogUtilities.cpp, Source/OpenPF2GameFramework/Private/UPF2Party.cpp, Source/OpenPF2GameFramework/Public/Utilities/PF2MapPairIterator.h
Framework code selects engine-version-specific APIs for gameplay effects, overlap handling, command queues, map iteration, play-in-editor IDs, and network update frequency. The overlap conversion no longer returns early only because the current component is a skeletal mesh.
Ability tag APIs and behavior
Source/OpenPF2GameFramework/Private/Abilities/PF2InteractableAbilityBase.cpp, Source/OpenPF2GameFramework/Private/Actors/Components/PF2AbilitySystemComponent.cpp, Source/OpenPF2GameFramework/Private/CharacterStats/AbilityBoosts/PF2AbilityBoostBase.cpp, Source/OpenPF2GameFramework/Private/Libraries/PF2TagLibrary.cpp, Source/OpenPF2GameFramework/Public/Libraries/PF2TagLibrary.h, Source/OpenPF2GameFramework/Public/Utilities/PF2GameplayAbilityUtilities.h
Ability tag assignment and lookup select APIs by engine version. Ability boosts use InstancedPerActor. The tag library adds a helper that returns a copied container with a tag added, and gameplay ability utilities add a HasTag overload.
Item interfaces and utility updates
Source/OpenPF2GameFramework/Private/Items/PF2InventoryComponent.cpp, Source/OpenPF2GameFramework/Private/Libraries/PF2DiceLibrary.cpp, Source/OpenPF2GameFramework/Public/Items/*, Source/OpenPF2GameFramework/Public/Libraries/PF2DiceLibrary.h, Source/OpenPF2GameFramework/Public/PF2MonetaryValue.h, Source/OpenPF2GameFramework/Public/CharacterStats/PF2TemlCalculation.h, Source/OpenPF2GameFramework/Private/CharacterStats/PF2TemlCalculation.cpp
Inventory storage now uses script interfaces, and the weapon interface derives from the item interface. Dice parsing stores its regex locally in the parsing function. The monetary-value tag check and TEML GetValue() definition are also updated.
Automation test support
Source/OpenPF2Tests/OpenPF2Tests.Build.cs, Source/OpenPF2Tests/Private/Tests/*, Source/OpenPF2Tests/Private/Tests/PF2SpecBase.cpp, Source/OpenPF2Tests/Public/Tests/PF2SpecBase.h
Specs use enhanced automation masks, and the spec macros return FEnhancedAutomationTestFlags. Ability-spec dynamic tags use a version-specific API. Tag-library specs cover adding a tag without changing the input and avoiding duplicates.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Feature

Merge Risk: ⚪ Minimal · up to efe76

No actionable regression was established in the compatibility changes; the PR is mergeable after normal checks.

Security architecture risk: 🔵 Low · up to efe76

The inspected changes largely preserve existing gameplay interfaces and tag checks. No newly introduced attack path was established. Some uncertainty remains around engine-managed ability lifecycle and UE 5.8 shutdown cleanup.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The inspected state changes concern host-game ability instances and inventory projections. Their immediate scope is gameplay objects, not a demonstrated new cross-service or infrastructure authority boundary; broader downstream exposure remains unverified.

Security Findings and Attack Paths

  • observed — Dice parsing retains the same anchored expression, integer conversion, and failure outputs. The inspected change moves regex construction from static initialization into first use; it does not change accepted input syntax.

Trust Boundaries and Controls

  • observed — The added container-reference HasTag overload performs the same tag lookup and membership check as the pointer overload. The monetary-value constructor continues checking CurrencyUnit membership rather than removing that validation.

Resilience and Maintainability Implications

  • inferred — The UE 5.8-only destructor clears the active-effect container owner before inherited destruction, intending to avoid a shutdown diagnostic dereference. Repository evidence does not establish how engine-owned pending effects and delegates finish cleanup after detachment. This is a lifecycle assurance gap, not a demonstrated stale-reference vulnerability.
Pre-merge checks: Passed 4 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Docstring Coverage Inconclusive Docstring coverage is 16.28% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 43 functions across 50 files. (5 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: Unreal Engine 5.3 through 5.8 support for OpenPF2.
Description check Passed The description directly explains the engine-compatibility changes, affected APIs, dependency, validation matrix, and follow-up documentation.
Full details: Docstring Coverage

Explanation

Docstring coverage is 16.28% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 43 functions across 50 files. (5 skipped: 1 unsupported, 4 over the file limit.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · 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

I’m a rabbit with a patch in my paws,
Hopping through versions with tidy new clauses.
Tags join their copies, tests wear new flags,
UE branches unfold in neat little zigzags,
Then I nibble a carrot and close my logs.

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

Provide CONTRIBUTING.md on the compatibility branch with the rule to advance copyright end years when changing project-owned files. Preserve original start years, owners, licenses, and third-party attribution.

Contributor guidance belongs with the repository so future edits follow the same copyright maintenance rule.
Advance project-owned copyright end years to 2026 in files touched by the Unreal compatibility changes. Keep each notice's original start year and owner, and preserve all third-party notices and source content.

The contributor guide requires current copyright dates when modifying these files. Exact byte comparisons verify that the edits affect only the project-owned year fields.
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