GraylinKim / sc2reader

A python library that extracts data from various Starcraft II resources to power tools and services for the SC2 community. Who doesn't want to hack on the games they play?
http://sc2reader.readthedocs.org
MIT License
413 stars 85 forks source link

siegetank supply BUG (must be 3, not 2)! #156

Closed razerfive closed 11 years ago

razerfive commented 11 years ago

"siegetank": { "is_army": true, "minerals": 150, "vespene": 125, "supply": 2 }, "siegetanksieged": { "is_army": true, "minerals": 150, "vespene": 125, "supply": 2 },

siege tank supply = 3!!! not 2 !!!!

GraylinKim commented 11 years ago

Good catch, will patch that tonight!

razerfive commented 11 years ago

btw, I have a question. Do you have any ideas how to determine what CommandCenter produced SCV? When I see SCV in Unit Born Event - how can I know what CC exactly made it?

GraylinKim commented 11 years ago

I believe that when ever a queued command (as in queued units, not shift clicking) is issued to goes to the building with the smallest current queue. If all selected buildings have the same queue size it gets issued to the first building in the selection. Similar logic can be used on eggs. They aren't queued so the first one in the selection transforms first. For targeted abilities like Warp-ins, scans, fungals, and EMPs the closest unit able to execute the command gets used.

You may want to run your own tests and confirm this though.

razerfive commented 11 years ago

oh maybe Blizzard can add a special field to UnitBornEvent. like parent_unit_id. so I can easly know what unit produce worker from replay. cus tracking all this selections etc i think is very hard

GraylinKim commented 11 years ago

Selection tracking is hard. Never fear though, sc2reader has already done it for you. See this thread on the mailing list.