T. J. Brumfield wrote:
> I opened up my trusty copy of notepad++ and tried searching within all
> the source files with mention to quest.txt to see which file is
> opening and parsing it, to add new calls for specific classes, and
> didn't find anything.
I used the Unix 'grep' command to search, and I found that the
reference to quest.txt is actually in slashem/util/makedefs.c . The
makefiles will run makedefs to convert quest.txt into quest.dat . The
code to access quest.dat is in slashem/src/questpgr.c . To actually
display some text from quest.dat, you use the com_pager function for
generic text or qt_pager function or role-specific text. For example,
the call to com_pager(1) in slashem/src/allmain.c will display entry
"%Cc - 00001" from quest.txt .
First, pick a message number. Go to include/qtext.h and add a quest
define (like "#define QT_xx yy") for the opening message. Note that 1
to 36 are already taken but 92 and up are open.
Second, add the opening messages to dat/quest.txt . For example, "%Cc
Arc 000yy", "%Cc Bar 000yy" and so on for every class in the game,
replacing yy with the number that you added to qtext.h .
Third, go to allmain.c and replace the "com_pager(1);" line with a
"qt_pager(QT_xx);" line. You might also need to add an #include
"qtext.h" near the top. It seems that this is the only C code that you
need to change.
Now you can recompile the game, fix any compiler errors or makedefs
errors, then reinstall the game.
--Kernigh
http://nethack.wikia.com/wiki/User:Kernigh________________________________________________________________________
Check Out the new free AIM(R) Mail -- Unlimited storage and
industry-leading spam and email virus protection.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Slashem-devel mailing list
Slashem-devel@...
https://lists.sourceforge.net/lists/listinfo/slashem-devel