Chat Icons

Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Zachar543

Well-known member
Joined
Feb 4, 2018
Messages
50
Zachar543 submitted a new resource:

Chat Icons - Allows Chat Icons by Permission Groups and/or Steam IDs

This plugin allows Overriding Chat Icons by Permission Groups and/or Steam IDs.

Example Configuration:
JSON:
{
  "Groups": { // Groups from the Permissions plugin
    "Admins": "/Game/PrimalEarth/UI/Textures/ServerAdminChat_Icon.ServerAdminChat_Icon", // Keep this line unless you want to override/remove the default ServerAdmin icon
    "Donor": "/Game/PrimalEarth/CoreBlueprints/StatusIcons/Mating_Icon.Mating_Icon"
  },
  "SteamIds": {
    "1234567890"...

Read more about this resource...
 
Just tried this out but there is a bug in here where you can read all the tribe chat message's even if youre not in the tribe.
 
still not fixed
To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Which version are you running? I'm currently waiting on moderator approval for the v1.0.1 upload.
oh i tough when you posted that you fixed it would be updated udner the download button :p mind pming me the updated version?
 
Working better with the newest version?

v1.0.1 is approved now as well (same as what I sent you, though).
No you need to fix youre config i get an json error.

C++:
void loadConfig() {
    auto& plugin = Plugin::Get();

    try {
        const std::string path = ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/ArkChatIcons/config.json";

        std::ifstream file{ path };
        if (!file.is_open()) {
            throw std::runtime_error("Failed to load config!");
        }

        file >> plugin.config;
    ---->    file.close();   <--- 

This part isnt filled so it crashed. 

        plugin.interceptGlobalChat = plugin.config.value("InterceptGlobalChat", true);
        plugin.interceptTribeChat = plugin.config.value("InterceptTribeChat", true);
        plugin.interceptAllianceChat = plugin.config.value("InterceptAllianceChat", true);
        plugin.interceptLocalChat = plugin.config.value("InterceptLocalChat", true);
        plugin.localChatDistance = plugin.config.value("LocalChatDistance", 1000);
    }
    catch (const std::exception& error) {
        Log::GetLog()->error(error.what());
        throw;
    }
}
 
No you need to fix youre config i get an json error.

C++:
void loadConfig() {
    auto& plugin = Plugin::Get();

    try {
        const std::string path = ArkApi::Tools::GetCurrentDir() + "/ArkApi/Plugins/ArkChatIcons/config.json";

        std::ifstream file{ path };
        if (!file.is_open()) {
            throw std::runtime_error("Failed to load config!");
        }

        file >> plugin.config;
    ---->    file.close();   <---

This part isnt filled so it crashed.

        plugin.interceptGlobalChat = plugin.config.value("InterceptGlobalChat", true);
        plugin.interceptTribeChat = plugin.config.value("InterceptTribeChat", true);
        plugin.interceptAllianceChat = plugin.config.value("InterceptAllianceChat", true);
        plugin.interceptLocalChat = plugin.config.value("InterceptLocalChat", true);
        plugin.localChatDistance = plugin.config.value("LocalChatDistance", 1000);
    }
    catch (const std::exception& error) {
        Log::GetLog()->error(error.what());
        throw;
    }
}
What was in your config file when the crash happened?

The original version's config file works for me and uses the defaults (the second argument to each .value() call) for all new properties:
JSON:
{
  "Groups": {
    "Admins": "/Game/PrimalEarth/UI/Textures/ServerAdminChat_Icon.ServerAdminChat_Icon",
    "AnotherGroup": "/Game/PrimalEarth/UI/Textures/StatsIcons/Fortitude_Icon.Fortitude_Icon"
  },
  "SteamIds": {
    "1234567890": "/Game/PrimalEarth/UI/Textures/StatsIcons/Fortitude_Icon.Fortitude_Icon"
  }
}

Any chance this is similar to the error you got, and were you using the reload config command when it happened?
Code:
08/05/18 11:53 [ArkChatIcons][error] [json.exception.parse_error.101] parse error at 17: syntax error - invalid literal; last read: '"Groups": { /'; expected string literal
08/05/18 11:53 [API][warning] Failed to load plugin - ArkChatIcons
Error code: 1114

If so, remove any comments from the config file as they aren't technically valid in json. To be extra safe, recreate your config.json from the one provided in the download (not the config example on the main page).
 
Checked directly from download.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Ah, it's the PluginInfo.json file. I'll upload a new version.

In the mean time, replace your PluginInfo.json file with this (Version changed to 1.1 instead of 1.0.1):
JSON:
{
  "FullName":"ARK Chat Icons",
  "Description":"Allows changing player chat icons by group or steam id",
  "Version":1.1,
  "MinApiVersion":2.3
}
 
also a small glitch with this plugin is that if you have the crossark chat plugin enabled for the api, the global chat text is duplicated. One shows the correct icon but the duplicated text has the vanilla icon.
 
also a small glitch with this plugin is that if you have the crossark chat plugin enabled for the api, the global chat text is duplicated. One shows the correct icon but the duplicated text has the vanilla icon.
I'll look into this as well, but I'm not certain I can prevent (or even detect) the double message since the ArkCrossServerChat plugin is using a very similar method for intercepting/resending chat. If I had to guess, the second message (with the default icons) is coming from the ArkCrossServerChat plugin.

Chat-based plugins using the same method may not be compatible for this reason. So, either plugin devs need to work together to prevent this sort of thing or we'll need some API option for dealing with these kind of conflicts.

I'll try to work with the developer of ArkCrossServerChat to see if we can resolve this.
 
Sadly, I cannot prevent the duplicated global chat issue from my side when ArkCrossServerChat is also installed, but I did submit a code fix to their GitHub that is waiting to be reviewed (PR #7).

I've added a compatibility note on the main page for now, but we'll need to wait for @Tobias to check the PR.
 
Awesome mod! Anyway you can provide us the place to find all the images for chat-icons?
 
Back
Top