ARK Tribe Log Relay

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

ARK Tribe Log Relay

Post by Thorium »

ARK is a popular game and i run a ARK server cluster. This tool is taking events from the game and posts them to Discord (chat service) channels. This is so you get informed about what happens in the game, while you are offline.
Obviously written in PureBasic.

It's called ATLR and it can relay the tribe logs of a server to Discord channels. It's a web alarm replacement that will post the whole tribe log instead of just a few events.

Download: https://www.CatBit.biz/atlr/atlr_v1.00.zip

I accept donations via PayPal. Donations are not required, ATLR is completely free. But i appreciate any amount you want to give to the project.

Donate via PayPal

It's a simplistic tool and still in development. There is some stuff i still want to add, like a event based notification system, currently there is only a keyword based one. Let it run as a service and more.

It's for windows only. If you need it for Linux and can help me to get it running on Linux. Drop me a message. I can compile it for Linux, but i am not familiar with it.

It reads the tribe files on the server, so you need to run it on the server, you can't use it with hosts like Nitrado. If people are interested i can build in a RCON mode to make it work with hosted servers. However you would need to enable logging tribe logs to RCON. The file based system is simple, reliable and takes very little system resources. So i would recommend keep using it, if possible.

The tool does not need admin privileges. It just needs read access to the tribe files you specify, to the ATLR.ini and to the keyword file you specify. Also it needs to connect to the Discord webhooks you specify.

You can also join my Discord for updates and help: https://discord.gg/MrmRngn

Configuration is done using a .ini file. Just watch the video below: (Since the video was been made a lot of features was been added. I will write a complete documentation in the next few days.)
https://youtu.be/AZaFXsEJRv8

FAQ

Does it work on official servers?
No

Does it work on hosters like Nitrado?
Currently no. I wanted to implement a RCON mode, but since it does not support Unicode (no special characters) and has a number of problems i am thinking about making it more suitable for hosters to integrate in their servers. There are some features still missing before i try to pitch it to some hosting companies.

Do you take feature requests?
Yes, join my Discord server and post your suggestion in the channel #atlr_discussion

I have a problem getting it to work on my server, can you help me?
Yes, join my Discord server and ask your questions in the channel #atlr_discussion. You can also write directly to me on Discord.

How is ATLR licensed?
It is licensed under the MIT license.

Can i monetize on ATLR as a paid feature on my server?
Yes. ATLR is licensed under the MIT license, which means you can do as you please with it, however i am not responsible for any problems it causes.

Do you take donations?
Yes, i accept donations via PayPal. Donations are not required, ATLR is completely free. But i appreciate any amount you want to give to the project.

It is currently used on my server: https://survivetheark.com/index.php?/fo ... berration/

Change Log:

v1.00 (public) 23.10.2018
  • added: Option to automatically remove relays for tribes, which are no longer existing. (activated by default)
  • added: Option to ignore tribe file format version.
  • changed: Updater version changed to 1.00 with some minor bug fixes.
v0.14 (public) 31.07.2018
  • changed: File names for file relays no longer include the tribe name, so the file does not change name if tribe name is changed.
  • added: Option to relay to another program via command line parameter.
v0.13 (public) 25.07.2018
  • fixed: Some characters in the message could prevent the message to be displayed in Discord.
  • fixed: If relay to discord on admin relay was disabled, it would still relay additional events.
  • added: Option to relay to text files.
v0.12 (public) 05.03.2018
  • fixed: Filter mode was not saved on auto config created relays, resulting in defaulting to Exclude mode no matter what mode was set in the template relay.
  • fixed: Mention entry in AdminRelay section was wrongly named as MentionString.
  • added: Additional instances can only be launched if located in different folders. Fixes problems caused by running multiple instances by mistake.
  • added: Option to update tribe names if they change in the tribe files. Enabled by default, can be disabled in relay sections in .ini.
  • added: Option to send additional events to the admin relay, for example tribe creation or tribe renaming.
