compacted chat cards

Modules create problems to solve problems... Today's problem: "When I roll an attack, it eats the whole vertical of my monitor with just that one attack..." The tradeoff with my modular combat modules is that each one creates its own chatcard. So I made a module that will check if a chat card being rendered is from the same actor as the one above it, and if so, collapse it upwards with css. Also various other purely-css tweaks to 5e Roll Cards.
No description
C
Calego829d ago
Here's the same-ish view without said new module
No description
C
Calego829d ago
how it works: An async hook on renderChatMessage gets the indexOf the chatMessage being rendered in game.messages.contents array. Check some properties (data.speaker mostly) on both the current and previous message by index. If they're from the same actor, add a class to the rendered html, if not, do nothing. From there it's all css based on the added class name. I'm a little nervous about how much that might blow up with worlds that have lots of chat messages. Not sure how indexOf works, does it loop through the array or is it fancier than that? looks like it does iterate, nothing fancy oof Well if anyone has any nifty ways I could make that process more efficient I'm all ears.
Want results from more Discord servers?
Add your server
More Posts
dragdrop shenneneginsRight now, a user can drag a spell onto their character sheet. I store that in a 'spell' array and leffect mini modulesI've gotten to the point where I'm confident in releasing a slurry of tiny no-config Active Effect rdamage application hooksNew 5e Hook ideas, gimme yer thoughts: `Hooks.call('Actor5e.preDamageApplied')` args: `damageAmounthook conventionsRegarding hooks, is the convention that _all_ `pre...` hooks are executed on the machine that initiaexpand arraysIs there a way to `expandObject` except for an Array?edit-owned-item-effectI've made an abomination. This hacks its way past the limitations surrounding editing effects on ownItem Pile feedbackSimple is king!effects to chat@badideasbureau is the `temporary` flag you look for in Effects to Chat a convention from somewhere 5e AEsI've been messing pretty heavily with some Active Effect assumptions and mechanisms in 5e. This is mhero creator ui feedbackI'm trying to refactor the abilities' tab on the hero creation room to accomodate Race ASIs, but I deffect mechanic searchingI need someone to check me on a null hypothesis I'm making. > There are no abilities in 5e RAW whicDialog shennaneginsTIL the button callbacks for `Dialog.prompt` and `Dialog.confirm` can be asynchronous. ```js const Advancement Hooks@kandashi @ccjmk and anyone else who is currently working on modules that would interact with the AdAPI doc topicsGive me some ideas for what areas of the foundry core API would benefit from a wiki documentation pa