Server Totals
Elysia - (2)
Deglos - (1)
Le'Or - (0)
Ferrell - (0)
M'Chek - (0)
Mikona - (0)
Wilderness - (0)
Visimontium - (0)
Underdark - (0)
Total players: 3
Gallery
  • Forge of DruEl
    Album name: DM Events
    Uploaded by: Brayon
    Uploaded: Tue Mar 17, 2015 9:23 am

Links Menu

parselog.lua : A NWN Log to HTML Convertor

General discussion about Avlis

Moderators: Nighthawk4, Dungeon Masters

parselog.lua : A NWN Log to HTML Convertor

PostAuthor: izyk » Fri Mar 14, 2003 7:06 am

*edited sat August 16th, 2003 because I moved the files *
* edited Thu November 11th, 2003 to include changes by Marcelo Resegue *

A NWN Log to HTML Convertor

I promised this in another thread, so here it is. This is the script I use to preserve and format my Neverwinter Nights log files. I spent way to much damn time on this today :->

--
If you have no idea what I am talking about,
skip to the bottom of this message and read
the section labelled "LOGGING YOUR CONVERSATION"
--

Basically, when you run the script it reads in the last log session and reformats it in HTML. An example of the output can be seen at the following url

http://www.izyk.net/avlis/parseLog/example_log.html

You will need to download this zip file below and extract it into your main NWN directory (wherever you keep nwnmain.exe).

http://www.izyk.net/avlis/parseLog/parselog.zip

DESCRIPTION

There are two files involved, parselog.lua, and lua.exe. Lua is the script interpreter and the other file is the actual script. You can read more about Lua at http://www.lua.org. To run the script all you have to do is type the following from the command line :

Code: Select all
lua parselog.lua


The output from this command will be a file named 14Mar2003_01.38.59.html - which is nothing more than the time that the script ran at. I needed something unique, that seems to do the trick.

Personally, I run a batch file. The batch file has two lines in it, which run my log parser and also starts NWN logging on straight to Mikona :

Code: Select all
  lua parselog.lua
  nwmain.exe +connect avlis.blackdagger.net:5121 +password ***********


Obviously you will want to replace the asterixes with the Mikona password.

Heh - if you like it cool. If you dont, make your own! I am nothing more than a hack, and unworthy to even look upon a real programmer. But this just makes my life easier.

Thanks
Isaac Guenard
aka Zachar

LOGGING YOUR CONVERSATIONS
The Neverwinter Nights game engine can be configured to log everything you and other characters say while you play. This is particularily useful when playing on a persistant world, like Avlis - the world I play in. The game is not configured to write a log by default - you will have to modify one of your INI configurations files.

Locate the file nwnplayer.ini in your Neverwinter Nights game directory (mine was at C:\NeverwinterNights\NWN\nwnplayer.ini) and open it with a text editor, like notepad.exe. Do not open it with a word processor such as word, these are not plain text editors. Locate the section labeled [Game Options], and add the line ClientChatLogging=1.

It should look like this :

Code: Select all
[Game Options]
ClientChatLogging=1


You may need to add this line if it is not already there.


-----------------------------------------------------------------
REVISIONS
v1.01 - March 28th, 2003
[changes by Isaac Guenard / Zachar]
modified to allow the use of the : character in conversation
old version available at
http://www.izyk.net/avlis/parseLog/parseLog_v1.01.lua

v1.02 - July 30th, 2004
[changes by Marcelo Resegue / Drysh]
added the player name after the character name to identify PCs and NPCs;
added color coding for "Whisper", "Tell", "Party" and "Shout"
fixed bug that kept last lines in log out of output
[/url]
Last edited by izyk on Thu Nov 11, 2004 4:16 pm, edited 2 times in total.
User avatar
izyk
Scholar of Fools
 
Posts: 413
Joined: Thu Jan 23, 2003 4:21 am
Location: Toronto.

PostAuthor: Starslayer_D » Fri Mar 14, 2003 8:21 am

I remember the event logged there. About the single biggest party catastrophe I was responsible for in wich I didn't die.

(Note: Never open elemental pack on a whim and dare when half your party is under lvl 7)

Starslayer_D
Master Sage
 
Posts: 5182
Joined: Thu Oct 24, 2002 7:35 pm
Location: Germany (+1 GMT)

