Author Topic: Unofficial Planeshift File Log Viewer by Kemex  (Read 2798 times)

Kemex

  • Traveller
  • *
  • Posts: 24
  • - If can be done, then i will code it -
    • View Profile
Unofficial Planeshift File Log Viewer by Kemex
« on: April 25, 2008, 04:08:45 am »
Well, as i stated here http://hydlaa.com/smf/index.php?topic=31848.msg371206#msg371206

At least! here is the most awaited Utility!!
 
PSOLV by Kemex.zip
http://www.sendspace.com/file/iuyklz

What its Included?


 PSLogViewer.jar -  The Program Itself, a Jar file.
 PSLogViewer.bat - A simple Batch Script File to Run the Program (Windows Users)
 TODO.txt  - Things to be implemented. :)

Why you didn't included a Script to run the program for Linux Users?
 By Many things.

  * Currently im using Windows Vista  :-[  (Yes i know, Vista is the :devil: ) and basically you will have to do the same as if dont provide it.
  * Most Linux Users out there already know how to execute a Java Program.
     
What it does?

    * Read your log file
    * Parse your log file
    * Backup your log file (NIY).

What is a Log File?
A Log file its a file that contains Most or all's events of application, in this case Planeshift.
So, you will able to see all your Chat, Tells, Groups, NPCS Again.. :)
It may help, to read a quest that you forgot the instructions.

Where is Located my Log File?
If you dont know what im talking about, so you dont need this utility.. :ban:
 ;D Just Kidding.. in vista is located  C:\users\yourusername\AppData\Roaming\Planeshift\logs\YourCharacter.txt
I dont know where is located in the others OS.

Key Benefits

    * It's Java Based (6), so Cross plattaform  Clap (the only thing that you will need it's the Java 6 SE Rutime as well )
    * All the benefits that you have reading a sorted Log File


The following things has been implemented

    * Tabs to Split the information (Character , Group , Tell )
    * Count the times has you logged   
   
Pending to be implemented.
   
    * Backup Log File (Formatted and Human-readable for non Linux Users)
    * Eye's Candy Gui
    * NPC's Tab Information (It's currently Appearing in the Character Tab)
    * SQLite 3 Implementation to store the logs (so to avoid log file dependence's when u load )
    * Show only the info for the selected Date/Time (Currently show all)
    * Anything that you can suggest

      How can you help me with this "project" ?
      Well, im  currently needeing the following:

          * A complete list of all's NPC's that you know in the game
          * Send me Ideas.
          * Some Motivation to Continue.. So be nice if you see me hanging around in Yliakum :)

kemexmiraz@gmail.com
« Last Edit: April 25, 2008, 04:13:45 am by Kemex »

Vornne

  • Testers
  • Hydlaa Resident
  • *
  • Posts: 189
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #1 on: April 26, 2008, 07:11:59 am »
This looks very nice :D if I was still playing the game regularly I'd use it.

A few months ago I started work on a very similar thing, but was a log viewer in game. Due to bugs in ps and getting out of my depth, I gave it up. But an idea I was going to implement, was to add a 'filter' feature to show only messages from a certain npc or character, or list of characters... and also obviously a 'find' feature ;)

Lanarel

  • Testers
  • Hydlaa Notable
  • *
  • Posts: 782
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #2 on: April 26, 2008, 08:50:42 am »
I also like it. Some comments and ideas that make it more useful (for me :) ) (you may have most of these on you hidden todo list already :)):
- I do not like the empty line between lines
- There is no indication of date now in the text
- I am guessing you want to use the list of NPC names to filter out NPC text. But how are you going to filter what the player said to the NPC? ALso, such a list would not be 100% correct, so you may want to add some other rules. FOr example, players names are only first name, so all double names are NPCs. For the others (such as Raithen), you may want to use a rule that if someone says "I do not understand" it is probably an NPC :). To avoid this, it may be a nicer idea to just mark NPCs names in the normal chat tab with a specific color
- the filename browser starting in the default location for the log files would be nice (as on windows at least it is quite hidden)

Anyway, good job!

Kemex

  • Traveller
  • *
  • Posts: 24
  • - If can be done, then i will code it -
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #3 on: April 26, 2008, 03:16:55 pm »
Thanks Guys...

Lanarel
 
- I do not like the empty line between lines
It look messy without them, but i will implement it as an option.  :)
 
- There is no indication of date now in the text
I will include it  (next release.)

- I am guessing you want to use the list of NPC names to filter out NPC text. But how are you going to filter what the player said to the NPC? ALso, such a list would not be 100% correct, so you may want to add some other rules. FOr example, players names are only first name, so all double names are NPCs. For the others (such as Raithen), you may want to use a rule that if someone says "I do not understand" it is probably an NPC Smiley. To avoid this, it may be a nicer idea to just mark NPCs names in the normal chat tab with a specific color

NPC's Tab isn't problem, since names are unique's (at least first) and i store them into a List (when program load) and i use an iterator to iterate over NPC names (find, contains, indexof). So the only "problem" is what character told to the NPC, so is a great idea about mix them in the chat tab with a different color.

- the filename browser starting in the default location for the log files would be nice (as on windows at least it is quite hidden)

Count with it.

Vornne
Good ideas, i will add such features when SQLITE3 implement  to store the Log Data. if you want to resume your work count with me. :)


