Polyglot for macro generated messages #170
napolitanod
started this conversation in
Ideas
Replies: 1 comment 6 replies
-
I'm not sure how to handle bubbles, but I've added support to ChatMessage.create() with the new update you just gotta add the following now: ChatMessage.create({
speaker:game.user,
content : "Hello Hello",
type: CONST.CHAT_MESSAGE_TYPES.IC, //or 2. Can also be OOC (1) or WHISPER (4) based on the Scramble OOC Chat Messages setting
lang: "dwarvish" //or "Dwarvish". Optional, if not specified, it'll get the currently selected language on the selector.
},{chatBubble : false}) This should not affect most current functions/macros since they generally aren't written with a type. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
Thought I'd reach out to see if you would be inclined to consider, if it is even possible, extending polyglot API or functionality so it can be tapped for chat messages and chat bubbles created within a macro or script (e.g. module). Below are two different calls to generate either a chat message or chat bubble and, based on my testing, these do not render in polyglot (and the chatbubble I get a console log error message for when sent over socket).
My interest is from a module development standpoint, because it would be cool if a module that generated text could tap into polyglot, providing whatever flags or data may be needed to facilitate the call.
ChatMessage.create({
speaker:game.user,
content : "Hello Hello",
...whatever else module needs
},{chatBubble : false})
canvas.hud.bubbles.say()
Thanks for your time!!!!
Beta Was this translation helpful? Give feedback.
All reactions