staticvariablejames / InsugarTrading

Cookie Clicker add-on for stock market analytics.
GNU General Public License v3.0
21 stars 7 forks source link

Question: How do I use my own data? #8

Open Kingdud opened 3 years ago

Kingdud commented 3 years ago

I downloaded your data generator for this and I wanted to play with the data a bit. Specifically, I want to see if I can make the data line up over time. Or see what sorts of trends exist over time. It might also be interesting to lock the data to just certain modes (IE: only mode 1, only mode 2) so that we can see what the lines tend to do during that time. I also may lose interest in this project, so, don't kill yourself answering my question. Right now, the only thing I'm actually after is how to load my own version of lvl1.js, preferably without having to host it on my own website. I'm not a javascript guy, despite what my bot on my own repos might say. I just hacked that together.

staticvariablejames commented 3 years ago

You can clone this repository, replace data/lvl1.js with your own, open a local server (using e.g. python -m http.server 8080) on the directory where you cloned this repo, and replace InsugarTrading.datasetUrl to something like

InsugarTrading.datasetUrl = function(bankLevel) {
    return 'http://localhost:8080/data/lvl' + bankLevel + '.js';
}
quatquatt commented 2 years ago

Sorry, bit of a coding idiot here. If it's not too much trouble, could you go into more detail on how to do this? I'm unclear on how to get my own data/lvl1.js from my own save. The rest I can probably figure out from googling, but if you'd like to go into detail on the rest too that'd be appreciated.

staticvariablejames commented 2 years ago

Insugar Trading has no facilities for collecting your data into a lvl1.js. I generated all the data for the mod using a custom tool. You'd have to write your own tools for that.