v0.11 (public) 27.02.2018
  • fixed: Auto relay config did not detect a new tribe if a tribe with the same ID was already existing on another server.
  • added: You can now set the alternative save path, if you use a alternative save path on your servers. If AltSavePath is set for a server, auto config will use it instead of ServerPath.
  • added: ATLR is now licensed under the MIT license
v0.10 (public) 26.02.2018
  • changed: Relay entries no longer need numbering in .ini. Numbering them will still work, but is no longer required.
  • changed: No limit for the count of relay entries anymore.
  • added: Admin relay option. Relays all tribe logs to one Discord channel for admin purposes. Uses seperate mentioning and filtering files.
  • added: Auto configure relays option. Automatically creates tribe relays for new tribes. They work without additional configuration for the admin relay but need a webhook manually set for the tribe channel.
v0.09 (public) 23.02.2018
  • fixed: memory leak
v0.08 (public) 23.02.2018
  • fixed: Tribe log state could not be stored on shutdown, if server name had control characters.
  • fixed: Control characters in JSON for Discord webhooks are now properly escaped instead of replaced with spaces.
  • fixed: Failed to save tribe log state on auto update, if updated directly after startup.
  • added: If incompatibility to current ARK server version is detected, a notification will be send to Discord.
  • added: Option to enable auto update, if incompatibility is detected to current ARK server version.
  • added: Filter option to remove clutter from the tribe log. Can work in exclude and include mode and with keywords and regular expressions.
  • added: missing .ini entries for all relays are now created on startup
v0.07 (public) 20.02.2018
  • changed: keywords are no longer case insensitive
  • added: missing folders are created on startup
  • added: missing .ini entrys are created on startup
  • added: Tribe log entries added while ATLR was off, will be read and relayed now. Fixes tribe log black out during auto update.
  • added: regular expression filter for mentioning, use RegEx on MentionMethode, uses MentionRegExListFile
  • added: option to post change log to Discord after auto update
v0.06 (public) 19.02.2018
  • added: option to ignore modify date on tribe files, only use it if you encounter problems about tribe logs not being loaded
  • added: auto correction of file name extension of tribe files, prevents selecting backup files
  • added: option to post ATLR status to discord channel
  • added: updater with auto update function, auto update is disabled by default
v0.05 (public) 25.01.2018
  • fixed: messages with none ASCII characters got discarded
  • changed: if you don't specify a server name, now nothing will be prefixed to the message
  • added: mentioning in every message
  • added: mentioning based on keywords
v0.04 (public) 21.01.2018
  • changed: redone discord code, now works in parallel and delays messages so discord will not discard them if coming in to quickly
  • added: settings are stored in a ini file
  • added: relay entries are stored in a ini file
v0.03 (private) 03.10.2017
  • fixed Crash on reading a tribe log with unicode tribe log entries (Now we know tribe log entries can be stored with different encodings in one tribe file!)
  • when reading the tribe log, ATLR will now ignore string length descriptors, as they are wrong with UTF-16 encoding.
v0.02 (private) 27.09.2017
  • removal of tags in tribe log entries
  • prefixing server name to the message
v0.01 (private) 18.09.2017
  • first working version
Last edited by Thorium on Tue Oct 23, 2018 5:00 pm, edited 8 times in total.
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

I made a video of how to set up ATLR on a server, because it was requested.

https://youtu.be/AZaFXsEJRv8
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

Update v0.06
  • added: option to ignore modify date on tribe files, only use it if you encounter problems about tribe logs not being loaded
  • added: auto correction of file name extension of tribe files, prevents selecting backup files
  • added: option to post ATLR status to discord channel
  • added: updater with auto update function, auto update is disabled by default
The auto updater is disabled by default, check .ini settings if you want to enable it. You can also run Updater.exe to perform an update manually. However it will not shut down your running ATLR instances, so shut them down before running the Updater, or enable auto updates.

For the updater to work, Update.exe needs write access to the ATLR folder and the Update subfolder.

New .ini options:

