Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CF: consistent title/content hack (book archive)





	I made a new hack on the reading material -- it basically introduces
	a book "archive" so that titles/content will always be the same.
	Look in /pub/thomas on ftp.astro.psu.edu for the file read.tar.gz.

	Below, I include an excerpt of the code documentation. Breakdown
	by file:

		readable.c.diff -- adds in archive code.
		treasure.c.diff -- makes treasure file funct calls 
				   consistent w/ code. Lowered book
				   values some.
		structs.c.diff -- introduces two new structures, "title"
				  and "titlelist". 
		libproto.h.diff -- needed to compile the code (if you
				   lack cextrct).
							-b.t.


	FROM ARCHIVE DESC in readable.c::

+  * This option should enforce UNIQUE combinations of titles,authors and
+  * msg contents during and *between* game sessions.
+  * Note: a slight degeneracy exists since books are archived based on an integer
+  * index value calculated from the message text (similar to alchemy formulae).
+  * Sometimes two widely different messages have the same index value (rare). In
+  * this case,  it is possible to occasionally generate 2 books with same title and
+  * different message content. Not really a bug, but rather a feature. This action
+  * should  keeps player on their toes ;).
+  * Also, note that there is *finite* space available for archiving message and titles.
+  * Once this space is used, books will stop being archived. Not a serious problem
+  * under the current regime, since there are generally fewer possible (random)
+  * messages than space available on the titlelists.
+  * One exception (for sure) are the monster messages. But no worries, you should
+  * see all of the monster info in some order (but not all possble combinations)
+  * before the monster titlelist space is run out. You can increase titlelist
+  * space by increasing the array sizes for the monster book_authours and book_names
+  * (see  max_titles[] array and include/read.h). Since the unique_book algorthm is
+  * kinda stupid, this program *may* slow down program execution if defined (but I don't
+  * think its a significant problem, at least, I have no problems running this option
+  * on a Sparc 10! Also, once archive title lists are filled and/or all possible msg
+  * combinations have been generated, unique_book isnt called anymore. It takes 5-10
+  * sessions for this to happen).
+  * Final note: the game remembers book/title/msg combinations from reading the
+  * file lib/bookarch. If you REMOVE this file, you will lose your archive. So
+  * be sure to copy it over to the new lib directory when you change versions.
+  * -b.t.