File storage is cheap, so I just store all I need in the pfile. Then I just keep a quest history linked list in char_data. Here's an example of what I store for my quest system (custom code).
#QHIST 101 The Stolen Teddy Bear~ 1086930574 0 0 End I keep a questID, name of quest (don't need to, but I like readable pfiles), timestamp for when it was last updated, if they've won (0 or 1), and a percentage of completion. I also save history for quests during the quest though. So if they got halfway through the quest but didn't win, then the questmaster will inform them they made it 50% through last time. You could go as simple as bits for if they've won a quest. It all depends on how far you want to take it. I need more information than that, and I like being able to expand what I store if needed. For instance, one thing you can't do with just storing a boolean of if they've won is limiting quests to single attempts (as opposed to single wins). > I am going to write my own custom quest code and I was wondering how I > could > easily keep track of the quests that players have done. I've decided that > it > would be the best way to have a master file that contains all the quests > done > by a player. In this file would be a listing of the player name and the > quest > number they've completed. When a quest is requested, the file will be > checked > and if they are not in the file they can do the quest, but if they are > then > they cannot. > > I am not exactly sure how efficent this will be, or if it'll cause > problems. > I don't want to have players become HUGE from the sheer amount of quests > that we > will be adding in, so I was thinking we can condense it into 1 master > file. > > Another option I suppose would be to have a secondary quest file, based on > the > player's name and it won't clutter up the player file. > > Or something else that you guys could suggest. > > Thanks. > > PS: When I write code I try to write in a way that I will learn something. > As of > right now I suck at file I/O in C so this will be a great learning > experience. > It does have a reason why I am doing it besides what I've said in my > previous > paragraphs. Thanks again! > > > > -- > ROM mailing list > [email protected] > http://www.rom.org/cgi-bin/mailman/listinfo/rom >