PostAuthor: JollyOrc » Fri Mar 14, 2003 8:41 am

Starslayer_D wrote:I remember the event logged there. About the single biggest party catastrophe I was responsible for in wich I didn't die.

(Note: Never open elemental pack on a whim and dare when half your party is under lvl 7)


*grin* you seem to have bad karma with these elemental packs... ;-)
User avatar
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1

PostAuthor: izyk » Fri Mar 14, 2003 4:44 pm

Starslayer_D wrote:I remember the event logged there. About the single biggest party catastrophe I was responsible for in wich I didn't die.

(Note: Never open elemental pack on a whim and dare when half your party is under lvl 7)



Ack. So it is. I remember that fight well. I was certain that a DM was involved because I mean, WOW, Elder Earth Elementals usually hang out a little farther from the mine entrance.

I kept waiting for the DM to step in and show us the way to defeating these grossly overpowered creatures. Finally I just wondered why the DM hated us so badly.

Heh. When I finally realized someone in our party was responsible for this...heh! Great fun - I had a blast that night. One of the many reasons I tend to hang on to log files.

Thanks
Isaac Guenard
User avatar
izyk
Scholar of Fools
 
Posts: 413
Joined: Thu Jan 23, 2003 4:21 am
Location: Toronto.

Update Announcement

PostAuthor: izyk » Mon Apr 28, 2003 8:38 pm

I updated the parselog.lua script I use for reformatting my log files. The previous version would strip the remaining text on the line if it encoutered the ":" character in the dialog.

If you are using the log convertor I suggest you update.

You will need to download this zip file below and extract it into your main NWN directory (wherever you keep nwnmain.exe).

http://www.izyk.net/nwn/parselog.zip

See the first post in this thread for details on the parselog.lua script and its use.
Zachar Mordecai
Right and Proper Society of the Iron Mantis
( aka Izyk G )
User avatar
izyk
Scholar of Fools
 
Posts: 413
Joined: Thu Jan 23, 2003 4:21 am
Location: Toronto.

PostAuthor: JollyOrc » Mon Apr 28, 2003 8:44 pm

thanks man !

It really hurt to loose these bits behind the ":", Janur's using them all the time
User avatar
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1

PostAuthor: Liartes » Tue Apr 29, 2003 1:20 am

Half the time it doesn't parse the log file. When I first started using it, I didn't check to see if it actually parsed, and I lost a few very good IC events to the ravages of time and memory. Now I'm sure to check every time I use it. When it does work, it's great. Makes it so much easier to read.

Anyone else getting a 50/50 on successful parses?
User avatar
Liartes
Sage
 
Posts: 2154
Joined: Mon Feb 24, 2003 6:19 am
Location: Arizona, USA (GMT -7)

PostAuthor: Scurvy_Platypus » Tue Apr 29, 2003 1:26 am

Actually, I'm lower than 50%. Haven't figured out what the factor is that keeps changing. So I parse it, and if it doesn't work then I do a copy, and rename the log. <shrug> I'm still gratefull for having the tool. Thaks Izyk!!
User avatar
Scurvy_Platypus
Scholar
 
Posts: 1212
Joined: Mon Feb 17, 2003 12:12 am
Location: Princeton, NJ. USA (GMT -5)

PostAuthor: izyk » Tue Apr 29, 2003 1:33 am

Now we have a thing in software production I like to call a bug report....

Cause when I know about bugs, i can fix em. If you could send me a copy of a clog that fails to izyk@izyk.net, I would appreciate it.
Zachar Mordecai
Right and Proper Society of the Iron Mantis
( aka Izyk G )
User avatar
izyk
Scholar of Fools
 
Posts: 413
Joined: Thu Jan 23, 2003 4:21 am
Location: Toronto.

PostAuthor: Scurvy_Platypus » Tue Apr 29, 2003 1:44 am

*Scurvy_Platypus taps his chin thoughtfully*
*Scurvy_Platypus appears to be thinking of something*
*Thinking: Now...if I give my logs....then he tests them...reads the output to be sure it went through....*
/ooc Hey! You're just trying to fool us so you can get ooc info, aren't you?!?! :shock: Very clever you blue skinned little bastard!!!

lol, couldn't resist. :) I'll be sending a couple of them to you tonight.
User avatar
Scurvy_Platypus
Scholar
 
