Latest version | 0.3.7 |
---|---|
Minimum Core | 11 |
Compatible Core | 12 |
Last updated | 35 minutes ago |
Created | 9 months ago |
Authors |
|
Languages |
English |
Systems | All systems |
Project source | Project URL |
A module for foundryvtt that renders chat messages on a per-scene basis.
game.modules.get("scenemessage").api.load() will bring up a dialog allowing you to load a number of chat messages of your choice (or the next 100 if you hit the 💯 button). This can be useful if your scene does not have enough messages sorted into it to allow scrolling, thus allowing you to access chat logs from older than the most recent 100 messages. Clientside, available to users. I considered adding sockets to allow the GM to do this for all users on the currently viewed scene, but because normal chat scroll is left to the user, I thought this should be as well.
game.modules.get("scenemessage").api.global() will set a flag that marks the currently viewed scene to show all chat messages. Useful if no scenes with ids that match messages exist, or whatever. Use it again to restore original module behavior. GM Only.
game.modules.get("scenemessage").api.inherit() will bring up a dialog allowing you to mark the currently viewed scene with an id. Messages that were created on a scene with a matching id will then appear in the scene that has inherited the id as if they were created in them (they will no longer appear in the original scene without a reload). This is not intended to allow messages to appear in two scenes at once: rather, this is intended to allow messages to carry over to a new scene should it need to be recreated or revisted after losing its original id. To facilitate this, please enabled "Allow Inherited Scene IDs" in the settings. GM Only. ※ Get your scene id by left clicking the compendium icon in the header when you open it with Configure. Keep track of your scene IDs if you plan to make use of this feature!
※ Execute these in the console (F12) or add them to 'script' type macros to execute.
This is a system agnostic module, but I am willing to add support for system specific messages that are not being correctly sorted, but should be. I mostly use foundry for dnd5e—users of other systems are free to make an issue asking for specific support (please provide necessary details). The current state of the module should cover most use cases, so please be specific in cases where it does not.
Because foundry only loads the last 100 chat messages, scenes which have fewer than a scrollbar's worth of chat messages flagged to appear in them in the last 100 cannot scroll up, and because of that they cannot load any older messages. Please use the first API method to overcome this if needed: for best results, do not load more than you need, though loading large numbers may not be able to be avoided if you have a world with many messages.
Please let me know if you encounter any issues (report them in Issues).
Scope: Compares currently viewed scene (game.scenes.viewed.id
) with message.speaker.scene
on chat messages, and adds the latter to the chat message's dataset (on render) for culling via display: none
on scene change. If OOC sort is on, accomplishes the same by adding message.speaker.scene
to the normally empty message.speaker
object of OOC chat messages.
License: MIT License.
Additional Info: Thanks to mxzf for help with the css.
To install this package, open your Foundry Setup screen and navigate to your Module tab and click the Install Module button.
From there, you can either search for the package unique name: scenemessage or copy its manifest URL:
And paste it to the input box at the bottom of your window.
You can install this package directly to your Forge account.
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Advertisement cookies are used to deliver visitors with customized advertisements based on the pages they visited before and analyze the effectiveness of the ad campaign.
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.