npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

entgaming-mod-stats

v0.0.1

Published

Basic game statistics for entgamming.net

Downloads

3

Readme

Overview

Web crawler to retrieve general game data from entgaming.net (custom stats).

You can:

  • Iterate through each game of a mod.
  • Get number of games per day.
  • Average number of games.

Usage


var Crawler = require('entgaming-mod-stats')

// Create an instance for a mod, for example: nwu
var myMod = new Crawler('nwu')

// Get Average games:
myMod.averageGames(function(err, average){
	console.log("Average games:", average)	
})

// Get games by day
myMod.gamesByDay(function(err, byDay){
	console.log(byDay)
})

// Iterate over games
myMod.each(function(game){
	console.log(game)
}, function onFinish(){
	console.log('Finished!')
})

It may take a while to obtain the information depending on the number of games available.

You could use .each function to store data in a database or file.

Available mods codes

Script works with mods available under "customstats" section

  • Legion TD Mega: legionmega
  • Battleships: battleships
  • Castle Fight: castlefight
  • Civilization Wars: civwars
  • Hero Line Wars: herolinewars
  • Hero Wars Icelands: herowarsice
  • Island Defense: islanddefense
  • Legion TD Mega: legionmega
  • Naruto Wars Unlimited: nwu
  • Risk Devolution: riskdevo
  • Tree Tag: treetag
  • Enfo's FFB: enfo
  • Castle Fight 1v1: cfone
  • Legion TD Mega 1v1: legionmegaone
  • Legion TD Mega 2v2: legionmegatwo
  • LTD x10: ltdx10
  • LIHL (ENT LTD IHL): lihl
  • NWU IH: nwuih
  • IDIH (ENT ID IHL): idih

Game data

Data is gathered from games section of a mod. For example: Battleships

When calling .each function, each game object has the following attributes:

  • map: String, Map name
  • duration: String, Duration (raw from HTML)
  • timedate: String, Game date (raw from HTML)
  • date: Date, game date
  • datestr: String, game date formatted dd/mm/yyyy
  • gameId: String, Game id.

Example:

{ 
	map: 'Legion TD Mega 3.5 (B4).w3x',
	duration: '14m24s',
	timedate: '28/11/2015, 11:13',
	date: Sat Nov 28 2015 11:13:00 GMT-0300 (CLT),
	datestr: '28/11/2015',
	gameId: '6848988' 
}