I was looking at the "Top mods" section of the Content Database and thought that it was based on downloads but some mods which have more downloads are lower in the list
How are the mods sorted?
ContentDB Top mods
ContentDB Top mods
Creator of jelys_pizzaria and motorbike, and player of persistent kingdoms. RIP
- Linuxdirk
- Member
- Posts: 3217
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: ContentDB Top mods
If I understand the code correctly it is based on views of the forum topic, if it has a screenshot, and if it has a free license.Extex wrote:I was looking at the "Top mods" section of the Content Database and thought that it was based on downloads but some mods which have more downloads are lower in the list
How are the mods sorted?
- rubenwardy
- Moderator
- Posts: 6972
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: ContentDB Top mods
Linuxdirk is correct, it's based on the forum topic currently with certain things being penalised.
The algorithm was designed to obtain an initial ordering of packages which historically used the forums for distribution. This was intended to be temporary whilst I work out how to do it better, but I never got around to that. The algorithm calculates the average number of views per month to estimate interest
A package will be penalised by 20% for not having a screenshot, and 90% for not being completely free and open source
The algorithm was designed to obtain an initial ordering of packages which historically used the forums for distribution. This was intended to be temporary whilst I work out how to do it better, but I never got around to that. The algorithm calculates the average number of views per month to estimate interest
A package will be penalised by 20% for not having a screenshot, and 90% for not being completely free and open source
Code: Select all
self.score = 10
if self.forums:
topic = ForumTopic.query.get(self.forums)
if topic:
days = (datetime.datetime.now() - topic.created_at).days
months = days / 30
years = days / 365
self.score = topic.views / max(years, 0.0416) + 80*min(max(months, 0.5), 6)
if self.getMainScreenshotURL() is None:
self.score *= 0.8
if not self.license.is_foss:
self.score *= 0.1
- Wuzzy
- Member
- Posts: 4786
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: ContentDB Top mods
A screenshot doesn't make sense for a variety of mods.
- Linuxdirk
- Member
- Posts: 3217
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: ContentDB Top mods
I just added random images to my "API-style" mods as screenshots.Wuzzy wrote:A screenshot doesn't make sense for a variety of mods.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: ContentDB Top mods
A simple logo is also useful for making the entry distinctive.Linuxdirk wrote:I just added random images to my "API-style" mods as screenshots.Wuzzy wrote:A screenshot doesn't make sense for a variety of mods.
Who is online
Users browsing this forum: No registered users and 15 guests