Posts: 1212
Joined: Mon Feb 17, 2003 12:12 am
Location: Princeton, NJ. USA (GMT -5)

PostAuthor: Liartes » Tue Apr 29, 2003 3:42 am

I'll send you all 30 or so :wink:
User avatar
Liartes
Sage
 
Posts: 2154
Joined: Mon Feb 24, 2003 6:19 am
Location: Arizona, USA (GMT -7)

PostAuthor: izyk » Wed Apr 30, 2003 8:32 pm

I have found the problem in the parselog.lua utility. Consider Timon Jorina my ultimatte enemy from this point forward. (It was something specific to that merchant)

The fixed version is now available - you can download the updated script from the link in the first message above. Let me know if I screwed up or missed anything.
Zachar Mordecai
Right and Proper Society of the Iron Mantis
( aka Izyk G )
User avatar
izyk
Scholar of Fools
 
Posts: 413
Joined: Thu Jan 23, 2003 4:21 am
Location: Toronto.

PostAuthor: Scurvy_Platypus » Thu May 01, 2003 2:15 am

Hope what I sent helps. Other problem seems to be, you always lose the last line of text. Every single time I've run the parser, it drops it. And thanks for fixing what you have. I haven't experienced whatever bug it was you fixed, but thank you for taking the time to make such a useful tool.
User avatar
Scurvy_Platypus
Scholar
 
Posts: 1212
Joined: Mon Feb 17, 2003 12:12 am
Location: Princeton, NJ. USA (GMT -5)

PostAuthor: jadeia » Thu May 01, 2003 2:25 am

Nice job Izyk.

Thanks for the contribution to the communtiy, it's well appreciated by all.

Lets see if Bioware now "develop" their own "version" and build it in to a future patch. :)

I know they watch Avlis with interest in many aspects.
User avatar
jadeia
Elder Sage
 
Posts: 3539
Joined: Tue Jan 21, 2003 10:56 am
Location: London, UK

PostAuthor: jadeia » Sun May 04, 2003 2:35 pm

*Bump* Made this sticky as had a few people ask about it.

Good work Izyk.
User avatar
jadeia
Elder Sage
 
Posts: 3539
Joined: Tue Jan 21, 2003 10:56 am
Location: London, UK

PostAuthor: jadeia » Thu Jun 05, 2003 4:07 am

Please excuse my ignorance, but hell, I cant get a batch file to run under XP. It just loads the command box up, executes the files, and closes in an instant.

Anyone else had this problem with XP and know how to fix?
User avatar
jadeia
Elder Sage
 
Posts: 3539
Joined: Tue Jan 21, 2003 10:56 am
Location: London, UK

PostAuthor: JollyOrc » Thu Jun 05, 2003 4:44 am

someone else had a similar problem. Try to call the batch file from the shell, so you can see the output: Often one of the paths is wrong and the nwn.exe isn't found.

If you use the batch file as Izyk made it, it has to reside in the main NWN folder. In case you moved it, you must give a path to all files.

Also make sure that the target directory in the link you created points also at the NWN folder.

I know these are the very obvious things, and you probably checked them, but just yesterday I had to walk over to the other office building to turn a monitor on...
User avatar
JollyOrc
QA Resource
 
Posts: 3900
Joined: Fri Jan 17, 2003 11:41 am
Location: Germany
Timezone: GMT+1

PostAuthor: Manuel the White » Thu Jun 05, 2003 4:50 am

Added to the downloads webpage. Actually, it's been there for a long time now but i just wanted to acknowledge the scripts usefulness again.
ACTIVE CHARACTERS: Casey Landry, Jessie Morrice
SOMETIMES CHARACTERS: Silinde, Luthias
INACTIVE CHARACTERS: Manuel (the White) Thay't Le'Megen, Zven Reaplenoose, Drashter Volterz
User avatar
Manuel the White
Team Member; Retired with Honors
 
Posts: 7424
Joined: Wed Mar 05, 2003 6:45 pm

PostAuthor: jadeia » Thu Jun 05, 2003 5:07 am

Yeh checked all that Jolly, cant figure it out. Ill try calling it from the shell like you said, just to be doubly certain. I know it will be something bery minor Ive missed, but was hoping it was something 10 people have had, and it -wasnt- my own stupidity. :)
User avatar
jadeia
Elder Sage
 
