Archived

This topic is now archived and is closed to further replies.

bsoft

Java-based optimal Rogue reforging calculator

81 posts in this topic

Fast is never fast enough! Now basically instant.

Split off from Korner's thread to avoid polluting it with bug reports that don't apply to his tool.

This is a reforging calculator that calculates the correct reforgings to achieve optimal EP. It's (loosely) based on Korner's tool, but since it's written in Java rather than Perl and has several optimizations, it's quite a bit faster (20 times or more in most cases).

Reasons to use my version:

  • It's even faster than Korner's C version!
  • You like the convenience of a web-based tool.

Reasons to use Korner's version:

  • It's been around longer and has fewer bugs
  • It has more options like customizable EP coefficients and caps
  • It works (manually) with random enchant items, which my tool doesn't handle at all

You can get Korner's original version from his thread:

http://elitistjerks.com/f78/t115053-complete_rogue_reforger_tool/

If you want to try my version, there are three versions: the applet version (which runs on a web page), the runnable JAR version (if you know how to run Java JARs) and the source code version (if you are a programmer and want to modify/examine my tool).

Most people should use the applet version.

The applet version of my program needs permission to access Armory and Wowhead. You'll see a big scary security warning when you load the page. If you don't trust me (and why should you?) you are welcome to download the source code and review it yourself. Alternatively you could run it in a VM or a machine that you don't do anything important on. I don't have to tell you how common keyloggers are. I can assure you that there is nothing malicious about my program, but of course someone trying to hack your account would say the same thing.

Typical solution times for my Java version are instant to a few seconds, depending on your hardware and how HotSpot is feeling.

If you don't have Java, download it from java.com

Applet version (recommended for most people):

Reforger

