draconas1/foundry-4e-tools

[Request] Any chance for Token Action HUD + CUB/Condition Lab compatibility?

FoxLee opened this issue · 8 comments

I love having conditions available in Token Action HUD, but I also use Combat Utility Belt's Condition Lab to customise condition icons and link conditions to reference journal entries. Is there any chance you could get Token Action HUD refer to the customised set, like the regular Token HUD does?

(I'm asking here because it doesn't seem that Token Action HUD has conditions by default, and therefore you've added them? I don't know if I'm correct about that, so do forgive me if I should ask Token Action HUD's developer instead.)

The entire TAH integration is me, so this is as good a place as any to ask, a slightly better place is my fork of TAH, because the integration actually lives in TAH, not in 4E or the tools (sadly, I would love it if they wrote a custom integration point so i could keep all the code together), but fundamentally I see all issues across my repos, and most of the rest of my integrations live here.

The answer is no, because I don't use CUB (I tried but didn't get on with it), I had tried to keep the CUB integration code that 5th ed had, and hoped that like skills and abilities, it would "just work". But if it doesn't then I am not going to have the time to debug a complex integration that I don't personally use sorry.

It's the toggleCondition method in https://github.com/Drental/fvtt-tokenactionhud/blob/master/scripts/rollHandlers/dnd4e/dnd4e-base.js That sets it and tries to farm out to CUB if it thinks it can, and I have no idea why that might not be working.

Fair enough! Thanks for pointing me in the right direction anyway, I appreciate it.

I just realised—you mentioned the roll handler, but the disconnect isn't in the click handling. It's in whatever retrieves the list of conditions.

Looking at the files, it looks like CUB updates the CONFIG global with its custom condition list, so it refers to CONFIG.statusEffects when it reads/writes those. Whereas in TAH you seem to be looking specifically at DND4EBETA.statusEffect, which would circumvent that. Am I understanding your work on TAH correctly there?

[Edit] Okay, I replaced both references to DND4EBETA.statusEffect with CONFIG.statusEffects on my end and it does indeed make things behave with CUB. It seems like it also works normally without the CUB module running. Do you mind if I submit a pull request with that update? Assuming you don't find it causing any problems, of course.

I mean that sounds like the sort of shortcut I would take if I couldn't remember where the game was storing status effects and yes, would totally ignore whatever CUB was doing.

I have raised Drental/fvtt-tokenactionhud#166 with the fix

Ta much :}

@FoxLee did it work BTW?

Yeh! Doesn't seem to have any problems now :)