[Tutorial] How to get the game data.

General topics, questions, suggestions, bugs, or anything Star Wars Commander related.
VeeFu
Storm Trooper
Posts: 6

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

Post#11 » Thu Oct 20, 2016 7:56 am

Thanks for this post! It has inspired me to learn a bit of python to parse the .json into readable data. I love having this kind of insight into the game.

I see now, why droideka, despite saying 'Favorite Target: Closest' dashes off across the map after any live unit.

The 'targetPreferenceString' seems to be inaccurate, reading:

Code: Select all

"\"wall\":1,\"building\":50,\"resource\":50,\"turret\":55,\"HQ\":50,\"shieldGenerator\":50,\"infantry\":50,\"bruiserInfantry\":50,\"vehicle\":50,\"bruiserVehicle\":50",


The Turret, Resource, Storage, and Building values for the object, though, all seem to have a '50' value for target preference, whereas Bruiser/Infantry/Vehicle have a '60' value.

It's also interesting to see the damage multiplier differences between Kessen for Empire vs Kessen for Rebels... that is, if I'm interpreting all of this correctly


User avatar
RebelYell
Admiral
Posts: 575

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

Post#12 » Thu Oct 20, 2016 8:37 am

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#13 » Thu Oct 20, 2016 9:26 am

RebelYell wrote:Kessen's are indeed quite different. Also in Build time:

http://www.swcommander.info/~swc/wiki/index.php?title=Johhar_Kessen_(Empire)
http://www.swcommander.info/~swc/wiki/index.php?title=Johhar_Kessen_(Rebel)
(I know, Railgun-Data is still missing)

whoah! that's hillarious.
btw they also have slightly different modifiers against troops for some reason: Imp is stronger against mechs, Reb is stronger against infantry.
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#14 » Thu Oct 20, 2016 11:16 am

spiderx wrote: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

Most numbers are the same as a year ago. There have only breen a few tweaks here and there.
spiderx wrote: and they also seem inacurate and math does not match the facts

Actually these files *are* the facts.They are not extracted or collected from the game in some way, they are the actual urls the game on your phone downloads and uses.
spiderx wrote:for example Kessen's "railgun" pops SC more easily than other buildings, but this file shows the same 50% damage for SC.

I think you misread the file somewhere.
Kessens railgun damage modifiers:

Code: Select all

projectileDamagePercentString:
wall:85
building:75
storage:50
resource:50
turret:55
HQ:50
shield:25
shieldGenerator:50
infantry:55
bruiserInfantry:100
vehicle:40
bruiserVehicle:100
SONS_OF_DEATH http://squadsofdeath.com
Global Squad War Ranking http://squadsofdeath.com/squadranking


User avatar
spiderx
Commodore
Posts: 135

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

Post#15 » Thu Oct 20, 2016 1:10 pm

Kender, thanks for explaining it to me. There are so much records for "projectile" or "ability" for "RailGun" that I looked at incorrect one (abilityRailGun10Rebel). When building modifier is 75% and storage 50% - it is what actually makes sense.

When I said that damage modifier data is changing too often, I meant that there is an old popular website "star wars commander database" that had all the modifiers some time ago. And data became obsolete step by step with each version. While upgrade costs and durations are quite stable, all damage/health/modifier stuff seems to be under constant tuning. You have motivation to fill the today's data to your website - we will see how you will support it with each new version :))
Rebel HQ10. Base score: 2957 of 2964.
Favorite SWC website: www.star-wars-commander-info.com


sargentti1000
Storm Trooper
Posts: 5

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

Post#16 » Thu Oct 20, 2016 5:17 pm

RebelYell wrote:Kessen's are indeed quite different. Also in Build time:

http://www.swcommander.info/~swc/wiki/index.php?title=Johhar_Kessen_(Empire)
http://www.swcommander.info/~swc/wiki/index.php?title=Johhar_Kessen_(Rebel)
(I know, Railgun-Data is still missing)


Is the information on this site accurate for all troops? I followed the earlier info how to find information of troops from the data and got different numbers. For example I searched for Shocktrooper and it's damage %. I found that Shocks do 200% damage against turrets. The above site shows only 75% damage? It's very possible that I just looked at wrong things because of massive amounts of data.

By far the most interesting topic recently!

ps. First post ever:) got a lot of info/help from these forums so thank you all!


User avatar
RebelYell
Admiral
Posts: 575

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