Runnable JAR version (faster than the Applet if you're familiar with Java):

http://powerofb.wsnetwork.net/reforger/reforger.jar

Source code:

http://powerofb.wsnetwork.net/reforger/src.zip

As of 1.4, the source code is released under the Apache License, Version 2.0.

Version history:

1.8:

  • Disable multi-threading. There was a weird race condition that would sometimes give bogus results. The single-threaded version is negligibly slower and doesn't have the problem.

1.7:

  • Fix another combat calculation bug.
  • Fix a performance bug - now up to 10x faster than 1.6, 100x faster than 1.5 and 50x faster than Korner's C version!

1.6:

  • Rewrote calculation code - up to 50x faster than 1.5 and even faster than Korner's C version!

1.5:

  • Fix combat reforging formula.
  • Print list of non-reforged items.

1.4:

  • Handle non-English character profiles
  • Correct EP values for Combat rogues
  • Auto-convert simple character URLs to advanced character URLs
  • Add license information to source files

1.3:

  • Improved detection of random enchant items that will not result in false positives.

1.2:

  • Print an error when encountering items with random enchants rather than give bad results
  • Print an error message if you don't enter the advanced armory URL rather than give bad results
  • Correctly calculate gem/enchant bonuses rather than using Armory's (bad) values. Stats should now match in-game values.

1.1:

  • Fix an EP calculation bug
  • Add better error messages
  • Add version info

Share this post


Link to post
Share on other sites

java.lang.RuntimeException: Item found with no stats - most likely a random enchant item. These items are not yet supported.

	at Reforger.runReforging(Reforger.java:129)

	at ReforgerApplet$ReforgerRunnable.run(ReforgerApplet.java:85)

	at java.lang.Thread.run(Unknown Source)

How I will fix that problem? solutions?

Share this post


Link to post
Share on other sites
java.lang.RuntimeException: Item found with no stats - most likely a random enchant item. These items are not yet supported.

	at Reforger.runReforging(Reforger.java:129)

	at ReforgerApplet$ReforgerRunnable.run(ReforgerApplet.java:85)

	at java.lang.Thread.run(Unknown Source)

How I will fix that problem? solutions?

In my case, it was most likely due to my Engineering helm.

Share this post


Link to post
Share on other sites

Hi, i'm intrigued by the two new reforge tools. I oped to use the Java-based tool, as it is somewhat faster. I left it to run over-night, and came back to check the results, which seemed at least a little odd:

Reforger version 1.1.

Loading character info:

  Using combat reforgings.

Loading items: 

  ["Scaleslicer" Stats=[Hit=97 Mastery=0 Haste=0 Expertise=97 Crit=0]]

  ["Dragonwreck Throwing Axe" Stats=[Hit=0 Mastery=72 Haste=72 Expertise=0 Crit=0]]

  ["Liar's Handwraps" Stats=[Hit=0 Mastery=0 Haste=169 Expertise=0 Crit=149]]

  ["Thieving Spaulders" Stats=[Hit=0 Mastery=0 Haste=150 Expertise=0 Crit=130]]

  ["Signet of the Elder Council" Stats=[Hit=0 Mastery=127 Haste=127 Expertise=0 Crit=0]]

  ["Left Eye of Rajh" Stats=[Hit=0 Mastery=0 Haste=0 Expertise=252 Crit=0]]

  ["Assassin's Chestplate" Stats=[Hit=183 Mastery=0 Haste=0 Expertise=0 Crit=253]]

  ["Mask of Vines" Stats=[Hit=0 Mastery=0 Haste=162 Expertise=0 Crit=182]]

  ["Fang of Twilight" Stats=[Hit=0 Mastery=97 Haste=0 Expertise=0 Crit=97]]

  ["Viewless Wings" Stats=[Hit=127 Mastery=0 Haste=0 Expertise=0 Crit=127]]

  ["Treads of Fleeting Joy" Stats=[Hit=0 Mastery=0 Haste=169 Expertise=0 Crit=149]]

  ["Leggings of the Impenitent" Stats=[Hit=0 Mastery=0 Haste=148 Expertise=0 Crit=168]]

  ["Green Trophy Tabard of the Illidari" Stats=[Hit=0 Mastery=0 Haste=0 Expertise=0 Crit=0]]

  ["Gilnean Ring of Ruination" Stats=[Hit=108 Mastery=0 Haste=138 Expertise=0 Crit=0]]

  ["Don Rodrigo's Fabulous Necklace" Stats=[Hit=0 Mastery=145 Haste=96 Expertise=0 Crit=0]]

  ["Fluid Death" Stats=[Hit=321 Mastery=0 Haste=0 Expertise=0 Crit=0]]

  ["Precious' Ribbon" Stats=[Hit=0 Mastery=0 Haste=0 Expertise=0 Crit=0]]

  ["Parasitic Bands" Stats=[Hit=0 Mastery=127 Haste=0 Expertise=0 Crit=127]]

  ["Red Beam Cord" Stats=[Hit=0 Mastery=0 Haste=150 Expertise=0 Crit=130]]

Base stats:

  Hit: 836

  Mastery: 568

  Haste: 1381

  Expertise: 349

  Crit: 1512

Gem/enchant bonuses:

  Hit: +40

  Mastery: +50

  Haste: +150

  Expertise: 0

  Crit: +105

Stats with no reforgings (EP = 5706.2):

  Hit: 876

  Mastery: 618

  Haste: 1531

  Expertise: 349

  Crit: 1617

Current reforgings:

  Hit: +12

  Mastery: -136

  Haste: +277

  Expertise: +447

  Crit: -600

Stats with current reforgings (EP = 5813.8):

  Hit: 888

  Mastery: 482

  Haste: 1808

  Expertise: 796

  Crit: 1017
. . .
Recommended reforgings: 

  ["Scaleslicer" 38 Expertise to Mastery]

  ["Dragonwreck Throwing Axe" 28 Haste to Hit]

  ["Liar's Handwraps" 59 Crit to Mastery]

  ["Thieving Spaulders" 52 Crit to Mastery]

  ["Signet of the Elder Council" 50 Haste to Hit]

  ["Left Eye of Rajh" 100 Expertise to Mastery]

  ["Assassin's Chestplate" 101 Crit to Mastery]

  ["Mask of Vines" 72 Crit to Hit]

  ["Fang of Twilight" 38 Crit to Hit]

  ["Viewless Wings" 50 Crit to Mastery]

  ["Treads of Fleeting Joy" 59 Crit to Hit]

  ["Leggings of the Impenitent" 67 Crit to Hit]

  ["Don Rodrigo's Fabulous Necklace" 38 Haste to Hit]

  ["Parasitic Bands" 50 Crit to Hit]

  ["Red Beam Cord" 52 Crit to Hit]

Stats with no reforgings (EP = 5706.2):

  Hit: 876

  Mastery: 618

  Haste: 1531

  Expertise: 349

  Crit: 1617

Stats with current reforgings (EP = 5813.8):

  Hit: 888

  Mastery: 482

  Haste: 1808

  Expertise: 796

  Crit: 1017

Stats with recommended reforgings (EP = 6030.8):

  Hit: 1330

  Mastery: 1018

  Haste: 1415

  Expertise: 211

  Crit: 1017

Improvement over current reforgings: 217.0

Seeing as how the tool reforged everything to hit/mastery, it looks like it's possible that the tool is using Assassination calcs across the board. Anyone else running combat have a similar experience?

Share this post


Link to post
Share on other sites
Seeing as how the tool reforged everything to hit/mastery, it looks like it's possible that the tool is using Assassination calcs across the board. Anyone else running combat have a similar experience?

The EP values and caps are the same right now for Combat and Assassination in my program, so, yeah, it's wrong.

Share this post


Link to post
Share on other sites
The EP values and caps are the same right now for Combat and Assassination in my program, so, yeah, it's wrong.

Thanks for the confirmation, should probably have noted i was using the Applet version, not the JAR version.

Share this post


Link to post
Share on other sites
java.lang.RuntimeException: Item found with no stats - most likely a random enchant item. These items are not yet supported.

	at Reforger.runReforging(Reforger.java:129)

	at ReforgerApplet$ReforgerRunnable.run(ReforgerApplet.java:85)

	at java.lang.Thread.run(Unknown Source)

How I will fix that problem? solutions?

Recieved the same message. I also have an engineering helm equiped.

Share this post


Link to post
Share on other sites
Recieved the same message. I also have an engineering helm equiped.

I've fixed the problem with false-positive random enchant detection on items that have no reforgeable stats.

Share this post


Link to post
Share on other sites

Stats with recommended reforgings (EP = 6114,0):

Hit: 1333

Mastery: 1829

Haste: 837

Expertise: 449

Crit: 414

Anyone having trouble with cycle stability with less than 500 expertise or only me?

Share this post


Link to post
Share on other sites

java.lang.RuntimeException: Random enchant item found. These items are not yet supported.

at net.wsnetwork.reforger.Reforger.runReforging(Reforger.java:153)

at net.wsnetwork.reforger.ReforgerApplet$ReforgerRunnable.run(ReforgerApplet.java:99)

at java.lang.Thread.run(Unknown Source)

Probably engineering tinkers(nitro, haste on gloves, parachute)

Share this post


Link to post
Share on other sites
java.lang.RuntimeException: Random enchant item found. These items are not yet supported.

at net.wsnetwork.reforger.Reforger.runReforging(Reforger.java:153)

at net.wsnetwork.reforger.ReforgerApplet$ReforgerRunnable.run(ReforgerApplet.java:99)

at java.lang.Thread.run(Unknown Source)

Probably engineering tinkers(nitro, haste on gloves, parachute)

This appears to be the problem item:

["Mistral Circle" Stats=[Hit=0 Mastery=0 Haste=0 Expertise=0 Crit=0]]

Solving this problem is complex because neither Wowhead nor the Armory item pages report the stats on these items correctly. The stats will need to be pulled from your Armory page, which is more complex since the item might already be reforge and the HTML is harder to parse.

I'll see if I can get a fix done tomorrow.

Share this post


Link to post
Share on other sites
This appears to be the problem item:

["Mistral Circle" Stats=[Hit=0 Mastery=0 Haste=0 Expertise=0 Crit=0]]

Solving this problem is complex because neither Wowhead nor the Armory item pages report the stats on these items correctly. The stats will need to be pulled from your Armory page, which is more complex since the item might already be reforge and the HTML is harder to parse.

I'll see if I can get a fix done tomorrow.

Some steps to resolve the random items issue can be found here: http://elitistjerks.com/f78/t115053-complete_rogue_reforger_tool/#post1849030

So if we hardcode all the random items and stats in the program, the item variant we need can be pulled from Armory by that suffixID, and the reforge option on the item can be determined from the same URL from "&re=144" part.

Share this post


Link to post
Share on other sites

java.lang.RuntimeException: Unable to load items from Armory URL: [url=http://us.battle.net/wow/en/character/blackrock/nexism/advanced]Nexism @ Blackrock - Game - World of Warcraft[/url]
Perhaps blocked from Armory? Full error below.

Reforger version 1.4.

Loading character info:

java.lang.RuntimeException: Unable to load items from Armory URL: http://us.battle.net/wow/en/character/blackrock/nexism/advanced

	at net.wsnetwork.reforger.Character.<init>(Character.java:97)

	at net.wsnetwork.reforger.Reforger.runReforging(Reforger.java:120)

	at net.wsnetwork.reforger.ReforgerApplet$ReforgerRunnable.run(ReforgerApplet.java:99)

	at java.lang.Thread.run(Unknown Source)

Caused by: java.security.AccessControlException: access denied (java.net.SocketPermission us.battle.net:80 connect,resolve)

	at java.security.AccessControlContext.checkPermission(Unknown Source)

	at java.security.AccessController.checkPermission(Unknown Source)

	at java.lang.SecurityManager.checkPermission(Unknown Source)

	at java.lang.SecurityManager.checkConnect(Unknown Source)

	at sun.plugin2.applet.Applet2SecurityManager.checkConnect(Unknown Source)

	at sun.net.www.http.HttpClient.openServer(Unknown Source)

	at sun.net.www.http.HttpClient.<init>(Unknown Source)

	at sun.net.www.http.HttpClient.New(Unknown Source)

	at sun.net.www.http.HttpClient.New(Unknown Source)

	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)

	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)

	at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)

	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)

	at net.wsnetwork.reforger.Character.<init>(Character.java:73)

	... 3 more

