[Tutorial] How to get the game data.

General topics, questions, suggestions, bugs, or anything Star Wars Commander related.
User avatar
Kender
Captain
Posts: 99

[Tutorial] How to get the game data.

Post#1 » Sat Oct 01, 2016 2:13 am

I see a lot of questions about game data and modifiers and get asked about how to get them a lot, so I decided to write a quick tutorial so anyone that wants to can access all the data.

The game's behaviour is defined in two ways:
1. through the code. This is only changed with a client update from the store. This updates the client version.
2. through the game data. This can change at any time. This updates the manifest version.

The game data controls almost anything in the game so while the code determines what functionality is available, the game data determines how that functionality works.


This is the current manifest:
https://starts0.content.disney.io/cloud-cms/manifest/starts/prod/310.json
where 310 is the version number that gets incremented with each update.

This manifest is like a map to all the files that the game needs.
It looks something like this:

Code: Select all

{
"secure_cdn_roots": [
"https://starts0.content.disney.io/cloud-cms/"
],
"environment": "prod",
"productId": "starts",
"group_uri_format": "{root}{codename}/{environment}/{relativePath}/{hash}",
"created": "2016-08-04T14:37:01Z",
"hashes": {
"assetbundles/android/aat1_rbl-ani.assetbundle": "508e5547d80ccaf05637575d54dc2643",
"assetbundles/android/aat1_smg-ani.assetbundle": "7f31d636d0bc92921d1cba28dfe9ba5b",
...


To get any file you want you need to construct the url.
For example the most interesting one: base.json
The manifest will have a line like this:
"patches/base.json": "e34e139732476faae2adb16f5999bff3",

For this you can construct an url to the actual file like this:

Take https://starts0.content.disney.io/cloud-cms/starts/prod/
append the path:
https://starts0.content.disney.io/cloud-cms/starts/prod/patches/base.json
append a slash and the hash:
https://starts0.content.disney.io/cloud-cms/starts/prod/patches/base.json/e34e139732476faae2adb16f5999bff3
append a dot and the filename:
https://starts0.content.disney.io/cloud-cms/starts/prod/patches/base.json/e34e139732476faae2adb16f5999bff3.base.json
and now you can download it.

This file has all the data on troops, buildings and other combat related functionality.
This and the other json files are basically spreadsheets formatted like json.
To make sense of them you will probably want to write some script to convert the data.

The assetbundle files contain the data for the Unity game engine. This includes textures, models, shaders, music, etc.
You can use Unity Studio to open these and extract whatever you want.
Exporting to FBX is one way of rendering the models. You can use any tool that can view FBX files, like fbx-review


Note: you are allowed to read any data you want. You are not allowed to publish some of it without express permission from Disney. Proceed at your own risk.
Last edited by Kender on Sat Oct 22, 2016 12:13 am, edited 3 times in total.
SONS_OF_DEATH http://squadsofdeath.com
Global Squad War Ranking http://squadsofdeath.com/squadranking


User avatar
DeathStriker
Moderator
Posts: 7105

Re: [Tutorial] How to get the game data.

Post#2 » Sat Oct 01, 2016 8:43 am

Kender wrote:I see a lot of questions about game data and modifiers and get asked about how to get them a lot, so I decided to write a quick tutorial so anyone that wants to can access all the data.

{snip}

Note: you are allowed to read any data you want. You are not allowed to publish some of it without express permission from Disney. Proceed at your own risk.

Kender - Very interesting read, especially for those with technical minds. ;)

While some many look at your post as a way to "hack" the game, and in a small way maybe that is true because you need access to game data, the truth is that you are only providing a way to view game data and what individuals do with it after they get it is up the them.

As a Moderator I approve of this Thread in its current form and will continue to monitor.

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

JSON File Explorer

Once you have the JSON Data you can use the JSON File Editor / Explorer here to "explore" the downloaded file:

  • Simply replace example text on left with a copy of downloaded JSON file text.
  • Click on RIGHT ARROW in middle then use EDITOR on right to "explore".

⇨ NOTE: While there are JSON to CSV Converters that can be found online, most can't handle nested Array / Object files and the output you get - if any - is useless.

Continuing the conversation...
Last edited by DeathStriker on Thu Oct 06, 2016 4:25 pm, edited 1 time in total.
 
Image
Death_Striker is looking for ALL Rebel Commanders
Sons_of_Death is looking for Level 5+ Rebel Commanders
If YOU Want to War - Apply Now!


User avatar
RebelYell
Admiral
Posts: 575

Re: [Tutorial] How To Get The Game Data.

Post#3 » Sat Oct 01, 2016 9:16 am

For 3D models I propose that you use the "webviewer" assetbundles. The android and ios versions use pvr textures (afaik) which would have to be converted using an additional tool.
ImageWe're recruiting! (Rebels/Android/iOS). Just PM me here/LINE:lleyleber or request in game with a meaningful text. If you want to take part in wars, lv7+ is useful.


User avatar
Sigma582
Admiral
Posts: 595

Re: [Tutorial] How To Get The Game Data.

Post#4 » Fri Oct 14, 2016 4:28 pm

wow. very cool.
I've found some info I was always curious about, thanks.
btw the latest available manifest is 312 (created: 2016-10-12 16:34:45)

One question: are both versions (iOS/Windows) use the same endpoint/path to obtain data files?
Image
New home of former Windows IMPERIALS® squad. PM me to join us on Android server.
-
Layout Manager
http://www.swcommander.com/viewtopic.php?f=31&t=19986
-
Defense Tracker
http://www.swcommander.com/viewtopic.php?f=31&t=20403


User avatar
Kender
Captain
Posts: 99

Re: [Tutorial] How To Get The Game Data.

Post#5 » Sat Oct 15, 2016 11:25 am

Sigma582 wrote:One question: are both versions (iOS/Windows) use the same endpoint/path to obtain data files?

No they don't.
This is for Android and iOS only.
If anyone wants to post the urls for windows that'll be cool.
SONS_OF_DEATH http://squadsofdeath.com
Global Squad War Ranking http://squadsofdeath.com/squadranking


User avatar
Sigma582
Admiral
Posts: 595

Re: [Tutorial] How To Get The Game Data.

Post#6 » Sat Oct 15, 2016 1:09 pm

well... looks like it's Fiddler time :)
Image
New home of former Windows IMPERIALS® squad. PM me to join us on Android server.
-
Layout Manager
http://www.swcommander.com/viewtopic.php?f=31&t=19986
-
Defense Tracker
http://www.swcommander.com/viewtopic.php?f=31&t=20403


User avatar
ChiptheFish
Major General
Posts: 394

Re: [Tutorial] How To Get The Game Data.

Post#7 » Tue Oct 18, 2016 9:20 pm

The latest URL for the 312 patch (Oct 12) is here:
https://starts0.content.disney.io/cloud ... .base.json

If you download the JSON file (over 10MB) to your local computer you can browse it locally with the ability to collapse main data structures using Notepad++. This is my go-to software for reading scripts and markup files because of the intelligent way it handles cascading data structures.

(I'm starting to enjoy the data analysis side of this game as much as playing it)

The main data sets are:

    AchievementData
    AssetData
    AudioData
    BuffData
    BuildingConnectorData
    BuildingData
    CivilianData
    ClearableData
    CommonAssetData
    CurrencyRewardMod
    CurrencyType
    EffectsData
    EqupmentEffectData
    Example
    FactionIcons
    GameConstants
    HeroAbilities
    InAppPurchases
    MedalRewardMod
    MobilizationHologram
    Notifications
    PlanetData
    PlanetaryLighting
    ProjectileData
    PvpTargetLootInformation
    ShaderData
    SkinData
    SkinOverrideData
    SpecialAttackData
    TransportData
    TrapData
    TroopData
    TurretData
    UIData
    UISupplemental
Chip the Fish, Rebel: HQ Prestige, Medals: 28K, Battle Rank: 14(Android)
FriskyEwoks: Level 50 Squad - Join us!


User avatar
ChiptheFish
Major General
Posts: 394

Re: [Tutorial] How to get the game data.

Post#8 » Tue Oct 18, 2016 10:41 pm

DeathStriker wrote:
JSON File Explorer

Once you have the JSON Data you can use the JSON File Editor / Explorer here to "explore" the downloaded file:



I've downloaded the JSON file for patch 312 and uploaded it to Dropbox for historical value (and since I was getting occasional errors reading the official Disney file URL occasionally). I've also isolated the Troops section and uploaded that as a separate JSON. Other than renaming them and reducing the data I have not modified the data in any way. Here are links to open the JSON files directly in the JSON Online Editor.

Troop Data Only:
http://jsoneditoronline.org/?url=https: ... ction.json

Full JSON, Patch 312:
http://jsoneditoronline.org/?url=https: ... _full.json
Chip the Fish, Rebel: HQ Prestige, Medals: 28K, Battle Rank: 14(Android)
FriskyEwoks: Level 50 Squad - Join us!


User avatar
spiderx
Commodore
Posts: 135

Re: [Tutorial] How To Get The Game Data.

Post#9 » Wed Oct 19, 2016 7:16 am

The file is really interesting. It contains, for example, all data about the new armory feature. Also has +2 cantina levels, +1 planetary command level :) Has some +2 heroes for rebels (that one doesn seem as upcoming but more like old abandoned feature).

Still, the most important things (like costs, durations, xp) were already published in various fan websites. Detailed damage numbers and modifiers (like damage percentages for building types), that you can find in this data file, are changing too often to rely on them and they also seem inacurate (for example Kessen's "railgun" pops SC more easily than other buildings, but this file shows the same 50% damage for SC and math does not match the facts). Still interesting.
Rebel HQ10. Base score: 2957 of 2964.
Favorite SWC website: www.star-wars-commander-info.com


User avatar
DeathStriker
Moderator
Posts: 7105

Re: [Tutorial] How To Get The Game Data.

Post#10 » Wed Oct 19, 2016 12:15 pm

ChiptheFish wrote:The latest URL for the 312 patch (Oct 12) is here:
https://starts0.content.disney.io/cloud ... .base.json

If you download the JSON file (over 10MB) to your local computer you can browse it locally with the ability to collapse main data structures using Notepad++. This is my go-to software for reading scripts and markup files because of the intelligent way it handles cascading data structures.

(I'm starting to enjoy the data analysis side of this game as much as playing it)

The main data sets are:

    AchievementData

    {snip}

ChiptheFish - Yes, thanks to Kender we can "explore" the Data File for iOS/Android Version of SWC.

For AchievementData here is a more readable version (re-post of my post found here).

Currently in the Game Data there are already established SWC Game Achievements for Google Play and Amazon.

HERE IS A LIST OF ACHIEVEMENTS CURRENTLY FOUND IN GAME DATA

Notes:
  1. The "Titles" and "Description" are from the Game Data.
  2. The requirements are for both Rebel Faction and Empire Faction.

1. Star Destroyer

  • DESCRIPTION: “PvE - Earn Stars”
  • LEVEL 1: Earn 10 Stars
  • LEVEL 2: Earn 50 Stars
  • LEVEL 3: Earn 150 Stars
2. There Is No Try

  • DESCRIPTION: “Win PvP Attacks”
  • LEVEL 1: Win 25 PvP Attacks
  • LEVEL 2: Win 250 PvP Attacks
  • LEVEL 3: Win 5000 PvP Attacks
3. No Reward Is Worth This

  • DESCRIPTION: “PvP - Loot Alloy”
  • LEVEL 1: Loot 20000 Alloy
  • LEVEL 2: Loot 1000000 Alloy
  • LEVEL 3: Loot 100000000 Alloy
4. Scoundrel I Like That

  • DESCRIPTION: “PvP - Loot Credits”
  • LEVEL 1: Loot 20000 Alloy
  • LEVEL 2: Loot 1000000 Alloy
  • LEVEL 3: Loot 100000000 Alloy
5. Proceeding As Foreseen

  • DESCRIPTION: “Upgrade Your Headquarters”
  • LEVEL 1: Upgrade HQ To Level 3
  • LEVEL 2: Upgrade HQ To Level 6
  • LEVEL 3: Upgrade HQ To Level 10
6. More Training You Require

  • DESCRIPTION: “Upgrade Your Barracks”
  • LEVEL 1: Upgrade Barracks To Level 2
  • LEVEL 2: Upgrade Barracks To Level 5
  • LEVEL 3: Upgrade Barracks To Level 10
7. All Too Easy

  • DESCRIPTION: “Upgrade Materials Storage (Alloy Depot)”
  • LEVEL 1: Upgrade Materials Storage To Level 2
  • LEVEL 2: Upgrade Materials Storage To Level 5
  • LEVEL 3: Upgrade Materials Storage To Level 10
8. In It For The Money

  • DESCRIPTION: “Upgrade Credit Storage (Credit Vault)”
  • LEVEL 1: Upgrade Credit Storage To Level 2
  • LEVEL 2: Upgrade Credit Storage To Level 5
  • LEVEL 3: Upgrade Credit Storage To Level 10
THEORETICALLY those Players whom have a Google Play or Amazon Account should be able to view these Achievements. Here is how:

  1. Google Play: View How to See Achievements in Google Play Games
  2. Amazon: View Amazon GameCircle on Kindle Fire
Adding to this Thread...
 
Image
Death_Striker is looking for ALL Rebel Commanders
Sons_of_Death is looking for Level 5+ Rebel Commanders
If YOU Want to War - Apply Now!


Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 372 guests