spawningtool
spawningtool copied to clipboard
Update supplies continuously
Currently, I'm using the playerstats to extract supply counts and then interpolating supplies between those data points. This method only has a resolution of 10 seconds, so I should check that continuously.
One easy to miss wrinkle in this problem is the different meanings of a supply count.
In-game, the supply count includes units that are currently being constructed (but only the current one being constructed, not any queued ones behind that). The supply count available at 10 second increments is a snapshot of the in-game supply count, so it has the same semantics.
In order to create a continuous reconstruction of that value, therefore, it would be necessary to know not only which units are alive at a given time, but also which units are being constructed. Which sounds tractable at first; you could just intercept the build-unit commands. What you find is that there are spurious build-unit commands in the replay file; if a player spams the build-unit command, in some replays there will appear build-unit commands that fail due to lack of resources.
Come to think of it, it probably wouldn't be too tough (relative to other requests) for Bliz to add some kind of construction-started event to the tracker stream to solve this problem.
Because of this issue, I prefer to think about build orders as time-based rather than supply-based, and even simply order-based.
In approaching this problem, I wouldn't intercept build commands. Instead I would work backwards from unit birth events using the unit build time. Chrono boost screws things up a little bit but can certainly be adjusted for.
I do agree with David though, that timings seem more important than supplies. Perhaps a few professionals can chime in on that.
Thanks to both you for chiming in; I hadn't thought about the distinction at all and probably wouldn't have noticed it until after implementing it. There are, in general, a lot of things that are messy about extracting build orders that I really hadn't anticipated until they came up, so I guess this just goes on the list. I think I would probably do what Graylin suggested just because that's how I currently determine when a unit was created, but maybe not.
My experience with timings versus supplies is that supply counts are more important earlier when you're really trying to sequence things, whereas time is more important later. Either way, we think about openings based on supply (e.g. 14 Pool, 15 Hatch). I think the truth is that these things are really based on other triggers (e.g. Factory @ 100 gas), but extracting intentions may be beyond me.