mouseas / steamSummerMinigame

Steam Summer Sale 2015 - Auto-play Optimizer
MIT License
136 stars 189 forks source link

Boss Level Notes #3

Closed Robadob closed 9 years ago

Robadob commented 9 years ago

Boss Levels tend to die fast, so would be useful to collect some data anyone can crawl from them, also worth commenting with any other useful boss level values found.

//If level is boss
if((g_Minigame.CurrentScene().m_nCurrentLevel + 1) % 10 == 0)
//alt replace with g_Minigame.CurrentScene().m_rgGameData.level

I've managed to catch a boss's game object, and it appears their names are specific rather than simply boss, e.g. this one is "Gold Helm, The Spice Lord", it's m_strSkinName is "space_boss", so it may be possible to use;

  var m_skin = <monsterobj>.m_strSkinName
  //Skin name ends with _boss
  if(m_skin.indexOf('_boss', m_skin.length - 5) !== -1)

Presumably, an alternate method would be to check whether slots 1-3 are empty.

mustachefeeling commented 9 years ago

Boss level is causing some issues; after the boss is dead and the lane is empty, the script keeps trying to switch into the empty boss lane.

Robadob commented 9 years ago

Yeah that's a known issue, it's commented about in the code, my own boss levels keep passing too fast for me to debug it thoroughly though

mustachefeeling commented 9 years ago

I saw the "TODO" comment, but nothing specific, didn't mean to be redundant. Cheers.

Robadob commented 9 years ago

Nah, don't worry. It might be better addressed with it's own issue such that it stands out.

wchill commented 9 years ago

I'm going to try and look into this as well, the script as is made me miss a 27k/click Raining Gold.

I'll try to grab the network traffic from level 320 for you.

mustachefeeling commented 9 years ago

This is an impressive undertaking, and I'm happy to scrape that as well if it would be helpful. Suggestions for programs to do that?

wchill commented 9 years ago

I'm using Fiddler2 to do the inspection. Unfortunately it looks like the data is encoded, so you'll have to inspect the game source for any decoding algorithm that's being used.

Robadob commented 9 years ago

I'm currently writing a new OP, so we can get everyone on Reddit playing in the same game after reset.

re: scraping the network traffic, wireshark or charlesproxy will probably work, however if we end up writing a standalone app that plays the game, it might be harder to inspire trust in users who wish to use it, it would be better to scrape the game states at known points of the game so we can keep working in JS.

wchill commented 9 years ago

Here's a link to the capture data

https://www.dropbox.com/s/hpeyexw0cv9t52g/1161_Full.txt?dl=0

Again, it's encoded; I haven't found the decoding method but it should be somewhere in the game source.

This does not include any POST requests because (a) I forgot to capture them and (b) they shouldn't have any major influence on the game state.

sbx320 commented 9 years ago

The data looks like it is in protobuf format.

http://steamcommunity-a.akamaihd.net/public/javascript/minigame/towerattack/network.js

A simple way to dump information would be modifying the network layer of the game to log data before passing it to the original networking stuff.

mouseas commented 9 years ago

I got boss levels working correctly now. It was as simple as checking each enemy's type; 2 is boss, 3 is miniboss (0 is spawner, 1 is creep)