DrBibop / Archipelago_Inscryption

Archipelago Multiworld integration for Inscryption.
MIT License
3 stars 0 forks source link

Card duplication when loading existing Archipelago save #3

Closed JKLeckr closed 11 months ago

JKLeckr commented 11 months ago

The Problem

When I start the game and load an existing archipelago save and continue the game ("continue" from the main menu), I notice that I am getting duplicate cards like Caged Wolf and Shunted Wolf. This is every time I load the AP save so if I need to restart the game because of a connection error, I would get a new set of duplicates. I only tested this on Act 1, but it may affect the other acts too.

To Reproduce

  1. Start the game and create a new Archipelago game
  2. From the main menu choose "Continue"
  3. Quit the the game
  4. Restart the game and load the existing Archipelago game. Note the logs of reapplying certain items
  5. From the main menu choose "Continue"
  6. Observe the deck

Screenshot:

Screenshot from 2023-12-22 00-00-13

Log:

Note: For privacy sakes of the other players I was playing with, I substituted their names with unique numbered names.

[Message:   BepInEx] BepInEx 5.4.19.0 - Inscryption (10/27/2023 10:58:50 AM)
[Info   :   BepInEx] Running under Unity v2019.4.24.6137584
[Info   :   BepInEx] CLR runtime version: 4.0.30319.17020
[Info   :   BepInEx] Supports SRE: False
[Info   :   BepInEx] System platform: Bits64, Windows
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.19.0]
[Info   :   BepInEx] 1 patcher plugin loaded
[Info   :   BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Message:   BepInEx] Preloader finished
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 1 plugins to load
[Info   :   BepInEx] Loading [ArchipelagoMod 0.2.0]
[Message:   BepInEx] Chainloader startup complete
[Info   :   Console] Searching for compatible XInput library...
[Info   :   Console] Found Xinput1_4.dll.
[Info   : Unity Log] Received stats and achievements from Steam