Share this post


Link to post
Share on other sites


java.lang.RuntimeException: Random enchant item found. These items are not yet supported.

	at net.wsnetwork.reforger.Reforger.runReforging(Reforger.java:153)

	at net.wsnetwork.reforger.ReforgerApplet$ReforgerRunnable.run(ReforgerApplet.java:99)

	at java.lang.Thread.run(Unknown Source)

It seems to have issues with Swordguard Embroidery as well.

Share this post


Link to post
Share on other sites

I've noticed that this tool reforges hit to get as close as possible to 1332 regardless of how many points a rogue has in Precision. Is there any way to have an option to specify Precision points so that it instead stops reforging for hit at 1127?

Edit - Whoops, nevermind, I just downloaded your source and compiled a 1127 version myself. Would still be useful, though.

Share this post


Link to post
Share on other sites

I downloaded the source and have a few questions.

First of all I'd like to try to always stay above HIT and EXP cap (using it normally it keeps putting me below EXP cap). I found this in the code, is there any way to alter it to force it to always hit EXP cap?

        int exp = statValues[Stat.exp.getIndex()];

        if (exp > EXP_CAP) {

            result += EP_AT_EXP_CAP;

        } else {

            result += exp * EXP_COEFFICIENT;

        }
While I was at it I also edited the EP values for the Combat profile for 4.0.6 values. However when I try to compile it with javac (javac *.java) I get the following errors:
Reforger.java:26: package net.wsnetwork.reforger.rogue does not exist

