• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 00:22
CEST 06:22
KST 13:22
  • 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
RSL Season 1 - Final Week4[ASL19] Finals Recap: Standing Tall10HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0
Community News
Firefly given lifetime ban by ESIC following match-fixing investigation17$25,000 Streamerzone StarCraft Pro Series announced6Weekly Cups (June 30 - July 6): Classic Doubles6[BSL20] Non-Korean Championship 4x BSL + 4x China10Flash Announces Hiatus From ASL70
StarCraft 2
General
RSL Revival patreon money discussion thread The GOAT ranking of GOAT rankings We need to be discussing a new patch right now! Firefly given lifetime ban by ESIC following match-fixing investigation RSL Season 1 - Final Week
Tourneys
RSL: Revival, a new crowdfunded tournament series FEL Cracov 2025 (July 27) - $8000 live event Sparkling Tuna Cup - Weekly Open Tournament $25,000 Streamerzone StarCraft Pro Series announced WardiTV Mondays
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 481 Fear and Lava Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma
Brood War
General
BW General Discussion A cwal.gg Extension - Easily keep track of anyone ASL20 Preliminary Maps BGH Auto Balance -> http://bghmmr.eu/ Script to open stream directly using middle click
Tourneys
Small VOD Thread 2.0 [Megathread] Daily Proleagues Last Minute Live-Report Thread Resource! [BSL20] Non-Korean Championship 4x BSL + 4x China
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Path of Exile CCLP - Command & Conquer League Project Stormgate/Frost Giant Megathread The PlayStation 5 Nintendo Switch 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
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Things Aren’t Peaceful in Palestine Russo-Ukrainian War Thread The Accidental Video Game Porn Archive Stop Killing Games - European Citizens Initiative
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Movie Discussion! [Manga] One Piece Anime Discussion Thread [\m/] Heavy Metal Thread
Sports
2024 - 2025 Football Thread Formula 1 Discussion NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
Men Take Risks, Women Win Ga…
TrAiDoS
momentary artworks from des…
tankgirl
from making sc maps to makin…
Husyelt
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 521 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
Bisutopia19230 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
Bisutopia19230 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
The PiG Daily
22:50
Best Games of SC
Clem vs ByuN
SHIN vs GuMiho
PiGStarcraft529
LiquipediaDiscussion
SC Evo Complete
22:00
Enki Epic Ser. Taeja vs soO EN
Liquipedia
OSC
20:00
Mid Season Playoffs
Spirit vs GeraldLIVE!
Solar vs ShoWTimE
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
PiGStarcraft529
Nina 183
RuFF_SC2 170
StarCraft: Brood War
Sea 2519
Leta 787
Larva 527
HiyA 183
Aegong 54
GoRush 51
NaDa 51
JulyZerg 20
PianO 14
LuMiX 3
Dota 2
monkeys_forever715
NeuroSwarm113
League of Legends
JimRising 939
Counter-Strike
Stewie2K634
Heroes of the Storm
Khaldor128
Other Games
summit1g8942
shahzam777
ViBE202
C9.Mang0200
Trikslyr55
kaitlyn21
Organizations
Other Games
gamesdonequick40510
BasetradeTV39
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 13 non-featured ]
StarCraft 2
• Berry_CruncH325
• Hupsaiya 67
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Scarra1209
Upcoming Events
RSL Revival
5h 38m
SHIN vs Clem
Cure vs TBD
FEL
7h 38m
FEL
11h 38m
Gerald vs PAPI
Spirit vs ArT
CSO Cup
11h 38m
BSL20 Non-Korean Champi…
13h 38m
Bonyth vs QiaoGege
Dewalt vs Fengzi
Hawk vs Zhanhun
Sziky vs Mihu
Mihu vs QiaoGege
Zhanhun vs Sziky
Fengzi vs Hawk
DaveTesta Events
13h 38m
Sparkling Tuna Cup
1d 5h
RSL Revival
1d 5h
Classic vs TBD
FEL
1d 10h
BSL20 Non-Korean Champi…
1d 13h
Bonyth vs Dewalt
QiaoGege vs Dewalt
Hawk vs Bonyth
Sziky vs Fengzi
Mihu vs Zhanhun
QiaoGege vs Zhanhun
Fengzi vs Mihu
[ Show More ]
Wardi Open
2 days
Replay Cast
3 days
WardiTV European League
3 days
PiGosaur Monday
3 days
uThermal 2v2 Circuit
4 days
Replay Cast
4 days
The PondCast
5 days
Replay Cast
5 days
Epic.LAN
6 days
Liquipedia Results

Completed

KCM Race Survival 2025 Season 2
HSC XXVII
NC Random Cup

Ongoing

JPL Season 2
BSL 2v2 Season 3
Acropolis #3
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Jiahua Invitational
2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters

Upcoming

CSL Xiamen Invitational
CSL Xiamen Invitational: ShowMatche
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
Underdog Cup #2
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
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.