Modifications on DPF#3
Open
vinymayan wants to merge 24 commits into
Open
Conversation
Removed Visual Studio workspace and configuration files. Major overhaul of CMakeLists.txt to improve build configuration, add resource handling, and update compiler settings. Updated CMakePresets.json with new overlay ports and build types. Replaced vcpkg-configuration.json and revised vcpkg.json to update dependencies and add package overrides.
Added a .gitignore entry for the .vs directory and deleted the SKSE_Plugin/.vscode/launch.json file to clean up project configuration.
Moved implementation from src/ to include/ as header files and updated includes to use headers. Added new CMake scripts for source/header lists and output management. Updated vcpkg dependencies and removed unused target_link_libraries from CMakeLists.txt.
Enable build
Removed the custom log.h implementation and replaced it with logger.h using spdlog for logging. Updated all logging calls throughout the codebase to use the new logger interface, improving consistency and log output. Updated CMake header list and removed log.h from includes.
Moved function and class method implementations from header files to corresponding source files for improved code organization and compilation speed. Updated headers to contain only declarations, and added new .cpp files for Services, form, model, persistence, serializer, and related modules.
Replaced std::lock_guard<std::mutex> with std::lock_guard for brevity across multiple source files. Improved const correctness in function signatures and lambda parameters. Cleaned up plugin.cpp by moving OnMessage into an anonymous namespace and removing unnecessary blank lines.
Replaced direct Read/Write calls with template usage for serializer methods to improve type safety and consistency. Updated function signatures to use const references and const qualifiers where appropriate. Cleaned up formatting, removed redundant code, and improved error handling in several files.
Changed logger::trace calls to use format strings for improved readability and consistency, displaying values with explicit formatting (e.g., hexadecimal for form IDs).
Added DPF_Settings.json
GetOrCreateFormByOwnerKeyEx so it knows now if the formid already existed
Author
|
Remember to when build remove the logger info of when save stuff since i was testing on release 🫠 |
eu esqueciiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
API Changes
DPF::InterfaceVersionto4.CreateByTypeForOwner(const char* owner, const char* key, uint32_t formType)GetOrCreateByOwnerKey(const char* owner, const char* key, uint32_t formType)ReleaseByOwnerKey(const char* owner, const char* key)ReleaseByLocalId(uint32_t localId, const char* owner)ReleaseOwner(const char* owner)CreateByType(formType)GetOrCreateByLocalId(localId, formType)GetOrCreateByFormId(formId, formType)Global Registry Behavior
Data/SKSE/Plugins/DPF.jsonis now the single global registry for DPF FormID slots.schemaVersion: 2.localIdformTypestateownerkeylocalId, not the full FormID.Dynamic Persistent Forms.esp.Ownership Rules
owner + keyuniquely identifies a named slot.GetOrCreateByOwnerKey(owner, key, type):nullptrif the owner/key exists with a different type;CreateByTypeForOwner(owner, key, type)follows the same owner/key behavior.ownerandkey.formType.Release / Cleanup Behavior
ReleaseByOwnerKey(owner, key)removes a single owned slot.ReleaseByLocalId(localId, owner)only releases the slot if the owner matches.ReleaseOwner(owner)removes all slots owned by that owner and returns the number released.DPF.json, making those local IDs available again.Schema Handling
DPF.jsonis missing, invalid, or not schema2, DPF starts with an empty registry and rewrites the file using schema2.Consumer Mod Flow
GetOrCreateByOwnerKey(owner, key, formType)for stable owned slots.owner + key;