fix: resolve Phase 6 compilation errors - unblock testing

- Made F4AnimationDescriptor constructor public
- Fixed logging macros by using std::string_view and renaming helpers
- Fixed int32_t/uint32_t type mismatch in animation variable reads/writes
- Disabled actor state flag setting (needs bitfield mapping in Phase 7)
- Disabled dynamic spawn APIs pending CommonLibF4 verification (Phase 7)
- Added move semantics to RemoteActionQueue for ProxyActorSlot

Build status: clean compilation, Phase 6 testing ready with pre-placed proxies

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-03 17:18:15 +12:00
co-authored by Cursor
parent 56d9c2c514
commit fb59eea0a2
6 changed files with 118 additions and 75 deletions
+54
View File
@@ -4274,4 +4274,58 @@ By using SetPosition() only for network sync (~300ms) and letting the AI drive m
If yes → Animations working! Tune sync intervals as needed.
If no → Investigate why Move() isn't being called or velocity isn't updating.
```
---
## 2026-06-03 - Compilation Error Fixes (Phase 6 Unblock)
### What Changed
**Compilation Errors Resolved:**
1. **Private Constructor Issue**: `F4AnimationDescriptor` had a private default constructor that prevented global singleton initialization.
- **Fix**: Changed constructor to public; removed duplicate declaration in private section.
2. **Logging Macro Incompatibility**: `REX::INFO` and `REX::WARN` expect format strings with std::string_view, not std::string parameters.
- **Fix**: Renamed helper functions from `LogInfo/LogWarning` to `LogInfoMessage/LogWarningMessage` and wrapped arguments with `std::string_view{...}`.
3. **Type Mismatch in `GetGraphVariableImplInt`**: CommonLibF4's API expects `std::int32_t&` but we were passing `std::uint32_t&`.
- **Fix**: Created a temporary `int32_t` for the API call, then cast result to `uint32_t` for snapshot storage in both `TryReadIntVariable` and `TryWriteIntVariable`.
4. **Actor State Access**: Initially tried accessing `actorState.flags1/flags2` but Actor inherits from ActorState as a base class, not as a member.
- **Fix**: Disabled actor state flag setting for Phase 6; marked as TODO for Phase 7 (requires bitfield mapping instead of direct flag assignment).
5. **Dynamic Spawn API Incompatibility**: Phase 4's `SpawnDynamicProxyActor` used CommonLibF4 APIs that don't exist or have different signatures (`LookupByID`, `PlaceAtMe`, `IsDead` parameter).
- **Fix**: Disabled dynamic spawning for Phase 6 testing; falls back to pre-placed proxy pool. Marked as TODO for Phase 7 API verification.
6. **Move Semantics**: `RemoteActionQueue` in `ProxyActorSlot` had deleted copy operators but no move operators, causing template instantiation errors.
- **Fix**: Added explicit move semantics: `RemoteActionQueue(RemoteActionQueue&&) noexcept = default;`
### Build Status
✅ **SUCCESS** - Plugin compiles clean with only non-critical warnings (unreferenced parameters, unreachable code).
### Current Limitations
- Dynamic actor spawning disabled (uses Phase 4 pre-placed proxy pool fallback)
- Actor state bitfield updates deferred to Phase 7
- Some CommonLibF4 APIs need verification for FO4-specific implementations
### Next Steps
- **IMMEDIATE**: Start Phase 6 testing with proxy animations
- **Phase 7**: Verify and fix CommonLibF4 API usage for dynamic spawning
- **Phase 7**: Implement actor state bitfield mapping (combat, sneaking, etc.)
- **Phase 7**: Full code cleanup and documentation
### Key Discovery
The compilation errors were mostly API surface mismatches between the codebase assumptions (based on Skyrim SE patterns) and FO4's CommonLibF4 implementation. The core animation logic is sound; we just needed to:
1. Work with the correct C++ language features (move semantics)
2. Match the exact logging/API signatures
3. Use fallback mechanisms where APIs differ
This is a good indication that the phased, iterative approach is working - we can disable unverified Phase 4 code and proceed with Phase 6 testing.
```