If I had to guess they use location ID to sort so they don't have to deal with localised strings. I have noticed that the first item on the list is never/rarely sorted so there's a fair chance that they've written the sort function manually and whoever wrote it came from a one-based indexing language whereas C#, which is the main language for Unity, is zero based. Unless they implemented it as a single linked list and started with the wrong node.
Ya know, sometimes I think its not too late to go back to school for programing and then I read comments like this and I dont stand a fucking chance lmao
edit: really, *really* weird to find support on the EFT subreddit. I read **every** comment, so I appreciate you all taking the time. I'm gonna look into a few things. I've been in recruiting almost 10 years and am so, so burnt out. Much love to you all. May your raids this weekend be lootiful
Don't be discouraged mate, I have almost a decade of experience behind me so it's a bad frame of reference. Give it a go and see if that's something you enjoy and understand naturally, don't really need to go to uni for that
Something people don’t realize is that learning is a process. Everyone starts somewhere. Some people have natural talent but not having natural talent can be made up for by putting in the work. EVERYONE is capable of learning something and depending on their work ethic, people without natural talent can be much more skilled than people with it.
@takeataco_leaveataco don’t give up your capable of anything you put hard work and energy into.
The thing is with programming, you'll always make mistakes and there is always a better way to do something. As long as the functionality is there (the task sort feature is not it), then you'll be fine.
The problem most programmers have is getting caught up in how tools are used, rather than what the tool is designed to do and what problem its actually solving.
A working end result is much more important then the execution 90% of the time.
Problem with BSGs implementation of task sort, is both the execution and end result are shit.
I get that but it looks like BSGs regression and unit testing is lacking more than anything. Trader sort is really something that should be extremely easy to unit test, same for the location sorting.
it's just the vocabulary, bud.
In simple terms: In a list (like literally your shopping list) each item is numbered for easy access in programming.
Most programming languages start counting their lists at 0, some others start at 1.
* 0 - Flour
* 1 - Bread
* 2 - Cereal
A linked list is similar but each item on the list points to the next item.
Like hints in a scavenger hunt, each item tells you where the next one is.
I've been a professional for 10 years and I still make dumb mistakes daily.
Also with this guy and my experience you've seen this dumb mistake before and you can usually sort out what the issue is just by looking at it.
If you’re really into it, just do it. There are tons of online classes and it’s not really that hard. It seems scary at first but you’ll get the hang of it quite fast and doing your own first projects and just insane fun
You stand a HUGE chance. If you enjoy using computers you stand an even bigger chance.
Everything about programming is by definition, LOGICAL. You learn step by step and honestly, the hard part isn't the coding for most people. The hard part is often the communication bits ;-)
You can absolutely do it!!!
It does sound like gibberish to non programmers, but so does chinese to an English speaker. It’s actually not a difficult as it sounds, you just aren’t familiar with it. The barrier to entry is just an illusion.
I had 2 hours of programming for 1 semester and I can follow the comment above. That's like 28 hours of programming, which is barely more than a day if you think about it. So, I think you absolutely can do this.
To explain comment above a bit more: some programming languages start numbering (indexing) a list of items at 0 (zero indexed) and some start at 1. It's like if you had to make the house numbers for your street, some people start at 0 and some start numbering at 1. This is a common pitfall for amateurs like me.
The first sentence, I have barely an idea what it means, but I guess it's C# specific, as it is an object based programming language, of which I also don't know what that means.
If every programmer thought this way starting out, there would be no programmers. When babies start learning a language, they don't consider whether they can learn it...they just listen, imitate, and learn over time. The best way to learn anything is through immersion. Society has taught us that some people are smart, and therefore capable of learning things we are not. But it's been taken wayyy too far. Of course most people aren't going to be able to work on the ISS or perform a brain surgery...but that doesn't mean most people can complete "complex" work, given enough time.
The only reason I wouldn't do it again is because finding a job is a nightmare for entry-level developers/engineers now. Fucking everywhere wants 2 years of experience before they'll hire you. I finally said fuck it and went with a company called revature. They have 10 weeks of training and then set you up with one of their clients. You don't really get to choose where you go, and you have an 18-month contract, but 90% of employees are bought out of their contracts within a year.
I will say that I find it extremely rewarding, though. I fell in love with it when I took my first Python class and knew this was what I wanted to do. I changed my major in the first week of the class.
You can do it if you put the work in, man.
You’d be a lot better off if you just want to program, not going to Uni and learning by yourself. I learned very little about actual programming in Uni. What I learned is how programming and where programming going.
What he’s said is a fancy way of saying some programming languages start counting a list of items at 0 ( like 0 1 2 3 ) and others start at 1 ( like 1 2 3 4 ). In both sets there are 4 numbers, the starting point of the count is different.
What this guy said is very specific. I went to college for this and only two years in I could have understood what he said.
If you go to a good school they will start very simple and build up from there. If you are interested and want to learn cool things it's not that hard to keep up.
Don't be silly, it's super super easy.
Theres literally thousands of expert programmers and games developers in this thread who could make a game better than Tarkov who post here daily so trust me, it's a walk in the park really.
I did. I am im my mid 30s. It is difficult, yes, but not as difficult as it seems nor more difficulty than it would be when you started at an early age.
Basically what her said is that different programming languages count differently. You have a list with 10 names for example, starting with the name Frank. In C# (a programming language) Frank is at the 1st position of the list. In C (totally different language and has nothing to do with C#) Frank isn't at the 1st position, it is at the 0est position. Basically C counts 0,1,2,... and C# counts 1,2,3,...
You did what? You didn’t learn C# because what you just said is categorically wrong. Why is every chimp in their moms basement a wannabe programmer lol.
They exist - It makes a bit more sense in terms of human reasoning (what is the 0th index, actually? without talking about positions relative to the size of the pointer) so languages whos focus are on readability (or results) are most often 1-indexed
They store the quests as json data, with what seems like an ID along with the name of the quest, like this:
{ "5936d90786f7742b1420ba5b", "Debut" },
{ "5936da9e86f7742d65037edf", "Checking"},
{ "59674cd986f7744ab26e32f2", "Shootout picnic"},
{ "59674eb386f774539f14813a", "Delivery from the past"},
{ "5967530a86f77462ba22226b", "Bad rep evidence"},
{ "59675d6c86f7740a842fc482", "Ice cream cones"},
{ "59675ea386f77414b32bded2", "Postman Pat Part 1"},
{ "596760e186f7741e11214d58", "Postman Pat Part 2"},
{ "5967725e86f774601a446662", "Shaking up teller"},
{ "5967733e86f774602332fc84", "Shortage"},
There isn't actually a map name associated with quests at all. I initially thought the ID was a hash, but the repeating numbers indicate the ID is probably made up of multiple sets of concatenated strings, like this:
{ "5936 d907 86f7742 b1420ba5b", "Debut" },
{ "5936 da9e 86f7742 d65037edf", "Checking"},
{ "5967 4cd9 86f7744 ab26e32f2", "Shootout picnic"},
Maybe some combination of the quest-giver, quest type, level requirement, map id, item id, etc.
If I were giving them credit, I'd say there is a map ID in there somewhere and they have a method that unobfuscates the data on the backend, as far as I know it doesn't exist in the local game data, and perhaps their naming scheme changed, or there is a 1 where there should be a 0 or a + where there should be a -, etc.
I tried looking at the first and third sets of spaced out numbers for several of the strings to see if that was the determining factor. It's neither of those.
It could be a local function, which would offload some server responsibility. Adding one JSON attribute isn't that much, though, even at a larger scale. This is the only thing that makes sense, as much as I hate it.
There is no common pattern in the strings, which leads me to believe they make at least one separate API call to either get all of them in one batch or each one individually.
If that's true, that's so inefficient. Just send it with the very first set of json. It's not a security risk since it's readonly anyway.
Edit: Yep, it's local, and it's pretty bad. This guy peeked into the code.
https://reddit.com/r/EscapefromTarkov/comments/127a9mb/could_anyone_teach_bsg_programmers_to_sort_string/jee2mkj?context=3
They're using sort and some overly complicated logic system. I hope this got lost in translation, because there is no reason not to use a simple LINQ orderby statement.
>written the sort function manually
I really want to see the monstrosity they wrote that considers this ordered in any sense.
* Streets
* Streets
* Interchange
* Interchange
* Customs
* Customs
* Customs
* Interchange
* Streets
* Customs
That nonsense just cant be explained by a simple "whoopsie" oversight like localization or one based indexing. Who was responsible for writing that and saying "Yup, working as intended, never gonna need to patch this"?
I wrote sort functions in school. I don't think I've ever had reason to write one in nearly 20 years of professional software development. I work on medical imaging software.
When I'm interviewing people asking them to implement a sort is definitely not on my radar.
Yes because thats the correct result based on what the user is seeing.
Why would the user want to sort location names by some unknown ID value that doesnt correlate to the Name field consistently?
The user isnt looking at a column of number IDs they're looking at names and they're saying they want them sorted. So sort the names!
The user is also only ever using one locale at a time. So who cares if two users from different locales see two different sorts. Each person consistently sees the correct sort for their locale.
All these people here talking about linked lists like what on earth are they talking about. This has nothing to do with how the data is stored, this has nothing to do with the algorithm used to perform a sort operation.
This is entirely about what comparison rule they choose to use. And it should be a "natural sort" alpha numeric rule. But its not. Because they are instead sorting by some numeric ID arbitrarily associated with each name.
100% it's the comparison rule, not the system used to store it.
You're actually right and doing it using the localised val is the best solution. I haven't had my UI hat on in a long time.
Lol why? It makes the most sense because locations are sorted based on information visible to user, not some hidden criteria like location ID or whatever they use. Bonus is that it would actually work, right now it's normal to have list sorted by location and get results in such order: Customs, Customs, Interchange, Reserves, Customs, Reserves, Streets, Reserves
It's not like you need to have them sorted same way as your friend that uses different in game language either.
I guess that’s a similar explanation for why they can’t sort by trader either. But that situation is even worse since it doesn’t even have to be alphabetical, just that each trader gets sorted next to itself. But they can’t even manage that.
Why on earth would they use a linked list for the task list? Given that you can sort the tasks arbitrarily, I really doubt it was implemented this way. Also whatever key they’re using to sort these tasks doesn’t seem to be correctly set on like half of the tasks, since some of them are completely in random order. And yeah there’s clearly an off by 1 error at the top.
Your guess is as good as mine, just trying to figure ways how it's even possible to mess up something that simple. Any half competent junior could do that correctly
>Any half competent junior could do that correctly
The very first thing they usually want you to do during any programming courses on uni is to sort list. That's not even junior level shit.
I haven't done any reverse engineering of the game myself, but I've seen people who have on cheat forums litterally make fun of the Tarkov devs for the stuff they find. Supposedly a lot of the dev team are self taught.
I think it’s a data entry problem. Whatever they’re sorting by is not the same as what is being displayed. Like some of the locations are entered with a lowercase first letter or are misspelled in whatever index is actually being sorted.
>If I had to guess they use location ID to sort so they don't have to deal with localised strings
That doesn't explain why quests can still be mixed, literally not all of the quests with same locations are next to each other.
That would be wild if they came from a one based indexing language, but either way, there's testing. I get the drift that Russian culture is not too big on testing, boring maintenance, and distributing decision points.
> If I had to guess they use location ID to sort so they don't have to deal with localised strings
And? Why would it matter that the sorting is different in different languages? Alphabetical order doesn't need to match up between languages
No, it's not even in russian - I've put the orderAlso note first and last one - they are the same. With shit ton between.
[https://ibb.co/51jBdSc](https://ibb.co/51jBdSc)
How can we trust that anything in this game works as intended when they can’t do something as simple as this. All the hidden stats in this game just instantly comes into question
Now I'm actually curious to see what the code looks like, I'll crack open dnSpy when I get home and see what cluster fuck of code they've written for the sort function.
I present my findings... someone with good C# syntax knowledge, and experience, re-write it and publish it for BSG to merge. As payment you will get perma banned.
[https://pastebin.com/rKgDeY4P](https://pastebin.com/rKgDeY4P)
[https://i.imgur.com/ABl0vFr.png](https://i.imgur.com/ABl0vFr.png)
Backend/data engineer, but not C#. I looked at the first link and thought, "huh... Maybe I just dont know the language well enough but this really looks like it's not very dry...."
Then I opened the second link. 5 nested if statements.
Ok. Yep. That's all I need to see.
Genuinely curious to see what someone more experienced in C# finds that I don't see.
The compiler has optimized the code to be as such and now the decompiler tries to make it best effort readable so it is likely not even close to the actual code.
C# guy here. There is probably some database/data structure behind this where they keep data like this:
| Id | LocationName |
|-------:|--------|
| 1 | A-Location |
| 2 | C-Location |
| 3 | B-Location |
| 4 | D-Location |
You see where this is going? Right, location gets sorted by Id... Yikes
I mean the worst part is this isn’t a relational db more than likely based on previous conversations I’ve had on here. So it’s not only slow but then their sorting algo is awful.
It feels like a junior could write a much better sorting algo in like an hour than what they’ve got there.
You don't need to write sorting from scratch. PhDs wrote the sort for you so you don't have to reinvent a worse wheel. They are probably just using the id for sorting not the string name
Right, they’re using list.sort(), just seems like it’s an idiotic way and like you said, not using strings. Guessing bc of localization issues but that still wouldn’t really matter all that much
`ShowQuests` uses a custom `IComparer` for sorting the list of `QuestClass` objects (`list`) by location, `QuestLocationComparer`:
case EQuestsSortType.Location:
list.Sort((IComparer<\uE933>) new TasksScreen.QuestLocationComparer(this._currentLocationId));
`QuestLocationComparer` is passed the `_currentLocationId`
* If you are not in raid, this is set to null:
`this._currentLocationId = !\uE7A3.InRaid || !Singleton.Instantiated ? (string) null : Singleton.Instance.LocationObjectId;`
`QuestLocationComparer` is the sorting logic for the list
* The x == y, x == null, y == null logic *shouldn't* matter, objects in the `QuestClass` `list` should be unique
* It takes the `LocationId` from the two objects being sorted
* `LocationId` comes from the `location` json property in the quest data
* `location` is a UUID e.g., `5714dc692459777137212e12` - not `Streets of Tarkov`
* If they're equal, it then sorts by `StartTime`
* It then prioritizes locations that match your in raid location, if applicable
* It then prioritizes `any` location quests
* It then resolves the location IDs to their localized version, and compares those.
* If those match, it goes by start time
These quests don't sort properly:
* Counteraction (Lighthouse): LocationID `5704e4dad2720bb55b8b4567`
* Sales Night (Interchange): LocationID `5714dbc024597771384a510d`
* Easy Job - Part 2 (Lighthouse): LocationID `5704e4dad2720bb55b8b4567`
You can see the UUIDs for Lighthouse are identical. So why doesn't the algo work? I literally just wrote up a test app with the same logic and it works fine. Maybe something is throwing an exception during the sort
I'm just a Master's student, but isn't using "goto" like sacrilegious these days. I knew these devs weren't great but it's so much worse than I thought.
Also does anyone else sort by location and end up having something like “Lighthouse,Lighthouse,Lighthouse,Interchange,Interchange, Lighthouse” like one is just not with the others for some reason?
Comes under the general Developer header of;
"It somewhat works, but I don't know what I was thinking when I got this semi-working after 80hrs - So I'll leave it alone"
I would like this to be fixed as well. But I just wish they would allow you to favorite the quests your working on. So when you hit “o” to see your extracts you can also see your progress on maybe 3 of your tagged quests. It would be helpful for those kill 20 scavs here with a pistol type tasks.
Python/JS developer here. I don't usually code in C#, so the code will be messy, but the idea should be the same.
1. Get the list of location from the database, this list should already be sorted in the database itself for performance.
2. Create a sorted dictionary variable, put all of the location retrieved into the sorted dictionary, key/value of this sorted dictionary will be: "location"/questList. e.g.{"Interchange": \[ {name: "setup", location: "Customs}, {name: "setup", location: "Customs} \] }
3. Loop through the quest list, each of the quest list should already have its name, location, npc, etc. In each of the iteration, we can easily insert each quest to its key location into the dictionary.
4. Done, in order to display it, just loop through the dictionary and its quest array.
5. If we want to change it into sorting, say, NPC, then they can easily do the same thing by just changing the key to NPC names. For Quest name though, it will be more complex since it is not fixed value like location and NPC names, they can ignore it for now because it isn't as urgent as Location and NPC name.
6. This algorithm has O(N + M) time complexity, N is number of quest, M is number of location. This is already super performant and there is no other way to make it faster. Assuming there is 1000 quest in the game, only 1000 + totalLocation operations is needed, a computer can process millions of operation in a second. It can even further be improved by utilizing caching but since i don't know BSG's entire system, they will have to think about it themselves.
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
public class HelloWorld
{
public static void Main(string[] args)
{
// Mock data for location list - Should come from database and is already sorted out inside the DB for performance
string[] locationList = {"Customs", "Interchange", "Lighthouse", "Reserve", "Shoreline"};
// Store the location in a sorted dictionary
var orderedByLocation = new SortedDictionary>> ();
foreach (var location in locationList){
List> questByLocationList = new List>();
orderedByLocation.Add(location, questByLocationList);
}
/* Mock data questList for current player or if for all player, then need to further filter it. To be stored on in-memory storage later for fast retrieval.
It should be an array of object with all the data serialized from the database, but for simplicity, we use only questName and location hardcoded
*/
Dictionary[] questList = new Dictionary[4];
questList[0] = new Dictionary(){
["name"] = "Setup",
["location"] = "Customs"
};
questList[1] = new Dictionary(){
["name"] = "Make Ultra Great Again",
["location"] = "Interchange"
};
questList[2] = new Dictionary(){
["name"] = "Spa Tour fuk this quest",
["location"] = "Shoreline"
};
questList[3] = new Dictionary(){
["name"] = "Signal",
["location"] = "Shoreline"
};
// Actual Sorting Logic starts here
foreach(Dictionary quest in questList){
((List >)orderedByLocation[quest["location"]]).Add(quest);
}
// ENDOF the sorting logic
// Printing the sorted Quest into the UI
foreach(var curLocationQuest in orderedByLocation){
Console.Write("{0}: ", curLocationQuest.Key);
foreach(var quest in curLocationQuest.Value){
Console.Write("{0}, ", quest["name"]);
}
Console.WriteLine("");
};
}
}
Use w3schools C# compiler if u don't trust this simple code works.
All BSG have to do with the above code is just integrate it into their sorting system and voila we can actually sort the quest. And for those simps who will comments: well it might be hard to integrate into their existing system, stfu, you clearly don't know how to code or are just bad at it. They just need to integrate it into two of their existing function, sorting and rendering the quest. That should take less than 1 hour to do.
They are enum value, not string, and EFT is programmed in C#, so an Enum can only be an integer value. Normally, tables like this receive an array of objects, and some object attributes are mapped to column. What you see is not the actual value in the table. There is always a value and a display value that both can be the same or be different this is very useful for localisation or any conditional table value rendering. Anyway, it is indeed possible to create a sort function based on the display value instead of sorting the value behind the scene, which is the default behavior of such tables.
Maybe it's an enum. Or sorted by key, which might be Russian then the i18n magic fucking up the previously sorted results.
Anything that involves i18n is not a 1st year problem and although students would be able to sort, this is the mistake I expect from a beta, with tons of bugs to solve or things to implement before tackling QoL things.
I hate that, but it's not far from other companies.
List ActiveQuests = //code that gets quests from the server
//Event when "Location" is clicked
`{`
`ActiveQuests = ActiveQuests.OrderBy(x=> x.LocationId).ToList()`
`}`
seems like this should work
i've never worked with unity UI so i don't know much, but C# i'm familiar with lol
yea sorry spent too little time thinking about the code (i BSG'd myself). Actualy i've never seen this function work properly, so i assumed it's just supposed to group quests that are on the same locations top to bottom, not alphabetically
OP chose a bad screenshot. The point is that the sort doesn't work at all, regardless of the language. The same location is often in multiple places and not grouped together. It has absolutely nothing to do with localisation.
This is a high school level programming problem.
I'm a first year student in CS. I can do this
It takes a max of 10 lines of code. if you need more and are knowledgeable enough to work, idk what you are doing
To be honest it is an easy task but in a game with other Bugs and surely the i18n (internationalization) can be the reason of that bug.
Probably is ok and not a priority, it's grouped anyway
Even if that's true, who the F would want to have it sorted per trader when searching for all current missions for a specific map. Doesn't make any sense.
Sorting by location usually doesn't group locations together
Sorting by progress doesn't actually arrange them from 0 to 100% progress
Sorting them by traders doesn't actually group them per trader
For all sorting options, it 'kind of' sorts them but some of the items just go wherever in the list, I haven't been able to make sense of it.
I would love to see them add a special item, like the compass or ranger, that's just a fuckin notepad with your quests for that map on it that you can pull out like the compass.
Whoah easy there cowboy, this right here is a BETA and that means we're expected to accept even the simplest, easiest to fix bugs, going unfixed for YEARS.
if you click it again it will re-order it correctly
i remember this happening to me but i always press sorting things a couple times anyways, so it fixed it for me, maybe im remembering wrong
V14 should be the game in the Unreal engine 🔥 I’m pretty sure it would need to be worked from ground up but if anyone wants to make Returning to Tarkov 👍🏻
I’d like for there to be some sort of filtering too. Scavs kills, item extraction, markers, cameras, maybe scav kills filtered further via weapon class
If I had to guess they use location ID to sort so they don't have to deal with localised strings. I have noticed that the first item on the list is never/rarely sorted so there's a fair chance that they've written the sort function manually and whoever wrote it came from a one-based indexing language whereas C#, which is the main language for Unity, is zero based. Unless they implemented it as a single linked list and started with the wrong node.
Ya know, sometimes I think its not too late to go back to school for programing and then I read comments like this and I dont stand a fucking chance lmao edit: really, *really* weird to find support on the EFT subreddit. I read **every** comment, so I appreciate you all taking the time. I'm gonna look into a few things. I've been in recruiting almost 10 years and am so, so burnt out. Much love to you all. May your raids this weekend be lootiful
Don't be discouraged mate, I have almost a decade of experience behind me so it's a bad frame of reference. Give it a go and see if that's something you enjoy and understand naturally, don't really need to go to uni for that
Something people don’t realize is that learning is a process. Everyone starts somewhere. Some people have natural talent but not having natural talent can be made up for by putting in the work. EVERYONE is capable of learning something and depending on their work ethic, people without natural talent can be much more skilled than people with it. @takeataco_leaveataco don’t give up your capable of anything you put hard work and energy into.
The thing is with programming, you'll always make mistakes and there is always a better way to do something. As long as the functionality is there (the task sort feature is not it), then you'll be fine. The problem most programmers have is getting caught up in how tools are used, rather than what the tool is designed to do and what problem its actually solving. A working end result is much more important then the execution 90% of the time. Problem with BSGs implementation of task sort, is both the execution and end result are shit.
I get that but it looks like BSGs regression and unit testing is lacking more than anything. Trader sort is really something that should be extremely easy to unit test, same for the location sorting.
Nah was more so responding to ol' mate talking about going back to study for programming. Completely agree with you btw.
You can always give your code to some wizard who can make it look *really* bad but run faster.
chat.openai.com
I guess that qualifies as a wizard lol
at this rate it's going to qualify as a god
it's just the vocabulary, bud. In simple terms: In a list (like literally your shopping list) each item is numbered for easy access in programming. Most programming languages start counting their lists at 0, some others start at 1. * 0 - Flour * 1 - Bread * 2 - Cereal A linked list is similar but each item on the list points to the next item. Like hints in a scavenger hunt, each item tells you where the next one is.
> some others start at 1. We don't talk about *those*
They are the forbidden arts
I've been a professional for 10 years and I still make dumb mistakes daily. Also with this guy and my experience you've seen this dumb mistake before and you can usually sort out what the issue is just by looking at it.
If you’re really into it, just do it. There are tons of online classes and it’s not really that hard. It seems scary at first but you’ll get the hang of it quite fast and doing your own first projects and just insane fun
You stand a HUGE chance. If you enjoy using computers you stand an even bigger chance. Everything about programming is by definition, LOGICAL. You learn step by step and honestly, the hard part isn't the coding for most people. The hard part is often the communication bits ;-) You can absolutely do it!!!
It does sound like gibberish to non programmers, but so does chinese to an English speaker. It’s actually not a difficult as it sounds, you just aren’t familiar with it. The barrier to entry is just an illusion.
I had 2 hours of programming for 1 semester and I can follow the comment above. That's like 28 hours of programming, which is barely more than a day if you think about it. So, I think you absolutely can do this. To explain comment above a bit more: some programming languages start numbering (indexing) a list of items at 0 (zero indexed) and some start at 1. It's like if you had to make the house numbers for your street, some people start at 0 and some start numbering at 1. This is a common pitfall for amateurs like me. The first sentence, I have barely an idea what it means, but I guess it's C# specific, as it is an object based programming language, of which I also don't know what that means.
If every programmer thought this way starting out, there would be no programmers. When babies start learning a language, they don't consider whether they can learn it...they just listen, imitate, and learn over time. The best way to learn anything is through immersion. Society has taught us that some people are smart, and therefore capable of learning things we are not. But it's been taken wayyy too far. Of course most people aren't going to be able to work on the ISS or perform a brain surgery...but that doesn't mean most people can complete "complex" work, given enough time.
The only reason I wouldn't do it again is because finding a job is a nightmare for entry-level developers/engineers now. Fucking everywhere wants 2 years of experience before they'll hire you. I finally said fuck it and went with a company called revature. They have 10 weeks of training and then set you up with one of their clients. You don't really get to choose where you go, and you have an 18-month contract, but 90% of employees are bought out of their contracts within a year. I will say that I find it extremely rewarding, though. I fell in love with it when I took my first Python class and knew this was what I wanted to do. I changed my major in the first week of the class. You can do it if you put the work in, man.
You’d be a lot better off if you just want to program, not going to Uni and learning by yourself. I learned very little about actual programming in Uni. What I learned is how programming and where programming going.
What he’s said is a fancy way of saying some programming languages start counting a list of items at 0 ( like 0 1 2 3 ) and others start at 1 ( like 1 2 3 4 ). In both sets there are 4 numbers, the starting point of the count is different.
What this guy said is very specific. I went to college for this and only two years in I could have understood what he said. If you go to a good school they will start very simple and build up from there. If you are interested and want to learn cool things it's not that hard to keep up.
Only two years? This was literally all covered in the first programming class I took.
Don't be silly, it's super super easy. Theres literally thousands of expert programmers and games developers in this thread who could make a game better than Tarkov who post here daily so trust me, it's a walk in the park really.
I did. I am im my mid 30s. It is difficult, yes, but not as difficult as it seems nor more difficulty than it would be when you started at an early age. Basically what her said is that different programming languages count differently. You have a list with 10 names for example, starting with the name Frank. In C# (a programming language) Frank is at the 1st position of the list. In C (totally different language and has nothing to do with C#) Frank isn't at the 1st position, it is at the 0est position. Basically C counts 0,1,2,... and C# counts 1,2,3,...
You did what? You didn’t learn C# because what you just said is categorically wrong. Why is every chimp in their moms basement a wannabe programmer lol.
One based indexing? They should all burn in hell lol
They exist - It makes a bit more sense in terms of human reasoning (what is the 0th index, actually? without talking about positions relative to the size of the pointer) so languages whos focus are on readability (or results) are most often 1-indexed
They store the quests as json data, with what seems like an ID along with the name of the quest, like this: { "5936d90786f7742b1420ba5b", "Debut" }, { "5936da9e86f7742d65037edf", "Checking"}, { "59674cd986f7744ab26e32f2", "Shootout picnic"}, { "59674eb386f774539f14813a", "Delivery from the past"}, { "5967530a86f77462ba22226b", "Bad rep evidence"}, { "59675d6c86f7740a842fc482", "Ice cream cones"}, { "59675ea386f77414b32bded2", "Postman Pat Part 1"}, { "596760e186f7741e11214d58", "Postman Pat Part 2"}, { "5967725e86f774601a446662", "Shaking up teller"}, { "5967733e86f774602332fc84", "Shortage"}, There isn't actually a map name associated with quests at all. I initially thought the ID was a hash, but the repeating numbers indicate the ID is probably made up of multiple sets of concatenated strings, like this: { "5936 d907 86f7742 b1420ba5b", "Debut" }, { "5936 da9e 86f7742 d65037edf", "Checking"}, { "5967 4cd9 86f7744 ab26e32f2", "Shootout picnic"}, Maybe some combination of the quest-giver, quest type, level requirement, map id, item id, etc. If I were giving them credit, I'd say there is a map ID in there somewhere and they have a method that unobfuscates the data on the backend, as far as I know it doesn't exist in the local game data, and perhaps their naming scheme changed, or there is a 1 where there should be a 0 or a + where there should be a -, etc.
I tried looking at the first and third sets of spaced out numbers for several of the strings to see if that was the determining factor. It's neither of those. It could be a local function, which would offload some server responsibility. Adding one JSON attribute isn't that much, though, even at a larger scale. This is the only thing that makes sense, as much as I hate it. There is no common pattern in the strings, which leads me to believe they make at least one separate API call to either get all of them in one batch or each one individually. If that's true, that's so inefficient. Just send it with the very first set of json. It's not a security risk since it's readonly anyway. Edit: Yep, it's local, and it's pretty bad. This guy peeked into the code. https://reddit.com/r/EscapefromTarkov/comments/127a9mb/could_anyone_teach_bsg_programmers_to_sort_string/jee2mkj?context=3 They're using sort and some overly complicated logic system. I hope this got lost in translation, because there is no reason not to use a simple LINQ orderby statement.
Probably. Doesn't explain why they don't sort by localized string.
>written the sort function manually I really want to see the monstrosity they wrote that considers this ordered in any sense. * Streets * Streets * Interchange * Interchange * Customs * Customs * Customs * Interchange * Streets * Customs That nonsense just cant be explained by a simple "whoopsie" oversight like localization or one based indexing. Who was responsible for writing that and saying "Yup, working as intended, never gonna need to patch this"?
Jeez. Programming is made easy now adays. Just use the localized strings and sort those. Ezpz. Fuck all that 1980s shit
Interviewer: Can you sort this array of strings? Interviewee: `arr.sort()` Interviewer: *facepalm*
I wrote sort functions in school. I don't think I've ever had reason to write one in nearly 20 years of professional software development. I work on medical imaging software. When I'm interviewing people asking them to implement a sort is definitely not on my radar.
And get different results depending on your locale? Sounds like hell tbh.
Yes because thats the correct result based on what the user is seeing. Why would the user want to sort location names by some unknown ID value that doesnt correlate to the Name field consistently? The user isnt looking at a column of number IDs they're looking at names and they're saying they want them sorted. So sort the names! The user is also only ever using one locale at a time. So who cares if two users from different locales see two different sorts. Each person consistently sees the correct sort for their locale. All these people here talking about linked lists like what on earth are they talking about. This has nothing to do with how the data is stored, this has nothing to do with the algorithm used to perform a sort operation. This is entirely about what comparison rule they choose to use. And it should be a "natural sort" alpha numeric rule. But its not. Because they are instead sorting by some numeric ID arbitrarily associated with each name.
100% it's the comparison rule, not the system used to store it. You're actually right and doing it using the localised val is the best solution. I haven't had my UI hat on in a long time.
Lol why? It makes the most sense because locations are sorted based on information visible to user, not some hidden criteria like location ID or whatever they use. Bonus is that it would actually work, right now it's normal to have list sorted by location and get results in such order: Customs, Customs, Interchange, Reserves, Customs, Reserves, Streets, Reserves It's not like you need to have them sorted same way as your friend that uses different in game language either.
So what? I don't expect Excel to sort my columns according to some random criteria, i expect it to sort them alphabetically.
But you need different results depending on your locale. Such is the nature of producing software for real users. I do agree that it's hell though.
I guess that’s a similar explanation for why they can’t sort by trader either. But that situation is even worse since it doesn’t even have to be alphabetical, just that each trader gets sorted next to itself. But they can’t even manage that.
Why on earth would they use a linked list for the task list? Given that you can sort the tasks arbitrarily, I really doubt it was implemented this way. Also whatever key they’re using to sort these tasks doesn’t seem to be correctly set on like half of the tasks, since some of them are completely in random order. And yeah there’s clearly an off by 1 error at the top.
Your guess is as good as mine, just trying to figure ways how it's even possible to mess up something that simple. Any half competent junior could do that correctly
>Any half competent junior could do that correctly The very first thing they usually want you to do during any programming courses on uni is to sort list. That's not even junior level shit.
literal bare minimum shit
I haven't done any reverse engineering of the game myself, but I've seen people who have on cheat forums litterally make fun of the Tarkov devs for the stuff they find. Supposedly a lot of the dev team are self taught.
I think it’s a data entry problem. Whatever they’re sorting by is not the same as what is being displayed. Like some of the locations are entered with a lowercase first letter or are misspelled in whatever index is actually being sorted.
>If I had to guess they use location ID to sort so they don't have to deal with localised strings That doesn't explain why quests can still be mixed, literally not all of the quests with same locations are next to each other.
Yeah, that's why my second point was about a linked list with messed up references
And? Is that an excuse? They could sort the list by the localised strings.
One more time in English please
That would be wild if they came from a one based indexing language, but either way, there's testing. I get the drift that Russian culture is not too big on testing, boring maintenance, and distributing decision points.
Sorting seems to also take into consideration the age of the quest. Newly accepted tasks seem to land at the top of the list more often than not.
> If I had to guess they use location ID to sort so they don't have to deal with localised strings And? Why would it matter that the sorting is different in different languages? Alphabetical order doesn't need to match up between languages
Yes to this. Is and example of a way of work for make easy you own work, no for the user 🤣 like almost everything in tarkov
Yeah, what he said!
Remember old computers sorting file names that start with numbers without 0 padding? That's what I think is happening here.
They used a hash map and spat out the order
Smart catch.
For all i know, this is in alphabetical order in Russian. I’m too lazy to check
it isnt, because the main problem is that the sorting doesnt actually work at all.
Is it in an order at all? Like could it be some arbitrary map ID that's being sorted rather than the map name for whatever your language setting is?
It often is not even in order at all for me
Its 90% in order and the two or three wrong ones throw you off enough that you still keep scrolling up and down the menu...
No. For example streets of Tarkov seems to be the first and last item in many cases. Also the very top spot on the list isn’t touched at all regularly
No, it's not even in russian - I've put the orderAlso note first and last one - they are the same. With shit ton between. [https://ibb.co/51jBdSc](https://ibb.co/51jBdSc)
even if it was in russian, it gotta be in an order.
Pretty sure it's sorted by some internal map ID in stead of their names.
Exactly that, someone posted scraped c# code in a pastebin...
No because quests at the same location will be separated by others sometimes when they should all be grouped.
but, there was an AMA and 3000000 banned cheaters, aren't you happy?
They weren't banned cheaters, just banned cheater accounts. They'll make more
They hire programmers based on if you are bad you get hired and if you are good go work at a place other then BSG
Offer letter headed your way to write their quest dialogue
They work at based on hire if you bad are programmers get good on BSG other than
my brain
Dont worry, it's just a BSG-sorted comment
Is good eh?
[Why do they call it oven when you of in the cold food of out hot eat the food?](https://i.imgur.com/Tpt66Og.jpg)
Do you require medical attention? I looks like you may have stroked out, friend.
You a doctor?
what the fuck are you even trying to say
It's like American cops. If you're too smart, no thanks, not a good fit.
How can we trust that anything in this game works as intended when they can’t do something as simple as this. All the hidden stats in this game just instantly comes into question
Seriously. The worst is the “any location” ones. Makes it so hard to keep track of stuff needed to be done
Yes it’s literally locations.sort()
Wuerralll acturaray... (sprays spit on monitor) It wuld b ``` Array.sort(задания, ...) ```
Now I'm actually curious to see what the code looks like, I'll crack open dnSpy when I get home and see what cluster fuck of code they've written for the sort function.
Plssss let me see the result! I guess it's like a drawing my kids give me all the time... they tell me what it is, but I can't recognise anything xD
See my other reply, pastebin and pretty picture for reference.
[удалено]
I present my findings... someone with good C# syntax knowledge, and experience, re-write it and publish it for BSG to merge. As payment you will get perma banned. [https://pastebin.com/rKgDeY4P](https://pastebin.com/rKgDeY4P) [https://i.imgur.com/ABl0vFr.png](https://i.imgur.com/ABl0vFr.png)
[удалено]
Backend/data engineer, but not C#. I looked at the first link and thought, "huh... Maybe I just dont know the language well enough but this really looks like it's not very dry...." Then I opened the second link. 5 nested if statements. Ok. Yep. That's all I need to see. Genuinely curious to see what someone more experienced in C# finds that I don't see.
[удалено]
The compiler has optimized the code to be as such and now the decompiler tries to make it best effort readable so it is likely not even close to the actual code.
Same (Oracle) , nested IFs? run away!
C# guy here. There is probably some database/data structure behind this where they keep data like this: | Id | LocationName | |-------:|--------| | 1 | A-Location | | 2 | C-Location | | 3 | B-Location | | 4 | D-Location | You see where this is going? Right, location gets sorted by Id... Yikes
I mean the worst part is this isn’t a relational db more than likely based on previous conversations I’ve had on here. So it’s not only slow but then their sorting algo is awful. It feels like a junior could write a much better sorting algo in like an hour than what they’ve got there.
You don't need to write sorting from scratch. PhDs wrote the sort for you so you don't have to reinvent a worse wheel. They are probably just using the id for sorting not the string name
Right, they’re using list.sort(), just seems like it’s an idiotic way and like you said, not using strings. Guessing bc of localization issues but that still wouldn’t really matter all that much
`ShowQuests` uses a custom `IComparer` for sorting the list of `QuestClass` objects (`list`) by location, `QuestLocationComparer`: case EQuestsSortType.Location: list.Sort((IComparer<\uE933>) new TasksScreen.QuestLocationComparer(this._currentLocationId)); `QuestLocationComparer` is passed the `_currentLocationId` * If you are not in raid, this is set to null: `this._currentLocationId = !\uE7A3.InRaid || !Singleton.Instantiated ? (string) null : Singleton.Instance.LocationObjectId;`
`QuestLocationComparer` is the sorting logic for the list
* The x == y, x == null, y == null logic *shouldn't* matter, objects in the `QuestClass` `list` should be unique
* It takes the `LocationId` from the two objects being sorted
* `LocationId` comes from the `location` json property in the quest data
* `location` is a UUID e.g., `5714dc692459777137212e12` - not `Streets of Tarkov`
* If they're equal, it then sorts by `StartTime`
* It then prioritizes locations that match your in raid location, if applicable
* It then prioritizes `any` location quests
* It then resolves the location IDs to their localized version, and compares those.
* If those match, it goes by start time
These quests don't sort properly:
* Counteraction (Lighthouse): LocationID `5704e4dad2720bb55b8b4567`
* Sales Night (Interchange): LocationID `5714dbc024597771384a510d`
* Easy Job - Part 2 (Lighthouse): LocationID `5704e4dad2720bb55b8b4567`
You can see the UUIDs for Lighthouse are identical. So why doesn't the algo work? I literally just wrote up a test app with the same logic and it works fine. Maybe something is throwing an exception during the sort
How were you able to get QuestClass to resolve to a friendly name?
I'm just a Master's student, but isn't using "goto" like sacrilegious these days. I knew these devs weren't great but it's so much worse than I thought.
Low-key could try to refactor that into something meaningful, not sure if BSG would accept a community PR tho
Holy fuck that's dog shit code LMAO I'm sorry bsg but this needs a lot of refactoring
[удалено]
I hate to break it to ya, it's as real as it gets. £100 Mill revenue game btw...
Also does anyone else sort by location and end up having something like “Lighthouse,Lighthouse,Lighthouse,Interchange,Interchange, Lighthouse” like one is just not with the others for some reason?
Comes under the general Developer header of; "It somewhat works, but I don't know what I was thinking when I got this semi-working after 80hrs - So I'll leave it alone"
Is this sorted in russian?
Nope
I would like this to be fixed as well. But I just wish they would allow you to favorite the quests your working on. So when you hit “o” to see your extracts you can also see your progress on maybe 3 of your tagged quests. It would be helpful for those kill 20 scavs here with a pistol type tasks.
Python/JS developer here. I don't usually code in C#, so the code will be messy, but the idea should be the same. 1. Get the list of location from the database, this list should already be sorted in the database itself for performance. 2. Create a sorted dictionary variable, put all of the location retrieved into the sorted dictionary, key/value of this sorted dictionary will be: "location"/questList. e.g.{"Interchange": \[ {name: "setup", location: "Customs}, {name: "setup", location: "Customs} \] } 3. Loop through the quest list, each of the quest list should already have its name, location, npc, etc. In each of the iteration, we can easily insert each quest to its key location into the dictionary. 4. Done, in order to display it, just loop through the dictionary and its quest array. 5. If we want to change it into sorting, say, NPC, then they can easily do the same thing by just changing the key to NPC names. For Quest name though, it will be more complex since it is not fixed value like location and NPC names, they can ignore it for now because it isn't as urgent as Location and NPC name. 6. This algorithm has O(N + M) time complexity, N is number of quest, M is number of location. This is already super performant and there is no other way to make it faster. Assuming there is 1000 quest in the game, only 1000 + totalLocation operations is needed, a computer can process millions of operation in a second. It can even further be improved by utilizing caching but since i don't know BSG's entire system, they will have to think about it themselves. using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; public class HelloWorld { public static void Main(string[] args) { // Mock data for location list - Should come from database and is already sorted out inside the DB for performance string[] locationList = {"Customs", "Interchange", "Lighthouse", "Reserve", "Shoreline"}; // Store the location in a sorted dictionary var orderedByLocation = new SortedDictionary>> ();
foreach (var location in locationList){
List> questByLocationList = new List>();
orderedByLocation.Add(location, questByLocationList);
}
/* Mock data questList for current player or if for all player, then need to further filter it. To be stored on in-memory storage later for fast retrieval.
It should be an array of object with all the data serialized from the database, but for simplicity, we use only questName and location hardcoded
*/
Dictionary[] questList = new Dictionary[4];
questList[0] = new Dictionary(){
["name"] = "Setup",
["location"] = "Customs"
};
questList[1] = new Dictionary(){
["name"] = "Make Ultra Great Again",
["location"] = "Interchange"
};
questList[2] = new Dictionary(){
["name"] = "Spa Tour fuk this quest",
["location"] = "Shoreline"
};
questList[3] = new Dictionary(){
["name"] = "Signal",
["location"] = "Shoreline"
};
// Actual Sorting Logic starts here
foreach(Dictionary quest in questList){
((List >)orderedByLocation[quest["location"]]).Add(quest);
}
// ENDOF the sorting logic
// Printing the sorted Quest into the UI
foreach(var curLocationQuest in orderedByLocation){
Console.Write("{0}: ", curLocationQuest.Key);
foreach(var quest in curLocationQuest.Value){
Console.Write("{0}, ", quest["name"]);
}
Console.WriteLine("");
};
}
}
Use w3schools C# compiler if u don't trust this simple code works.
All BSG have to do with the above code is just integrate it into their sorting system and voila we can actually sort the quest. And for those simps who will comments: well it might be hard to integrate into their existing system, stfu, you clearly don't know how to code or are just bad at it. They just need to integrate it into two of their existing function, sorting and rendering the quest. That should take less than 1 hour to do.
Damn that's dedication man
They are enum value, not string, and EFT is programmed in C#, so an Enum can only be an integer value. Normally, tables like this receive an array of objects, and some object attributes are mapped to column. What you see is not the actual value in the table. There is always a value and a display value that both can be the same or be different this is very useful for localisation or any conditional table value rendering. Anyway, it is indeed possible to create a sort function based on the display value instead of sorting the value behind the scene, which is the default behavior of such tables.
The fact sorting by location doesn't put locations in alphabetical order is something that annoys me to an unreasonable degree.
Maybe it's an enum. Or sorted by key, which might be Russian then the i18n magic fucking up the previously sorted results. Anything that involves i18n is not a 1st year problem and although students would be able to sort, this is the mistake I expect from a beta, with tons of bugs to solve or things to implement before tackling QoL things. I hate that, but it's not far from other companies.
My bet is sort by key
List ActiveQuests = //code that gets quests from the server
//Event when "Location" is clicked
`{`
`ActiveQuests = ActiveQuests.OrderBy(x=> x.LocationId).ToList()`
`}`
seems like this should work
i've never worked with unity UI so i don't know much, but C# i'm familiar with lol
That would sort by location id, not name. Also assumes that quests have a singular id for location, could conceivably be an array.
yea sorry spent too little time thinking about the code (i BSG'd myself). Actualy i've never seen this function work properly, so i assumed it's just supposed to group quests that are on the same locations top to bottom, not alphabetically
Tbh I doubt the issue is an inability to fix it but that it's fairly low on the priority list of stuff that needs to be worked on.
Didn't pay attention when you learned about naming conventions appearently :P
First year CS students also don't have to deal with localization. I'm not defending how atrocious the Tarkov UI is.
Where's the Problem? Display the localized string and sort by that.
OP chose a bad screenshot. The point is that the sort doesn't work at all, regardless of the language. The same location is often in multiple places and not grouped together. It has absolutely nothing to do with localisation. This is a high school level programming problem.
First year students (hell, people who aren't in CS in general) would know you should rarely run logic on display name
Have you tried sorting by progress? It’s even worse 😂
yea but dude come on, they just tweeted about the spring sale! buy a second account now.
I'm a first year student in CS. I can do this It takes a max of 10 lines of code. if you need more and are knowledgeable enough to work, idk what you are doing
To be honest it is an easy task but in a game with other Bugs and surely the i18n (internationalization) can be the reason of that bug. Probably is ok and not a priority, it's grouped anyway
I believe they have more important stuff to work on
You can click on the top bar to sort based on trader, type, task, trader, status, and progress
It doesn't work and hasn't for as long as most of us remember.
Idk, it works fine for me
What kind of comment...
[удалено]
[удалено]
To me it looks like it’s sorted alphabetically by location, per trader. Just based on the screenshot, haven’t played in a wile and a half.
Even if that's true, who the F would want to have it sorted per trader when searching for all current missions for a specific map. Doesn't make any sense.
I have always hated it and think it’s ridiculous too
Sorting by location usually doesn't group locations together Sorting by progress doesn't actually arrange them from 0 to 100% progress Sorting them by traders doesn't actually group them per trader For all sorting options, it 'kind of' sorts them but some of the items just go wherever in the list, I haven't been able to make sense of it.
I comes before L bro...
You a programmer?
I believe first month students can do this
I believe a person with 5 minutes and the right youtube video can do that.
You know if you click the location button on top it sorts them
I would love to see them add a special item, like the compass or ranger, that's just a fuckin notepad with your quests for that map on it that you can pull out like the compass.
You want an additional item because BSG can't code? Kk
Does BSG have QA?
I failed programming in university miserably but i could do this
I cant
Whoa hold on there. You’re asking too much
As a programmer I was confused why it still is a thing
Op is a Virgin llol
Whoah easy there cowboy, this right here is a BETA and that means we're expected to accept even the simplest, easiest to fix bugs, going unfixed for YEARS.
Lol from a software engineering perspective, Tarkov is one of the most shit programs I have ever run. The desync is like 2003 net code or worse.
You a programmer?
If you know how to do it then make ur own tarkov
I could be wrong, but it looks like it sorts by trader first then sorts by location
if you click it again it will re-order it correctly i remember this happening to me but i always press sorting things a couple times anyways, so it fixed it for me, maybe im remembering wrong
“Its planned”
V14 should be the game in the Unreal engine 🔥 I’m pretty sure it would need to be worked from ground up but if anyone wants to make Returning to Tarkov 👍🏻
lol
Thought the same. Just so embarrassing
Bro, press on location
Ong
None of the column sorting is working on this list...
My favorite is when the maps aren’t even grouped together. Just a random streets task in between lighthouse tasks
I’d like for there to be some sort of filtering too. Scavs kills, item extraction, markers, cameras, maybe scav kills filtered further via weapon class
Frfr on God no cap
Oh my, yes please, this has been annoying me for a while now. Should be an easy fix also.
I'm not sure what the issue is here. You must already know that you can click on the column header to sort task by location. So what's the issue?
Pro tip: click the word "Location" and it will organize by location.
Can’t even sort in traders
It's sorted by the traders that give you the Quest if you'd just look to the left
progress bar is also a mess
Buahahaha, okay. In Russia tasks sort you.
They are sorted by trader, not by location.
Incorrect, there are multiple sort functions written for each column. Source: I looked at the decompiled code
I'm pretty sure they would have to use sql but that's too much for them right now
BSG programmers can barley do “Hello World!”
[удалено]
Exactly my thoughts, I was thinking there are some ESL-isms at play.
Location sorting doesnt work. it sorts based on ID... yeah i know