Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v3.8:

### Save Options v1.3
- Fixed issue with newly created characters inheriting options from previously loaded character.

## v3.7: Meteor Shower

### [Console Mod Menu v1.6](https://github.com/bl-sdk/console_mod_menu/blob/master/Readme.md#v16)
Expand Down
2 changes: 1 addition & 1 deletion src/save_options/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"register_save_options",
)

__version_info__: tuple[int, int] = (1, 2)
__version_info__: tuple[int, int] = (1, 3)
__version__: str = f"{__version_info__[0]}.{__version_info__[1]}"
__author__: str = "bl-sdk"

Expand Down
8 changes: 3 additions & 5 deletions src/save_options/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,19 @@ def save_game(_1: UObject, args: WrappedStruct, _3: Any, _4: BoundFunction) -> N
save_options.options.any_option_changed = False


@hook("WillowGame.WillowSaveGameManager:EndLoadGame", Type.POST, immediately_enable=True)
def end_load_game(_1: UObject, _2: WrappedStruct, ret: Any, _4: BoundFunction) -> None: # noqa: D103
@hook("WillowGame.WillowPlayerController:FinishSaveGameLoad", immediately_enable=True)
def end_load_game(_1: UObject, args: WrappedStruct, _3: Any, _4: BoundFunction) -> None: # noqa: D103
# We hook this to send data back to any registered mod save options. This gets called when
# loading character in main menu also. No callback here because the timing of when this is
# called doesn't make much sense to do anything with it. See hook on LoadPlayerSaveGame.

# Often we'll load a save from a character with no save data. We'll set all save options
# to default first to cover for any missing data.

for mod_save_options in registered_save_options.values():
for save_option in mod_save_options.values():
set_option_to_default(save_option)

# This function returns the new save game object, so use a post hook and grab it from `ret`
save_game = ret
save_game = args.SaveGame
if not save_game:
return
extracted_save_data = _extract_save_data(save_game.UnloadableDlcLockoutList)
Expand Down
Loading