• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 01:28
CET 07:28
KST 15:28
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
TL.net Map Contest #21: Winners4Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
Starcraft, SC2, HoTS, WC3, returning to Blizzcon!25$5,000+ WardiTV 2025 Championship5[BSL21] RO32 Group Stage4Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win9
StarCraft 2
General
Starcraft, SC2, HoTS, WC3, returning to Blizzcon! TL.net Map Contest #21: Winners RotterdaM "Serral is the GOAT, and it's not close" Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win 5.0.15 Patch Balance Hotfix (2025-10-8)
Tourneys
Constellation Cup - Main Event - Stellar Fest $5,000+ WardiTV 2025 Championship Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond) $3,500 WardiTV Korean Royale S4
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection Mutation # 495 Rest In Peace
Brood War
General
[BSL21] RO32 Group Stage BGH Auto Balance -> http://bghmmr.eu/ SnOw's ASL S20 Finals Review Practice Partners (Official) [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[Megathread] Daily Proleagues [BSL21] RO32 Group B - Sunday 21:00 CET [BSL21] RO32 Group A - Saturday 21:00 CET BSL21 Open Qualifiers Week & CONFIRM PARTICIPATION
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Stormgate/Frost Giant Megathread Dawn of War IV Nintendo Switch Thread ZeroSpace Megathread General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread YouTube Thread Dating: How's your luck?
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
Anime Discussion Thread Movie Discussion! [Manga] One Piece Korean Music Discussion Series you have seen recently...
Sports
2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023 Formula 1 Discussion
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Why we need SC3
Hildegard
Career Paths and Skills for …
TrAiDoS
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1529 users

SC2 unit data in JSON

Forum Index > SC2 General
Post a Reply
mittleider
Profile Joined December 2013
6 Posts
April 17 2014 18:32 GMT
#1
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)?
BisuDagger
Profile Blog Joined October 2009
Bisutopia19297 Posts
April 17 2014 18:37 GMT
#2
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.
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
mittleider
Profile Joined December 2013
6 Posts
April 17 2014 18:39 GMT
#3
Bisu what do you mean? You are working on a similar tool? What data are you encoding in JSON?
Artisian
Profile Joined October 2010
United States115 Posts
Last Edited: 2014-04-17 19:22:36
April 17 2014 19:11 GMT
#4
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.
Supply is a conspiracy against me...
BisuDagger
Profile Blog Joined October 2009
Bisutopia19297 Posts
April 17 2014 19:15 GMT
#5
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.
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
mittleider
Profile Joined December 2013
6 Posts
Last Edited: 2014-04-17 19:24:33
April 17 2014 19:22 GMT
#6
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
UberNuB
Profile Joined December 2010
United States365 Posts
April 17 2014 19:23 GMT
#7
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?
the absence of evidence, is not the evidence of absence.
Artisian
Profile Joined October 2010
United States115 Posts
April 17 2014 19:23 GMT
#8
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...
Supply is a conspiracy against me...
mittleider
Profile Joined December 2013
6 Posts
Last Edited: 2014-04-17 19:28:14
April 17 2014 19:27 GMT
#9
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
Artisian
Profile Joined October 2010
United States115 Posts
Last Edited: 2014-04-17 19:34:35
April 17 2014 19:33 GMT
#10
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.
Supply is a conspiracy against me...
mittleider
Profile Joined December 2013
6 Posts
Last Edited: 2014-04-17 19:55:59
April 17 2014 19:50 GMT
#11
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.
Artisian
Profile Joined October 2010
United States115 Posts
April 17 2014 20:07 GMT
#12
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.
Supply is a conspiracy against me...
Please log in or register to reply.
Live Events Refresh
Next event in 5h 32m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
Nina 163
ProTech121
StarCraft: Brood War
Calm 11099
Zeus 720
TY 264
PianO 224
Leta 215
EffOrt 203
Tasteless 136
soO 23
Bale 17
Icarus 8
League of Legends
JimRising 622
Counter-Strike
fl0m478
taco 59
Other Games
summit1g13283
tarik_tv10901
WinterStarcraft429
C9.Mang0262
goatrope130
NeuroSwarm89
ViBE79
NotJumperer6
Organizations
Other Games
gamesdonequick846
Counter-Strike
PGL158
StarCraft: Brood War
UltimateBattle 36
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Scarra1217
• Jankos880
• Stunt497
Upcoming Events
OSC
5h 32m
LAN Event
8h 32m
Korean StarCraft League
20h 32m
CranKy Ducklings
1d 3h
LAN Event
1d 8h
IPSL
1d 11h
dxtr13 vs OldBoy
Napoleon vs Doodle
BSL 21
1d 13h
Gosudark vs Kyrie
Gypsy vs Sterling
UltrA vs Radley
Dandy vs Ptak
Replay Cast
1d 16h
Sparkling Tuna Cup
2 days
WardiTV Korean Royale
2 days
[ Show More ]
LAN Event
2 days
IPSL
2 days
JDConan vs WIZARD
WolFix vs Cross
BSL 21
2 days
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
Replay Cast
3 days
Wardi Open
3 days
WardiTV Korean Royale
4 days
Replay Cast
5 days
Kung Fu Cup
5 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
5 days
The PondCast
6 days
RSL Revival
6 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

BSL 21 Points
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
Stellar Fest: Constellation Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

BSL Season 21
SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.