Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DeepStats core functionality without external backend #44

Open
wants to merge 8 commits into
base: mainline
Choose a base branch
from

Conversation

jmichelsen
Copy link
Contributor

This has the scaffolding and some example code to make POST requests from kolbot when items drop, as well as when SOJs are sold or Diablo walks.

For DeepStat file writes, a sample of the output is included.

In the stats, every item is given a unique ID. It follows the same format as the unique ID given by mulelogger, except it has a timestamp prepended to it:

item_id: Date.now().toString(36) + "$" + unit.gid + ":" + unit.classid + ":" + unit.location + ":" + unit.x + ":" + unit.y + (unit.getFlag(0x400000) ? ":eth" : ""),

@jmichelsen
Copy link
Contributor Author

You guys are of course under no obligation to merge this, but I wanted it available in case it's useful to anyone.

@noah-
Copy link
Contributor

noah- commented Mar 10, 2020

I think this is good, agree it shouldn't point to any default server
also think that there should be a reference to an open source implementation of the server so that others can run it (for example with limedrop the server runs in the d2bot instance)

@@ -383,6 +383,7 @@ var DataFile = {
experience: 0,
deaths: 0,
lastArea: "",
lastAreaID: 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding lastAreaID will then also appear in current logging which should be fine but I think you wanted to avoid that.
You could also maybe use sdk.js instead to parse the ID from string.

DeepStats.create();
}

string = Misc.fileAction("data/deepstats/" + me.profile + ".dump.json", 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit worried about the potential file size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants