Announcement

Collapse
No announcement yet.

Player pain sounds

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Player pain sounds

    Hello,

    Beeing a rather poor skilled player, I usually never play Quake on skill 3.
    Now that I had to play on skill 3 for testings, I noticed this bug which I never heard or read about before:

    In skill 3 the player only does pain sounds every 5 seconds !
    That means, that even though monsters attack you, you will keep silent for 5 seconds, which fells really weird, as if the player became dumb.


    That is due to changing self.pain_finished value in T_Damage function to 5 seconds. Which should prevent monsters to go into pain frames often in skill 3. But unfortunately that also applies to the player. And the players pain sounds are started independent to its pain animations. So, the player goes into his pain frames as usual (whenever he doesnt fire a weapon) but doesnt "scream", because self.pain_finished is only checked inside his PainSound function.


    To correct this, you have to extend this in the T_Damage function:
    Code:
    if (skill == 3)
    	self.pain_finished = time + 5;
    to this:
    Code:
    if ((skill == 3) && (self.classname != "player"))
    	self.pain_finished = time + 5;

  • #2
    Nice catch! Never noticed it happened to the player! LOL! I always found this a bit annoying for the monsters. I understand the need for the delay and if you alter it to anything much less you get strange behavior. :/ Interestingly some monsters have exceptions to this rule. For instance the fiend.

    if (self.touch == Demon_JumpTouch)
    return;

    if (self.pain_finished > time)
    return;

    self.pain_finished = time + 1;
    sound (self, CHAN_VOICE, "demon/dpain1.wav", 1, ATTN_NORM);

    if (random()*200 > damage)
    return; // didn't flinch

    demon1_pain1 ();

    I imagine this method works because this monster has a particularly large amount of health so using this method on the rest of the monsters wouldn't work properly. Then I thought maybe you could set it to take into account it's current health when determining whether to go into pain. You could then add a random time value. Using this method you may be able to customize each monster to respond more "realistically". Thoughts?

    Comment


    • #3
      Hello PrimalLove,

      The demon is affected the same way, as his self.pain_finished - check is prior to his self.pain_finished declaration in his pain function. That means he will not go into pain frames in skill 3 for 5 seconds after a successful attack by the player.

      His additional checks for:
      1) If he is currently jumping
      2) The dealt damage
      will ensure that he will 1) not interrupt his ranged attack and 2) only goes into pain frame when the damage impact is really "high". Some single nails will probably not interest him too much. But he will get the damage nevertheless (only skips the pain frames).


      Quake has a really high variation for his minions regarding pain and attack behavior. Which is good. If you are interested, I am currently going through all these things and make them adjustable (manuell and/or semi-automatic) to adapt it to ones personal skill and likings in playing Quake. I scratched this topic here. It will all be in the next update.

      Comment


      • #4
        Nice find seven! Goes to show you no matter how much you think you know quake, there's always something to find.
        'Replacement Player Models' Project

        Comment


        • #5
          Ah my mistake! Thanks for clarifying! That sounds great!! I'll check out your post of the subject. One quick request. Will you be adding a Flashlight? I know it's kinda stupid but I went ahead and added one myself to the source for my personal use but was wondering if that would be something you'd consider? I basically took heavily from the Kleshik coop mod. I also added the flare! I love those two additions from Kleshhik. I'm also a big fan of the FEAR like effects and would be a great addition as an extra cvar! On an off topic I also added Zeus bot! I gave monsters realistic vision using a tut over at inside3d and getlight from DP. Also added it to Zeus bot but the results haven't been what I wanted plus Zeus pathing needs to be completely redone but I just don't have the know how currently. With getlight he acts even stranger than before :/ Also removed the shortest pathing as it keep crashing my game.

          Just wanted to take a moment and say how terrific your work is and it's been a real treat experiencing it with Quake. It's like a whole new game that seems familiar. Really appreciate all this incredible hard work and dedication to the Quake community!

          edit: WOW! Can't believe I missed this!! On Inside3d they also have some code for SNEAKING! This would be perfect I thought to go with their limited sight using Getlight! So I'm gonna add this as well and give you an update! The code has it set up to activate and deactivate it using an impulse. This should be pretty easy to integrate! I'll give you an update maybe on a different thread. Also, a side note about Zeus bot. I was able to use the 3rd_person_visible_weapons cvar and set player_model cvar to enable ZeusBot to use the included models and vweps! It seems to be working correctly. His appearance will change based on the cvar and which model the player is using. I suppose I could just make it separate but I really like that he can use vweps! The other issue is skins. I'm gonna need to get some additional skins for the model so I can utilize the skin changing option. Other than that Zeus is looking good! I wonder if I can make him sneak too? wOOt! LOL maybe not! His pathing is terrible so I see no real good use for it. Hell even the "realistic" vision is breaking him. :/ Anyway any thoughts would be appreciated.
          Last edited by PrimalLove; 08-10-2014, 11:25 PM.

          Comment


          • #6
            Originally posted by Dutch View Post
            Nice find seven! Goes to show you no matter how much you think you know quake, there's always something to find.
            Hehe, biggest mystery was why the shalrath is able to jump in vanilla Quake


            PrimalLove,
            Do whatever you want to do with the code For some people it is more fun to tinker with Quake than to play Quake. A flashlight ? Oh, there are a couple of great flashlight approaches available. It should be not a big issue to squeeze one into your mod. inside3d is usually the best place to begin.
            Recently abel1389 talked about this topic as well.
            I do not know much about zeus bot, maybe you should give frikbot a try. Its code is well commented and can be adepted into most mods quite well.
            Happy tinkering.

            Comment


            • #7
              @Seven

              Thanks for the info. I already implemented the flashlight concept from Kleshik and the flare from Kleshik in my on personal files. I was more curious as to whether you planned to implement one in SMC release? If not its all good because you always release the src so i can just add it later. Its an easy integration process.

              I know Frikbot is easy to implement. But I really like Zeus because he is a helper bot and I was fond of him from back in the day with Killer Quake Pack. I was successful in implementing him into the source code so he can now take advantage of DP extensions,etc. Most notably I gave him realistic vision using getlight tut from inside3d with a few modifications. The monsters work fine with it. In fact, its better than i expected really but I had to play with the lighting to make it effective. But Zeus just acts weird with getlight and strangely if you put him in Axe attack mode he swings wildly and mostly never hits anything anymore. LOL!

              The biggest thing was I wanted him to be able to use vweps and the included player.mdl from SMC 4.80 so I implemented it so that when the cvar is active he will spawn using the correct model even if you decide to use player_model cvar. He works for the most part but his pathing is just screwy. Perhaps I can take a look at Frikbot and find a way to improve his pathing. Thanks for suggestion.

              After implementing these features, specifically getlight monster vision, I was curious if any other mods exist like this and I found one called "Stealth". It is pretty cool and they included the source. It looks like they perfected the realistic vision by not sure yet which method they used. If they used getlight maybe I can improve my code to make it even better. Stealth makes the game pretty dark tho but its a fun little mod you might like to try out. It's at quaddict just look for stealthDP.zip. Can't wait to check out the src. They also have a none DP version just called stealth.zip

              Edit: Also, I have not implemented the Sneak code yet but I will probably today and see how it work with the new monster vision. I have high hopes but now that I see this Stealth mod I might peek at it's src first to see what methods it uses for it's sneak mechanism. It has something similar to alot of stealth games that if you run away and hide out of direct line of sight for a given time period they will lose interest and go back to a routine or patrol. Its very good!
              Last edited by PrimalLove; 08-11-2014, 10:21 AM.

              Comment


              • #8
                I always did wonder why the monsters made slightly different noises when i played on nightmare. Now i know, nice find seven.
                Before too long well have a patch for most quake ports that turns it into a bug-free game. (well almost)
                We primarily speak english here...
                Is english a second language for you? If you are having trouble getting your point across please confront me on the forum or send me a PM. German is a second language for me and i will be able to provide the most help to those from deutschland.

                Comment


                • #9
                  Seven has implemented this particular fix already in SMC 5.0.

                  Comment

                  Working...
                  X