This project is read-only.

Export 'Relative Stat Values'

Topics: Retired
Nov 30, 2008 at 10:56 AM
Is there some way to export the 'Relative Stat Values'?
I want to use them in game whit pawn, and also whit other gear comparison tools.
But right now i have to copy it by hand, can't even select the text whit the mouse :-(

If it isn't, are there going to be? or in what source file could i try to add this?
Nov 30, 2008 at 3:07 PM
Personally I do what you just said, copy them by hand. It doesnt take so much time to do.
Nov 30, 2008 at 4:39 PM
No plans at the moment to add any text output for charts, sorry.
Dec 2, 2008 at 11:59 PM
I think i fixed it my self now, if someone else is intrested, this is the diff list of the main changes (dame tool did alot of other changes to the code to)

diff -r org/FormMain.cs new/FormMain.cs
>         private void copyRelativeStatsValuesToClipboardToolStripMenuItem_Click(object sender, EventArgs e)
>         {
>             StringBuilder sb = new StringBuilder();
>             sb.AppendLine(Calculations.GetCharacterRStatsString(Character));
>             Clipboard.SetText(sb.ToString(), TextDataFormat.Text);
>             if (Type.GetType("Mono.Runtime") != null)
>             {
>                 //Clipboard isn't working
>                 System.IO.File.WriteAllText("rstats.txt", sb.ToString());
>             }
>         }
diff -r org/FormMain.Designer.cs new/FormMain.Designer.cs
>             this.copyRelativeStatsValuesToClipboardToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
>             //
>             // copyRelativeStatsValuesToClipboardToolStripMenuItem
>             //
>             this.copyRelativeStatsValuesToClipboardToolStripMenuItem.Name = "copyRelativeStatsValuesToClipboardToolStripMenuItem";
>             this.copyRelativeStatsValuesToClipboardToolStripMenuItem.Size = new System.Drawing.Size(322, 22);
>             this.copyRelativeStatsValuesToClipboardToolStripMenuItem.Text = "Copy Relative Stats Values to Clipboard";
>             this.copyRelativeStatsValuesToClipboardToolStripMenuItem.Click += new System.EventHandler(this.copyRelativeStatsValuesToClipboardToolStripMenuItem_Click);
>         private System.Windows.Forms.ToolStripMenuItem copyRelativeStatsValuesToClipboardToolStripMenuItem;
diff -r org/Rawr.Base/Calculations.cs new/Rawr.Base/Calculations.cs
>         public static string GetCharacterRStatsString(Character character)
>         {
>             return Instance.GetCharacterRStatsString(character);
>         }
>         public virtual string GetCharacterRStatsString(Character character)
>         {
>             StringBuilder stats = new StringBuilder();
>             stats.AppendFormat("Character:\t\t{0}", character.Name);
>             foreach (ComparisonCalculationBase ccb in GetCustomChartData(character, "Relative Stat Values"))
>             {
>                 stats.AppendFormat("\r\n{0}:\t\t{1}", ccb.Name, ccb.OverallPoints);
>             }
>             return stats.ToString();
>         }

Dec 3, 2008 at 3:55 PM
I'd find this super useful, too. Any chance that patch (or something close) will get rolled into mainline?
Dec 3, 2008 at 5:56 PM
Something like that is planned, yes. (As well as an image export)

For the text output, I'm thinking item ID, item Name, overall rating, maybe source, and the subratings, as a CSV. Is that what people would want? I really don't want to have this blossom into some huge data dump functionality or something.
Dec 3, 2008 at 7:31 PM
That's not exactly what I'm looking for (or what I think the OP was looking for). Your proposed CSV dumps ratings for *items*, whereas we're looking for ratings on *stats*. (1 stam is worth X much, 1 int is worth Y much, etc.) Part of the issue is that it seems there's no unified framework for that in Rawr, instead each module implements (or doesn't implement it) on their own.

And just to be clear, I get that simple stat values can't capture all the subtleties, it depends on the gear you have, etc. But it's a good approximation for use in game where there is no Rawr addon. :)
Dec 3, 2008 at 7:37 PM
I meant anything that shows up in the charts, not just items specifically (they're all considered 'items' to the chart, but you wouldn't know that, sorry). That would cover what you're looking for.
Dec 3, 2008 at 8:31 PM
In case it helps set some context for the original request:

Pawn is a (very nicely done) addon that computes overall item scores using user-provided stat weights and displays the totals in the item tooltips.  Users can provide 1 or more sets of scales (ie., strength = 1; int = 2; stam = 1.5; etc).  It's a fair guess that there's a decent overlap between Rawr users and Pawn users.

It already has a facility to import stat weights via a specifically formatted text string.  It would be a very nice touch if Rawr could make this string available to copy, or just directly put it onto the clipboard.  I'm not sure if the code above does this.

So, for this specific request, providing a generic CSV output would probably not be any more helpful than just manually copying over the weights.

While I agree this would be one of those smile-inducing, extra polish, nice touches, I also haven't found it much of a hardship to retype the stat weights.

Dec 3, 2008 at 8:57 PM
Edited Dec 3, 2008 at 9:16 PM
as brucek2 says, CSV is junk for me, i want it for PAWN,

the code above just dump the relative stats, one per row, in the format
<stat name> : <tab> <tab> <non normailzed value> <newline>

to get a output that can be inserted directly to pawn, someone need to make a
rawr to pawn stat name table, and some option dialog for name of the
scale, and what value to normalize to.

and my skills in c# or what the code was writen in dosn't cover that,
so i made a php-code that can read the east output i was able to make,
and the php code normalize and translates it to pawn, the way i want

is there someone whit c# skills and knowledge of pawn, that can finish
what i started?

(i tried to email this reply, but it didn't work, hope it dosn't get posted twise now)

For you who want to try it, i put the files at:

rawr_src_whit_rstat_dump.7z is the complete source code (24843) whit above code added
rawr_exe_whit_rstat_dump.7z is the exe file of above code (for you that trust me, and don't want to compile your own.)

Dec 3, 2008 at 10:13 PM
Obviously a string that you could import directly into pawn would be the most smile-inducing. ;) But there are other tools that take stat weights in other formats; wowhead and thottbot come to mind. CSV has flexibility in that you could add some spreadsheet goo on top to turn it into whatever string format you wanted, and it keeps Rawr out of the business of trying to support every format under the sun.

My issue (which could just be a noob issue) is that I don't think the stat weights even *exist* for all modules, i.e. it's not a standard chart. If it is, please let me know that I'm being dumb.
Dec 3, 2008 at 10:39 PM
Ok, so the first step should be to standalize the Relative stats chart, almost all got one, but the name isn't the same

Relative Stat Values

Stat Relative Weights, Stat Values

Item Budget, Stats (Item Budget)

Dec 3, 2008 at 11:23 PM
Aye, quite true, and we're working on that.