RPTools.net

Discussion and Support

Skip to content

It is currently Sat May 25, 2013 4:50 am 






Reply to topic  [ 13 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Giant
 
Joined: Sat Feb 28, 2009 3:20 pm
Posts: 194
Location: Massachusetts, USA
 Post subject: [1.3.b50] Automatically save message history
PostPosted: Sun Mar 01, 2009 7:40 pm 
I would like there to be a way to save the message history automatically.

I used to be an OpenRPG user (technically I still am, but I'm trying to get my group to move over to MapTool) and one of the few OpenRPG features I liked that I didn't find in MapTool was that OpenRPG saved a chat log as you played. It seemed to save it line-by-line as you were playing, so if the program crashed you didn't lose the whole history. I would love it if MapTool did something like this.

It should save the log to a directory of the user's choosing (set in Edit -> Preferences?) and should save it with a name like "Name-Year-Month-Day.htm". The name could be customizable (also set in Edit -> Preferences?). An example would be, "Log-2009-03-01.htm".

An acceptable feature would be if it saved the log automatically on quit, but even better would be if it added to the log file one line at a time so that in the event of a crash or a hard shutdown you wouldn't lose the whole session's log.

_________________
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Sun Mar 01, 2009 7:47 pm 
Hmm, this is cool. :)

I think I'd like some options about how often it saves the log, though. Every line is certainly one option. Perhaps another could be whenever a GM posts a message (whisper or otherwise).

To save a new line each time would mean either keeping the file open and always appending new text. That's a pain under Windows because then the file can't be viewed at the same time. Another option would be to open the file, append to the end, and then close it. That's more overhead, but allows the file to be copied out from under the application if necessary (so to upload to a web site in the middle of a game session).

Does anyone else have any conditions which should trigger an auto-save?

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Sat Feb 28, 2009 3:20 pm
Posts: 194
Location: Massachusetts, USA
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Sun Mar 01, 2009 7:52 pm 
Azhrei wrote:
Another option would be to open the file, append to the end, and then close it.


I think that's what OpenRPG does, and it doesn't seem to have a problem. I know that you can view the file while you're playing a game. If it doesn't log every single post it at least logs very frequently, maybe once a second or so.

I think it's perfectly acceptable to put in options for how often it logs. Maybe have the user choose between "log on close", "log every post" and "log once every X seconds" where X is a user-inputted number between 1 and 60 (I don't think you'd want to log any slower than once an hour).

_________________
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced


Top
 Profile  
 
User avatar  Offline
Great Wyrm
 
Joined: Sat Sep 06, 2008 6:54 pm
Posts: 1391
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Sun Mar 01, 2009 9:44 pm 
Myself, I would set it to save

A: After every message
B: unless it was last saved less than 5 (or X) seconds ago

This keeps the log very close to real-time, but doesn't bog it down with file access when there's a sudden spate of messages.


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Sun Mar 01, 2009 10:24 pm 
Alright, I've added this to my todo list.

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
User avatar  Offline
Deity
 
Joined: Tue Sep 11, 2007 6:31 pm
Posts: 5229
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Sun Mar 01, 2009 10:44 pm 
Azhrei wrote:
Does anyone else have any conditions which should trigger an auto-save?


How about the most obvious: When maptool autosaves the campaign every 5 minutes.

Issues to think about: how do you deal with saving and to where when someone has used the /clear command???? Perhaps there would need to be some type of value incremented with /clear so that the filename could be created without overriding the previous one and not duplicate data?

_________________
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Sat Feb 28, 2009 3:20 pm
Posts: 194
Location: Massachusetts, USA
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Sun Mar 01, 2009 10:55 pm 
The log should ignore the /clear command. I want the log to be something I can look back on after the game is over in case I want to remember a certain NPC's name, or where they said we could find the next McGuffin. If I use the /clear command to get rid of old clutter in the chat window that's all I want it to do... clear the chat window. It shouldn't go back and delete anything in the log file.

And personally, I don't think five minutes is fast enough to log. I want a situation as real-time as possible so that if somebody smashes their car into the utility pole outside and I lose power I'll lose as little of the log as possible. A lot can happen in five minutes in the chat window. I understand that others might not want it to log that fast, but I do. :) Which is why I'm all for putting in a configurable time limit.

