Go to Page... |
## DependsOn: LibChatMessage
local chat = LibChatMessage("MyAddon", "MA") -- long and short tag to identify who is printing the message chat:Print("Simple message") -- instead of d() chat:Printf("Formatted %s", "message") -- instead of df() chat:SetTagColor("ff0000"):Print("Message with a different tag color") -- To change the tag color for e.g. warnings. The message itself can be colored with a color tag, although I can't really recommend doing that chat:SetEnabled(false) -- in case the output of this ChatProxy should be enabled. Could be used when a settings is supposed to disable chat messages for an addon chat:Print("Ignored message") -- won't show up
/chatmessage <command> [argument] <time> [on/off] Enables or disables the time prefix <chat> [on/off] Controls the time prefix on regular chat <format> [auto/12h/24h] Changes the used time format <tag> [off/short/long] Changes the length of the used tag <history> [on/off] Restore old chat after login <age> [seconds] The maximum age of restored chat Example: /chatmessage tag short
local chat = LibChatMessage.Create(longTag, shortTag)
local chat = LibChatMessage(longTag, shortTag)
local chat = chat:SetTagColor(color)
chat:Print(message)
chat:Printf(formatString, ...)
chat:SetEnabled(enabled)
LibChatMessage:ClearChat()
LibChatMessage:ClearHistory()
LibChatMessage:GetHistory()
LibChatMessage:SetTimePrefixEnabled(enabled)
local enabled = LibChatMessage:IsTimePrefixEnabled()
LibChatMessage:SetTimePrefixEnabled(enabled)
local enabled = LibChatMessage:IsTimePrefixEnabled()
LibChatMessage:SetTimePrefixFormat(format)
local format = LibChatMessage:GetTimePrefixFormat()
LibChatMessage:SetTagPrefixMode(mode)
local mode = LibChatMessage:GetTagPrefixMode()
LibChatMessage:SetChatHistoryEnabled(enabled)
local enabled = LibChatMessage:IsChatHistoryEnabled()
local enabled = LibChatMessage:IsChatHistoryActive()
LibChatMessage:SetChatHistoryMaxAge(maxAge)
local maxAge = LibChatMessage:GetChatHistoryMaxAge()
LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE) LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE, reformatLinkFunc)
local function reformatLink(linkStyle, linkType, data, displayText) return ZO_LinkHandler_CreateLinkWithFormat(displayText, nil, linkType, linkStyle, data) end LibChatMessage:RegisterCustomChatLink(YOUR_LINK_TYPE, reformatLink)
function addon:OnLinkClicked(link, button, text, color, linkType, ...) if linkType ~= YOUR_LINK_TYPE then return end if button == MOUSE_BUTTON_INDEX_LEFT then -- Do your stuff elseif button == MOUSE_BUTTON_INDEX_MIDDLE then -- Do your stuff end return true -- link has been handled end function addon:InitLinkHandler() LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_CLICKED_EVENT, self.OnLinkClicked, self) LINK_HANDLER:RegisterCallback(LINK_HANDLER.LINK_MOUSE_UP_EVENT, self.OnLinkClicked, self) end
File Name |
Version |
Size |
Uploader |
Date |
1.1.3 |
5kB |
sirinsidiator |
03/02/20 01:26 PM |
|
1.1.2 |
5kB |
sirinsidiator |
03/02/20 12:10 PM |
|
1.1.1 |
6kB |
sirinsidiator |
02/25/20 01:55 PM |
|
1.1.0 |
6kB |
sirinsidiator |
02/24/20 02:43 AM |
|
1.0.1 |
5kB |
sirinsidiator |
06/01/19 05:15 AM |
|
1.0.0 |
5kB |
sirinsidiator |
05/28/19 09:18 AM |
![]() |
Comment Options |
stifu |
View Public Profile |
Send a private message to stifu |
Find More Posts by stifu |
Add stifu to Your Buddy List |
ownedbynico |
View Public Profile |
Send a private message to ownedbynico |
Find More Posts by ownedbynico |
Add ownedbynico to Your Buddy List |
![]() |
||
Re: Version variable
Code:
## DependsOn: LibChatMessage>=105 |
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
|
Version variable
Hey, it would be nice if there was a variable that returns the version of the lib.
Im using it for custom links in Wizard's Wardrobe and people with a old version of this lib get UI errors (obviously). This way I could check if its 1.2.0 or newer and tell them to update. ![]() Edit: Nvm, a simple way would be to check function RegisterCustomChatLink() exists. lul
Last edited by ownedbynico : 01/26/22 at 02:09 PM.
|
![]() |
![]() |
ownedbynico |
View Public Profile |
Send a private message to ownedbynico |
Find More Posts by ownedbynico |
Add ownedbynico to Your Buddy List |
![]() |
||
Re: Questions...
In the specific case of printing messages to chat, it also means that when someone used d() to show the user a message in chat, it is no longer possible to separate them from actual debug messages done by other addons. For example DebugLogViewer takes all d() messages and instead of showing them in chat, shows them in the debug log, since they are supposed to be debug messages. As for CHAT_SYSTEM:AddMessage(), that function was actually split up into two new function and only exists as a compatibility alias. d() now uses CHAT_ROUTER:AddDebugMessage(messageText) and CHAT_SYSTEM:AddMessage() calls CHAT_ROUTER:AddSystemMessage(messageText) which is the actual way to print messages to chat without using LibChatMessage. |
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
Questions...
Can someone explain in a bit more detail why using d() or CHAT_SYSTEM:AddMessage() is bad practice? I am not clear on how this is actually a problem.
|
|
![]() |
![]() |
Phinix |
View Public Profile |
Send a private message to Phinix |
Visit Phinix's homepage! |
Find More Posts by Phinix |
Add Phinix to Your Buddy List |
![]() |
|
Forum posts: 1
File comments: 25
Uploads: 0
|
I have the same issue as Rengaru.
A little more info if it will help. With Smart Cast v 1.3 (Minion updated March 13) and LibChatMessage 1.2.0 (Minion updated Apr 22) any ability/ultimate i try to cast that is a ranged target aoe ability: 1. doesn't fire 2. immediately breaks the map (nothing is clickable and no popups on cursor range over) 3. inventory right click menus pop up in upper left corner of the screen. /reloadui fixes it. I first noticed it on 4/23 and nothing else updated in the time frame. I also rolled back to LibChatMessage 1.1.3 and everything works correctly. I don't know if it's related, but something keeps randomly turning base game setting Quick Cast Ground Abilities to OFF. |
![]() |
![]() |
yoderc |
View Public Profile |
Send a private message to yoderc |
Visit yoderc's homepage! |
Find More Posts by yoderc |
Add yoderc to Your Buddy List |
![]() |
|||
Forum posts: 0
File comments: 11
Uploads: 0
|
|
||
![]() |
![]() |
BioKem1 |
View Public Profile |
Send a private message to BioKem1 |
Visit BioKem1's homepage! |
Find More Posts by BioKem1 |
Add BioKem1 to Your Buddy List |
![]() |
||
|
While using the current version (1.2.0) of this library together with SmartCast it will lock up any ground targeted skill, I can still press the button but the skill will not fire. In-game I'm currently using the previous version (1.1.3) of this library and SmartCast works as expected. |
|
![]() |
![]() |
Rengaru |
View Public Profile |
Send a private message to Rengaru |
Visit Rengaru's homepage! |
Find More Posts by Rengaru |
Add Rengaru to Your Buddy List |
![]() |
|
I just installed both of these addons and don't get any errors. Please make sure that you have installed everything correctly and report any problems you have to the respective comment sections. Also try to be more specific and include as much detail as you can when you report a problem. Don't assume that what happens on your end happens on the author's end too.
![]() |
|
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|
|
Also SmartCast (https://www.esoui.com/downloads/info...dtargeting.htm) no longer works if you install the latest version of this library.
|
![]() |
![]() |
Rengaru |
View Public Profile |
Send a private message to Rengaru |
Visit Rengaru's homepage! |
Find More Posts by Rengaru |
Add Rengaru to Your Buddy List |
![]() |
|
Forum posts: 0
File comments: 2
Uploads: 0
|
UI errors occur with the LibChatMessage addon when the Socerer Helper is used, there is only a constant UI error and the Scoerer Helper addon is no longer executed
|
![]() |
![]() |
Blathnir |
View Public Profile |
Send a private message to Blathnir |
Visit Blathnir's homepage! |
Find More Posts by Blathnir |
Add Blathnir to Your Buddy List |
![]() |
||||
Re: Re: Re: Per chat-proxy ability to always include a prefix?
|
||||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
|||
|
Re: Re: Per chat-proxy ability to always include a prefix?
|
||
![]() |
![]() |
marlonbrando |
View Public Profile |
Send a private message to marlonbrando |
Send email to marlonbrando |
Visit marlonbrando's homepage! |
Find More Posts by marlonbrando |
Add marlonbrando to Your Buddy List |
![]() |
||
Re: Per chat-proxy ability to always include a prefix?
|
||
![]() |
![]() |
sirinsidiator |
View Public Profile |
Send a private message to sirinsidiator |
Send email to sirinsidiator |
Visit sirinsidiator's homepage! |
Find More Posts by sirinsidiator |
Add sirinsidiator to Your Buddy List |
![]() |
You have just downloaded by the author . If you like this AddOn why not consider supporting the author? This author has set up a donation account. Donations ensure that authors can continue to develop useful tools for everyone.