Kemex

  • Traveller
  • *
  • Posts: 24
  • - If can be done, then i will code it -
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #4 on: April 26, 2008, 08:26:38 pm »
Welll, here is the new Alpha version (getting closer to beta)!!!

PSOLV by Kemex.zip
V0.3alpha
http://www.sendspace.com/file/g0ijx3

The most of things suggested in this thread where implemented. So, enjoy it!! (just 18kb)
Any new Ideas are Welcome.

Still to do:

+ Find text (next release)
+ List of the Character (Non NPC) that youve interacted (next release).
+ Messages filtered by Date (in progress)
+ Statistical Data (Dead)


Durwyn

  • Hydlaa Citizen
  • *
  • Posts: 301
    • View Profile
    • Athénée Royal Jean Rey Couvin
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #5 on: April 26, 2008, 08:54:14 pm »
 i have a question :) : why listing the npcs to the player? i thought you would use it to know if its a NPC chat or if its not.
can someone tell me if its actually permitted to list all the NPCs to a player? (ie: like it is in the program under Help)

if its, then keep it going like that! ^^
http://arjrcouvin.jimdo.com/
Athénée Royal Jean Rey Couvin

Kemex

  • Traveller
  • *
  • Posts: 24
  • - If can be done, then i will code it -
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #6 on: April 26, 2008, 09:09:38 pm »
Really i put that for info only.. i didnt use that for my "guess NPC algorithm".
Since this is an unnoficcial app (not PS Game dev related), i thinks shouldnt be a problem for planeshift community. Also if where a problem, all NPC's in PS Game are clearly stated with different Label Color(cyan)  and this App doesnt reveal NPC Location.
« Last Edit: April 26, 2008, 09:11:46 pm by Kemex »

Vornne

  • Testers
  • Hydlaa Resident
  • *
  • Posts: 189
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #7 on: April 27, 2008, 07:22:16 am »
I tried the latest version, all my log files load fine but one... my main, about 7MB in size (all the others are less than 500KB). The boxes all stay black, no text appears... most likely it's still loading, or out of memory:

Code: [Select]
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 2
        at kemex.miraz.ui.PSLogViewerUI.appendChar(PSLogViewerUI.java:745)
        at kemex.miraz.ui.PSLogViewerUI.readLogFile(PSLogViewerUI.java:697)
        at kemex.miraz.ui.PSLogViewerUI.loadLogFile(PSLogViewerUI.java:459)
        at kemex.miraz.ui.PSLogViewerUI.jButton1ActionPerformed(PSLogViewerUI.java:502)
        at kemex.miraz.ui.PSLogViewerUI.access$200(PSLogViewerUI.java:29)
        at kemex.miraz.ui.PSLogViewerUI$2.actionPerformed(PSLogViewerUI.java:144)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.Component.processMouseEvent(Component.java:6041)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5806)
        at java.awt.Container.processEvent(Container.java:2058)
        at java.awt.Component.dispatchEventImpl(Component.java:4413)
        at java.awt.Container.dispatchEventImpl(Container.java:2116)
        at java.awt.Component.dispatchEvent(Component.java:4243)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
        at java.awt.Container.dispatchEventImpl(Container.java:2102)
        at java.awt.Window.dispatchEventImpl(Window.java:2440)
        at java.awt.Component.dispatchEvent(Component.java:4243)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

It may be that I need to assign more memory to my java process? By the way, this is exactly the problem I ran into, I made an in game log viewer that worked fine for small files, it loaded it all at once... but that is not a good idea when you are talking about the 20MB log file of a veteran player ;) Loading it in small parts, and splitting it into lines correctly, and getting the scroll bar working turned out very difficult for me to code only using crystal space.

But you should have no problems, I imagine you can do it all with java even if that's the problem here...

saladasalad

  • Hydlaa Resident
  • *
  • Posts: 96
    • View Profile
    • Vivada - Band / Blog / Good People
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #8 on: April 27, 2008, 08:43:33 am »
Just thought I'd point out that in Linux at least, there is no way to navigate to the directory (/home/user/.PlaneShift) where the logs are stored. As I'm sure you would concede, this is a major flaw ;) Still, great idea. Hope you continue with it :)
Artisian Hooke  -  Guild Elder in The Organisation.
Alumolo Genare.
Divire Dighur.
--------------------------------------------------------------------
Vivada - Band / Blog / Good People

Kemex

  • Traveller
  • *
  • Posts: 24
  • - If can be done, then i will code it -
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #9 on: April 27, 2008, 09:20:01 am »
I have some theories about your problem Vornne (also your memory included). but my main theory is not about memory.. hope fixes into the next release.
ah, no more load wait... next Release, i will implement Threads.

About Linux.. you can do an soft Link to you log file and put it in a place where the program can read the log file.
from a command shell:

ln -s .Planeshift/log/yourchar.log     $HOME

thanks guys.

Vornne

  • Testers
  • Hydlaa Resident
  • *
  • Posts: 189
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #10 on: April 28, 2008, 06:51:56 am »
Or, you can go to your home directory, type ".PlaneShift" and press enter ;)

But most likely in time something easier will be figured out.

Beniel

  • Hydlaa Resident
  • *
  • Posts: 132
    • View Profile
Re: Unofficial Planeshift File Log Viewer by Kemex
« Reply #11 on: May 25, 2008, 11:05:39 am »
Well this is just plain brilliant Kemex. Good work!