Post#17 » Fri Oct 21, 2016 12:21 am

spiderx wrote:When I said that damage modifier data is changing too often, I meant that there is an old popular website "star wars commander database" that had all the modifiers some time ago. And data became obsolete step by step with each version. While upgrade costs and durations are quite stable, all damage/health/modifier stuff seems to be under constant tuning. You have motivation to fill the today's data to your website - we will see how you will support it with each new version :))


Yes we'll see :-). At least the current wiki is a project of multiple players. The troop data is updated "automatically" by a script/bot. Ok the script has to be started and as the game changes, the script and wiki site has surely have to be adapted.

Still, there's much work to come. Currently, the buffs/nerfs and special abilities are not represented in the Wiki. The Twi'Lek alone comes with 4 different buffs/nerfs (at least), each with individual parameters and a complete modifier table.

The Heavy Death-Troopers also have a nerf b.t.w. which usually only affect the rebels: Their healing ability is reduced by 50%. (Edit: I see that this is already properly mentioned in the Dev Blog post. Cool!)

sargentti1000 wrote:Is the information on this site accurate for all troops? I followed the earlier info how to find information of troops from the data and got different numbers. For example I searched for Shocktrooper and it's damage %. I found that Shocks do 200% damage against turrets. The above site shows only 75% damage? It's very possible that I just looked at wrong things because of massive amounts of data.


The information is accurate as far as the bot works and interpretes the data correctly. You'll find the correct modifiers for the ShockTrooper in the linked Projectile table entry ("projectileShockLevel.."). The modifiers in the TroopData table can probably be ignored.
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.


VeeFu
Storm Trooper
Posts: 6

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

Post#18 » Fri Oct 21, 2016 12:51 am

sargentti1000 wrote:
RebelYell wrote:Kessen's are indeed quite different. Also in Build time:

http://www.swcommander.info/~swc/wiki/index.php?title=Johhar_Kessen_(Empire)
http://www.swcommander.info/~swc/wiki/index.php?title=Johhar_Kessen_(Rebel)
(I know, Railgun-Data is still missing)


Is the information on this site accurate for all troops? I followed the earlier info how to find information of troops from the data and got different numbers. For example I searched for Shocktrooper and it's damage %. I found that Shocks do 200% damage against turrets. The above site shows only 75% damage? It's very possible that I just looked at wrong things because of massive amounts of data.

By far the most interesting topic recently!

ps. First post ever:) got a lot of info/help from these forums so thank you all!


If the wiki is pulling from the 'projectileDamagePercentString' property of the Shock Trooper's projectile, it may not be accurate. Every value in this string has a corresponding property in the object itself that doesn't necessarily match the ones in the string:

Here's the Shock Trooper entry. (with some irrelevant attributes removed)

Code: Select all

{
   "HQ" : "50",
   "armorType" : "bruiserInfantry",
   "bruiserInfantry" : "50",
   "bruiserVehicle" : "50",
   "building" : "50",
   "champion" : "50",
   "chargeTime" : "500",
   "damage" : "2340",
   "dps" : "2340",
   "faction" : "empire",
   "favoriteTargetType" : "trap",
   "flierInfantry" : "50",
   "flierVehicle" : "50",
   "healerInfantry" : "50",
   "health" : "5760",
   "heroBruiserInfantry" : "1",
   "heroBruiserVehicle" : "1",
   "heroInfantry" : "1",
   "heroVehicle" : "1",
   "infantry" : "50",
   "lvl" : "1",
   "maxAttackRange" : "9",
   "minAttackRange" : "0",
   "projectileType" : "projectileShockLevel1",
   "reload" : "3000",
   "resource" : "50",
   "role" : "Breacher",
   "shield" : "50",
   "shieldGenerator" : "50",
   "shotDelay" : "250",
   "storage" : "50",
   "targetPreferenceStrength" : "90",
   "targetPreferenceString" : "\"wall\":1,\"building\":50,\"resource\":50,\"turret\":40,\"HQ\":90,\"shieldGenerator\":50,\"infantry\":50,\"bruiserInfantry\":50,\"vehicle\":50,\"bruiserVehicle\":50",
   "targetedType" : "ENEMIES",
   "trap" : "90",
   "turret" : "50",
   "type" : "infantry",
   "uid" : "troopShock1",
   "unitID" : "Shock",
   "vehicle" : "50",
   "wall" : "1",
}


Here is the projectile assigned to the shock trooper

