ContentDB Top mods

Post Reply
User avatar
Extex
Member
Posts: 190
Joined: Wed Mar 14, 2018 23:14
GitHub: Extex101
In-game: Extex

ContentDB Top mods

by Extex » Post

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 and motorbike mods. Working on another mod which should be coming soon!

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

Re: ContentDB Top mods

by Linuxdirk » Post

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: 6276
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

Re: ContentDB Top mods

by rubenwardy » Post

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: 4064
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: ContentDB Top mods

by Wuzzy » Post

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

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

Re: ContentDB Top mods

by Linuxdirk » Post

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: 1752
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: ContentDB Top mods

by texmex » Post

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.
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw

Post Reply

Who is online

Users browsing this forum: celeron55 and 10 guests