As we know, the problem of determining the best reforges is a NP-Complete problem - shortly, that means that there is no guaranteed way of solving it without trying all possible combinations.
So I decided to write a tool which will iterate through all possible variants, calculate EP of each and choose the best.
That way it is guaranteed that the solution is the best possible. Also, this way of calculation automatically handles stat caps, if EP is calculated correctly.
The one major drawback of this method is calculation time: even with all possible optimizations and on a powerful hardware it takes up to couple of minutes to iterate through all these 4,837,294,080 (e.g.) variants.
Now, to the tool itself:
It is written in Perl and uses simple config file to set options. The script is fully cross-platform, and can be run on PC, Mac, Linux, etc - basically, on every platform.
- The script with a sample configuration file for those who have Perl installed:
Anyone can look at the source and check that it's not some malicious badware.
- For Windows users who do not want to download ActivePerl distribution, I have packaged an .exe file:
Due to Perl specifics (not a compiled language), this executable includes minimalistic Perl interpreter and is quite big for such a small script. However, it works.
To install it, just unzip the archive somewhere
To run the bare Perl version, you need to install Config::General , Parallel::ForkManager, Inline::C and Time::HiRes modules.
This can be done by issuing 'cpan ModuleName' on UNIX, or 'c:\somewhere\perl\bin\cpan install ModuleName' on Windows.
Also, script version must be installed into folder with path without spaces
(C:\tools\reforger\reforger.pl is OK, C:\Documents and Settings\user\Desktop\Reforger\reforger.pl is not OK)
Packaged executable from 'reforger-exe.zip' can be started without these prerequisites.
The configuration is stored in reforger.cfg file in plain text.
To get quickly started as Mutilate rogue, you need to enter your character Armory URL in the 'url = ' line at the beginning of the file, and launch the tool.
- url - The Armory URL. List of items and gem/enchant stats will be pulled from there, if the next parameter is set to 1.
- useArmory - set to 1 if you want to pull the data from Armory and do not want to enter item ID/stats
- ThreadCount - Set to number of your CPU cores to increase calculation speed. Default is 4 threads.
- <items> - List of item IDs in the gear set. Item stats will be pulled from Wowhead.
- <added_stats> - Stats, obtained from gems, enchants, etc. (not from gear items)
- <want_reforge> This table determines, what reforge combinations are tried (left stat will be tried to be reforged to all the stats to the right)
Changing this table affects calculation time significantly.
However, as it is rather small now, feel free to add options there.
Defaults are for Mutilate:
<want_reforge> hit = mst,hst mst = hit hst = hit,mst exp = hit,mst,hst cri = hit,mst,hst </want_reforge>
For Combat, sample table is as follows: (updated for 4.0.6)
Also, when switching to Combat, remember to update EP values to combat ones.
<want_reforge> hit = exp,hst mst = hst,exp,hit hst = exp,hit exp = hst,hit,mst cri = exp,hst,hit </want_reforge>It contains more possible variants, and so Combat calculations are much slower, while still in acceptable range (few minutes).
- <ep_values> - These are pre-cap EP values (for stats which have cap), or simply EP values for all other stats.
For hit, pre-cap means before spell hit cap (as yellow hit cap is reached automatically in current raiding gear)
- <caps> - These are the stat caps. Default sre for mutilate, you should change them for Combat or gnomes.
If, at some point, we will have some other cap (e.g., Mastery cap), it can be added here and will be taken into account automatically.
- <ep_values_post> - These are EP values for post-cap stats. You must add entry there, if additional cap is added.
For Hit, this is the value of white hit.
Items are firstly looked for in this file, so you can customize item stats here.
Mistral/Wind Stalker items
These items are fully supported now, if you use Armory as input source.
is kind of bugged in Armory or even in game - sometimes Armory shows that this item's reforge is counted twice. It may be an Armory bug, or it may be even ingame bug (I don't have that sword to test).
When in doubt about results, obtained with that item - use manual configuration.
If you prefer manual items input, you should still enter your random epic item stats into the item_cache.cfg file.
The results will be presented in the following form:
Suggested reforge options (only those that you need to change): --- no --- (Neck) Don Rodrigo's Fabulous Necklace cri -> hit (Shoulder) Poison Protocol Pauldrons cri -> hit (Chest) Sark of the Unwatched --- no --- (Waist) Belt of Nefarious Whispers cri -> hst (Legs) Wind Dancer's Legguards --- no --- (Feet) Storm Rider's Boots cri -> mst (Back) Dory's Finery exp -> hit (MH) Organic Lifeform Inverter exp -> mst (OH) Scaleslicer ============Only items you need to change reforges on are listed.Resulting stats: hit: 1332 mst: 2612 hst: 729 exp: 118 cri: 531 Resulting EP: 5872.04, 153.94 gained============ Unused reforge options found: hit -> hst mst -> hit exp -> hst
Also, item slots names are provided for convenience.
Reforges listed as 'unused' can be potentially removed from want_reforge table. However, be careful - they may be needed at your next gear set.
"Gained" EP displays the gain in EP over your current reforges.
As it does not take into acccount Agility, you should not compare different gear sets with this tool - use Shadowcraft instead.
This will also be saved to results.txt file, so they are not lost when you close the console window.
- Q: It is terribly slow, can it be made faster?
A: It is fast already, and if calculation time of few seconds/minutes seems too long for you - you are welcome to rewrite the tool in Assembler or for GPU calculation.
- Q: Why Perl, and not Python as in Shadowcraft?
A: I code in Perl much better, and this tool can not be integrated to Shadowcraft web ui anyway (see the next question).
- Q: Can we have a Web UI?
A: You can look at WowReforge - it now uses a very similar calculation approach that my tool, and will produce the same results. But you will need to have Silverlight installed.
- Q: there is an Optimal Reforger Calculator around, how this is different?
A: Optimal Reforger Calculator does not guarantee the perfect solution, it simply reforges the stats with less EP to the stats with max EP. This tool guarantees that the solution is the best possible.
- Q: Displayed stats (haste and mastery) do not match the ones I see in game, if Armory import is used.
A: This has been fixed for the most characters. If you still observer such behaviour - that is most likely and Armory bug, let's wait until Blizzard implements Armory XML feed again.
I have tested the tool on a dozen characters, and it always generates results close to what you would want from the EP perspective: capped stats are within 2-10 points from the cap, maximum EP stat is maximized, etc.
So, this tool can be used to provide the guaranteed to be best answer to "How should I reforge?" question, given that you are able to configure it correctly.