|
Hello all,
I'm interested in making a tool for the SC2 community which can help analyze the trade off of specific orders and provide a relatively accurate upper bound on the speed of a build.
Programming this in SC2 map editor means that all the unit data is easily accessible, but I don't think that using SC2s map editor is the right option. I think a tool like this can be built fairly quickly in any scripting language.
One difficulty of creating the tool is that there are tons of different units and buildings all with different attributes. Manually inputting the data is a pain. Does anyone know if this data exists in JSON or XML (or any easily readable format)?
|
Bisutopia19214 Posts
Sorry I can't answer your question, but I'm curious to see the feedback from other coders. I've been working with JSON for a couple months now.
|
Bisu what do you mean? You are working on a similar tool? What data are you encoding in JSON?
|
Well, there are tons of unit stat spreadsheets that you could save as a tab delimited text file and format from there... let me find some of these...
http://wiki.teamliquid.net/starcraft2/Protoss_Building_Statistics http://wiki.teamliquid.net/starcraft2/Terran_Unit_Statistics
Transfer these over to excel, or something like it, save in a file whatever language will read nicely, and it shouldn't be too bad from there.
I can't find a good sheet of upgrade statistics, you may have to do those by hand.
Edit: or I suppose you could get a file reader to grab what you need from:
http://wiki.teamliquid.net/starcraft2/Protoss_Upgrades
But that's a much more intensive file reader than I've ever personally built. You could probably use the consistent font formatting to grab each upgrade name, and then blindly reach for where the other stats should be... But it looks like more work than just manually entering the upgrades.
|
Bisutopia19214 Posts
On April 18 2014 03:39 mittleider wrote: Bisu what do you mean? You are working on a similar tool? What data are you encoding in JSON? I'm not allowed to discuss my coding projects. You know, national security and all. But it gets the job done for networking among multiple projects.
|
Thanks, Artisian. I don't really want to parse HTML to get the data, it's not fully reliable. I think you're right in that it may be equivalently easy to just enter the data manually.
I think you have a good idea though of copy/pasting into excel. Then you can save excel as a CSV format (which is fine by me). But this is still significantly more work than JSON or XML.
Maybe someone knows something about the SC2 map editor? (I don't). I wonder if you can do file IO from there? I might just be able to extract all the data into an output file? :X
And Bisu if you have any interesting SC2 projects that you need a hand on let me know. National security is not an issue here, I don't talk enough or care enough to tell anyone
|
Assuming the data is easily accessible in the SC2 editor, why not just make a script within that to dump out the json data you want?
|
If I were just a bit more familiar with JSON, I'd have a python script convert from excel to whatever format you like in a minute. Alas, I'm not sure what it should look like...
|
OOH! Artisian I see what you mean now. Ok actually you solved my problem!
CSV is a little bit lame, but converting from CSV to JSON is much easier than manually inputting the data. Thank you
|
Yay, I helped!
Now, on the actual program... are you thinking something like this:
http://sc2calc.org/build_order/
with the option to look at what can be improved and what you're giving up relative to another given ordering? Or were you thinking something closer to this:
http://www.teamliquid.net/forum/starcraft-2/168348-scfusion-wol-and-hots-build-order-optimizer
With a given goal, it shows you the fastest way to get there, and then you have to find what nuance changes need to be made to actually survive long enough?
edit: both the above are pretty out of date if I recall correctly, so any sort of replacement or update would be awesome still.
|
Both of these tools are similar to what I'm thinking.
Maybe SC2 calc is closer. However, it doesn't seem like SC2Calc gives you the state of the game at every time interval (or maybe it CAN, it just doesn't, I'll have to look into it). For example, say I want to go 14 pool... at what game time do I have exactly 200 minerals? And if I execute no more actions, what will the state of the game be by time 10:00? (You would still have 13 workers and xxxxx minerals). I realize that's not a useful build, but the idea is that this would allow you to look at things like "what if I cut this probe here".
SC2Fusion is close to what I was thinking. I did have the idea of computing an "optimal" strategy. And I think the author of this program has a great idea in creating "waypoints" of goals along the build order. But I'll have to look more deeply into how his tool works and the problems that it has. If his works well, it may be best to just abandon my idea and roll with his.
Either way, these two programs are great. I think building on one of them will be much faster, assuming the code is clean.
One possible issue with SC2Fusion is that even though 1M games per second is fast simulation, if the simulation is random then clearly most of the games are just trash. If you want to check the build order for a longer game it will be more difficult. For example, how do i get from state "X" (say you're at 100/120) to state "Y" of 200/200.
Making an optimal SC2 build is clearly an NP complete problem, so having a human decide the course of action is more intuitive in my opinion.
|
On April 18 2014 04:50 mittleider wrote: One possible issue with SC2Fusion is that even though 1M games per second is fast simulation, if the simulation is random then clearly most of the games are just trash. If you want to check the build order for a longer game it will be more difficult. For example, how do i get from state "X" (say you're at 100/120) to state "Y" of 200/200.
I really like the idea of giving SC2Fusion a goal, say 'I want 5 stalkers', letting it find it's optimization, and then being able to look at what shuffling the order of it's results or adding a few more/less probes to it would do. That would be insanely useful, since usually the builds you get from Fusion stop being viable after the 7 min mark or so, simply because you can't get it to include the needed defensive units.
It sounds awesome.
|
|
|
|