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.
Motivation
Extend the config file properties to bind properties the save files themselves. This Proof of Concept is setup for MP Profiles (Combat Simulator or CS) and to bind the
Handicap
setting directly to the profile itself without modifying the binary save file.Approach - Profile Extensions Proof of Concept
Introduced new structures (
struct extplayerprofile
andstruct extplayerprop
) to encapsulate extended player profile properties. A save-specific key prefix is generated as :MpPlayer.x%-x%.
,fileguid.deviceserial, fileguid.fileid
This approach can be extended to other save file types (game file, mp setup, bss, perfect head) and/or to associate mod-specific properties with a particular save type.During config file initialization:
fileguid
like slugs are detected from the ini and astruct configentry
is added tosettings
and the pointer is registered to an internal extended player profile tablestruct extplayerprofile
as a new element ofg_ExtendedPlayerProfiles.
When the CS file is actually loaded for the first time during the session
mpExtendedProfileRegister
is called w/ a parameter to actually bind the config entry to the extended profile store.During CS file transitions the initfunc for all properties is called to ensure the right values are bound to the extended profile store / config entry.
Removed uncalled functions and hooked in config extensions into MP save / loading flow.
Related changes
Handicap
as a extended profile entry: Profile handicap extension #562