import net.wsnetwork.reforger.rogue.CombatSpecModel;

                                   ^

Reforger.java:27: package net.wsnetwork.reforger.rogue does not exist

import net.wsnetwork.reforger.rogue.MutiltateSpecModel;

                                   ^

Reforger.java:124: cannot find symbol

symbol  : class CombatSpecModel

location: class net.wsnetwork.reforger.Reforger

            model = new CombatSpecModel();

                        ^

Reforger.java:127: cannot find symbol

symbol  : class MutiltateSpecModel

location: class net.wsnetwork.reforger.Reforger

            model = new MutiltateSpecModel();

                        ^

4 errors

Any tips on what I'm doing wrong? I'm assuming it has something to do with the CLASSPATH but since I'm new to Java I'm a bit lost lol.

Share this post


Link to post
Share on other sites

Great tool but I think it is using melee hit calculations instead of spell hit. The tool reforged me to 17% melee hit which is 18.89% spell hit and we need to be at the spell hit cap to be optimal.

Share this post


Link to post
Share on other sites

Getting error when trying to import, using both Chrome and IE8:

Reforger version 1.4.

Loading character info:

java.lang.RuntimeException: Unable to load items from Armory URL: us.battle.net/wow/en/character/steamwheedle-cartel/vaelaris/advanced

