#17 3 quick questions

closed
None
5
2015-06-22
2010-02-23
No

first I have added the trickier bag from the nethack patches and (although I had to remove the code for when the bag has no charges you can put stuff in it because I have no idea how to stop it from asking you if you want to put something in the (next item slot name)) it seems to work.
I doubled the bag of tricks because I wanted to have a 50/50 chance of trickier bag or bag of tricks (original) and the problem is you can't loot it.
So the question is this where is the code located for looting bags of tricks?

problem 2 somehow you can't force chests with a weapon anymore did I mess something up and if I did where do I look for the code on forcing chests?

and problem 3 I have created a rifle artifact, and aside from the fact that it works totally the way I wanted ( creates a magical explosion like the hellfire only magic blast instead of fireball) I cannot wish for it. I did switch it to being able to be named (IE SPFX_RESTR is not there) so that I can actually test it, but when I even wish for a rifle named blunderbuss ( I couldn't think what to name it) I can't get the artifact. I can only get it if I wish for a rifle then name it blunderbuss, and even before I took out SPFX_RESTR I got it at an altar when I sacrificed. Is there something I need to add to the code I put in:
#ifdef FIREARMS
A("Blunderbuss", RIFLE,
SPFX_ATTK, (SPFX_ESP|SPFX_EREGEN), 0,
STUN(8,13), NO_DFNS, NO_CARY,
0, A_CHAOTIC, NON_PM, NON_PM, 16000L ),
#endif

that will allow me to wish for it?

sorry for being such a noncoder with semigood ideas but no knowledge of how to code them.
If you could tell me some of these things that would be much appreciated.

Discussion

  • J. Ali Harlow

    J. Ali Harlow - 2010-02-24

    1. I suggest you search the code for BAG_OF_TRICKS.
    2. Commands are defined in cmd.c; once you find the name of the function that is invoked, you can search for it.
    3. You'd normally wish for "Blunderbuss" or whatever you've called the artifact. If that doesn't work, you'll need to add debugging output to makewish() or the functions it calls to see where it goes wrong.

     
  • J. Ali Harlow

    J. Ali Harlow - 2010-02-24
    • assigned_to: nobody --> j_ali
    • status: open --> closed
     
  • ozma

    ozma - 2015-06-22

    Ah although this is really really old, thanks for the info....add debugging output to makewish() I never even thought of making the program tell me what is wrong.... so simple, but I have NO knowledge of coding other than the few years I have spent copy/paste/patch/troubleshoot on this project of making my own custom characters and slashem.

     

Log in to post a comment.