[Warning: Unity Log] Font size and style overrides are only supported for dynamic fonts. Font 'Marksman (Crisp)' is not dynamic.
[Info   :ArchipelagoMod] Connecting to archipelago.gg:53880 as JKL-Inscryption...
[Warning:ArchipelagoMod] Item ID 147038 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147019 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147031 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147024 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147021 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147019 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147001 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147012 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147020 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147029 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147003 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147005 didn't apply properly. Retrying...
[Message:ArchipelagoMod] JKL-Inscryption (Team #1) playing Inscryption has joined. Client(0.4.1), [].
[Message:ArchipelagoMod] Now that you are connected, you can use !help to list commands to run via the server. If your client supports it, you may have additional local commands you can list with /help.
[Info   : Unity Log] Test save file:
[Info   : Unity Log] DiskCardGame.StoryEventsData
[Info   :ArchipelagoMod] DeathLink is set to False
[Message:ArchipelagoMod] Received Holo Pelt from [redacted1]
[Message:ArchipelagoMod] Received Epitaph Pieces from [redacted2]
[Message:ArchipelagoMod] Received Nano Armor Generator from [redacted2]
[Message:ArchipelagoMod] Received Mycologists Holo Key from [redacted2]
[Message:ArchipelagoMod] Received Bone Lord Femur from [redacted1]
[Message:ArchipelagoMod] Received Epitaph Pieces from [redacted1]
[Message:ArchipelagoMod] Received Stunted Wolf Card from [redacted1]
[Message:ArchipelagoMod] Received Extra Candle from [redacted1]
[Message:ArchipelagoMod] Received Monocle from [redacted1]
[Message:ArchipelagoMod] Received Dock's Clover Plant from [redacted1]
[Message:ArchipelagoMod] Received Skink Card from [redacted1]
[Message:ArchipelagoMod] Received Caged Wolf Card from [redacted3]
[Info   : Unity Log] Test save file:
[Info   : Unity Log] DiskCardGame.StoryEventsData

My YAML:

Inscryption:
  progression_balancing: 50
  accessibility: items

  # false: Only die when you die (vanilla).
  # true: When other players using deathlink die, you die as well.
  deathlink: 'false'

  # 0: Send a death when sacrificed by Leshy. Receiving a death will extinguish all candles.
  # 1: Send a death when a candle is extinguished. Receiving a death will extinguish a candle.
  act1_deathlink_behaviour: 0

  # 0: Complete each act and the epilogue in order. You can return to previously completed acts.
  # 1: Complete each act in any order, then the epilogue. All acts are available from the start.
  # 2: Complete Act 1 by finding the New Game button. Great for a smaller scale randomizer.
  goal: 1

  # false: No code randomization (vanilla)
  # true: randomizes certain codes and passwords so that you can't unlock everything by memory.  
  randomize_codes: 'false'

  # 0: No deck randomization (vanilla).
  # 1: Randomize cards within their type on each encounter (Common/Rare, only works on act 1 for now).
  # 2: Randomize cards completely on each encounter.
  randomize_deck: 0

  # 0: No ability randomization (vanilla).
  # 1: Randomize modded abilities only (like those gained from sacrifices).
  randomize_abilities: 0

  # 0: Make a death card on every act 1 death (vanilla).
  # 1: Gain the option to skip death cards on every act 1 death.
  # 2: Gain the option to skip death cards only when dying from death link in act 1.
  optional_death_card: 0

  # false: Play through the tutorial (vanilla).
  # true: Skip the first few tutorial runs. Bones are available from the start.
  skip_tutorial: 'true'

  # 0: Randomizes all nine pieces as their own item.
  # 1: Randomizes pieces in groups of three.
  # 2: Group all nine pieces as a single item.
  epitaph_pieces_randomization: 1

description: 'Template file from https://github.com/DrBibop/Archipelago_Inscryption/releases'
game: Inscryption

# Change this to your own username
name: JKL-Inscryption

APWorld sha256:

b7f3a5e99fcef9d1668818b08e86f34f9d32ef34754264a20e44265e2cf42dd3 inscryption.apworld

If there is anything extra that is needed, feel free to reach out.

DrBibop commented 11 months ago

Looks like an issue with the save file. Usually, if you receive items, it shouldn't have to reapply again if everything saved correctly. I'll try to reproduce those steps.

DrBibop commented 11 months ago

Looking back at our code, there is a possibility that the save file is being loaded too late which makes the mod think some items weren't applied properly.

Try downloading this version and see if it fixes the issue: https://we.tl/t-MG8s8k9DH7

In the mod manager, go to "Settings" > "Locations" > "Browse profile folder". In the folder that appears, go to "BepInEx\plugins\Ballin_Inc-ArchipelagoMod" and put the downloaded file there.

JKLeckr commented 11 months ago

It does seem to be fixed. Though, I noticed in the log I am still being reapplied Epitaph Pieces. It does not seem like there are problems with duplication with those though.

Log:

[Message:   BepInEx] BepInEx 5.4.19.0 - Inscryption (10/27/2023 10:58:50 AM)
[Info   :   BepInEx] Running under Unity v2019.4.24.6137584
[Info   :   BepInEx] CLR runtime version: 4.0.30319.17020
[Info   :   BepInEx] Supports SRE: False
[Info   :   BepInEx] System platform: Bits64, Windows
[Message:   BepInEx] Preloader started
[Info   :   BepInEx] Loaded 1 patcher method from [BepInEx.Preloader 5.4.19.0]
[Info   :   BepInEx] 1 patcher plugin loaded
[Info   :   BepInEx] Patching [UnityEngine.CoreModule] with [BepInEx.Chainloader]
[Message:   BepInEx] Preloader finished
[Message:   BepInEx] Chainloader ready
[Message:   BepInEx] Chainloader started
[Info   :   BepInEx] 1 plugins to load
[Info   :   BepInEx] Loading [ArchipelagoMod 0.2.0]
[Message:   BepInEx] Chainloader startup complete
[Info   :   Console] Searching for compatible XInput library...
[Info   :   Console] Found Xinput1_4.dll.
[Info   : Unity Log] Received stats and achievements from Steam

[Warning: Unity Log] Font size and style overrides are only supported for dynamic fonts. Font 'Marksman (Crisp)' is not dynamic.
[Info   :ArchipelagoMod] Connecting to archipelago.gg:53880 as JKL-Inscryption...
[Info   : Unity Log] Test save file:
[Info   : Unity Log] DiskCardGame.StoryEventsData
[Warning:ArchipelagoMod] Item ID 147019 didn't apply properly. Retrying...
[Warning:ArchipelagoMod] Item ID 147019 didn't apply properly. Retrying...
[Message:ArchipelagoMod] JKL-Inscryption (Team #1) playing Inscryption has joined. Client(0.4.1), [].
[Message:ArchipelagoMod] Now that you are connected, you can use !help to list commands to run via the server. If your client supports it, you may have additional local commands you can list with /help.
[Info   :ArchipelagoMod] DeathLink is set to False
[Message:ArchipelagoMod] Received Epitaph Pieces from [redacted2]
[Message:ArchipelagoMod] Received Epitaph Pieces from [redacted1]
[Info   : Unity Log] Test save file:
[Info   : Unity Log] DiskCardGame.StoryEventsData
DrBibop commented 11 months ago

Does it reapply everytime like the previous times? And do you see 6 pieces available to you in Grimora's crypt?

JKLeckr commented 11 months ago

They do reapply each time, and there are indeed six pieces each time as intended.

DrBibop commented 11 months ago

It might be our item verification code that's wrong. I'll take another look.

DrBibop commented 11 months ago

The issue was found and fixed with this commit.

The item verification step was taking place before options were retrieved so the mod didn't know you chose to group epitaph pieces yet. The good news is this doesn't harm anything in any way apart from getting the notification everytime you connect. We'll post an official update with those fixes sometime soon after we fix something else related to deathlink. Thanks for reporting those issues!