Posts: 3539
Joined: Tue Jan 21, 2003 10:56 am
Location: London, UK

PostAuthor: Scurvy_Platypus » Thu Jun 05, 2003 7:35 am

For anyone that wants to be able to do this the easy way, first follow the basic instructions provided on where to put the files, and how to acitvate the logging in NWN.

Next, create a blank Notepad (or any other simple .txt file) and put the path to the parser in it. For example, mine is:

c:\Games\NWN\lua parselog.lua

Save and close. Now, rename this something clever (mine is called "parse") and change the file extension on this to .bat

Move this .bat file (should have a sprocket sort of thing as part of the icon) to your main NWN folder, and leave it there. By "main" is mean, when you take a screenshot, and it writes it to the game folder? That's the same place to leave the .bat file.

Now, create a shortcut to the .bat file, and place on your desktop for easy use.

Hope it helps, and isn't insulting your intelligence.
User avatar
Scurvy_Platypus
Scholar
 
Posts: 1212
Joined: Mon Feb 17, 2003 12:12 am
Location: Princeton, NJ. USA (GMT -5)

PostAuthor: Actually » Thu Jun 05, 2003 6:04 pm

If the window is closing after the application runs:

Try right-clicking on the shortcut you made to the .BAT file, and checking the properties. Anything that runs in Window's "modified DOS" mode *should* give you a checkbox that says "Close this window upon program completion?" or something like that.

Dumb-ass Windows generally defaults that box checked. So uncheck it and the results should stay on the screen until you physically close the window.

BTW, Izyk hasn't logged in to the boards since at least the beginning of May, and his website (http://www.izyk.net) has been down the last few times I checked. Anybody heard from him?

Bye Now,
Jerry Cornelius - Another Avlis MIA.

Actually
Sage
 
Posts: 1823
Joined: Sat Dec 14, 2002 10:11 pm
Location: Red Zone: Cuba

PostAuthor: jadeia » Thu Jun 05, 2003 6:19 pm

Did everything you said, over and again.

Looked like the whole thing didnt work because i forgot to hit the ENTER key in the notepad AFTER the second line that loads nwn... heh.. knew it would be something minor..
User avatar
jadeia
Elder Sage
 
Posts: 3539
Joined: Tue Jan 21, 2003 10:56 am
Location: London, UK

PostAuthor: izyk » Sat Aug 16, 2003 10:36 pm

According to my web logs there are a few people with direct links to the parselog scripts. I reorganized my website and moved those files, so you may want to update your links. Use the updated links at the top message on this thread.

My life has become far to complicated to play avlis for a few months. I have a once in a lifetime opportunity right now, but it takes all my time. I am still commited to supporting the parselog script. if there are problems with the script you may still email me at izyk@izyk.net.

I will also continue to host avatar pis sent to avlis-pics@izyk.net should anyone require.
Zachar Mordecai
Right and Proper Society of the Iron Mantis
( aka Izyk G )
User avatar
izyk
Scholar of Fools
 
Posts: 413
Joined: Thu Jan 23, 2003 4:21 am
Location: Toronto.

PostAuthor: j5hale3 » Sun Aug 17, 2003 12:25 am

Izyk,

Good to hear from you. both my characters and I miss you and your great RP.

Good luck with the opportunity. Hope to see you back in game sometime. And thanks again for the log tool it helps alot.

Best regards,

j5hale3
Heldor
Vashano
User avatar
j5hale3
Apprentice Scholar
 
Posts: 964
Joined: Tue Jan 14, 2003 3:23 am
Location: Central NJ {EST (GMT -5) and EDT (GMT -4)}

PostAuthor: Titanium Dragon » Mon Mar 01, 2004 3:10 pm

Okay, so how do you create a batch file?

EDIT: I see, but I still don't understand. Do you just create it with the lua blah blah blah line then the nwn.exe line?
Gilkin> ouch. how often do you roll a 20?
Cath> once every 20 rolls?
User avatar
Titanium Dragon
Sage
 
Posts: 2917
Joined: Sun Apr 27, 2003 5:18 pm
Location: Corvallis, OR (GMT - 7)

Next

Return to The Avlis Project: General Discussion

Who is online

Registered users: Bing [Bot]