ft-t / ets2-sync

https://ft-t.github.io/
MIT License
6 stars 0 forks source link

Jobs not syncing #5

Closed Skippeh closed 4 years ago

Skippeh commented 4 years ago

I've noticed while playing with friends that the jobs don't always sync. We're 100% sure we're saving/syncing/loading the correct save file.

It might only be some countries/locations/companies because it seemed to work to begin with.

We've had trouble in finland and tallinn so far, using ProMods.

Dahlis commented 4 years ago

It worked last friday, but not today. We tried to sync jobs with and without Promods part, no luck there either.

skynet2 commented 4 years ago

Hi, Ok, will try to check, thanks for the report

Skippeh commented 4 years ago

game.sii.raw.txt game.sii.synced.txt

I've uploaded two files, one being a save file before sync and the other one after syncing. Might be helpful for comparison.

Damanox commented 4 years ago

Save looks ok, can you please provide game.log.txt after loading synced save?

Skippeh commented 4 years ago

game.log.txt

You can ignore the "g_save_format 3", i used it for something else temporarily, i made sure to upload the non binary version. Let me know if you want one where 2 is used.

skynet2 commented 4 years ago

Hi @Skippeh , You don't have any error messages during loading save in-game correct?

That's possible that for some cities\companies there is no data in our database, as when i uploaded data to populate database I realized that I don't have the latest DLC for ETS 2.

Skippeh commented 4 years ago

Nope, no messages pop up.

If that is the case would it help to uncheck the dlc that isn't in the database?

skynet2 commented 4 years ago

Hi @Skippeh , As i understand the issue is that for some cities you don't have synced cargoes, but at the same time, with that save the file you have synced cargoes in other cities, correct (you can check cargo expiration time)?
If yes, then its not an issue, it means that our database just don't have data for those cities, and we need to populate it :)

Skippeh commented 4 years ago

Do you know the countries that aren't in the database (or is it as granular as per city?) so i know what places i should avoid until it's fixed? :)

Dahlis commented 4 years ago

Was playing with a friend yesterday (using Promods) and it seems like Sweden, Finland, France and Germany doesn't get any jobs after syncing jobs.

Haven't check the other countries yet, but what it looks like, none of them works.

skynet2 commented 4 years ago

Ok, how that project work :

We are not generating jobs, we have a parser which parses jobs from original game.sii and inserts it into our database. The job runs every 72 hours, which selects a job offers from the database and generating a list of jobs for user to sync with.

The first idea was that when user upload savefile, we are parsing all jobs and inserting it into the database, that's how we thought that we`ll populate job database, but in fact, that will not work, as there is a possibility that somebody will upload broken savefile with broken jobs or smth like and that will cause issues for user users in future.

So, for now, we only when "admin" uploads save a file, only then jobs will be parsed and added to the public database. As I and @Damanox playing ETS\ATS rarely, database is not filled enough with the jobs for all regions.

If you are interested in this software, I can give you specific access and instructions on how to populate a public database with the jobs, so it probably will solve most of the issues.

Skippeh commented 4 years ago

Maybe generating a few dozen lists or so and rotating them every n hours would suffice instead of new jobs everytime if i understand it correctly?

If you wanna do overkill you could "merge" the jobs semi-randomly (making sure it's evenly spread out etc) to get a random list everytime it changes.

I have all map/cargo/trailer dlcs so generating the jobs shouldnt't be a problem if i can figure out how to clear pre-existing jobs first :) (reset economy?)

Edit: Correction, i have all dlcs for ets2. I only own the base game of ATS sadly.

skynet2 commented 4 years ago

The new list is generated every 72 hours, and yes it has random logic, but as the database with the jobs is pretty small, it even doesn't try to do random, as it does not have enough data to do that :) https://github.com/ft-t/ets2-sync/blob/master/cmd/web/offer_manager.go#L34

Yep, just simple reset economy, no magic here :) If you want to do that, please ping me in discord : skydev#7777

Skippeh commented 4 years ago

For anyone who might stumble upon this issue, the problem was steam cloud sync. The game save needs to be in documents or it won't work