Code: Select all

{
        "HQ" : "200",
        "bruiserInfantry" : "25",
        "bruiserVehicle" : "75",
        "building" : "75",
        "champion" : "100",
        "flierInfantry" : "50",
        "flierVehicle" : "100",
        "healerInfantry" : "50",
        "heroBruiserInfantry" : "25",
        "heroBruiserVehicle" : "75",
        "heroInfantry" : "50",
        "heroVehicle" : "100",
        "infantry" : "50",
        "name" : "Shock Rocket",
        "passThroughShield" : "true",
        "projectileDamagePercentString" : "\"wall\":300,\"building\":75,\"storage\":75,\"resource\":75,\"turret\":200,\"HQ\":75,\"shield\":75,\"shieldGenerator\":75,\"infantry\":25,\"bruiserInfantry\":25,\"vehicle\":100,\"bruiserVehicle\":75",
        "resource" : "75",
        "shield" : "75",
        "shieldGenerator" : "75",
        "splashDamagePercentages" : "100,50,10,5",
        "storage" : "75",
        "trap" : "500",
        "turret" : "75",
        "uid" : "projectileShockLevel1",
        "vehicle" : "100",
        "wall" : "700"
}


I suspect the projectileDamagePercentString isn't used for actual game logic. The property values like "wall" : "700" and "HQ" : "200" are probably the actual, effective damage multipliers.

Why do I think this? Because of the discrepancy in Droideka's targeting behavior that I've observed in-game compared to the 'targetPreferenceString' for this unit:

Here's the sentinel Droideka's entry

Code: Select all

{
        "HQ" : "50",
        "armorType" : "champion",
        "bruiserInfantry" : "60",
        "bruiserVehicle" : "50",
        "building" : "50",
        "champion" : "60",
        "chargeTime" : "500",
        "damage" : "734",
        "dps" : "2202",
        "faction" : "smuggler",
        "favoriteTargetType" : "closest",
        "flierInfantry" : "60",
        "flierVehicle" : "50",
        "healerInfantry" : "60",
        "health" : "16000",
        "heroBruiserInfantry" : "1",
        "heroBruiserVehicle" : "1",
        "heroInfantry" : "1",
        "heroVehicle" : "1",
        "infantry" : "60",
        "lvl" : "1",
        "projectileType" : "projectileChampionRebelDroideka",
        "reload" : "500",
        "resource" : "50",
        "shield" : "50",
        "shieldAssetName" : "effectRebelDroidekaShield1",
        "shieldCooldown" : "20",
        "shieldGenerator" : "50",
        "shieldHealth" : "12000",
        "shotCount" : "6",
        "shotDelay" : "200",
        "storage" : "50",
        "targetPreferenceStrength" : "90",
        "targetPreferenceString" : "\"wall\":1,\"building\":50,\"resource\":50,\"turret\":55,\"HQ\":50,\"shieldGenerator\":50,\"infantry\":50,\"bruiserInfantry\":50,\"vehicle\":50,\"bruiserVehicle\":50",
        "targetedType" : "ENEMIES",
        "trap" : "0",
        "turret" : "50",
        "type" : "champion",
        "uid" : "troopSmugglerDroideka1",
        "unitID" : "SmugglerDroideka",
        "vehicle" : "50",
        "wall" : "1",
}


Inside the 'targetPreferenceString', 'turret' has the highest value, 55. The 'turret' property of the object, though, is '50' and the 'infantry'-type attributes have a value of 60. This explains why the droideka races to any existing units on the map on offense (often to its death).

I think the same is probably true for the projectileDamagePercentString; these strings probably do not have any actual impact on unit behavior or damage.


User avatar
RebelYell
Admiral
Posts: 575

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

Post#19 » Fri Oct 21, 2016 1:28 am

I just had a look at the code. I won't say that I understand all at a glance, but you're probably right! The TroopData values for each armortype actually contain the target preferences. "targetPreferenceStrength" contains the weighting from Preference Values vs. Target Distance (so here unit type is 90% relevant, distance 10%).

This surely is an interesting aspect for the wiki. I'll have to check it further and see how to integrate it in the future without letting the Page size explode.
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
2Tee2
Captain
Posts: 61

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

Post#20 » Mon Feb 27, 2017 3:05 am

Sigma582 wrote: well... looks like it's Fiddler time :)


I guess that didn't go quite well :?:

:cry: :cry: :cry:


Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 32 guests