Monster death sound in 3.3.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Kaze
    Rookie
    • Jan 2011
    • 10

    Monster death sound in 3.3.0

    Downloaded 3.3.0 today to give it a spin, and after a while realized something was off.

    The monster death sound no longer seems to play for all monsters. While I'm sure this is an intentional change and it makes sense that some things just don't make humanoid death noises, I've grown rather fond of the little scream everything used to make when killed. Quick look at sound.cfg and pain.txt gave little idea how to change this back to the old behavior, so I assume it's more deep.

    Any way of easily reverting to the old system where everything makes the scream, or do I need to mess with the source?


    edit: Upon further testing, I noticed that killing things with melee attacks or thrown items still makes the death sound, but magic missile doesn't.
    Last edited by Kaze; August 6, 2011, 14:47.
  • Magnate
    Angband Devteam member
    • May 2007
    • 5110

    #2
    If it's any consolation, I think this is cock-up rather than conspiracy. I honestly can't remember anyone messing with sounds during development of 3.3 (except for making it an in-game option, which wouldn't change any sound handling once the option is on).
    "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

    Comment

    • Kaze
      Rookie
      • Jan 2011
      • 10

      #3
      Originally posted by Magnate
      If it's any consolation, I think this is cock-up rather than conspiracy.
      I don't have a suitable compiler installed right now that would allow me to test things on my end, but looking at the source, my guess is that it might have something to do with mon-make.c, line 1470:
      Code:
      /* Death by Missile/Spell attack */
      if (note)
      {
      	/* Hack -- allow message suppression */
      	if (strlen(note) <= 1)
      	{
      		/* Be silent */
      	}
      
      	else msgt(soundfx, "%^s%s", m_name, note);
      }

      Comment

      • Magnate
        Angband Devteam member
        • May 2007
        • 5110

        #4
        Originally posted by Kaze
        I don't have a suitable compiler installed right now that would allow me to test things on my end, but looking at the source, my guess is that it might have something to do with mon-make.c, line 1470:
        Code:
        /* Death by Missile/Spell attack */
        if (note)
        {
        	/* Hack -- allow message suppression */
        	if (strlen(note) <= 1)
        	{
        		/* Be silent */
        	}
        
        	else msgt(soundfx, "%^s%s", m_name, note);
        }
        Good find - that's quite interesting, as it implies that the reason you're not hearing death sounds is because there is no message to go with them. But your OP reported only the absence of sounds - are you also seeing things die without messages? I can see the logic of the code block, but strlen(note) should always be >1 ...
        "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

        Comment

        • Derakon
          Prophet
          • Dec 2009
          • 9022

          #5
          What about "15 Jackals die"? Would that give a message for each one?

          Comment

          • Magnate
            Angband Devteam member
            • May 2007
            • 5110

            #6
            Originally posted by Derakon
            What about "15 Jackals die"? Would that give a message for each one?
            That's not how it currently works - it may well be an improvement, but at the moment we're trying to understand how some messages are accompanies by sounds and others aren't. (I don't play with sound so I haven't noticed this, and nobody else has commented on the thread to the effect that they have noticed it.)

            My current guess is that the posted code snippet isn't actually used, but I could be wrong.
            "Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles

            Comment

            • Kaze
              Rookie
              • Jan 2011
              • 10

              #7
              Originally posted by Magnate
              are you also seeing things die without messages?
              Good point, actually. I do see the death message, but the sound just isn't played. Doesn't look like it's the message suppression at fault then.



              edit: Actually, it is after all, somehow. Finally got around to installing mingw and messing around with the code. I changed the message suppression code to
              Code:
              if (strlen(note) <= 1)
              {
              	/* Be silent */
              	msgt(soundfx, "TEST.");
              }
              and am now seeing things like "TEST. The Black ogre dies." when killing with magic, and the sound plays once as it should.
              Last edited by Kaze; August 18, 2011, 22:37. Reason: findings from testing

              Comment

              • Kaze
                Rookie
                • Jan 2011
                • 10

                #8
                Okay, this seems to work for me at least...
                Code:
                /* Death by Missile/Spell attack */
                if (note)
                {
                	/* Hack -- allow message suppression */
                	if (strlen(note) <= 1)
                	{
                		/* Don't be silent */
                		sound(soundfx);
                	}
                
                	else msgt(soundfx, "%^s%s", m_name, note);
                }
                ...when there's no sound, just add one.

                Comment

                • PowerWyrm
                  Prophet
                  • Apr 2008
                  • 2986

                  #9
                  Originally posted by Magnate
                  Good find - that's quite interesting, as it implies that the reason you're not hearing death sounds is because there is no message to go with them. But your OP reported only the absence of sounds - are you also seeing things die without messages? I can see the logic of the code block, but strlen(note) should always be >1 ...
                  For magic effects, mon_take_hit() is called with a last parameter "note" equal to "", so strlen(note) is indeed 0...
                  IIRC, there was a good reason for that call during the refactor of monster spells (to avoid displaying fear messages twice?), but sounds like the code evolved again.
                  PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!

                  Comment

                  Working...
                  😀
                  😂
                  🥰
                  😘
                  🤢
                  😎
                  😞
                  😡
                  👍
                  👎