Quest.txt

View: New views
2 Messages — Rating Filter:   Alert me  

Quest.txt

by Bugzilla from enderandrew@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Howdy.  I'm looking to learn C, and I have picked up a book on C, and
thought I might cut my teeth on some code with Slash'em because I dig
it so much.  Despite being an older gamer, sadly, I am quite new to
the rouge-like scene, but slash'em is my favorite so far.

To date I've been finding various nethack and slash'em patches,
patching the code, and then I'm going to try and compile, debug and
fix what I broke.  Then my next plan of attack was to look at the
patches, and how they implemented new things to learn how to start
coding my own additions.

Some if it (like adding monsters and the like) seems incredibly easy.
However, I've already run into one question I can't seem to answer on
my own.  I applied the Jedi patch that is floating around to add a
Jedi class, and I can easily edit the text for the Jedi quest, however
when you start the game initially, you are given the Generic opening
text about gods and the Amulet of Yendor.

I was hoping to customize that text for each class.  For instance, for
the Jedi, I wanted to suggest that their Z-95/X-Wing whatever had
crashed in the Yendor system, and they needed a necessary
maguffin/part to fix the hyperdrive.  A Force Ghost of their mentor
(their god effectively) told them a part could be found in a local
dungeon, the medallion of the Yendor Amulet could magically fix the
hyperdrive.

It also never made sense that the Tourist was on a religious crusade
of life-or-death for this amulet either, and I would like to rewrite
their opening text to something more fitting of how they stumbled into
the situation, and just need a way out.

Honestly, I think the text really could/should be rewritten for each class/role.

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.

How would I go about this?

-- T. J. Brumfield
"In the beginning the Universe was created. This has made a lot of
people very angry and been widely regarded as a bad move."
--Douglas Adams
"Nihilism makes me smile."
--Christopher Quick

-------------------------------------------------------------------------
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

Parent Message unknown Re: Quest.txt

by xkernigh :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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