IgnoreFileModifyDate Set to True to enable ignoring of modify date of the tribe files. This can help in some cases if you deal with day time changes or weird cache issues. I recommend keeping it at False and only change to True if you encounter problems about the tribe logs not being loaded. This will make ATLR load all tribe files on every update cycle.

AutoCorrectTribeFileExtension Set to False to disable the auto correction of the tribe file name extension. The option prevents some cases of wrongly selected files. Only set to False if you want to link to a file not ending in .arktribe.

StatusNotifyDiscord Set to True to enable ATLR to post it's status to a Discord channel. Status messages include: "ATLR running", "ATLR stopped", "ATLR updating" and "New ATLR update available." For the update messages to appear, auto update needs to be enabled.

StatusMention Who do you want to notify on ATLR status changes, for example @everyone. If empty no notification will be generated.

StatusDiscordWebhook The webhook status changes will be posted to.

EnableAutoUpdate Set to True to enable the automatic update. This is disabled by default. If enabled ATLR will check for new updates and downloads them automatically.

AutoUpdateInterval Interval in minutes ATLR should check for new updates.

AutoUpdateOnlyCheck Set to True if you want ATLR only to check for new updates and notify you by posting to Discord. Will not download updates.
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

Update v0.07
  • changed: keywords are no longer case insensitive
  • added: missing folders are created on startup
  • added: missing .ini entrys are created on startup
  • added: Tribe log entries added while ATLR was off, will be read and relayed now. Fixes tribe log black out during auto update.
  • added: regular expression filter for mentioning, use RegEx on MentionMethode, uses MentionRegExListFile
  • added: option to post change log to Discord after auto update
To get the update, wait for the auto update to trigger (if you enabled it) or shut down ATLR and run Updater.exe, or download the updated .zip in the first post.
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

Update v0.08
  • fixed: Tribe log state could not be stored on shutdown, if server name had control characters.
  • fixed: Control characters in JSON for Discord webhooks are now properly escaped instead of replaced with spaces.
  • fixed: Failed to save tribe log state on auto update, if updated directly after startup.
  • added: If incompatibility to current ARK server version is detected, a notification will be send to Discord.
  • added: Option to enable auto update, if incompatibility is detected to current ARK server version.
  • added: Filter option to remove clutter from the tribe log. Can work in exclude and include mode and with keywords and regular expressions.
  • added: missing .ini entries for all relays are now created on startup
To get the update, wait for the auto update to trigger (if you enabled it) or shut down ATLR and run Updater.exe, or download the updated .zip in the first post.

New .ini options:

Settings Section
FilterKeywordListFile Text file name with keywords that ATLR should use to remove entries from the tribe log (clutter removal)
FilterRegExListFile Text file name with regular expressions that ATLR should use to remove entries from the tribe log (clutter removal)

Updater Section
EnableAutoUpdateOnIncompatibility Set to True if you have auto updates disabled but want ATLR to turn on auto updates if it detects that it's no longer compatible to the current ARK server version. This is the case if the tribe file format changes. Use this option if you only want ATLR to auto update on emergency.

Relay Section
FilterMethod The method ATLR should use to remove entries from the tribe log for clutter removal. Works analog to MentionMethod. Can be Nothing, Everything, Keywords or RegEx
FilterMode Tells ATLR if filtered tribe log entries should be included or excluded. Can be Include or Exclude.
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

Update v0.09
  • fixed: memory leak
To get the update, wait for the auto update to trigger (if you enabled it) or shut down ATLR and run Updater.exe, or download the updated .zip in the first post.

Highly recommended to update to v0.09 because of memory leak dating back to v0.01!
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

Update v0.10
  • changed: Relay entries no longer need numbering in .ini. Numbering them will still work, but is no longer required.
  • changed: No limit for the count of relay entries anymore.
  • added: Admin relay option. Relays all tribe logs to one Discord channel for admin purposes. Uses seperate mentioning and filtering files.
  • added: Auto configure relays option. Automatically creates tribe relays for new tribes. They work without additional configuration for the admin relay but need a webhook manually set for the tribe channel.