at net.wsnetwork.reforger.Character.<init>(Character.java:97)

at net.wsnetwork.reforger.Reforger.runReforging(Reforger.java:120)

at net.wsnetwork.reforger.ReforgerApplet$ReforgerRunnable.run(ReforgerApplet.java:99)

at java.lang.Thread.run(Unknown Source)

Caused by: java.net.MalformedURLException: no protocol: us.battle.net/wow/en/character/steamwheedle-cartel/vaelaris/advanced

at java.net.URL.<init>(Unknown Source)

at java.net.URL.<init>(Unknown Source)

at java.net.URL.<init>(Unknown Source)

at net.wsnetwork.reforger.Character.<init>(Character.java:70)

... 3 more

Share this post


Link to post
Share on other sites

A suggestion: Why not implement so you can enter the EP-values and the cap values?

A set of textboxes with the suggested values with the option of changing them? That way you can enter the EP-values for your particular talent-spec and gear level. That would also increase understanding as to what values are actually used in the reforging calculations.

Share this post


Link to post
Share on other sites
A suggestion: Why not implement so you can enter the EP-values and the cap values?

A set of textboxes with the suggested values with the option of changing them? That way you can enter the EP-values for your particular talent-spec and gear level. That would also increase understanding as to what values are actually used in the reforging calculations.

That's actually the only thing that i want from Java app. It's much faster than korner version and i can use it after i get any item.

Java Reforger should also say if some items should not have any reforge at all. There's no such information in current version.

Share this post


Link to post
Share on other sites
I downloaded the source and have a few questions.

First of all I'd like to try to always stay above HIT and EXP cap (using it normally it keeps putting me below EXP cap). I found this in the code, is there any way to alter it to force it to always hit EXP cap?

        int exp = statValues[Stat.exp.getIndex()];

        if (exp > EXP_CAP) {

            result += EP_AT_EXP_CAP;

        } else {

            result += exp * EXP_COEFFICIENT;

        }
While I was at it I also edited the EP values for the Combat profile for 4.0.6 values. However when I try to compile it with javac (javac *.java) I get the following errors:
Reforger.java:26: package net.wsnetwork.reforger.rogue does not exist

import net.wsnetwork.reforger.rogue.CombatSpecModel;

                                   ^

Reforger.java:27: package net.wsnetwork.reforger.rogue does not exist

import net.wsnetwork.reforger.rogue.MutiltateSpecModel;

                                   ^

Reforger.java:124: cannot find symbol

symbol  : class CombatSpecModel

location: class net.wsnetwork.reforger.Reforger

            model = new CombatSpecModel();

                        ^

