Coder Social home page Coder Social logo

amoeba / treestats.net Goto Github PK

View Code? Open in Web Editor NEW
8.0 4.0 2.0 77.24 MB

Player tracking for Asheron's Call

Home Page: https://treestats.net

License: MIT License

Ruby 62.15% JavaScript 10.74% R 1.13% SCSS 3.41% Haml 22.23% Procfile 0.04% Shell 0.30%
asherons-call ruby sinatra mongodb redis

treestats.net's Introduction

travis build status

TreeStats

TreeStats is an offline player tracking program for Asheron's Call (AC). AC was one of the earliest popular MMORPG titles and was released in 1999. One of the defining characteristics of AC was its Allegiance system, which allowed players to swear fealty to other players, affording the involved players concrete (e.g. experience and rank for patrons) and social benefits (e.g. items, advice for the vassal) which added greatly to the immersive nature of the game.

As vassals gained experience points for themselves, a portion of that experience was passed up to the patron. Players soon manipulated and gamed the system to form efficient experience passup chains and out of this came the original versions of TreeStats, written by Akilla.

A long time has passed since TreeStats lived and I've decided to bring it back as a side project. Much fewer players play the game these days so the purpose of this project is left to the reader.

What TreeStats Does

TreeStats records ingame data from your characters using the Decal plugin, sends it to the web app, which stores it in a web-accessible database for convenient out-of-game browsing. The web interface is designed to be reminiscent of the old TreeStats website and also to stay true to the design of Asheron's Call itself (because why not?). Three main types of data are collected by the Decal plugin:

  • Player metadata, attributes, vitals, and skills, etc.
  • Allegiance information (Monarchs, patrons, and vassals)
  • Server population counts

A novel feature of the new TreeStats, compared to the original version, is that it uses D3.js to show allegiance trees and character chains (all vassals):

Here's a particular characters' chain (as it is known to TreeStats):

Allegiance chain

And the entire allegiance tree, drawn as a force-directed graph (again, as it is known to TreeStats):

Allegiance tree viewer

One limitation of TreeStats is that it only knows about monarchs, patrons, and vassals of the characters that are directly uploaded (i.e. what is on your Allegiance pane). It won't know about the characters in between unless those players upload their characters using the plugin directly.

Structure

TreeStats comes in two parts:

Contribute

I am of course open to any feature requests or bug reports. Please use the Issues feature to send those in. The other thing I could use help with is discovering what the unknown character properties are. You'll notice that each player's page has a tab for Unknown Properties. I store a lot more data than is display in a structured way, and this is because I don't know what everything is. On the Unknown Properties tab are pairs of IDs and Values. If you do Decal development, you might know these as Character Property DWORD values. If the value of something sticks out as being a particular thing, please let me know.

Run your own TreeStats

I made this open source primarily so people can know what the plugin and web app are doing but secondarily so people can give me advice on my code or run their own TreeStats clone on their own setup.

Both the Decal plugin and the web app are incomplete source code as each of them implement encryption methods to help prevent people from sending bogus information over the wire from the plugin to the web app. The source code for these features is not committed to version control in order to keep the method secret. If you try to compile the plugin or run the web app you'll need to reimplement these features or remove them from the source code.

treestats.net's People

Contributors

amoeba avatar jkisor avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

treestats.net's Issues

Add some check & test against stack overflow in tree viewer

I think it's potentially possible to end up with an infinite loop which would lead to a crash if something like this happens:

A swears to B
A is uploaded

Generated Tree: A -> B

B swears to C
B is uploaded

Generated Tree: A -> B -> C

C breaks from B
A swears to C
C is uploaded

Generated Tree: C -> A -> B -> C -> ∞ -> ∞ -> ∞ -> ∞ -> ∞ -> ∞ -> ∞ -> ∞ -> ∞ -> ∞ -> ∞

Because B is two levels away from the uploader, the update doesn't contain any information about the vassals of B. If we did, we could remove C as a vassal of B. Until B is uploaded, the tree will be invalid and, without a check, will result in an infinite loop.

Remove Masteries from Character View

Hells Wrath showed that Masteries are superfluous now and can be removed.

Masteries are a waste of time, only Summoning mastery matters. The others were made universal with the last patch, so you could actually hide that useless information that does nothing but confuse people.