_________________
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Sat Feb 28, 2009 3:20 pm
Posts: 194
Location: Massachusetts, USA
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Sun Mar 01, 2009 10:56 pm 
Azhrei wrote:
Alright, I've added this to my todo list.


Thanks much! :D

_________________
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced


Top
 Profile  
 
User avatar  Offline
Dragon
 
Joined: Mon Jul 21, 2008 6:38 pm
Posts: 714
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Wed Mar 04, 2009 4:32 pm 
I'd also want as close to real-time as possible but if the first implementation is just part of the autosave process, that's cool too.

Ideally, I'd like a file name based on the date, and the time the session started.

Optional bonus feature would be to start with the name of the campaign file you had loaded, or server/IP you connected to if you're just a player. THEN add date, then time.

Date should not be in the American format. I love you guys, but seriously, computer nerds everywhere know that dates should sort numerically :D

YYYY MM DD HH MM (SS?) - not this demented MM DD YY business you guys get up to.

Super bonus points for letting us define our own naming pattern, using wildcards, %Year or whatever. :D


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Sat Feb 28, 2009 3:20 pm
Posts: 194
Location: Massachusetts, USA
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Wed Mar 04, 2009 6:57 pm 
OpenRPG creates a log named "Log-YYYY-MM-DD.html" The "log" name is configurable. All chat messages posted on the same day go into the same log file, even if you had one session in the morning and one at night, and if you have a session that goes past midnight it gets split into several files.

This implementation is perfectly fine with me, and will probably be very easy to implement. It's really easy to merge or cut HTML files yourself if you don't like the way they ended up. I really just want something quick and dirty that ensures I have something to search through if I forgot who took that +1 Cloak of Resistance two weeks ago.

More advanced features like those Mrugnak suggested can come later.

_________________
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Wed Mar 04, 2009 7:17 pm 
Mrugnak wrote:
Date should not be in the American format. I love you guys, but seriously, computer nerds everywhere know that dates should sort numerically :D

Heh-heh. But you see, we know how to write code, so for us it's easy to set a later field to be the primary key and an earlier field as the secondary key. ;)

Yeah, my plan is to use the format specifiers provided by the java.util.text library (I think that's it). This is the same one Craig uses for the strformat() macro function.

I'm going to try to work on this tonight and tomorrow.

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
User avatar  Offline
Giant
 
Joined: Sat Feb 28, 2009 3:20 pm
Posts: 194
Location: Massachusetts, USA
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Wed May 13, 2009 6:54 am 
Is there any hope to get this in before 1.3 goes final? We lost the transcript of our most recent game because MapTool crashed before the GM could save it. We lost the transcript of the game before due to a power outage. It would really have been nice if the transcript was saving as we went along.

_________________
Adventure is not outside; it is within.
--Found in a fortune cookie on game night

MapTool Framework for Sufficiently Advanced


Top
 Profile  
 
User avatar  Offline
Site Admin
 
Joined: Mon Jun 12, 2006 12:20 pm
Posts: 11622
Location: Tampa, FL
 Post subject: Re: [1.3.b50] Automatically save message history
PostPosted: Wed May 13, 2009 11:35 am 
I've been saying this for the last couple weeks now, but maybe it'll be a reality now?

"I've got some time off so I'm hoping to get back into MapTool coding." (sigh)

I'm not scheduled to work again until early June, so in addition to some work on my brother's web site, some business stuff (writing a new course on Linux Performance Mgmt), and other miscellaneous jobs, I want to work on my TODO list (see the link in my sig)...

_________________
Interested in Time Magazine's Best Invention of 2008 Unix-powered laptop? No crashes or lockups. In fact, that series of articles has two such machines. The other is a Dell netbook. :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 13 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 0 users online :: 0 registered, 0 hidden and 0 guests (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 0 guests





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman