Slimmmo / Slimmmo.github.io

AdVenture Capitalist calculator
http://slimmmo.github.io/
35 stars 42 forks source link

Updates Thanks-Gizmo unlocks #163

Closed Nutty69 closed 6 years ago

Nutty69 commented 6 years ago

Thanks-Gizmo was missing a lot of the current unlocks; this adds the current (April, 2018) unlocks

Kevin-Mok commented 6 years ago

I was trying to figure out the structure of this to implement. Awesome that you're already done though.

Just out of curiosity anyway, what does the the first element in the nested list mean?

e.g. [100, [0, 25]]: I understand that the first element is the level required, and the second element in the nested list is the multiplier. But, I couldn't figure out what the first meant?

Nutty69 commented 6 years ago

I'm probably not going to do a very good job explaining it but I'll try.

Each unlock has one of two possible effects on an investment: profit multiplier or speed multiplier.

The profit multiplier index for an investment is 2(investment index) The speed multiplier index for an investment is (2(investment index))+1

The investment indices are 0-based so the first investment's index is 0, the second is 1, etc. The "everything" investment index is 1 more than the index of the last investment.

The Thanks-Gizmo investment indices are: 0 = Pumpkin Spice Infuser 1 = Touch Screen Football 2 = Gravy-Go Helmet 3 = Snug-xedo 4 = Small Talk Decoy 5 = Leftover Delivery Drones 6 = Fi-doo 3000 7 = Leaf Thrower 8 = Turkey Multi-Tool 9 = Everything

Examples:

Does that help at all?

Kevin-Mok commented 6 years ago

Couldn't that element just be calculated directly in the program rather than being manually input then?

Nutty69 commented 6 years ago

The unlock data have to be input manually as there's no way (that I'm aware of) to query HyperHippo's servers to figure out what the current unlocks are.

I'll be the first to admit that I've not delved deep into the code to figure out the whys and wherefores of how the program actually uses the data to work its magic. I've just pieced together enough information to figure out how to enter the data that's needed to keep it up-to-date as event replays come along.

Kevin-Mok commented 6 years ago

Yeah, it's awesome that you were able to piece it together enough to be able to update it like this for the event. But what I meant was that if you're going to manually enter say:

$scope.gizmo.unlocks[9] = [[1, [19, 2]]];

Couldn't the 19 just be calculated by the index of the unlock [9] and the 1 you entered manually? There seems to be no need to enter it as it appears to be the same number for the entire rest of the other nested lists too.

Nutty69 commented 6 years ago

Ah, now I think I understand the question. But realize that:

  1. Purchasing one investment can affect a different investment and
  2. Unlocks can affect either speed or profit

Let's take a look at some of the entries for Newspapers on Earth:

// Earth unlock indices:
// 0 = Lemon, 1 = Newspaper, 2 = Carwash, 3 = Pizza, 4 = Donut, etc.
// 
//      Affect indices:
//  Investment | Profit | Speed
// ------------|--------|-------
//  Lemon      |    0   |   1
//  Newspaper  |    2   |   3
//  Carwash    |    4   |   5
//  Pizza      |    6   |   7
//  Donut      |    8   |   9
//  etc.
//
$scope.earth.unlocks[1] = [ // Applies to levels of Newspapers
    [25,  [3, 2]],  // 25 Newspaper = Speed of Newspaper x2
    ...
    [125, [0, 2]],  // 125 Newspaper = Profits of Lemon x2
    [150, [4, 2]],  // 150 Newspaper = Profits of Carwash x2
    [175, [6, 2]],  // 175 Newspaper = Profits of Pizza x2
    [200, [3, 2]],  // 200 Newspaper = Speed of Newspaper x2
    [225, [8, 2]],  // 225 Newspaper = Profits of Donut x2
    ... 

Does that help? -- I told you I wasn't great at explaining things :-)

Kevin-Mok commented 6 years ago

Ohh okay, that makes sense now. Thanks for the clarification.