February 2014 - Weapon masteries are universal. All characters get the benefit of 5 DR when using a weapon with a mastery, regardless of the character's mastery. Weapon that previously had no mastery bonus at all still don't give 5 DR.
http://acpedia.org/wiki/Announcement...#Release_Notes

Fix staleness-related issues

Values like server pop will be stale as they are only set (updated) when the character list packet is sent. Either don't send stale information or only send information at login.

Add monarch to tree visualization when disconnected

It would be nice to see the monarch on the tree. I sense that people might generally expect the entire allegiance to be on the tree anyway.

Maybe the monarch could be added as a dashed line as the parent to the highest patron when the highest patron isn't also the monarch.

Add subheader below 'TreeStats'

Give a short description of the site. I noticed this omission in Google's results, where Google doesn't parse the website well.

Graph ideas

The whole point of this thing is to graph data, right?

How about let users view their previous updates? Show level or XP over time?
Add more here later.

Implement Accounts UI

Implement the user interface for the Accounts feature.

A good user suggestion came in that asked for a quick way to compare characters across accounts. This would essentially be /rankings as it is but it'd add a criterion for the Account onto the query.

Another way of doing this would be to implement a /account/X/table view that would show a set of attributes and those attributes would be user-editable. i.e. The table view would start with character name, server, and level. The user could then check a box for "Lum XP" and the view would refresh and add that onto the table.

Misc. tweaks to website

  • Fix the broken ranking someone reported
  • Add commas to Unassigned XP view, most deaths, etc
  • Fix leadership ranking (done)

Add more rankings

-Most followers
-Browse the char sheet/DB for others I'm not already doing

I'd like to do every possible ranking.

Add landing page on the index

Consider making it introduce the user to what the page is
Explain what the plugin does and does not do
Show some recent characters or allegiances
Show player counts maybe

Finally fix datetime handling

I decided to display everything in UTC. I think that's okay, but I might try EST or "seconds ago" type formats. I think this makes more sense, esp. given that AC's servers are EST.

Check for broken links on character update

False allegiance information can exist when a character changes their patron. That character's record will be correct but their old patron will still show them as their vassal. This will cause instability for chain generation. Reported in #44.

Make ranking queries more efficient

As of writing, the ranking queries are being post-processed in Ruby, within the request body. This is pretty fast for small numbers of users but it definitely won't scale.

Investigate using MongoDB aggregations, then just have URL->Query mappings which are called from the request depending on the params.

Develop some way to give news/updates to users

Plugin/website users need to be able to know when things update. They request things. Then what? What am I working on now? What did I just ship?

Potential methods include:

  • Communicate via plugin. When the client logs in, grabs the latest message as a welcome. Limit this in length!
  • Communicate via website. The landing page is nice but I probably should post news/updates there too.
  • Communicate via mailing list

Connect stubs in chain view

Yaroz has mentioned multiple times that the chain viewer doesn't connect stubs. Look into this and fix it.

Fix bug where a player's race/gender are set to numbers

I thought this was fixed but it's definitely not.

If player A is uploaded with allegiance (vassal at least, not sure on others) to player B, player B's race/gender will be set to numbers instead of names. This is certainly caused by the after_save callback getting too aggressive with which attributes it updates.

Update to some unknown properties

Here are the ones I know about:

139 (0x8b) = 0xe9 - Player Level
199 (0xc7) = 0x44c1f8ef - House Purchase Date (seconds since 1970)

0x11f: Celestial Hand Society Standing
0x120: Eldrytch Web Society Standing
289 (0x121) = 0x1 - Radiant Blood Society Standing
if (standing < 101) return @"Initiate";
if (standing < 301) return @"Adept";
if (standing < 601) return @"Knight";
if (standing < 1001) return @"Lord";
if (standing == 1001) return @"Master";
The value (standing) is the number of ribbons you've turned in.

307 (0x133) = 0x0 - Damage Rating
308 (0x134) = 0x0 - Damage Reduction Rating
314 (0x13a) = 0x0 - Crit Damage Rating
322 (0x142) = 0x7 - Unlocked Aetheria Slots (1 blue, 2 yellow, 4 red)
323 (0x143) = 0x0 - Healing Rating // From Growth Aetheria
350 (0x15e) = 0x0 - Damage Over Time Reduction Rating
351 (0x15f) = 0x0 - Life Reduction Rating // vigor

Add more API routes

A user guessed that the URL /player_counts/WintersEbb existed. It would be great if this worked

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.