Skip to content
TORNLIFE More

Kivou: forum

Kivou [2000607] Level 100 Traveling Nub Navy Nubs Co-leader

Forum posts (Torn's count)
1,694 observed
Archived posts
1,481
Threads started (archived)
90

Boards

From the 1,481 newest archived posts.

Threads started

Most-liked posts

Likes as archived at fetch time, adjusted for how long each post had been up. Scored posts only; the full score pass runs after the import.

The fall of the YATA bot · · 198 likes

TLDR: The yata bot is a discord bot made to make your Torn life easier on discord. On the 31th of August 2022 it will stop being available for free. In this article you will find out why. You will also learn what I plan to do to still deliver some of its critical features for free.

The yata bot: what is it and what you can do with it


A good chunk of Torn discussions among players bypass the in-game Torn chats and the player base seems to have chosen discord as a support (which seems legit as it has originally been designed for gamers). The first problem that comes into mind is how to link your discord account and your Torn account (i.e. how to know for sure to who you’re talking to). Thankfully both discord (with their nicknames and roles) and Torn with their verification procedure and API offers a perfect way to deal with that.
So now that we have a way to link both accounts we need a way to automate the process, and that’s where discord bots enter the dance. You can see a bot (even if it’s less and less the case) as a “standard” discord user (in the sense that it has access to the same kind of actions: reading/writing messages, assigning roles, changing nicknames, and more depending on the restrictions given by the server admins). The difference being that it’s not controlled by a human but by a program. One of the key features of the YATA bot (which was the starting point of the whole project) is to handle this verification procedure. To verify a discord member (in the following when I say “member” I’m referring to discord member, when I say “player”, I’m referring to Torn player), the bot interrogates the Torn API (that’s were members need to be officially verified by Torn) and act according to rules setup by the discord server admin through a dashboard. It can:
  • Change the member nickname to match the player name (with torn ID or not)
  • Give roles based on faction membership and faction positions
This verification can be triggered automatically upon joining the server, manually by users or on a daily/weekly basis for the whole server thus setting the root of a safe and clean environment where, as long as you trust your server admins, you can be sure to who you’re talking to, even on servers with tons of factions.
That is what I consider being the main critical feature of the YATA bot. In view of this article title I’m not going to give full details on the other features. But still, I’m going to enumerate some of its features (you can see it as a guideline for other developers or simply a moving farewell). Full documentation can be seen here.

The faction features.
In addition to the factions verification, the bot provides several features to help factions: like chains alerts, customizable OC alerts, retals alerts linked with TornStats and YATA spy databases, territory, rackets and raid news, vault status, members status and so on.

The revive module.
That’s the part of the bot from which I’ll keep a bitter taste. In my mind the module was gold and would be broadly used. It was a way for any server to send or receive revive calls to any other set of servers without having to rely on any other party... for free. Indeed, entering the revive game has a huge entry cost (in addition to the game play). One needs to count their revives and provide handy tools to their clients. Not an easy task for small factions without money nor devs. The combined use of the website report and the bot could have opened this door to anyone. Except for some minor bug reports I’ve never had any feedback on this feature. I’m sad to see it go but I don’t think it will be missed...

The loot alerts.
After verifications, I think the loot alerts are the most used feature of the bot. It provides customizable alerts for any NPC at any loot level. I’ve heard that faction leaders try to get their members to join the server with loot alerts. Maybe back in the days it was a cool feature. But let’s be honest it’s everywhere now. Not that I’m the first to have made it, but the YATA bot democratised it. Is it useful for sure but not critical. First, it’s something that can easily be centralised and doesn't need to be sent to every single server. Second, it’s quite easy to implement… So it’s not a big loss imo. My discord server will still provide these alerts.

The other features.
RTFM
On such rudeness let’s move to the more relevant part of this already too long forum post.

Why do I have to stop the YATA bot


There are a couple of reasons why the bot will stop. It includes a “sudden” change in Discord policy, a fork war in the open source community and two lovely very young children. Each reason being sufficient to stop imo.

Discord privileged gateway intents.
Sooner I told you that a bot can be seen as a standard discord user. Obviously it’s not an actual mechanical bot typing on a computer. Bots are programs that interact with discord through its gateway (you can see a gateway as a fancy API (you can see an API as a way for two programs to interact with each others (you can see two programs that interact with each others as two terminators talking to each other over a pint in a motorbike pub))). Anyway… Discord is (legitimately) setting the rules of the gateway, stating what bots can or can’t do. Over the last years they started introducing what they call “privileged intents”. At first the privileges was being able to have a live list of members of a server and being able to see their presence.
It means that you, as a bot developer, have to justify why your bot needs these privileges to discord staff. It implies giving your (rl) ID to the company and following a painful and long process. That’s what happened in late 2018 when the bot was not seeing members for verification. I was in the process of being “validated” by Discord (on the + side I now have got a collectible “early bot developer” badge on my account :))
It was painful and put the bot to halt for a couple of weeks but in the end didn’t change the way it was built. But discord was not going to stop there. In late 2021 they officially announced the so-called message content intent, a new privileged intent that bots need to have to be able to read users messages. The justification behind being to stop third-parties to mine data (the data being the convos). Being legit or not is not for me to judge, what’s important to understand is that this new intent is bound to change the way bots are built. Indeed, if you’ve been using a bot you know that you have to type something like “!command” to trigger the bot… which implies that the bot needs to be able to read messages to work properly. That’s the heart of the problem. To overcome this issue Discord released (half released you may even say) the now (not so) famous slash commands, which are a new way to interact with bots without using messages (smart).
Discord being “ready” for the change, it “just” needs the whole community to update their codes before the message content intent is enforced. Which leads us to our second issue: discord.py, the python library I use to talk to the discord gateway. But before that a little imaginary Q&A might answer some of your questions.
  • Mr Nub: “So when is it happening?”
  • Kivou: “Message content intent was announced at the end of 2021 to be enforced the 31th of May. I wrote this post in April and while doing so I received a message from discord stating that they pushed it to the 31th of August. I shit you not. I literally received it while writing this post.”
  • Mr Nub: “Why don’t you ask for the message intent then?”
  • Kivou: “There’s no way Discord will grant the YATA bot this privilege. There’s nothing in the bot that justifies reading messages.”
  • Mr Nub: “You seem to be doubtful about this release… why is that? And what does half released mean?”
  • Kivou: “I’m not qualified to properly evaluate if this is a good decision or not. What I can say is what I feel. I feel it has been done quickly (the full potential of slash commands is not even released yet) so it’s hard to grasp what you can do with it. And it lets the developers (at every level) very little time to update their programs (and pushing the deadline two times is not as productive as setting it directly at a later date). In my opinion they should have let at least a couple of years with the two options, letting both discord to fully release slash commands and developers to implement them. I haven’t read a justification for a rush, and the fact that they are delaying the due date tends to prove my point.“
  • Mr Nub: “So slash commands are crap, discord is dead… Right. What’s the new cool thing then?”
  • Kivou: “That’s not at all what I said. Slash commands are awesome. It gives a way better user experience than message commands.. My concern is the time they give us to make the change.”
  • MrImADevAndYoureFullOfS***: “Wait, I’ve made a bot and I can select the intents I need without having to ask discord.”
  • Kivou: “The need to ask Discord for privileged intent only concerns bot that are on more than 100 servers, which is the case of the YATA bot. Bots on less than 100 servers can read messages as before and no changes are required. Can I move on now?”
  • MrImADevAndYoureFullOfS***: “Yeah sure… sorry…”
