Skip to content

Estimate created date for maps missing a date #1023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

willocn
Copy link
Contributor

@willocn willocn commented Feb 19, 2025

This PR adds a creation date to maps which don't have one.

I used the command git log --follow -M level.dat to get the oldest commit for each map. In order to confirm this works at all, I compared this predicted date to existing map <creation> tags.
mean difference: ~125 days
median difference: 5 days

This will definitely be wrong for some maps, but seems to be pretty close for most. I have given most of these maps a cursory glance, but obviously I don't know the history of some of these maps, so hopefully someone else can look at them as well.

@willocn
Copy link
Contributor Author

willocn commented Feb 19, 2025

Some of these files have a huge diff, not sure if I understand why - maybe I clobbered the encoding?

Comment on lines +5 to +12
<created>2022-04-12</created><!--created date derived from commit 0a44b860-->
<include id="infection"/>
<if variant="default">
<created>2022-04-01</created>
</if>
<if variant="halloween">
<created>2022-10-03</created>
</if>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhh... i think your script needs a bit of tweaking, this map already has creation date(s)

Copy link
Contributor

@CrazyisCreeps CrazyisCreeps Feb 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, same with Hide n Seek. Probably anything with the created in an <if> got included?

@TheRealPear
Copy link
Member

It might be better if we also checked the last played date inside the oldest level.dat file to make sure it lines up as well. It’ll be more effort, but I know some of the commit dates for these maps are wrong

@arcadeboss
Copy link
Contributor

arcadeboss commented Feb 19, 2025

Totally GOAT - Nice PR!

@@ -1,6 +1,7 @@
<map proto="1.5.0">
<name>Backstreets</name>
<version>1.2</version>
<created>2024-12-22</created><!--created date derived from commit 6fcc818f-->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small suggestion on formatting to add space before comment and two inside comment

<created>2024-12-22</created> <!-- created date derived from commit 6fcc818f -->

@CrazyisCreeps
Copy link
Contributor

My copy of the Stratus repo only goes so far back, a more recent map dev from there would have better insight - but I believe most of the Water Drop maps were a part of an April Fools event, Some new ones may have been created when the rest were added, but I want to say the originals were made in 2018/2019.

On top of that, there appears to be a few maps from the Stratus repo that were added into the CommunityMaps repo instead of the PublicMaps repo - such as Hide n Seek & Wrath Tor Rage. There could be others. Those maps would have older creation dats not reflected by the commit into this repo.

@calcastor
Copy link
Member

This will definitely be wrong for some maps

I'm concerned this is going to be far more than anticipated. Backstreets is incorrect (should be sometime in April or May 2022) and anything else that is a competitive map migrated into this repo from public-competitive is going to be wrong as well.

@willocn
Copy link
Contributor Author

willocn commented Feb 22, 2025

I'm concerned this is going to be far more than anticipated. Backstreets is incorrect (should be sometime in April or May 2022) and anything else that is a competitive map migrated into this repo from public-competitive is going to be wrong as well.

For maps that were moved from a different repo, I think Pear's approach (reading oldest level.dat) might work better. I didn't realize that that many maps were migrated into community - I thought it was mostly new (post-OCC) maps.

@TheRealPear TheRealPear added enhancement New feature or request map This issue is related to a map in the repository labels Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request map This issue is related to a map in the repository
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants