ensingm2 / SteamMonsterGameScript

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

AutoTargeting issue (again/still) #90

Closed cdmichaelb closed 9 years ago

cdmichaelb commented 9 years ago

Boss level (1520, if it matters) Instead of targeting the boss (Lane 2), which had multiple raining golds, it targeted one of the minions (lane 1) with no raining golds. Occasionally it still gets stuck in lanes without enemies too.

Also, I don't think slaves are working.

cdmichaelb commented 9 years ago

Opening multiple instances manually it seems like the slave trick works, so it seems to be a problem with the generated slaves.

Edit: If I open in multiple tabs, the hidden tabs wont function. Perhaps hiding the elements in the slaves is causing them not to function?

ensingm2 commented 9 years ago

What version of the script are you running? Since https://github.com/ensingm2/SteamMonsterGameScript/commit/357e126fd44cbc2bd64719856e1eecb0ee929005 (version 1.75) targetting has worked pretty well for me.

There IS a bit of guesswork though. Sometimes enemy types get set to 'false' so it's difficult to tell exactly what is what. I think it may have been an addition to hinder autoclickers.

As for the slaves, what specifically makes you think they aren't working? debug=true outputs the expected stuff.

cdmichaelb commented 9 years ago

I'm on version 1.75. Getting stuck on a lane is extremely rare*, and I've only seen it have the issue with bosses one or two times. Suggestion: Force a recheck of some sort every 2 seconds or so?

Gold gain doesn't seem to increase noticeably using the generated slaves (I generated up to 11). But when I open a second window manually (with slaves off), each update approx. doubles my gain over the period of the previous update. I opened a third and it approx. triples.

*Edit: I say rare, but I should say it's rare that I notice it. A new level clears the stickiness.

ensingm2 commented 9 years ago

It checks for target updates every 1s. It may be due to the fact that health that you see on screen isn't accurate, as the server only sends you values every once in a while, and your client tries to estimate and make things smooth. There are a lot of times that enemies will actually be dead, but your client keeps them there for a few seconds to "transition" their hp to zero smoothly from the last update.

As for the slaves, I'll look into it tomorrow. I've been planning to just reimplement it completely anyway to just send the requests from the main window without even spawning extras.

cdmichaelb commented 9 years ago

I thought that might be a possibility with the slaves. As far as the current ones, even if you aren't going to fix it, I'm wondering if they are somehow not generating unique IDs (or whatever it was that post said needed to be unique)?

Another idea. I think gold from kills only happens in lane. What if you created three slaves, each one sticks to a lane for gold collection purposes?

ensingm2 commented 9 years ago

No, they ARE totally separate windows, the only difference between them and manually opening a new tab is the runMaster() vs runSlave() functions in slaveWindows.js.

I mean, I guess if they wanted to specifically blacklist our script they could tie part of the click validation to the renderer we disable in runSlave() or check for the '?slave' we put in the URL to identify, but I kind of doubt it.

ensingm2 commented 9 years ago

Is autoTargetting still an issue? It's seemed to be working fine for me since https://github.com/ensingm2/SteamMonsterGameScript/commit/357e126fd44cbc2bd64719856e1eecb0ee929005

cdmichaelb commented 9 years ago

Haven't seen any issues since.