MonsterBlocks icon indicating copy to clipboard operation
MonsterBlocks copied to clipboard

Does not recognize 4.x enrichers

Open ctbritt opened this issue 11 months ago • 2 comments

Great to see this updated, thanks! But it doesn't recognize 4.x enrichers.

Image

The generated attacks are good, but if the enrichers are present, maybe forego the automated attack descriptions and use the enricher descriptions instead?

ctbritt avatar Jan 27 '25 19:01 ctbritt

Is this the same issue as #230 or is there additional new stuff for 4.x?

zeel01 avatar Jan 27 '25 20:01 zeel01

At first glance, I believe the main fix here is to add a relativeTo to the enrichHTML call (currently at MonsterBlock5e.js:97).

-   const value = await TextEditor.enrichHTML(item.system.description.value, { secrets: (data.owner && !data.flags["hidden-secrets"])});
+   const value = await TextEditor.enrichHTML(item.system.description.value, { relativeTo: item, secrets: (data.owner && !data.flags["hidden-secrets"])});

Didn't test it much yet, but should cover the basics.

Aioros avatar Jan 30 '25 21:01 Aioros