The open source fork war over discord.py.
The bot is coded in python and relies on a python library called discord.py to talk to the discord gateway (talking to discord gateway can be cumbersome and libraries like this one greatly help bot developments). This library is open source, which means that the code is available to anyone. The sources of discord.py are hosted on github which provides means to collaborate and protect the code. The maintainer and main developer of discord.py announced late 2021 that he will stop maintaining the library and no one among its trustworthy collaborators was willing to take over. Not maintaining it implied not having slash commands available. I guess you start to see the issue.
But usually you shouldn’t worry (too much) about these kinds of things. The beauty of open source projects is that it can be taken over by anyone. That’s when, after begging and insulting discord.py maintainer (big news, twats are everywhere), the classical fork war began. You can see a fork as a duplication of code by someone else who is willing to update it. At this point it’s important to know that discord.py was used by the vast majority of python bots. The pressure was real and we saw a bunch of very promising forks, all stating that they will take over and implement slash commands. With time, we would have been able to see promising and dying forks in order to make an informed choice before diving into our code rebuild… but we’re back to discord, pushing us to rush our code updates.
I’m passing all the drama (that, tbh, I didn’t follow), but as of today there are still a couple of forks and I’m unable to make a choice. Would I choose the speedy fork that implemented everything in a matter of weeks? Would I choose the other fork with more developers but with slower development? Only time (that discord is not giving us) can tell. And cheery on the cake, very recently, discord.py maintainer said he was back in the game… At this point I can only shrug.

At the end of the day, we have “on the market” a couple of libraries (that can’t really be trusted (imo)) I could use to update the YATA bot to comply with discord intents. But… let’s finish with:

Me, myself and I.