To get the update, wait for the auto update to trigger (if you enabled it) or shut down ATLR and run Updater.exe, or download the updated .zip in the first post.

New .ini options:

Settings Section
AutoConfigRelays Set to False if you don't want ATLR to automatically add new tribe log relays. If set to True and servers are configurated in Server sections then ATLR will scan the save directories of the servers for new tribe files and will create relay sections for them on base of the tribe files and template relay.

AdminRelay Section
Analog to Relay sections but will relay all tribes logs from all other relays to one discord channel. This is usefull for admins monitoring the server, especialy with auto relay config enabled. Relays created by the auto config will relay to the admin relay without any further configuration needed.

TemplateRelay Section
A template for new relay entries. For your reference when adding new relays. Also used by the auto config as default values for automatically created relays.

TemplateServer Section
A template for new server entries. For your reference when adding new servers.

Server Section
Create new server sections if you want to add servers to the auto config.
Name The name of the Server.
Path The path of the Server. Only set to server root, ATLR will add the save path.
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

Update v0.11
  • fixed: Auto relay config did not detect a new tribe if a tribe with the same ID was already existing on another server.
  • added: You can now set the alternative save path, if you use a alternative save path on your servers. If AltSavePath is set for a server, auto config will use it instead of ServerPath.
  • added: ATLR is now licensed under the MIT license
To get the update, wait for the auto update to trigger (if you enabled it) or shut down ATLR and run Updater.exe, or download the updated .zip in the first post.
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

Update v0.12
  • fixed: Filter mode was not saved on auto config created relays, resulting in defaulting to Exclude mode no matter what mode was set in the template relay.
  • fixed: Mention entry in AdminRelay section was wrongly named as MentionString.
  • added: Additional instances can only be launched if located in different folders. Fixes problems caused by running multiple instances by mistake.
  • added: Option to update tribe names if they change in the tribe files. Enabled by default, can be disabled in relay sections in .ini.
  • added: Option to send additional events to the admin relay, for example tribe creation or tribe renaming.
Donations
Since i was asked about it, i do now accept donations via PayPal. Donations are not required, ATLR is completely free. But i appreciate any amount you want to give to the project.

Donate via PayPal

FAQ
I compiled some of the questions that are commonly asked about ATLR.

Does it work on official servers?
No

Does it work on hosters like Nitrado?
Currently no. I wanted to implement a RCON mode, but since it does not support Unicode (no special characters) and has a number of problems i am thinking about making it more suitable for hosters to integrate in their servers. There are some features still missing before i try to pitch it to some hosting companies.

Do you take feature requests?
Yes, join my Discord server and post your suggestion in the channel #atlr_discussion

I have a problem getting it to work on my server, can you help me?
Yes, join my Discord server and ask your questions in the channel #atlr_discussion. You can also write directly to me on Discord.

How is ATLR licensed?
It is licensed under the MIT license.

Can i monetize on ATLR as a paid feature on my server?
Yes. ATLR is licensed under the MIT license, which means you can do as you please with it, however i am not responsible for any problems it causes.

Do you take donations?
Yes, i accept donations via PayPal. Donations are not required, ATLR is completely free. But i appreciate any amount you want to give to the project.
Thorium
Addict
Addict
Posts: 1271
Joined: Sat Aug 15, 2009 6:59 pm

Re: ARK Tribe Log Relay

Post by Thorium »

Update v1.00
  • added: Option to automatically remove relays for tribes, which are no longer existing. (activated by default)
  • added: Option to ignore tribe file format version.
  • changed: Updater version changed to 1.00 with some minor bug fixes.
To get the update, wait for the auto update to trigger (if you enabled it) or shut down ATLR and run Updater.exe, or download the updated .zip in the first post.

This is the last version as far as features are concerned. There will still be bug fix updates, if needed. There may be a version 2 if ARK 2 comes or more extensive features are required. But i feel it's in a good spot now for what it is intended for.
Post Reply