Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[QUESTION]: adding a new spell group #272

Open
Sillsoft42 opened this issue Oct 12, 2024 · 8 comments
Open

[QUESTION]: adding a new spell group #272

Sillsoft42 opened this issue Oct 12, 2024 · 8 comments
Labels
enhancement New feature or request

Comments

@Sillsoft42
Copy link

I'm using a class from a module (Apothecary from Sebastian Crowe's Guide to Drakkenheim) and it has a different spell slot system setup. Is there a way I can get it so the spells I have placed on my character show up in the token action hud?

System: dnd5e 4.0.4

@Sillsoft42 Sillsoft42 added the enhancement New feature or request label Oct 12, 2024
@Larkinabout
Copy link
Owner

What's the module? If they store them differently than spells, then the module might need to use Token Action HUD Core's hooks to add them to the HUD.

@Larkinabout
Copy link
Owner

Oh, it's a premium module, so they're probably not going to add support for Token Action HUD. You might need to create a separate module to do it, but it depends in what their class implementation is actually doing and how it's storing the spells in the actor. Unfortunately, I can't support it myself as I don't own the module.

@Sillsoft42
Copy link
Author

Yeah, that's what I figured. I have my own personal module that I could probably use to create the hooks. Could you tell me which hooks I would need to use as a starting point.

Looking at the actor object, they add the following item to the system.spells object on the actor.
{
"type": "apothecary",
"level": 1,
"max": 1,
"value": null
}

@Sillsoft42
Copy link
Author

I tried messing around today using the system template example and I haven't been able to make it very far so I'm probably doing something wrong. At one point, I did seem to get a new group to show up but now I can't even get that working again.

@Larkinabout
Copy link
Owner

I'll have to have a think how to do it on top of the system module. Ultimately, you'd need to add your group on the tokenActionHudCoreRegisterDefaults, add an extender of the action handler on tokenActionHudCoreAddActionHandlerExtenders, then also add an extender for the roll handler. The hook for the latter doesn't exist yet, but it's in development for the next release.

@Sillsoft42
Copy link
Author

I appreciate you looking into it. TAH is such a great module.

@Sillsoft42
Copy link
Author

So I'm taking another run at doing this and I've figured out how to add a new group but I'm stuck on the next steps.

I also don't fully understand what the 'action handler' does and what the 'roll handler' does

Which bit is the part where I look at an actor and figure out what items show up in this new group that I added.

@madseumas
Copy link

If it still helps the action handler is where you look at an actor and figure out how to make items show up and the roll handler is where you take the encoded value from the event generated by someone clicking on a button and have it do the roll.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants