Abbreviate Guild Names in Chat
So, I've been trying for quite a while to get this working. The idea is simple:
Quote:
I've tried prehooking to the CHAT_SYSTEM, EVENT_CHAT_MESSAGE_CHANNEL event. I've tried prehooking to CHAT_SYSTEM.primaryContainer, "AddMessageToWindow". I even tried changing the guild names in the CHAT_SYSTEM table. All approaches crash miserably. Any changes to the guild name makes the game very unhappy. No error, just freeze. So, I'm a bit stumped. Any good approach on getting this done? Without redoing the whole chat system. |
Did you have a look at pChat? I think it got such a feature to rename the guilds to short forms.
But I also know pChat overwrites and changes a lot of chat stuff so better not "doing the totally same" :-) Visit the devs here and ask the question, I bet someone is able to help: https://gitter.im/esoui/esoui |
Quote:
Sadly, pChat overwrites the whole chat system. Which is exactly what I want to avoid. It's no surprise that it doesn't even run for me, as it's out of date and is so vulnerable to API changes. (It even relies on libChat2 from 2015, yikes.) I went over its code again now, just to make sure. :) (6.4k code lines in one file.) I see the option of overriding the guild name, but that (changing guild names in the CHAT_SYSTEM table) didn't work for me [when not overwriting the API.] Any other ideas, anybody? |
Looking through the code, it seems the game is using the method GetChannelName to determine what guild name to show. It uses the information in chatdata.lua to that end. You could try to overwrite the channel info so it no longer uses a dynamic name for the guild channels and then set your custom name like this:
Lua Code:
|
Quote:
Tried that. It just changes the table data in CHAT_SYSTEM, which freezes the game (and/or messes guild functionality) at some eventual point. I assume it uses this data somewhere else and tries to match it. |
I've come to a solution. Not ideal, as I override a global function, but it's a very specific one-liner. This lets me affect the channel links (which only seem to apply to the chat box, and to this specific usage) without changing any data tables.
Code:
_G["ZO_LinkHandler_CreateChannelLink"] = CreateChannelLink Code:
local OriginalCreateChannelLink = _G["ZO_LinkHandler_CreateChannelLink"] |
All times are GMT -6. The time now is 07:51 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI