Skip to content

Integrate AutoHook for FSH class quests#487

Draft
raitono wants to merge 13 commits into
PunishXIV:new-mainfrom
raitono:autohook
Draft

Integrate AutoHook for FSH class quests#487
raitono wants to merge 13 commits into
PunishXIV:new-mainfrom
raitono:autohook

Conversation

@raitono

@raitono raitono commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

I am completely inexperienced with Dalamud plugin development and would appreciate any and all feedback. I am going to continue adding and testing the FSH quests as I work through them.

This PR is a rough draft of integrating AutoHook for use during FSH class quests. I have only added the first missing quest, Bigger Fish to Fry, for now, so that I can get feedback on this setup.

I encountered many issues with the AutoHook plugin, and I cannot tell whether I implemented AutoHookIpc incorrectly or if the plugin is truly not working through this method. I instead chose to use the plugin's slash commands as a workaround. Unfortunately, this also meant that I could not have Questionable automatically import and clean up a fishing preset for AutoHook. This seems possible based on the IPC code in the AutoHook repo, but it never worked for me.

Because I couldn't automatically import the preset, I created a folder for them on the AutoHook wiki that can be imported in-game.
image

I am willing to continue working on this. My next goal is to implement a few more quests to get more experience with quest scripting and to explore whether I can determine if my issues with the AutoHook IPC are caused by a bug in that plugin. I may also be able to fix that and then undo the preset importing workaround . As with all open-source projects, that will depend on what time and energy I have available. I hope this will at least serve as a good starting point for me or anyone else willing to take it forward.

Update: I made a silly mistake in the IPC and renamed the function delegates without giving them the proper names in the EzIPC attribute. This has now been fixed and the AutoHookIpc is working as intended, as far as I can tell.

@raitono raitono changed the title Integration AutoHook for FSH class quests Integrate AutoHook for FSH class quests Jun 22, 2026
@alydevs

alydevs commented Jun 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks! @LeontopodiumNivale14 was also looking at implementing AutoHook for QST, based on the cosmic exploration plugin. I haven't had the time to look into it myself, and beyond the three Ixal quests that use fishing I hadn't bothered because we don't yet have support for the fishing questline either. Looks good so far.

@ShermTank7272

Copy link
Copy Markdown
Contributor

This is a brilliant effort - I've been writing some quest paths for the FSH quests on my local machine, so if you're able to get the setup working with the first one I can adapt my paths to use this approach.

There should be a way to create temporary presets for AutoHook - I know some plugins like Ice's Cosmic Exploration or Henchman can do that with their auto-fishing functionalities. If you can't figure it out, then we'll just need to make sure to leave a note in the quest path that the presets need to be manually imported.

@Kagekazu

Copy link
Copy Markdown
Member

Me or Ice can add the autohook IPC to make the _anon presets when the rest is done.

@raitono

raitono commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

I feel like that's the piece I'm missing. Just based on the naming and what I could understand from the AutoHook repo, I assumed that CreateAndSelectAnonymousPreset would give me that functionality. It didn't work for me, but I think I broke it when I refactored to use use the IpcInvoke.Safe* methods. I renamed the IPC ones and forgot that EzIPC requires them to be named exactly the same, unless I intentionally set the name in the attribute.

I'm going to give that a try and see if the import starts working.

@raitono

raitono commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

That worked, and the IPC now imports the anonymous preset correctly. This will eliminate the need for the community wiki workaround that I started with. It will also mean that the presets can have a prettier name and won't be required to match the quest ID, since they can be selected as soon as they're created. I also re-enabled the cleanup that deletes the anonymous preset.
image

I still have some outstanding questions I'd like to get feedback on.

  1. What is an acceptable level of reliability in the design of the Fish interaction type and quest path sequencing?
    • For example, I discovered that the player may not be facing the water correctly if the sequence is interrupted after accepting the quest but before moving to the fishing spot. I got lucky that moving directly from the quest NPC to the water faced me in the correct direction. I added an extra movement step so the player faces the correct direction when they reach the final location. This has probably not been an issue for other tasks, since they presumably have a distinct target and the game will make the player face them anyway. Is this an opportunity to extend the position coordinates with a "yaw" or "direction"? I'm not sure this is possible based on my brief glance at NavmeshIpc.
    • On a similar note, I tried to break the sequence up like this, but found that it would skip straight to the complete quest step, which would just accept the other quest that the NPC has since the class quest is not yet complete. I thought it would be simple, but I seem to be missing something about how sequencing works. I wanted this so I could potentially find a way to skip the "Move and Fish" sequence entirely if the player already has the required items. I can skip the Fish step by integrating that into the task, which I did, but I cannot skip the movement. It would be a real shame to have the player fly all the way out to another zone, get out their rod, immediately stop fishing, and fly all the way back to the NPC.
      0: Accept Quest
      1: Move and Fish
      255: Complete Quest
  2. I copied the HasRequestedItems function from the Gather step. I also saw it in the Craft step. Do we think we have the opportunity to refactor these into a shared utility, or should they remain distinct for future flexibility? I generally take copy/pasting as a code smell unless I have a good reason to do it. I did it in this case just to make it easier to get the feature working, which isn't a good enough reason. I just don't know enough about plugin development yet to tell whether this is actually repeated code or whether these cases can truly be considered unique and need their own implementations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants