ContentDB Top mods

Extex
Member
 
Posts: 113
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

ContentDB Top mods

by Extex » Mon Oct 14, 2019 05:08

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?
Player of PK, RIP. Creator of the light_tool mod. Working on another mod which is pretty cool so far
 

User avatar
Linuxdirk
Member
 
Posts: 2200
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: ContentDB Top mods

by Linuxdirk » Mon Oct 14, 2019 07:19

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?

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.
 

User avatar
rubenwardy
Moderator
 
Posts: 5863
Joined: Tue Jun 12, 2012 18:11
Location: United Kingdom
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: ContentDB Top mods

by rubenwardy » Mon Oct 14, 2019 07:29

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

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
 

User avatar
Wuzzy
Member
 
Posts: 3629
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: ContentDB Top mods

by Wuzzy » Tue Oct 15, 2019 12:29

A screenshot doesn't make sense for a variety of mods.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
Linuxdirk
Member
 
Posts: 2200
Joined: Wed Sep 17, 2014 11:21
Location: Germany
In-game: Linuxdirk

Re: ContentDB Top mods

by Linuxdirk » Tue Oct 15, 2019 13:00

Wuzzy wrote:A screenshot doesn't make sense for a variety of mods.

I just added random images to my "API-style" mods as screenshots.
 

User avatar
texmex
Member
 
Posts: 1590
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: ContentDB Top mods

by texmex » Tue Oct 15, 2019 17:48

Linuxdirk wrote:
Wuzzy wrote:A screenshot doesn't make sense for a variety of mods.

I just added random images to my "API-style" mods as screenshots.

A simple logo is also useful for making the entry distinctive.
 


Return to General Discussion



Who is online

Users browsing this forum: Norore and 9 guests