Skip to content

Bait not swapped when Fisher's Intuition is gained in AutoHook predator/target preset pairs #585

Description

@meltiso

Description

When GBR generates a predator/target preset pair for a Fisher's Intuition fish, AutoHook switches to the target preset on intuition gain, but does not switch bait to the target fish's bait. The predator bait remains active, causing the wrong bait to be used for the next cast.

Personally confirmed on two ARR Fisher's Intuition fish. The issue has also been mentioned by other users on Discord.

Steps to Reproduce

  1. Queue a Fisher's Intuition fish that uses a different bait than its predators.
  2. Let GBR generate the two AutoHook presets (*_Predators + *_Target).
  3. Start auto-gather. Catch enough predator fish for Fisher's Intuition to trigger.
  4. Observe: AutoHook switches to the *_Target preset but keeps the predator bait active instead of switching to the target fish's bait.

Possible Lead

Looking at AutoHookPresetBuilder.cs, BuildPredatorPreset sets the preset swap on intuition gain, but does not appear to set a bait swap at the same time:

preset.ExtraCfg.SwapPresetIntuitionGain = true;
preset.ExtraCfg.PresetToSwapIntuitionGain = targetPresetName;
// Possibly missing:
// preset.ExtraCfg.SwapBaitIntuitionGain = true;
// preset.ExtraCfg.BaitToSwapIntuitionGain = <target bait>;

The fields SwapBaitIntuitionGain and BaitToSwapIntuitionGain do exist in the AutoHook schema — for example, a manually configured preset with these fields set looks like:

"ExtraCfg": {
  "Enabled": true,
  "SwapBaitIntuitionGain": true,
  "BaitToSwapIntuitionGain": {
    "Id": 2585,
    "Name": "Lugworm"
  },
  "SwapPresetIntuitionGain": true,
  "PresetToSwapIntuitionGain": "Nepto Dragon",
  "ForceBaitSwap": true,
  "ForcedBaitId": 2606,
  ...
}

The ForcedBaitId set by ConfigureExtraCfg on the target preset may not be sufficient to trigger an immediate bait change when the preset is swapped mid-session — but I haven't verified this fully.

If this is indeed the cause, a possible fix in BuildPredatorPreset (after ConfigureExtraCfg) could look something like:

var targetBait = targetFish
    .Where(f => f.Predators.Length == 0 && f.Mooches.Length == 0 && f.InitialBait.Id != 0)
    .Select(f => f.InitialBait)
    .FirstOrDefault();

if (targetBait != null)
{
    preset.ExtraCfg.SwapBaitIntuitionGain = true;
    preset.ExtraCfg.BaitToSwapIntuitionGain = new AHBaitConfig((int)targetBait.Id)
    {
        Name = targetBait.Name[GatherBuddy.Language]
    };
}

It may also be worth checking the symmetric case: whether BuildTargetPreset should set SwapBaitIntuitionLost to revert to the predator bait if intuition is lost.

Happy to provide more details or test any fix. Thanks for the great plugin!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions