Sketchy502 / SDV-Summary

An application to display a summary of the player from a Stardew Valley save file.
206 stars 21 forks source link

Dates are one day ahead. #11

Closed JiFish closed 6 years ago

JiFish commented 8 years ago

The dates displayed on the farm information are actually one day later than the actual image. For example a farm listed as 1st of Fall is actually shows the state of play at the end of the day on the 28th of summer. Also, it uses the sprites for the wrong season.

This is particularity obvious on the first of the month, where you can crops from the wrong month.

Here is an example: http://upload.farm/1BpC6G (Note the hops and tomato crops.)

This is probably caused by the date being one day ahead in the save file?

Sketchy502 commented 8 years ago

That's strange. What is the correct date of the save file that you uploaded? is it 1st of Fall?

I'll have a look into the issue as soon as I can.

JiFish commented 8 years ago

That's strange. What is the correct date of the save file that you uploaded? is it 1st of Fall?

That's an awkward question, because it's dependant about how you think about it. The save was made the night of the 28th. Of course, if you load that save it will load on the 1st of Fall. But the farm data still represents the date the day it was saved, not the day it will load. So in a way, saves are actually between days.

I'm pretty certain this is because the game increments the day before saving, but doesn't apply the new day's changes until after it loads. But without being able to get the code running locally, I can't be sure.

Sketchy502 commented 8 years ago

By the correct date I was referring to the date in which the game loads into, I just wanted to make sure the site was getting the correct date.

I initially assumed the game update then saved progress however, like you said, the game most likely updates after saving. I'll add a check to the save game parser to filter out any crops that are from the previous season.

JiFish commented 8 years ago

I'll add a check to the save game parser to filter out any crops that are from the previous season.

Forgive me, but I think that's definitely fixing this the wrong way around. After all, the game doesn't just remove items in the morning, it all also adds items. For example, going from the 28th of Winter to the 1st of Spring adds a bunch of new grass patches, weeds etc to the ground. Even on a normal day, crop / grass growth would also not be updated. So even if you exclude certain crops, the image is still not going to truly represent what the farm looks like after you load the game.

Unfortunately due to the saving between days quirk, a save labelled a given day is actually showing the state of play for the day before. The more accurate way to display the summary is to decrease the date by one day. Which I grant you, is confusing because it won't match the way the save is labelled. Obviously, it's down to you, but this way will match what is seen in game as closely as possible.

Sketchy502 commented 8 years ago

That is a much better and nicer solution than the hack I suggested, this way the rendered image is what was last seen by the player.

I will have a look to see if there are any problems.