• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 20:20
CEST 02:20
KST 09:20
  • 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
Team TLMC #5 - Finalists & Open Tournaments0[ASL20] Ro16 Preview Pt2: Turbulence10Classic Games #3: Rogue vs Serral at BlizzCon9[ASL20] Ro16 Preview Pt1: Ascent10Maestros of the Game: Week 1/Play-in Preview12
Community News
StarCraft II 5.0.15 PTR Patch Notes53BSL 2025 Warsaw LAN + Legends Showmatch0Weekly Cups (Sept 8-14): herO & MaxPax split cups4WardiTV TL Team Map Contest #5 Tournaments1SC4ALL $6,000 Open LAN in Philadelphia8
StarCraft 2
General
StarCraft II 5.0.15 PTR Patch Notes #1: Maru - Greatest Players of All Time Weekly Cups (Sept 8-14): herO & MaxPax split cups Team Liquid Map Contest #21 - Presented by Monster Energy SpeCial on The Tasteless Podcast
Tourneys
SC2's Safe House 2 - October 18 & 19 RSL: Revival, a new crowdfunded tournament series Maestros of The Game—$20k event w/ live finals in Paris Sparkling Tuna Cup - Weekly Open Tournament SC4ALL $6,000 Open LAN in Philadelphia
Strategy
Custom Maps
External Content
Mutation # 491 Night Drive Mutation # 490 Masters of Midnight Mutation # 489 Bannable Offense Mutation # 488 What Goes Around
Brood War
General
ASL20 General Discussion Soulkey on ASL S20 BW General Discussion ASL TICKET LIVE help! :D NaDa's Body
Tourneys
[ASL20] Ro16 Group C [ASL20] Ro16 Group D Small VOD Thread 2.0 [Megathread] Daily Proleagues
Strategy
Simple Questions, Simple Answers Muta micro map competition Fighting Spirit mining rates [G] Mineral Boosting
Other Games
General Games
Stormgate/Frost Giant Megathread Borderlands 3 Path of Exile Nintendo Switch Thread General RTS Discussion Thread
Dota 2
Official 'what is Dota anymore' discussion LiquidDota to reintegrate into TL.net
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread UK Politics Mega-thread Canadian Politics Mega-thread
Fan Clubs
The Happy Fan Club!
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread
Sports
2024 - 2026 Football Thread Formula 1 Discussion MLB/Baseball 2023
World Cup 2022
Tech Support
Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread High temperatures on bridge(s)
TL Community
BarCraft in Tokyo Japan for ASL Season5 Final The Automated Ban List
Blogs
i'm really bored guys
Peanutsc
I <=> 9
KrillinFromwales
The Personality of a Spender…
TrAiDoS
A very expensive lesson on ma…
Garnet
hello world
radishsoup
Lemme tell you a thing o…
JoinTheRain
RTS Design in Hypercoven
a11
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1990 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
Bisutopia19263 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
Bisutopia19263 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 9h 41m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
SteadfastSC 137
SpeCial 128
RuFF_SC2 59
WinterStarcraft54
CosmosSc2 54
StarCraft: Brood War
Britney 12163
Artosis 722
Shuttle 425
Aegong 87
Sexy 49
Vindicta 7
Dota 2
monkeys_forever925
NeuroSwarm210
League of Legends
JimRising 1005
Counter-Strike
Stewie2K498
PGG 1
Super Smash Bros
Mew2King55
Other Games
summit1g7361
shahzam941
C9.Mang0223
Trikslyr51
ViBE43
Organizations
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• davetesta33
• intothetv
• AfreecaTV YouTube
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• HerbMon 11
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Doublelift4945
Other Games
• Scarra1376
• imaqtpie1254
• Shiphtur231
Upcoming Events
RSL Revival
9h 41m
Zoun vs Classic
Map Test Tournament
10h 41m
Korean StarCraft League
1d 2h
BSL Open LAN 2025 - War…
1d 7h
RSL Revival
1d 9h
Reynor vs Cure
BSL Open LAN 2025 - War…
2 days
RSL Revival
2 days
Online Event
2 days
Wardi Open
3 days
Monday Night Weeklies
3 days
[ Show More ]
Sparkling Tuna Cup
4 days
LiuLi Cup
5 days
The PondCast
6 days
Liquipedia Results

Completed

Proleague 2025-09-10
Chzzk MurlocKing SC1 vs SC2 Cup #2
HCC Europe

Ongoing

BSL 20 Team Wars
KCM Race Survival 2025 Season 3
BSL 21 Points
ASL Season 20
CSL 2025 AUTUMN (S18)
LASL Season 20
RSL Revival: Season 2
Maestros of the Game
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1

Upcoming

2025 Chongqing Offline CUP
BSL World Championship of Poland 2025
IPSL Winter 2025-26
BSL Season 21
SC4ALL: Brood War
BSL 21 Team A
Stellar Fest
SC4ALL: StarCraft II
EC S1
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
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.