• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 02:23
CEST 08:23
KST 15:23
  • 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
herO wins GSL Code S Season 1 (2025)10Code S RO4 & Finals Preview: herO, GuMiho, Classic, Cure6Code S RO8 Preview: Classic, Reynor, Maru, GuMiho3Code S RO8 Preview: ByuN, Rogue, herO, Cure5[ASL19] Ro4 Preview: Storied Rivals7
Community News
Weekly Cups (May 12-18): Clem sweeps WardiTV May3Code S Season 2 (2025) - Qualifier Results132025 GSL Season 2 (Qualifiers)14Code S Season 1 - Classic & GuMiho advance to RO4 (2025)4[BSL 2v2] ProLeague Season 3 - Friday 21:00 CET7
StarCraft 2
General
¿Cómo marcar al British Airways Chile telefono? ¿Cómo llamo al Avianca Costa Rica telefono? ¿Cómo llamar al Volaris Costa Rica telefono? Replay cast herO wins GSL Code S Season 1 (2025)
Tourneys
DreamHack Dallas 2025 announced (May 23-25) RSL: Revival, a new crowdfunded tournament series [GSL 2025] Code S Season 1 - RO4 and Grand Finals PIG STY FESTIVAL 6.0! (28 Apr - 4 May) Monday Nights Weeklies
Strategy
Simple Questions Simple Answers [G] PvT Cheese: 13 Gate Proxy Robo
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 474 Futile Resistance Mutation # 473 Cold is the Void Mutation # 472 Dead Heat Mutation # 471 Delivery Guaranteed
Brood War
General
Where is effort ? BGH auto balance -> http://bghmmr.eu/ StarCastTV Ultimate Battle Pros React To: Emotional Finalist in Best vs Light ASL 19 Tickets for foreigners
Tourneys
[Megathread] Daily Proleagues The Casual Games of the Week Thread [ASL19] Semifinal A [USBL Spring 2025] Groups cast
Strategy
[G] How to get started on ladder as a new Z player Creating a full chart of Zerg builds [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Beyond All Reason What do you want from future RTS games? Grand Theft Auto VI Nintendo Switch Thread
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
LiquidLegends to reintegrate into TL.net
Heroes of the Storm
Simple Questions, Simple Answers
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia TL Mafia Community Thread TL Mafia Plays: Diplomacy TL Mafia: Generative Agents Showdown Survivor II: The Amazon
Community
General
UK Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread European Politico-economics QA Mega-thread US Politics Mega-thread
Fan Clubs
Serral Fan Club
Media & Entertainment
[Manga] One Piece Movie Discussion! Anime Discussion Thread [Books] Wool by Hugh Howey
Sports
2024 - 2025 Football Thread Formula 1 Discussion NHL Playoffs 2024 NBA General Discussion
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread Cleaning My Mechanical Keyboard How to clean a TTe Thermaltake keyboard?
TL Community
The Automated Ban List TL.net Ten Commandments
Blogs
Narcissists In Gaming: Why T…
TrAiDoS
Poker
Nebuchad
Info SLEgma_12
SLEgma_12
SECOND COMMING
XenOsky
WombaT’s Old BW Terran Theme …
WombaT
Heero Yuy & the Tax…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 29608 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
Bisutopia19214 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
Bisutopia19214 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 17h 37m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
mcanning 30
StarCraft: Brood War
BeSt 899
Sharp 707
PianO 428
actioN 360
Leta 285
TY 204
Aegong 112
scan(afreeca) 54
soO 23
KwarK 18
[ Show more ]
ajuk12(nOOB) 12
Noble 10
Bale 4
League of Legends
JimRising 694
Counter-Strike
Stewie2K1428
Heroes of the Storm
Trikslyr49
Other Games
summit1g9786
WinterStarcraft494
PiGStarcraft316
SortOf58
NeuroSwarm50
Organizations
Other Games
gamesdonequick751
StarCraft 2
ESL.tv139
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 17 non-featured ]
StarCraft 2
• Berry_CruncH284
• Light_VIP 54
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• Kozan
• IndyKCrew
• LaughNgamezSOOP
StarCraft: Brood War
• ZZZeroYoutube
• STPLYoutube
• BSLYoutube
Dota 2
• lizZardDota2114
League of Legends
• Rush1170
• Stunt528
• HappyZerGling103
Other Games
• Scarra1059
Upcoming Events
PiGosaur Monday
17h 37m
The PondCast
1d 3h
Replay Cast
1d 17h
Replay Cast
2 days
Replay Cast
2 days
Replay Cast
3 days
Road to EWC
3 days
Replay Cast
4 days
SC Evo League
4 days
Road to EWC
4 days
[ Show More ]
Afreeca Starleague
4 days
BeSt vs Soulkey
Road to EWC
5 days
Wardi Open
6 days
Liquipedia Results

Completed

Proleague 2025-05-16
2025 GSL S1
Calamity Stars S2

Ongoing

JPL Season 2
ASL Season 19
YSL S1
BSL 2v2 Season 3
BSL Season 20
China & Korea Top Challenge
KCM Race Survival 2025 Season 2
NPSL S3
Heroes 10 EU
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
ECL Season 49: Europe
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025
BLAST Open Spring 2025
ESL Pro League S21

Upcoming

Rose Open S1
CSLPRO Last Chance 2025
CSLAN 2025
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
Bellum Gens Elite Stara Zagora 2025
2025 GSL S2
DreamHack Dallas 2025
IEM Cologne 2025
FISSURE Playground #1
BLAST.tv Austin Major 2025
ESL Impact League Season 7
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.