ensingm2 / SteamMonsterGameScript

A Javascript automator for the 2015 Summer Steam Monster Minigame
78 stars 29 forks source link

Raining Gold doesn't seem to be activating #164

Closed CaptDreamer closed 9 years ago

CaptDreamer commented 9 years ago

Every 100 or 1000th level it seems that other scripts are pausing to let everyone spam raining gold while this script doesn't.

vanZeben commented 9 years ago

Other scripts have been changing their methodologies and algorithms like no tomorrow for item use... I dont mind merging with them as they go, but personally I think there needs to be some repo for this sort of thing....

ensingm2 commented 9 years ago
    speedThreshold: 2000, // use gold rain every boss round after here
    rainingRounds: 500, // use gold rain every x rounds
    disableGoldRainLevels: 200 // min level to use gold rain on
else if (!nukeBosses && isBoss) {
                //Raining Gold
                if (hasAbility(ABILITIES.RAINING_GOLD) && autoUseConsumables && targetPercentHPRemaining > useRainingGoldAbovePercent && timeToTargetDeath > 30 && lvl > CONTROL.disableGoldRainLevels && (lvl <= CONTROL.speedThreshold || lvl % CONTROL.rainingRounds === 0)) {
                    if (debug)
                        console.log('Using Raining Gold on boss.');

                    castAbility(ABILITIES.RAINING_GOLD);
                }
            }

So, using on the following conditions:

Can you confirm this is not the case?

Note: until recently the speedThreshold and rainingRounds variables were different, and disableGoldRainLevels was not enabled. This is because the other scripts keep tweaking their variables and I don't really want to just sit there checking if they make small changes every 5 minutes.

cdmichaelb commented 9 years ago

I have 100+ raining golds, I only bought 20 to start with. Maybe if item count starts getting really high, really relax the requirements to raining gold?

Do the same thing for all items(Except throw money)? I'm at 170 god modes, 133 resurrect and 145 health steal lol.

ensingm2 commented 9 years ago

Yeah I'll probably add a threshold for item count and if you increase above that number it just spams them indiscriminately.

I'll add it in a few hours, not at my desktop.

vadsamoht commented 9 years ago

I was about to pos tthe same thing - one of my instances has over 400 of several useful things and I doubt they'll get used.

EDIT: Ninja'd. Thanks.

ensingm2 commented 9 years ago

Err, actually, looking back I think it should be working as is. You may have a ton right now, but once you cross the threshold of what you can use in the time remaining in the round, it'll spam them.

I don't really see a point to spamming until then, since those items are generally more efficient on later levels.

Do you disagree, or should I close this out?

vadsamoht commented 9 years ago

I do disagree, simply because of the sheer number of items I'm getting, and the presumption that some items (raining gold especially) are going to be more useful earlier in the game as well.

I'd personally do something like auto spam all items with over, say, 50-100 in the inventory, and then clear it out near the end, though i have no mathematical basis for the number - I just currently have nearly 600 raining golds and that is clearly more than will be used in the final hour. Keep in mind that with higher boss loot percentages, it's very likely that you'll even be picking up the same item during it's cooldown as well.

EDIT: Maybe that would be a good metric: If you have more of an item than can be used in the final period assuming standard cooldown, then spam it if your level or game time is over some threshhold.

ensingm2 commented 9 years ago

EDIT: Maybe that would be a good metric: If you have more of an item than can be used in the final period assuming standard cooldown, then spam it.

That's what I'm saying. That's already implemented. See https://github.com/ensingm2/SteamMonsterGameScript/commit/99684a552b9fa64fb45ceec1920f0bfbd2ded9f6

I just currently have nearly 600 raining golds and that is clearly more than will be used in the final hour.

Right, we check time remaining vs itemCount * cooldown.

As for your point about raining gold (and treasure) not being helpful during this super lategame period, I'm kind of torn. I see where you're coming from, and having that gold earlier on would be helpful. _however_, those items scale with level, so using them later on will net you significantly more gold leading to bigger (though later) upgrades.

vadsamoht commented 9 years ago

I agree that it's a compromise. I think we can agree that the raining gold used in the last ten seconds of the game is useless - perhaps autospam such that you're aiming to clear them by a certain point before the game is over (say, 45-60 minutes or so? Even 30 seems to be cutting it fine, but anything lower would probably be too much IMO)?

ensingm2 commented 9 years ago

Yeah, the 'safe buffer' that you aim to have all consumables gone by is 10 minutes (Just in case servers go down or whatever). I'll probably code a special case for raining gold/treasure that multiplies that buffer period by 3-6 in order to make them spam earlier.

zinefer commented 9 years ago

19 minutes left in my game and I have 540 raining gold and 366 treasures. I am interested to see how this code performs in practice.

ensingm2 commented 9 years ago

@zinefer That doesn't seem right. What version are you running?

zinefer commented 9 years ago

V2.09

ensingm2 commented 9 years ago

Hmmm... And you have Automatic Ability use Enabled?

https://github.com/ensingm2/SteamMonsterGameScript/blob/master/automator.user.js#L371-381 looks fine to me.

zinefer commented 9 years ago

Yes ... All settings are default ... I have reloaded a few times now.

ensingm2 commented 9 years ago

OK. Let's keep this issue on the original topic though (not auto-using raining gold). For the end-round item spam issue, I've opened https://github.com/ensingm2/SteamMonsterGameScript/issues/180

ensingm2 commented 9 years ago

Closing this out as I think everything's addressed.

The script already does stop nuking at multiples of 100 and opts to rain gold instead.

Raining Gold / Treasure counts are aimed to be depleted by 1 hr before round end. This allows you to benefit from the extra gold gained from the higher levels, while still being able to _use_ that gold.

Correct me if I'm closing this in error.