Yes, it’s also a bit because of me that this project stops. As I explained just above I’m faced with a bet I have to make. And really, YATA is a hobby for me. The website is interesting to maintain and to develop as there are no limitations. The bot might be more useful to most of you but it’s very boring to develop and maintain. And I don’t want to spend countless hours updating it with a library I’m not sure is going to be maintained next year.
  • Mr SmartAss: “I mean, that’s what you did with the first library? You developed the bot with a library that is not maintained today.”
  • Kivou: “If it was just that, I could have used a fork with very minor changes of my code and then just followed the new lib updates. The issue is that discord forced new features (slash commands). The implementation of slash commands will be made differently for each fork and compatibility is not ensured between them. So once I’ve chosen a lib, I’m kind of bound to it if I don’t want to update all my code yet another time. And the choice is to be made from forks that are only 6 months old!”
A bit of RL is required to be fully honest too. I’ve got ambitions on a professional level and the past year and the following are important to me. I used to casually work on YATA during work (yeah I know I’m bad ^^) but not anymore (also they closed the discord ports at my work so I couldn’t even if I wanted). Then on a family level, passing from 1 to 2 kids is kind of time consuming as some of you know. We all know time is precious, I definitely prefer spending it on family and projects I like than wasting it, trying to catch up with the moods of a tech company in San Francisco and a bunch of nerds that can’t work together.

I know the YATA bot will leave a rather big void. But nature hates void. First of all, the code is open source. So anyone a bit tech savvy can run it’s own instance. Second, torn’s community is full of good developers. I’m sure equivalent solutions will pop up. And third, I’m not letting you alone.

The future


I’m not completely shutting down the service. If you read above you understand that the limitation is: “On more than 100 servers the bot needs slash commands”.
I can’t rebuild the whole bot with slash commands (see above why) but I can still run it as it is on less than 100 servers.

Here is what I’m going to to:
1/ Provide a free bot with slash commands with a limited number of features. For now I see player verifications. Maybe loots, but now you know what I think of it. And maybe other things. Go to my server to talk about it.
2/ Select less than 100 servers and run the bot as it is today. Except rare exceptions the selection will be based on money.

Then, with time and stability, I’m not excluding implementing slash commands for all the features.

Last but not the least: who’s behind the bot


I’m the only developer of the YATA bot, but the project could not have continued without the hard work of the bot @Staff. To put things into perspective, the bot is (at the time of writing) on 639 servers and it has joined 1307 servers since it was created. For a hobby project it’s too many to handle alone.

If you’ve used the bot you’ve met one of them. They are here to set up the bot and answer users questions. They’ve done a terrific job since my first call for help and they are still working their ass off to please our users. When it started it was mainly SVD_NL [2363978], Tipsy [1160609], Isca [672082], Redxjak [2255595] and vavi [2224491] (PT needs for automated verifications drove development of the verification module thanks to vavi). As all cool nerd stories, it started in a basement. Except that here it didn’t start in a basement. But still, we were tweaking the DB manually based on google forms filled by users in order to set the preferences of each server. That was a huge task and I can’t thank enough all the hard work made by the team. Those were the days! Obviously that was not sustainable. I developed a dashboard so that server admins could set up their preferences themselves. Lately joined cynikal [2130575] that is currently doing most of the setup and Q&A as we speak. There are also a couple of self assigned helpers, like Braxlaw [2319642] who are providing “customer services”. To all of you, I can’t thank you enough for all the hard work you’ve been putting all these years into this project, you’ve lifted quite a lot off my shoulders.

Decap [47662] needs his own paragraph. Without him YATA would have been down long ago. Bot and website alike. He just saved the project by administering our new server and making it possible to run the web services and the database on two measly vCPU and 2GB of RAM. A talented admin if you ask me. Decap, you have my eternal gratitude. It’s not much I know, but I can’t offer way more.


Feel free to come to YATA's discord to discuss about it.

[Site] YATA: Yet Another Torn App · · 350 likes

It's pretty cool. Check it out here https://yata.yt and join the discord https://yata.yt/discord if you have any questions.

[250R+] Add battle stats spies in the API · · 266 likes

Hey,

it's a rather simple suggestion. Being able to have the last battle stats spies we made in the user section of the API.

I don't know what size it should have (last 100, last month...), but the basic idea would be to have it accessible to third party tools in an automated way.

Imo it is justified since spy databases already exist and are broadly used and as far as I know are one of the few things (if not the only) that require copy pasting text.


EDIT: Thank you all for the upvotes. Let's see what it gives
https://www.torn.com/forums.php#/p=threads&f=19&t=16215319

API for Elimination · · 42 likes

What would be nice tho would be to be able to see if a player belongs to the key owner team before elimination starts.
The main use for it would be discord verification which currently can't be automated (except with in-game script that connects to the chat).

Case 1: player didn't join a team
"competition": {
"name": "Elimination",
}

Case 2: player joined the same team as the key owner
"competition": {
"name": "Elimination",
"score": 0,
"team": "keyboard-warrior",
"attacks": 0
}

