PDA

View Full Version : My scratchpad



Celephais
06-11-2008, 05:39 PM
I needed a thread to be able to upload something... figure a member journal is good enough.

Vulva, attached is a quick exe I threw together as requested... you'll need the .NET framework 2.0 installed (you likely already have this, if not.. https://www.microsoft.com/downloads/details.aspx?FamilyID=0856EACB-4362-4B0D-8EDD-AAB15C5E04F5&displaylang=en).

I didn't bother with a UI or anything fancy like an installer... just drag all your log files onto the exe and it'll spit out a csv file. Columns are:
Endroll, Target, Sonic Disruption damage, ... Damage, Crit message.

I just tossed it together quick, but if I get a minute I'll throw in some multi-threading to speed it up, and a progress UI.

radamanthys
06-11-2008, 08:57 PM
As long as this is a member journal, you're opening yourself up for all sorts of personal shit. Here goes my issues with you:


Honestly, I don't think I've ever seen you on the low end of an argument, and I've been around here for a long while (four years now?). Take a ratio of active people on PC and issues/arguments, and you're doing quite well. You're quick to help out, and certainly helped me out of a jam a bit back. Plus, your sig rocks.

Blankly: you're good shit, dude. Thanks for being around.

No reply necessary, just figured I'd say it. Sometimes I feel like giving random props to people I think are good shit, and deserve it. Go about your business.

TheEschaton
06-11-2008, 09:24 PM
I admit, I sometimes confuse Clove for Celephais. I don't know why, either.

Celephais
06-11-2008, 10:38 PM
Go about your business.

Aww thanks, warm fuzzies. Basically I go for low hanging fruit when it comes to arguments, no point in banging your head against the wll on the internet... low blows are also hillarious


I admit, I sometimes confuse Clove for Celephais. I don't know why, either.
I think that's because we're both awesome... take a count of people who've been nominated for thread winner in various threads, and I bet clove, myself and methais would be compose the top three... you know, no big deal...

Danical
06-12-2008, 12:23 PM
Awesome. I'll give a look at it when I get home from work.

Thank you!

Celephais
06-23-2008, 10:55 PM
Update for you Vulva, this one uses .NET 3.5 though... so you may need an upgrade.

For anyone who knows how to write a RegEx, it takes a RegEx input and parses your GS log files, feel free to use this to parse any of your log data (things like stealing, etc can be parsed out).

<File Removed; Updated later in the thread..>

Stanley Burrell
06-23-2008, 11:41 PM
Celephais was my best friend forever carved in a tree, but the C&H sig is broken, so I cannot make holy sacrifice to thine sculpted weatherveins or Gomez the Frog God. Sorry.

Stanley Burrell
06-24-2008, 07:35 AM
Sweet.