Reforger.java:127: cannot find symbol

symbol  : class MutiltateSpecModel

location: class net.wsnetwork.reforger.Reforger

            model = new MutiltateSpecModel();

                        ^

4 errors
Any tips on what I'm doing wrong? I'm assuming it has something to do with the CLASSPATH but since I'm new to Java I'm a bit lost lol.
Actually I take back what I said about the EXP part. The code looks fine, I'm probably ending up under EXP cap just because the java applet isn't able to reforge a few stats that I do have reforged. This is what the java app is set to reforge:
    @Override public Map<Stat, Set<Stat>> getPossibleReforgings() {

        HashMap<Stat, Set<Stat>> result = new HashMap<Stat, Set<Stat>>();

        Set<Stat> stats = new HashSet<Stat>();

        stats.add(Stat.exp);

        stats.add(Stat.hst);

        result.put(Stat.hit, stats);


        stats = new HashSet<Stat>();

        stats.add(Stat.hst);

        stats.add(Stat.exp);

        result.put(Stat.mst, stats);


        stats = new HashSet<Stat>();

        stats.add(Stat.exp);

        stats.add(Stat.hit);

        result.put(Stat.hst, stats);


        stats = new HashSet<Stat>();

        stats.add(Stat.hit);

        stats.add(Stat.mst);

        stats.add(Stat.hst);

        result.put(Stat.exp, stats);


        stats = new HashSet<Stat>();

        stats.add(Stat.exp);

        stats.add(Stat.hit);

        stats.add(Stat.mst);

        stats.add(Stat.hst);

        result.put(Stat.cri, stats);
If the code was altered to this:
    @Override public Map<Stat, Set<Stat>> getPossibleReforgings() {

        HashMap<Stat, Set<Stat>> result = new HashMap<Stat, Set<Stat>>();

        Set<Stat> stats = new HashSet<Stat>();

        stats.add(Stat.exp);

        stats.add(Stat.hst);

        result.put(Stat.hit, stats);


        stats = new HashSet<Stat>();

        stats.add(Stat.hit);

        stats.add(Stat.hst);

        stats.add(Stat.exp);

        result.put(Stat.mst, stats);


        stats = new HashSet<Stat>();

        stats.add(Stat.exp);

        stats.add(Stat.hit);

        result.put(Stat.hst, stats);


        stats = new HashSet<Stat>();

        stats.add(Stat.hit);

        stats.add(Stat.mst);

        stats.add(Stat.hst);

        result.put(Stat.exp, stats);


        stats = new HashSet<Stat>();

        stats.add(Stat.exp);

        stats.add(Stat.hit);

        stats.add(Stat.hst);

        result.put(Stat.cri, stats);

(Taking MST out of CRI and adding HIT to MST)

Would the time change at all? If not I think that should result in much better reforges (HIT/EXP/HST on every possible stat). MST could be added to a few if it wouldn't increase reforge times too much, but I suspect it would.

*All of the above is referring to the COMBAT profile, although similar changes could probably be made to the Assassination profile*

Share this post


Link to post
Share on other sites
That's actually the only thing that i want from Java app. It's much faster than korner version and i can use it after i get any item.

Java Reforger should also say if some items should not have any reforge at all. There's no such information in current version.

For what it's worth I am playing around with bsofts code to be more versatile for both rogues and any other class. We briefly touched base and he said he doesn't have the time to go all the way with his reforging tool. When I come up with something I'll be sending it to him for his review.

Share this post


Link to post
Share on other sites
For what it's worth I am playing around with bsofts code to be more versatile for both rogues and any other class. We briefly touched base and he said he doesn't have the time to go all the way with his reforging tool. When I come up with something I'll be sending it to him for his review.

I started doing the same thing. I wanted to get a working copy that worked before I reached out to him. I'd be more then happy to review what you have done if you need another set of eyes.

Share this post


Link to post
Share on other sites

  • Recently Browsing   0 members

    No registered users viewing this page.