Case 3: the player joined another team
"competition": {
"name": "Elimination",
"score": 0,
"team": "",
"attacks": 0
}


That would be a nice addition to fight in-game border-line scripts.

Discussion around the API · · 164 likes

Hey,

that's kind of a specific suggestion but I want to see if I'm the only one to be affected by the breaking changes in the API (that come with hardly any warning or any sustainable ways to handle them) or if I am a whiner.

I'm currently dirty patching YATA to handle unannounced (or at least not announced where it should have) breaking changes.
Worst part is that it's Yet Another Tuesday Evening... I know that I should make the changes when I can or when I want, but having a broken website and a broken discord bot stresses me out to the point where I feel forced to fix it asap.

I'm not the first one to be upset and I will not be the first one to leave this community. But before that I would like to know why the API development is as it is and I will do my best to either understand and accept or make things change.

So what I suggest is having a chat with ched (and/or any other Torn staff) and whoever from the player dev community wants to join.
The idea would be to share views, opinions, pros and cons of the current state and understand a bit better what's going on behind the scene. And maybe have it differently if all sides come to an agreement.

Cheers

Recent archived posts

This is for french in torn city ·

I wouldn't be so sure about that.

How do you like the Awards page rebuild? · · 6 likes

Yet Another Thirdparty App feature built in :)

It's nice to see the game design driven by the community. Thanks.

Nr.1 statted SSL nub in town · · 10 likes

We're glad to have you on our side :)

 

But remember, even if you're the best at what you do, you're still a nub !

Target List 1.0? · · 5 likes

Pretty happy to see yata features implemented in-game.

 

Thanks ❤️

:) · · 2 likes

It's been a pleasure playing/working with you :)

API item 827 still electornic ·

If I understood well the electronic type is no more. However the Perceptron : Calibrator (id 827) is sill of type electronic.

[image: i.imgur.com]

[Script] Burglary Advanced · · 2 likes

thanks you rock :)

[Script] Burglary Advanced · · 3 likes

Thanks for the very useful script.

I've added some lines to change the color of the target depending if it's already been done. I find it useful for the merit.
It would be a great addition to the script imo. Feel free to use it and change it (to make it more efficient) if you find it worth it.
// get all burgled places
const stats = document.querySelectorAll("button[class^=statistic___]");
const myBugs = [...stats].map(button => button.querySelector("span.label___nP_nn")).filter(span => {
if(!span) { return false; }
const words = span.innerHTML.split(' ');
if(words[words.length - 1] !== "burgled") { return false; }
const target = span.innerHTML.replace(" burgled", "")
return safetyAssessments.hasOwnProperty(target);
}).map(span => {
const target = span.innerHTML.replace(" burgled", "")
return target;
});

// display if burgled or not
const currentTargets = document.querySelectorAll("div[class^=crimeOptionGroup]")[1].querySelectorAll("div.crime-option ");
[...currentTargets].map(line => {return line.firstChild.childNodes[1]}).forEach(t => {
console.log(t);
if(myBugs.includes(t.innerHTML)) {
t.style.color = "var(--crimes-stats-successes-color)"
} else {
t.style.color = "var(--crimes-stats-criticalFails-color)"
};
});

[image: i.imgur.com]

[API] user stat=rehabcost returns null ·

Thanks :)

Sneak peek on new halloweek honor ·

they are not, look at the url

Crimes 2 Honor Images ·

yes I know. But now the url is simply the honor ID and not a random ID. So as soon as it's out we will have the image.

edit: maybe it has always been there btw...

Sneak peek on new halloweek honor · · 14 likes

Can you guess what we will need to do to get it ?


Crimes 2 Honor Images · · 1 like

lol, I guess you can close this thread now :)

[API] user stat=rehabcost returns null ·

Hello,

it seems that the public stats rehabcost, eastereggsused and eastereggs don't work when fetching from the past.
For example :

https://api.torn.com/user/?selections=personalstats&stat=rehabs,rehabcost×tamp=1697913846&key=

gives

{"personalstats":{"rehabs":10660}}

https://api.torn.com/user/?selections=personalstats&stat=rehabcost&timetamp=1697913846&key=

gives

{"personalstats":null}

As far as I know it's the only 3 public stats that don't work.

Have a good day :)

Blood Money vs Nub Navy · · 4 likes

[Script] Burglary Advanced · · 1 like

Thank you for the free service you provide to the community :)

R+

Nub Navy [8.5 m respect] Recruiting ! · · 1 like

bump

Warlord 19%, RPG Finale - REVISED PRICES!! ·

good deal, quick and safe trade.

I recommend :)

Crimes 2 Honor Images · · 2 likes

King Pin, (thanks Pretz)

https://awardimages.torn.com/838243379.png

API Elimination Team issue ·

It seems to be working now thanks :)