simulationcraft / simc

Simulationcraft engine/GUI
GNU General Public License v3.0
1.35k stars 683 forks source link

Ask Mr. Robot export doesn't load characters #1830

Closed navv1234 closed 9 years ago

navv1234 commented 9 years ago

Originally reported on Google Code with ID 1831

What steps will reproduce the problem?
1. Simulate a character to generate stat weights
2. Click the AskMrRobot link towards the top. 
3. You will see it goes to a URL similar to this: http://www.askmrrobot.com/wow/gear??spec=WarlockDestruction&weights=Intellect:1,SpellPower:0.85,HitRating:0.88,CritRating:0.5,HasteRating:0.56,MasteryRating:0.5

Also, if you click on the AMR link toward the bottom of the report, it likes to /results,
instead of the URL.

What is the expected output? What do you see instead?
The URL needs to be modified.
--There are 2 question marks after the AMR url, instead of 1

--The string needs to include the character information (region, server, character).
Note, spaces in the realm are replaced with underscores. Punctuation (like apostrophes)
stay in the realm names.

--The final URL should look like this: http://www.askmrrobot.com/wow/gear/usa/kul_tiras/swol?spec=WarlockDestruction&weights=Intellect:1,SpellPower:0.85,HitRating:0.88,CritRating:0.5,HasteRating:0.56,MasteryRating:0.5

What version of the product are you using? On what operating system?
530-6, on Windows 8

Please provide any additional information below.

Reported by vee@askmrrobot.com on 2013-08-05 18:23:40

navv1234 commented 9 years ago
Something seems fishy.  Using 530-6 on Win7, this is what I get for Swol after importing
from the armory:

http://www.askmrrobot.com/wow/gear/usa/kul-tiras/Swol?spec=WarlockDestruction&weights=Intellect:1,HitRating:0.77,CritRating:0.51,HasteRating:0.55,MasteryRating:0.48

(simming only those stats, and at low accuracy since we're not particularly interested
in that at the moment).

Looking at the code, there should be only one case where you get a URL that contains
two question marks.  It happens when:
a) region, server, and name strings aren't provided (should happen automatically with
armory import)
b) SimC can't figure out those values by parsing the origin string (i.e. 
origin="http://us.battle.net/wow/en/character/kul-tiras/Swol/advanced" ).  

Can you give me some more details on the steps you took to get the broken link?  Did
you import from the armory, or were you copy/pasting from a SimC file into the Simulate
tab?  If you were using a file, does it contain the origin string?

Reported by theckhd on 2013-08-05 19:40:37

navv1234 commented 9 years ago
I imported the code from Ask Mr. Robot. To do that, load any character in AMR, then
click the export button. Copy the SimC code into the Simulate tab on SimC.

I did not try importing from the armory. I will do that shortly (in about 1 hour) and
report back.

Reported by vee@askmrrobot.com on 2013-08-05 19:46:35

navv1234 commented 9 years ago
theckhd - I imported from the armory and the links to AMR work. It appears to be isolated
to characters that are imported from AMR. Here's what I do to import from AMR:

1. Load my character
2. Click the export button
3. Copy the SimC code into the Import tab on SimC.

The code that I grab from AMR looks like this:
warlock=swol
origin="http://www.askmrrobot.com/wow/gear"
level=90
race=goblin
role=spell
spec=destruction
professions=Tailoring=600/Herbalism=600
talents=232312
glyphs=healthstone/burning_embers/siphon_life

head=hood_of_the_thousandfold_hells,id=95326,stats=2010armor_1318int_2338sta_950hit_867haste
neck=destroyers_battletags,id=95146,stats=868int_1302sta_604hit_536mastery,reforge=mastery_crit
shoulders=mantle_of_the_thousandfold_hells,id=95329,stats=1855armor_998int_1736sta_653crit_715haste
chest=robes_of_the_thousandfold_hells,id=95328,stats=2533armor_1439int_2519sta_916hit_1049mastery,gems=160int_80int_160crit_80int_160hit_180int,enchant=80all,reforge=mastery_crit
waist=cord_of_cacophonous_cawing,id=94813,stats=1391armor_998int_1736sta_748hit_597haste,gems=160int_80int_160crit_160int_120haste,reforge=hit_crit
legs=alsets_tormented_leggings,id=94739,stats=2164armor_1398int_2338sta_733hit_1091mastery,gems=80int_160crit_80int_160hit_120int,enchant=285int_165crit,reforge=mastery_crit
feet=falling_blossom_treads,id=94277,stats=1700armor_998int_1736sta_759hit_579mastery,gems=160int_160int_120mastery,enchant=140mastery,reforge=hit_crit
wrists=frostborn_wristwraps,id=94804,stats=1082armor_788int_1302sta_858hit,gems=80int_160crit_60int,enchant=170mastery,reforge=hit_crit
hands=gloves_of_the_thousandfold_hells,id=95325,stats=1546armor_1078int_1736sta_701crit_747mastery,gems=160int_60int,enchant=170haste,reforge=mastery_haste
finger1=signet_of_the_shadopan_assault,id=95138,stats=868int_1302sta_579crit_579haste,reforge=haste_hit
finger2=roshaks_remembrance,id=95785,stats=640int_1081sta_513crit_335mastery,gems=80int_160hit_60haste,reforge=mastery_hit
trinket1=breath_of_the_hydra,id=94521,upgrade=2,reforge=haste_crit
trinket2=volatile_talisman_of_the_shadopan_assault,id=94510,stats=1467int
back=deadly_glare_cape,id=94929,stats=1237armor_788int_1302sta_510crit_556haste,gems=160int_60int,enchant=lightweave_embroidery_3
main_hand=suenwo_spire_of_the_falling_sun,id=96167,stats=1695int_2663sta_1254haste_10169sp_974mastery,gems=160int_160int_60int,enchant=jade_spirit,reforge=mastery_crit,weapon=staff_3.3speed_8561min_12843max

default_pet=felhunter

Reported by vee@askmrrobot.com on 2013-08-05 20:27:31

navv1234 commented 9 years ago
Yeah, this is a problem on AskMrRobot's end.  Basically, your export doesn't contain
any information about the server.  Without that information, SimC can't build a proper
link.

It can figure out the name (from "warlock=swol"), but needs some additional source
of info to figure out region (which defaults to "us") and server.  

There are two ways to do it:
1) Before the character declaration (i.e. at the top of the file), provide the parameters
default_server=kul-tiras
default_region=us

Technically you could omit default_region if it's US, but it would be required for
EU et. al.  Note that if you use this method, these two lines *must* come before the
player declaration (warlock=swol).

2) Use the player's armory link for the origin, so that SimC can parse it and figure
out where they're from.  

Reported by theckhd on 2013-08-05 21:04:10

navv1234 commented 9 years ago
I see the problem, thanks! Our developer said we can add in the server and character
info. Thanks for the help theck, we'll get that fixed on AMR shortly. (I'm not the
dev, I'm sure our dev would have spotted that right away!). 

Reported by vee@askmrrobot.com on 2013-08-05 21:21:37