Danical
07-23-2008, 07:35 PM
I get this error when trying to run it :( :( :(

************** Exception Text **************
System.IO.FileNotFoundException: Could not load file or assembly 'System.Threading, Version=1.0.3058.34407, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
File name: 'System.Threading, Version=1.0.3058.34407, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at GSParser.frmParser.Parse()
at GSParser.frmParser.frmParser_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].



************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3031 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
GSParser
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Documents%20and%20Settings/daniel_lamoree/Desktop/GSParser.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3031 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3031 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3031 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

Celephais
07-23-2008, 11:41 PM
Sorry about that, Parallel extensions library... I attached a dll, just drag it into your C:\Windows\Assembly folder.

Celephais
07-23-2008, 11:44 PM
If anyone cares for the source... it's a very simple program for running RegEx against log files. Feel free:

Danical
07-24-2008, 03:20 AM
It's not working for me . . .

The parse out excel file just has the variable names at the top with no numbers :(

Did I break it?

http://estrip.org/elmwood/users/theecarey/images/0507/NsGrandmasBoy20528.jpg

Celephais
07-24-2008, 09:56 PM
Huh, send me a log... if you're getting the excel file out it's likely just an issue w/ the regex..

Sean
07-24-2008, 10:18 PM
It's not working for me . . .

The parse out excel file just has the variable names at the top with no numbers :(

Did I break it?

http://estrip.org/elmwood/users/theecarey/images/0507/NsGrandmasBoy20528.jpg

I have no idea but I have word from a solid source that you have a nice racecar bed and that your mom caught me jerking off to your action figures.

Danical
07-25-2008, 04:57 AM
I have no idea but I have word from a solid source that you have a nice racecar bed and that your mom caught me jerking off to your action figures.

You just made my day . . .

http://kreations.kaptainmyke.com/cp/cpimg/headers/gcarbed.png

Danical
07-25-2008, 04:59 AM
Huh, send me a log... if you're getting the excel file out it's likely just an issue w/ the regex..

I . . . uh, don't have 3.5 on my home computer so lemme update.

Celephais
07-29-2008, 06:38 PM
By the log I meant your game log... and yeah the excel file should have all of the found attacks for you.

Danical
07-29-2008, 06:39 PM
[boom]>incant 1030

Your disk arrives, following you dutifully.
You change your tune slightly, adding the element for Song of Sonic Disruption to your song...
Your spellsong is ready.
You weave another verse into your harmony, directing the sound of your voice at a triton radical.
The dull golden nimbus surrounding a triton radical suddenly begins to glow brightly.
CS: +522 - TD: +370 + CvA: +25 + d100: +12 == +189
Warding failed!
A triton radical reels under the force of the sonic vibrations!
Sound waves disrupt for 91 damage!
... 80 points of damage!
The triton radical's neck explodes launching her head into the air.
The triton radical gurgles once and goes still, a wrathful look on her face.
A white glow rushes away from a triton radical.
The dull golden nimbus fades from around a triton radical.

Celephais
07-31-2008, 08:33 AM
I copied that text into notepad, saved it, and then downloaded the exe, dragged the txt file onto the exp and the csv file it created had all the data. I also opened the exe, clicked parse, selected the text file and the csv it created that time was fine too.

Is it possible there is something changing in the formatting of the text when you post it on the forums vs in your log files? Zip one of your log files up (the entire file) and then attach it to a post... I'll try this on a few other computers when I get a chance today.

Danical
07-31-2008, 01:54 PM
huh, I did the exact same thing and it worked but not with my log files . . .

I'll check to see what the deal is.

Stanley Burrell
07-31-2008, 03:58 PM
I copied that text into notepad, saved it, and then downloaded the exe, dragged the txt file onto the exp and the csv file it created had all the data. I also opened the exe, clicked parse, selected the text file and the csv it created that time was fine too.

Is it possible there is something changing in the formatting of the text when you post it on the forums vs in your log files? Zip one of your log files up (the entire file) and then attach it to a post... I'll try this on a few other computers when I get a chance today.

If you do not invite me over so that I can drink your beer and laugh at your bronze frog, the children will cry.

Peace, love & happiness,

- 'Jamin of Kellenjamin. Unstoppable alliance.

BigWorm
07-31-2008, 04:13 PM
If you do not invite me over so that I can drink your beer and laugh at your bronze frog, the children will cry.

Peace, love & happiness,

- 'Jamin of Kellenjamin. Unstoppable alliance.

Hmm. Your ideas are intriguing to me and I wish to subscribe to your newsletter.

Danical
07-31-2008, 04:55 PM
Alright, so I tried with my actual log and it doesn't work . . .

I'll add it to a zip when I get the chance.

Celephais
07-31-2008, 07:46 PM
huh, I did the exact same thing and it worked but not with my log files . . .

I'll check to see what the deal is.
phew, I'm not crazy... Are there spaces that indent the text there? That's probably what's causing it... you want to add (without quotes) " *" that's space star, to the beginning of the lines that can have spaces. Then run it from the UI... if that works I'll add it to the default so that you can just drag the logs onto the exe.

Danical
08-01-2008, 12:25 PM
HOLY FUCKING SHIT!

RADSTICKS!

oh, it worked.

Celephais
08-01-2008, 06:36 PM
HOLY FUCKING SHIT!

RADSTICKS!

oh, it worked.
Sweet, so it was the formatting on the boards... I don't know which lines you needed the space star infront of so instead I just made the program use a file for the regex... if the file doesn't exist it uses the original regex. So just open the new exe, add the space star crap, click the "Save RegEx" button and then whenever you open the exe again or drag log files onto the exe it'll use the new RegEx... this will also make adding things like parsing for not just that spell trivial.

AestheticDeath
08-01-2008, 06:45 PM
You know how to make a program to delete duplicate lines? :P

I found all of one online and its shareware for $20, call me cheap..

Celephais
08-01-2008, 06:56 PM
You know how to make a program to delete duplicate lines? :P

I found all of one online and its shareware for $20, call me cheap..
Duplicate lines... from what? Just from a txt file?

Vulva, after you get the new exe... try putting this file in the location of the exe and then running it against your logs (just an example of what the RegEx can do)

AestheticDeath
08-01-2008, 07:00 PM
Duplicate lines... from what? Just from a txt file?

yeah

Celephais
08-02-2008, 01:33 PM
yeah
I'm confused by what you mean, do you mean duplicates in a row? Or throughout the document. ...

If your document has:

A
A
B
A
B
C
C
D
A Do you want option 1:

A
B
C
D Or option 2:

A
B
A
B
C
D
A
Sounds like pretty simple code though...
Here, I whipped this up, certainly not enterprise level or anything, has a radio button to switch between which option you want... it doesn't support dragging/dropping the files onto the exe, but it does support selecting multiple files... and it saves the changes directly back to the same file, so make sure you're working w/ a copy of the files first. You need .NET framework 3.5 installed, but you don't need that parallel extensions library dll in your assembly folder.

If you want any other features, let me know...

Celephais
08-02-2008, 03:40 PM
A (long) while ago someone asked me about making a pickpocket log analyzer like Wezas' old one. While I never got around to doing that, this GSParser can be used as a basic pickpocket analyzer, turning your logs into a comma delimited file (that you can open in excel) and then use Excel's built in formatting to get the visualization you need.

I don't have a pickpocket character, so I don't have all the messages, but the attached RegEx, used with the exe attached previously will take something like the following from your logs:

You couldn't find anything worth taking. Maybe you should offer Chump a donation instead.
>
You reach into Chump's climbing pack and pull out some acantha leaf.
>
You reach into Chumpette's leather gem pouch and pull out a green zircon.
>
You reach into Chumpette's leather gem pouch and pull out a medium grey pearl.
>
You reach into Chump's pockets and pull out 252 silvers.
>
You reach into Chumpiest's heavy silk pack and pull out an iron wand. Would generate a spreadsheet like so:
http://i169.photobucket.com/albums/u222/GuinnessKMF/Pickpocket.jpg

If someone wants to tell me some of the other messages (can't get closer, when you get caught, when someone other than the target catches you) I'll update the RegEx so that it'll add those to the csv file as well.

AestheticDeath
08-02-2008, 04:14 PM
option 1, basically if you have a long list of items throughout a document

a,a,a,a,a,a,b,b,b,b,b,c,c,c,c,c,c,c,d,f,d,f,d,f,f, d,f,d,f,b,c,d,c,a,d

you come out with

a, b, c, d, f

ill try that one out

Audriana
08-19-2008, 04:05 AM
Thank you thank you thank you for that parser. It gets me the data I was looking for and it's crazy fast. It doesn't like the crit: Loud *crack* as the critter's sternum breaks!, but other than that works awesome.

I've parsed 37 levels worth of logs for archery. Tomorrow I hope to do my locksmithing logs... Very cool!

Danical
08-19-2008, 04:07 AM
You'll need to put a

\

before the *s . . . I think.

Audriana
08-19-2008, 10:53 AM
Well... this one got "Loud" which I figured out was "Loud *Crack*"... etc.


You nock a(n)? [A-Z,a-z, ,0-9,\,,-,\'] in your (?<Bow>[A-Z,a-z, ,0-9,\,,-,\']+).
You fire a(n)? (?<Weapon>[A-Z,a-z, ,0-9,\,,-,\']+) at (a(n)?)? (?<Target>[A-Z,a-z, ,0-9,\,,-,\']+)!
*AS: (\+|-)[0-9]+ vs DS: (\+|-)[0-9]+ with AvD: (\+|-)[0-9]+ \+ d100 roll: \+[0-9]+ = \+(?<Roll>[0-9]+)
*\.\.\. and hit for (?<MeleeDamage>[0-9]+) points of damage!
*(?<Crit>[A-Z,a-z, ,0-9,\,,-,\'\.\!]+)But then I wanted to grab where I was aiming at the time (and going to pull skills and level next since my AS fluxuates so much), so I added another line:

(* You're now aiming at the (?<Aiming>[A-Z,a-z, ,0-9,\,,-,\']+) of your target when using a ranged weapon, or while ambushing.
)(* You nock a(n)? [A-Z,a-z, ,0-9,\,,-,\'] in your (?<Bow>[A-Z,a-z, ,0-9,\,,-,\']+).
You fire a(n)? (?<Weapon>[A-Z,a-z, ,0-9,\,,-,\']+) at (a(n)?)? (?<Target>[A-Z,a-z, ,0-9,\,,-,\']+)!
*AS: (\+|-)[0-9]+ vs DS: (\+|-)[0-9]+ with AvD: (\+|-)[0-9]+ \+ d100 roll: \+[0-9]+ = \+(?<Roll>[0-9]+)
*\.\.\. and hit for (?<MeleeDamage>[0-9]+) points of damage!
*(?<Crit>[A-Z,a-z, ,0-9,\,,-,\'\.\!]+)[/
)That's when it stopped working...

Celephais
08-19-2008, 06:58 PM
To fix, change:

?<Crit>[A-Z,a-z, ,0-9,\,,-,\'\.\!]+ to

?<Crit>[A-Z,a-z, ,0-9,\,,-,\'\.\!\*]+
Basically just add \* inside of the brackets.

Oh and thank you for the complements, always helps to know it's appreciated.

Audriana
08-19-2008, 07:00 PM
Okay... so the things in the commas are what it can have in it?

It can have upper, lower, spaces, numbers, commas, dashes, single quotes, dots, exclamations, or asterisks?

Just so I can understand it a bit more...

Wouldn't it be then
[A-Z,a-z, ,0-9,\,,-,\.,\!,\*] with commas between em all?

Celephais
08-19-2008, 11:29 PM
It looks like you just removed the single quotes (which is important for things like: "rips a hole in the rat's head".

The ?<Crit> is a named backreference (I think that's what it's called), basically ?<Name> says the next section is a column in the excel output.

The bracket means "select any single character in this set", so the bracket means, any single uppercase/lowercase/space/number/etc, then the plus means "one or more of the last thing", so you kind of read things backward:
Select one or more of any single character that is Uppercase, or lowercase, or a space or a number etc, and name it "Crit".

This is all standard RegEx (which can be very complicated to figure out sometimes...) so any RegEx tutorials you find can help you figure out how to write more complicated parses. If you need any specific tips, feel free to ask.

Audriana
08-20-2008, 12:06 AM
Thanks; I figured it was some standard that I wasn't privy to. I'll look it up myself from here on out ><.

(you rock)

Celephais
08-20-2008, 12:11 AM
No need to not leverage a resource when it's available, I'm more than willing to give you a hand w/ any RegExs (just list the text you want to match and what info you want to pull out).

I'm also willing to write one-off apps for this sort of thing if you find yourself limited in some respect and there is some info you want to see put together better, this parser application was created to be very generic.

Drisco
08-20-2008, 12:07 PM
A (long) while ago someone asked me about making a pickpocket log analyzer like Wezas' old one. While I never got around to doing that, this GSParser can be used as a basic pickpocket analyzer, turning your logs into a comma delimited file (that you can open in excel) and then use Excel's built in formatting to get the visualization you need.

I don't have a pickpocket character, so I don't have all the messages, but the attached RegEx, used with the exe attached previously will take something like the following from your logs:

You couldn't find anything worth taking. Maybe you should offer Chump a donation instead.
>
You reach into Chump's climbing pack and pull out some acantha leaf.
>
You reach into Chumpette's leather gem pouch and pull out a green zircon.
>
You reach into Chumpette's leather gem pouch and pull out a medium grey pearl.
>
You reach into Chump's pockets and pull out 252 silvers.
>
You reach into Chumpiest's heavy silk pack and pull out an iron wand. Would generate a spreadsheet like so:
http://i169.photobucket.com/albums/u222/GuinnessKMF/Pickpocket.jpg

If someone wants to tell me some of the other messages (can't get closer, when you get caught, when someone other than the target catches you) I'll update the RegEx so that it'll add those to the csv file as well.



Twas me! <3 ( I stopped playing tho :P)

Audriana
08-20-2008, 12:24 PM
Well I think I got it, but what I really wanted was for it to pull out the start of a new log, my level (I type skills and skill base a lot, not sure why - just habit), Ambush, Ranged Weapons, and Perception skills, where I happen to be aiming at the time (changes often), The arrow I used for any strike, the target of the strike, the bow I used, my AS, targets DS, AvD, Final, Damage, Critical...

For other things I wanted to pull out the start of a new log, ranged weapons skill, level, any strikes that hit me, the critter that me, the weapon, the damage, the critical, and any stuns I received, armor I was wearing at the time, strikes I dodged or parried...

For others I wanted to pull the start of a new log, all boxes I've picked, the name of the box, the client, my level, the client's fame if I checked it, my lockpicking, disarming and perception skills, the lockpick I used, if it was picked or not, the roll I got, the difficulty of the lock, and the RT I received, when I put on and take off lores...


Out of the 1st one, I think I got most of it already so I should be alright. I had some issues with the skills, and even now they're... a little off... but for the most part I think I have my 25000 records.

The other two I haven't started on yet, but I think I got a good idea of how to do all that HEH. Once I get all of that, I'll just run the new logs each week and keep a good record of all that...

Just with what I've got so far I've been able to figure out my general accuracy with aiming a bow on certain critters. It's pretty nifty seeing my accuracy rise slowly.

Celephais
08-29-2008, 07:15 PM
Thanks for the post ....i had a good upt at this time
Fucking spammer in my scratchpad... MY SCRATCHPAD!!! This is personal now.

Celephais
08-04-2009, 12:17 PM
Make some GIFs! Should open most video formats, if you have a DVD you'll need to rip it to something like an AVI or MP4.

It's relatively crude from a UI prespective, actually even the output is kind of crude, the GIFs end up kind of large, I'll look into fixing that.
http://i1009.photobucket.com/albums/af213/GuinnessKMF2/GIFMaker.png

It doesn't have a "browse" you have to type in the name of the file, you don't need to click open, but if you do it'll give you a preview, go to the frame you want (first textbox "1058800" is the frame in milliseconds, or use the slider). The second textbox is the number of frames to grab (10ths of a second, so 10 is one second). The next two textboxes are the size to grab, after clicking open it'll auto-fill with the default size, I'd try to stick with the same aspect ratio. Click capture and it'll create a gif named the same as your video file except .gif ... if you capture a single frame it'll create a .png

The Output tab will show you the frames it used to make the gif so you can tweak it a bit easier.
http://i1009.photobucket.com/albums/af213/GuinnessKMF2/GIFMakerOutput.png

http://i1009.photobucket.com/albums/af213/GuinnessKMF2/Sword.gif

It requires .NET 3.5 SP1, if you don't have it you can install it from here:
http://www.microsoft.com/downloads/details.aspx?familyid=AB99342F-5D1A-413D-8319-81DA479AB0D7&displaylang=en

Celephais
08-06-2009, 12:27 AM
http://i1009.photobucket.com/albums/af213/GuinnessKMF2/GIFMakerUpdate-1.png

Updated w/ cropping, speed modifier better resizing, and more reliable.
This is half speed (the 1.0 changed to 0.5) ... you can see it's cut before the lightsaber hits:
http://i1009.photobucket.com/albums/af213/GuinnessKMF2/Chop.gif