Announcement

Collapse
No announcement yet.

Small Mod compilation

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

  • Originally posted by Seven View Post
    Hello Lightning Hunter,

    My suggestion to fix this:

    Replace in wizard.qc:

    with:


    That should stop it.

    Ah, so your solution is to exclude the flying monster cloning in E4M3? I should have mentioned that I saw this bug at least 2 other times while playing through Quake, but E4M3 was simply the easiest map to reproduce the bug in! I guess I can always just exclude Wizards from being cloned altogether if I keep encountering the bug. That would be a bit of a shame, but necessary in the end.

    On another topic, I've been improving all the pain skins. I never liked how the existing pain skins were added to the existing skin (blendfunc add) rather than blending with it (blendfunc blend). I don't blame you for setting it up this way of course, since a blended skin looks bad if there isn't a unique pain skin for each individual monster. As such, I am creating a unique pain skin for each monster. I also discovered a bug along the way that I believe I have fixed (hopefully without causing other bugs). In this following code, I noticed the pain skin is only supposed to appear when the monster's health is halfway depleted, but instead the pain skin was showing up after firing the very first shot. I think the culprit was with the "else" command halfway through the "pain_skin_entity_think" function. I added a comment in the code below to my fix. Let me know if you think this might create more bugs, although so far the pain skins now work as they should!

    Code:
    if (self.owner.health < self.owner.health_initial)
    {
    if (self.owner.health < (0.5 * self.owner.health_initial))
    {
    if (self.owner.painskin_helper == 2) // "2" is regular spider (it has 8 used skins)
    self.skin = 9;
    else if (self.owner.painskin_helper == 3) // "3" is yakman (he has 5 used skins)
    {
    self.skin = 6;
    if ((self.owner.skin == 1)||(self.owner.skin == 2))
    self.alpha = autocvar_painskin_transparency - 0.1; // on dark skins painskin is stronger
    }
    else if (self.owner.painskin_helper == 4) // "4" is necromancer (he has 3 used skins)
    {
    self.skin = 4;
    self.alpha = autocvar_painskin_transparency - 0.1; // on dark skins painskin is stronger
    }
    else
    self.skin = 3;
    }
    
    else //I believe this is where the bug is. I changed it to else if (self.owner.health < (0.5 * self.owner.health_initial))
    
    {
    if (self.owner.painskin_helper == 2) // "2" is regular spider (it has 8 used skins)
    self.skin = 8;
    else if (self.owner.painskin_helper == 3) // "3" is yakman (he has 5 used skins)
    {
    self.skin = 5;
    if ((self.owner.skin == 1)||(self.owner.skin == 2))
    self.alpha = autocvar_painskin_transparency - 0.1; // on dark skins painskin is stronger
    }
    else if (self.owner.painskin_helper == 4) // "4" is necromancer (he has 3 used skins)
    {
    self.skin = 3;
    self.alpha = autocvar_painskin_transparency - 0.1; // on dark skins painskin is stronger
    }
    else
    self.skin = 2;
    }
    }

    And for fun, here are some screenshots of the new pain skins and other HD skins ​to show what I've been up to. I took these screenshots without any Darkplaces lighting effects, because I wanted to show the skin quality without any fancy effects. I always feel a skin should look great without lighting, but sadly, many skins out there look terrible when you take away the in-game lighting. This is probably only about 3% of the HD content I have done in the last month. Haha.

    Updated soldier showcasing the pain skin (the Grenade launcher is a redone PrimEvil skin):


    New soldier with some variants behind him (parts of the soldier such as the face borrowed from Reforged; Armor of the variants borrowed from the PrimEvil player skin; 90% of the rest done by me):


    New Nailgun Grunt variants. The shirt/armor borrowed from PrimeEvil player skins, touched up by me. The Nailgun is a redone PrimEvil skin:


    New Reiver variant with pain skin done by me:


    New HD Yakman skin done entirely by me (also with the new pain skin applied):



    And here is a comparison of the old Wyvern skin with my new Wyvern skin, done entirely by scratch from me. I downsized it to 2k for the purpose of uploading it here, but the version I have is 4k.



    Last edited by Lightning_Hunter; 09-23-2023, 02:47 PM.

    Comment


    • Hello Lightning Hunter,


      Originally posted by Lightning_Hunter View Post
      Ah, so your solution is to exclude the flying monster cloning in E4M3? I should have mentioned that I saw this bug at least 2 other times while playing through Quake, but E4M3 was simply the easiest map to reproduce the bug in! I guess I can always just exclude Wizards from being cloned altogether if I keep encountering the bug. That would be a bit of a shame, but necessary in the end.
      I told you my thoughts about it in previous post and how I would approach.
      You have to decide, if you want to enable this feature by default in your mod.
      It will make all maps brutally hard, as the monster count will be at least doubled.

      Be careful with this decision, as this will affect the gameplay/difficulty significantly.
      The creators of maps have decided and finetuned the monster, ammo, armor, weapons placements during their creation and playtesting.
      Most of the time, they added 4 different difficulties to choose from.
      By changing this, the map will be totally different.

      For example:
      Ammo, armor and so on will be much less to kill the double amount of monsters in the map.
      Playing with this powerful feature should be considered and decided by each player individually.
      That is why it is and always will be disabled by default in the SMC.

      And as explained before, the culprit for your experienced bug in my opionion is not the code.
      Time to move on to your next point





      Originally posted by Lightning_Hunter View Post
      On another topic, I've been improving all the pain skins. I never liked how the existing pain skins were added to the existing skin (blendfunc add) rather than blending with it (blendfunc blend). I don't blame you for setting it up this way of course, since a blended skin looks bad if there isn't a unique pain skin for each individual monster. As such, I am creating a unique pain skin for each monster. I also discovered a bug along the way that I believe I have fixed (hopefully without causing other bugs). In this following code, I noticed the pain skin is only supposed to appear when the monster's health is halfway depleted, but instead the pain skin was showing up after firing the very first shot. I think the culprit was with the "else" command halfway through the "pain_skin_entity_think" function. I added a comment in the code below to my fix. Let me know if you think this might create more bugs, although so far the pain skins now work as they should!
      You write:
      the pain skins now work as they should!

      Please excuse me, but I think you did not understand how the painskins are coded and work.
      There is no bug in the code.
      And the way you wanted to edit the code shows me, that you still are not 100% sure what you are doing (and understanding QuakeC).

      But thats fine. We are here to help.
      Let me tell you how the code works and hopefully it will be clearer in the end:



      First, the code checks if the monster is wounded (it doesnt matter how much).
      If thats the case, it will go deeper into the function.
      That is done by this line:
      if (self.owner.health < self.owner.health_initial)

      OK, now we know, that the monster is wounded.
      Now, we want to know how much it is wounded, because we have 2 painskins !
      1 painskin for lightly wounded monsters and 1 for heavily wounded monsters.

      That is why I check how much the monster is wounded with this line:
      if (self.owner.health < (0.5 * self.owner.health_initial))

      If this is the case (monster lost more than half of his health), it is heavily wounded and will use its painskin: 3
      Painskin 3 is the one with the many wound textures (you can find it inside the pk3)



      Now to the part, that you didnt understand:
      We know until now, that the monster is wounded. We also know that we did the code for heavily wounded monsters already.
      Now whats left to do is the part for the lightly wounded monsters.

      That is why we only need an: else
      We do not need an additional if check anymore, because we are already done with the checking.
      So, we can tell the monster to use its painskin: 2

      We are done with the painskin code.



      Regarding your line, that you wanted to edit the function with:
      This is an exact copy of the line we already used at the beginning.
      You should never use the same comparism twice in a function.


      It would mean something like this (example):
      You are checking if an apple is green.
      Your first check: If its green you will eat it.
      Your second check: If its green you will eat it.

      As you see, you will always eat it
      That makes no sense.



      If you didnt notice, that the SMC has 2 painskins, then you didnt understand the code itself (also all the scripts, that handles the different monster/pain skins).
      Because I would not need to check how much the monster is wounded in the first place.
      That is what I meant when I mentioned above: 100% understanding the code (QuakeC).

      Please, be sure first, that you fully understand a function before you edit it.

      But that is fine, as we all have a learning curve.






      Regarding your textures:

      Very good job on the soldiers.
      They look really good !

      The Afrit shows some lines/areas where the texture does not fully match the model geometry/edges.
      Examples his hands. Some parts are "smooth" while other are "rough" on the same surface.
      But you are on a good way.

      Yakman looks good too.


      I see, that textureing is your world.
      Knowing you from earlier years, were you spend lots of time in Quake and also Unreal (with a complete texture pack).
      You are very talented and made great content already for this community.


      Keep up the good work,
      Seven

      Comment


      • Thanks for responding promptly, Seven. You are correct that I am NOT a coder. I only get involved in coding when nobody else is able to help me (if you want something done, you have to do it yourself). It takes me a very long time to study code in order to understand it. Sometimes it takes me hours. When I am determined enough however, I will do it.

        Originally posted by Seven View Post
        Hello Lightning Hunter,

        I told you my thoughts about it in previous post and how I would approach.
        You have to decide, if you want to enable this feature by default in your mod.
        It will make all maps brutally hard, as the monster count will be at least doubled.

        Be careful with this decision, as this will affect the gameplay/difficulty significantly.
        The creators of maps have decided and finetuned the monster, ammo, armor, weapons placements during their creation and playtesting.
        Most of the time, they added 4 different difficulties to choose from.
        By changing this, the map will be totally different.

        For example:
        Ammo, armor and so on will be much less to kill the double amount of monsters in the map.
        Playing with this powerful feature should be considered and decided by each player individually.
        That is why it is and always will be disabled by default in the SMC.

        And as explained before, the culprit for your experienced bug in my opionion is not the code.
        Time to move on to your next point
        Yes, I have taken everything you said into consideration already. I would NEVER force players to use monster cloning and/or turn it on by default. It will be OFF unless someone turns it on. Maybe you misunderstood me, but in my last post I was just saying the solution might be to disable cloning of flying monsters if the bug keeps returning. I could probably even create another setting in the config for this.

        The compilation I am creating (at least the first part) is maps made between 1996-1997, and most of these maps are extremely easy. Back then, people only used a keyboard to play with no mouse, so they were extremely inaccurate. These older maps are have a lot of ammo, but very few monsters. Cloning is a great solution to this. I will be giving recommendations in the readme file for which maps can be played with cloned monsters, sort of like this:

        Code:
        Obiwan.bsp "Prepare for HELL" by Obi-Wan 1996  //can play with clone monsters
        plumber.bsp "Call a Plumber" by Gyro Gearloose 1996  //can play with clone monsters
        torture.bsp "Torture" by Gyro Gearloose 1996 //low ammo, do NOT use clone monsters
        Arma2.bsp "Armageddon 2" by Matthias Worch 1996 //Clone monsters optional

        Originally posted by Seven View Post
        Please excuse me, but I think you did not understand how the painskins are coded and work.
        There is no bug in the code.
        And the way you wanted to edit the code shows me, that you still are not 100% sure what you are doing (and understanding QuakeC).
        You are correct that I did not understand the code for pain skins (which is why I posted it here). I didn't realize there were 2 pain skins for each monster. I thought the code was trying to apply the same pain skin twice. Thank you for clearing this up. Now I will go back and edit the monsters to have a second pain skin that is less bloody than the first. I did notice that pain skins are not being applied to living monster clones (only dead corpses), but this is not a big deal. I might not bother to fix this one.


        Regarding your textures:

        The Afrit shows some lines/areas where the texture does not fully match the model geometry/edges.
        Examples his hands. Some parts are "smooth" while other are "rough" on the same surface.
        But you are on a good way.
        Yeah, I noticed that too and have already added it to my list of things to fix.


        I see, that textureing is your world.
        Knowing you from earlier years, were you spend lots of time in Quake and also Unreal (with a complete texture pack).
        You are very talented and made great content already for this community.
        Thanks for the compliments on the skins! I am a texture/skin artist at heart, although believe it or not I am actually better at pixel art than I am HD art! For fun, here is a boss I created using just my imagination and the pencil tool on my computer. This is for the Gameboy using only 4 colors for an upcoming mod for "Final Fantasy Legend 2":


        And here is a boss Chimera, inspired only by looking at mythological drawings online (same game):
        Last edited by Lightning_Hunter; 11-28-2023, 10:33 AM.

        Comment


        • Hey Seven, do you have the source for SMC 5.02? I thought I would attempt to merge Hipnotic SMC with the newest version 5.6, but it would really help if I could compare the changes of Hipnotic 5.02 to the SMC 5.02 code. It's easier than reverse engineering the entire thing!

          Comment


          • Hello Lightning Hunter,

            The Situation with Mission Packs and base Quake is a little different with the SMC.
            The SMC is clearly focused on base Quake and therefore the version numbers have not been released simultaneously with Mission Pack builds.
            Reason behind it is clear, as with Quake SMC you can play hundreds of maps and episodes. While with Mission pack SMC only a very few.

            That means, Quake SMC was always developed further and further.
            While Mission Pack SMCs was taken care of a lot later. And not to the full feature content.

            If you want to make SMC v5.6 for the Mission Packs you HAVE to start and compare: Quake SMC 5.6 with Mission Pack SMC 5.02 source.
            And bit by bit port all the features.
            Oh dear, be careful, because Mission Packs handle things different and is filled with extra stuff...


            There is not even a Quake SMC v5.02 every released. That version number only exists for Mission Pack SMCs as explained above.
            At the time when Mission Pack SMC v5.02 was released, Quake SMC was around v5.30 (so you get a picture)

            So, in other words, its not an easy task.
            Otherwise I would have done it long time ago...


            But you are of course encouraged to give it a try.

            Best wishes,
            Seven

            Comment


            • Originally posted by Seven View Post
              Hello Lightning Hunter,

              The Situation with Mission Packs and base Quake is a little different with the SMC.
              The SMC is clearly focused on base Quake and therefore the version numbers have not been released simultaneously with Mission Pack builds.
              Reason behind it is clear, as with Quake SMC you can play hundreds of maps and episodes. While with Mission pack SMC only a very few.

              That means, Quake SMC was always developed further and further.
              While Mission Pack SMCs was taken care of a lot later. And not to the full feature content.

              If you want to make SMC v5.6 for the Mission Packs you HAVE to start and compare: Quake SMC 5.6 with Mission Pack SMC 5.02 source.
              And bit by bit port all the features.
              Oh dear, be careful, because Mission Packs handle things different and is filled with extra stuff...


              There is not even a Quake SMC v5.02 every released. That version number only exists for Mission Pack SMCs as explained above.
              At the time when Mission Pack SMC v5.02 was released, Quake SMC was around v5.30 (so you get a picture)

              So, in other words, its not an easy task.
              Otherwise I would have done it long time ago...


              But you are of course encouraged to give it a try.

              Best wishes,
              Seven

              Thanks for the response, Seven! I completely understand what you are saying. I have decided to import only the missing monsters, but not all the features. I will probably leave out a few dozen effects (like film grain, motion blur, blood splats, etc.) and instead focus on just the new monsters. I would like to see the Necromancer, Yakman, and my new monster conversions in the mission packs. I will keep it simple!

              Comment


              • Just a heads up that I am still working on this compilation, although just a bit slower with work getting busier. By the way Seven, do you still have that TF2 Rocket Launcher sitting around? I couldn't find a download link to it. It's in your video here:
                https://www.youtube.com/watch?v=-Qp8W2ORPqk

                Comment


                • Hello Lightning Hunter,

                  Good to hear, you still have fuel in the tank and are active

                  Yes, I always make notes where I find stuff. And If I implement them in the SMC, to be able to give proper credit.

                  The model, that you are looking for is a rip out of an still available commercial game, so I cannot upload files.
                  But I can guide you to the place where I downloaded it from back then:

                  Model can be found here:
                  https://gamebanana.com/mods/198635
                  https://gamebanana.com/mods/204314

                  Textures can be found here:
                  https://gamebanana.com/mods/204305
                  https://gamebanana.com/mods/204312

                  Have fun,
                  Seven

                  Comment


                  • Seven I love to see those monkeys image from time to time

                    Comment


                    • Hey Seven, do you know if there is something in the code of Rogue that differs with skin handling when compared to normal Quake? I successfully implemented Painskins into Hipnotic with ease, but Rogue is kicking my butt. For example, when I set up the Demon in Rogue exactly the same way I did in Hipnotic, the Demon changes its skin when it dies. I already verified that the Demon.mdl has 4 skins along with Demon1.mdl. I also verified that the scripts are set up correctly (I'm using all the same files between Hipnotic and Rogue). The Hipnotic pain skins work great, while the Rogue pain skins do not. There must be some changes to the skin handling in Rogue, but I can't find what it is. Any ideas?

                      I know that the Knight/Hell Knight statue will cause painskins to work a bit different. I also know the Ogre has the Ogre Boss skin. But why won't the Demon work? I couldn't find any differences with the Demon. It also appears the Shambler does not work properly, among other monsters.

                      Edit: I discovered another painskin issue, and I think it's a bug with the original SMC 5.6: when Necromancers spawn a Wizard or Afrit, the painskins are incorrect. When you shoot the summoned wizard/Afrit, the skin changes to the incorrect skin. This issue does not happen when a Wizard/Afrit is placed at the start of the level. I'm thinking this can be fixed by simply forcing the default skin when a Necromancer summons a Wizard/Afrit, but I'm unsure where/how to do this. Perhaps the model and skin can be set to '0' in this code?

                      Code:
                      //////////////////////////////////////////////////////////////////////////////////////
                      // Code for adding ADDITIONAL Wizard monster into a map to support FLYING monsters
                      // Wizard will be spawned near the flying monster
                      //////////////////////////////////////////////////////////////////////////////////////
                      
                      void() add_wizard_support_fly =
                      {
                      local entity clone, head;
                      local float done, c, proceed;
                      local vector ang, pos;
                      
                      done = 0;
                      c = 0;
                      ang = self.angles;
                      while (done == 0)
                      {
                      makevectors(ang);
                      pos = self.origin + (60 * v_forward) + (crandom() * 33 *v_right) + (crandom() * 30 *v_up); // randomize the spawn position !!
                      head = findradius(pos, 35);
                      proceed = 1;
                      while (head)
                      {
                      if ((head.health > 0) && (head.flags & (FL_MONSTER | FL_CLIENT)))
                      proceed = 0;
                      head = head.chain;
                      }
                      traceline(self.origin,pos,FALSE,self);
                      if (trace_fraction == 1 && (proceed == 1))
                      {
                      traceline(self.origin,(pos-'40 40 0'),FALSE,self);
                      if (trace_fraction == 1)
                      {
                      traceline(self.origin,(pos+'40 40 0'),FALSE,self);
                      if (trace_fraction == 1)
                      {
                      done = 1;
                      }
                      }
                      }
                      if (done == 0)
                      {
                      ang_y = ang_y + 36;
                      c = c + 1;
                      if (c==10)
                      {
                      return;
                      }
                      }
                      }
                      
                      clone = spawn();
                      copyentity (self,clone);
                      setorigin(clone, pos);
                      
                      WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
                      WriteByte (MSG_BROADCAST, TE_TELEPORT);
                      WriteCoord (MSG_BROADCAST, pos_x);
                      WriteCoord (MSG_BROADCAST, pos_y);
                      WriteCoord (MSG_BROADCAST, pos_z);
                      
                      clone.enemy = world;
                      clone.do_not_replace_me = 1;
                      clone.owner = self;
                      
                      local vector dir;
                      dir = normalize (self.enemy.origin - self.origin);
                      clone.angles = vectoangles (dir * 20); // always face the enemy
                      clone.angles_x = 0; // monsters can only look straight ( _x is looking up/down)
                      
                      clone.think = monster_wizard;
                      clone.nextthink = time + 0.0001;
                      };
                      Last edited by Lightning_Hunter; 12-05-2023, 12:48 PM.

                      Comment


                      • Hello Webangel,

                        and I love to see the sweet puppies too



                        Hello Lightning Hunter,

                        I always include the original QCīs in the uploads. So you can better compare what was done and what was left.
                        Please compare the original source from ID1 and Rogue to see what happened and why.

                        I highly/strongly recommend to use diff tools when you code and create mods.
                        It would be impossible for me to learned and understand QC magic without it.
                        There are free diff tools: Winmerge
                        I myself am using Beyond Copmare v3.0

                        The demon did not change between ID1 and Rogue as far as I know.
                        To pin down the issue, you should work with simplified mods.
                        That means, take the original source, that Imentioned above and add only the 1 feature and see yourself.
                        You can imagine how difficult it is to combine the many many SMC features for each monster and do not lose the overview.
                        Almost all features interfere with each other...

                        In theory, the demon should work just as robust in Rogue as it does in ID1.
                        Double check your code to be sure.



                        Regarding the bug that you mentioned:
                        The SMC uses the same painskins for all monsters, so it never was an issue and never was noticable due to overlapping transparent skins/textures of the same type.
                        Now, that you add different ones for each, it may become an issue, yes. If that is the issue you mean.

                        Unfortunately you cannot delete one sub_entitiy from another sub_entitieīs code.
                        So, you have to use _helper variables.
                        Like I did it with the one that regulates, that no additional added monster can produce another additional monster.
                        You surely noticed that.
                        Try it the same way to prevent the painskin entities to spawn when the main entity (monster) produces a clone.
                        You have to switch order to first check the clone probability and THEN add painskin entities to original monster.
                        So that the clone will not inherit the painskin from original monster and you can add a unique painskin to the clone later.

                        That should work.

                        Best wishes,
                        Seven

                        Comment


                        • Originally posted by Seven View Post
                          Hello Webangel,

                          Hello Lightning Hunter,

                          I always include the original QCīs in the uploads. So you can better compare what was done and what was left.
                          Please compare the original source from ID1 and Rogue to see what happened and why.
                          Yes, I am always comparing the original source codes. I've been using a program called ExamDiff for years. I try not to come here and ask questions unless I have exhausted all resources. In this case, I compared the code of just about every .qc file using Examdiff. Through hours of trial and error and comparing source codes, I have unfortunately gotten nowhere with Rogue. Hipnotic worked RIGHT away, and I copied the same code over simultaneously between Rogue and Hipnotic. I thought maybe you would have a clue about some different skin handling within Rogue, but that's ok. I might have to drop Painskins with Rogue, since I'm out of ideas.

                          The demon did not change between ID1 and Rogue as far as I know.
                          To pin down the issue, you should work with simplified mods.
                          That means, take the original source, that Imentioned above and add only the 1 feature and see yourself.
                          You can imagine how difficult it is to combine the many many SMC features for each monster and do not lose the overview.
                          Almost all features interfere with each other...
                          Yes, I constantly revert back to the original code to be sure I didn't make any mistakes. Even though I am NOT a good coder, I have mastered the ability to cross-reference, compare, and use trial and error. This is the ONLY way I am able to do any code, since I am terrible at understanding the language itself. That being said, you have to give me some credit for importing all the monsters from SMC 5.6 to Hipnotic and Rogue along with all the blood features and more. I am starting to understand how a lot of your SMC code works/interacts with the vanilla code, as amateurish as I may be!

                          So, you have to use _helper variables.
                          Like I did it with the one that regulates, that no additional added monster can produce another additional monster.
                          You surely noticed that.
                          Yes, I have actually already used the painskin_helper to add 5 skins to the added Cyberdemon (by Marc Fontaine). It has its own painskins, and even footstep dust among other features!




                          Try it the same way to prevent the painskin entities to spawn when the main entity (monster) produces a clone.
                          You have to switch order to first check the clone probability and THEN add painskin entities to original monster.
                          So that the clone will not inherit the painskin from original monster and you can add a unique painskin to the clone later.
                          I will look through your code again for references to help me in this regard. Can I use the existing painskin_helper code, or must I write new code in this regard? Also, where is the best place to inject the new helper code? I haven't messed with clones much, except for adding variables to disable Wizard/Shambler cloning (since they produce lots of bugs in custom maps).

                          Thanks.

                          Edit: I looked at the Rogue painskin code again. Everything is literally identical in Demon.qc, and I verified 10 times that all the painskin code was copied over the same in Rogue as it is with Hipnotic/default SMC in Custom_Effects.QC, World.QC, and Combat.QC. The only thing that looks out of place is this bit of commented out code in World.QC of Rogue. I have no clue what this code does, but perhaps it's a clue?

                          Code:
                          //bodyque_head.skin = ent.skin;   // edited out  (this does not exist in QC 1.06)  ?????
                          This is in "CopyToBodyQue":

                          Code:
                          void(entity ent, float hp, string headmdl) CopyToBodyQue =
                          {
                          // PGM - support for new deathmatch skins on corpses too!
                          
                          //bodyque_head.skin = ent.skin; // edited out (this does not exist in QC 1.06) ?????
                          bodyque_head.i_am_a_corpse = 1;
                          bodyque_head.sizediff = self.sizediff;
                          bodyque_head.painskin_helper = self.painskin_helper;
                          bodyque_head.baked = self.baked;
                          
                          if (headmdl == "statueknight") // ask if call comes from statue knight
                          bodyque_head.skin = 1; // then set skin to 1
                          else if (headmdl == "statuehknight") // ask if call comes from statue hellknight
                          bodyque_head.skin = 1; // then set skin to 1
                          else if (headmdl == "ogreboss") // ask if call comes from ogreboss (multigrenade ogre)
                          bodyque_head.skin = 1; // then set skin to 1
                          else
                          bodyque_head.skin = self.skin; // to set the correct skin on corpse (was necessary due to multiskin-support)
                          
                          bodyque_head.colormod = self.colormod; // to keep the visual settings from living monster on dead monster (when killed in lava/slime)
                          bodyque_head.traileffectnum = self.traileffectnum;
                          bodyque_head.spawnflags = self.spawnflags; // needed for Hellknight + Knight statues
                          bodyque_head.burnable_corpse = self.burnable_corpse;
                          bodyque_head.original_frame = self.frame; // needed for ragdoll
                          bodyque_head.enemy = self.enemy;
                          bodyque_head.scale = self.scale; // needed for random monster size feature
                          if (random() < 0.5)
                          bodyque_head.spin_direction = 0; // corpse will spin counter-clockwise when shot
                          else
                          bodyque_head.spin_direction = 1; // corpse will spin clockwise when shot
                          
                          bodyque_head.angles = ent.angles;
                          bodyque_head.model = ent.model;
                          bodyque_head.modelindex = ent.modelindex;
                          bodyque_head.frame = ent.frame;
                          bodyque_head.colormap = ent.colormap;
                          // bodyque_head.movetype = ent.movetype;
                          bodyque_head.velocity = ent.velocity;
                          bodyque_head.flags = 0;
                          setorigin (bodyque_head, ent.origin);
                          
                          // Gibbable Corpses: make bodyqueue damagable
                          
                          // enforce a minimum size for the corpse, so there's something to shoot
                          local vector minsiz, maxsiz;
                          minsiz = ent.mins;
                          maxsiz = ent.maxs;
                          if (bodyque_head.baked != 1) // only baked monster will stand tall/straight, regular killed monsters are lying on the floor !
                          { // so we ignore the bbox -z reduction for baked monsters
                          minsiz_z = ent.mins_z;
                          maxsiz_z = ent.mins_z + 17; // set this to how tall you want the corpse hitbox (was +15 in smc V3.1)
                          }
                          setsize (bodyque_head, minsiz, maxsiz);
                          
                          //// GYRO code below
                          Gyro_Object_ClearPhysics(self);
                          Gyro_Object_ClearPhysics(bodyque_head);
                          var float autocvar_gyroset = 2; // set cvar 'gyroset' default to 2
                          if (autocvar_gyroset > 0) // if 'gyroset' is set to '0', Gyro is not enabled
                          {
                          var float autocvar_corpsemass = 2700;
                          Gyro_Object_Activate (bodyque_head, autocvar_corpsemass);
                          }
                          
                          bodyque_head.health = hp;
                          if(hp == 0) // If HP is set via cvar 'corpsehealth' to "0", corpses are not gibbable
                          {
                          bodyque_head.takedamage = DAMAGE_NO;
                          bodyque_head.solid = SOLID_NOT;
                          }
                          else
                          {
                          bodyque_head.takedamage = DAMAGE_AIM;
                          bodyque_head.solid = SOLID_SLIDEBOX;
                          }
                          if (bodyque_head.baked == 1)
                          {
                          bodyque_head.th_die = baked_explode;
                          DropBackpack();
                          bodyque_head.nextthink = time + autocvar_coaled_monster_lifetime;
                          bodyque_head.think = baked_explode;
                          }
                          else
                          bodyque_head.th_die = corpse_die;
                          
                          if (autocvar_painskin_transparency)
                          {
                          entity pain_skin_entity;
                          
                          pain_skin_entity = spawn();
                          pain_skin_entity.solid = SOLID_NOT;
                          pain_skin_entity.movetype = MOVETYPE_NOCLIP;
                          pain_skin_entity.owner = bodyque_head;
                          setmodel (pain_skin_entity,bodyque_head.model);
                          setsize (pain_skin_entity, VEC_HULL2_MIN - bodyque_head.sizediff, VEC_HULL2_MAX - bodyque_head.sizediff);
                          setorigin (pain_skin_entity, '0 0 0');
                          // pain_skin_entity.scale = bodyque_head.scale;
                          pain_skin_entity.skin = bodyque_head.skin;
                          pain_skin_entity.colormod_x = bodyque_head.colormod_x;
                          pain_skin_entity.colormod_y = bodyque_head.colormod_y;
                          pain_skin_entity.colormod_z = bodyque_head.colormod_z;
                          pain_skin_entity.frame = bodyque_head.frame;
                          pain_skin_entity.painskin_helper = bodyque_head.painskin_helper;
                          pain_skin_entity.alpha = autocvar_painskin_transparency;
                          pain_skin_entity.think = pain_skin_entity_corpse_think;
                          pain_skin_entity.nextthink = time;
                          
                          setattachment(pain_skin_entity, bodyque_head, "test");
                          }
                          
                          bodyque_head.th_pain = corpse_pain;
                          bodyque_head.semisolid = "y";
                          bodyque_head.movetype = MOVETYPE_TOSS;
                          bodyque_head.netname = headmdl;
                          bodyque_head = bodyque_head.owner;
                          };
                          Last edited by Lightning_Hunter; 12-07-2023, 12:27 PM.

                          Comment


                          • Sorry for double post (I'm sure everyone is tired of hearing from me), but I just thought I'd update saying that I solved the Necromancer summon pain skin bug. It was actually easier than expected. I just added "clone.delete_painskin = 1;" under the support_fly section of each monster, and that prevents the painskin from showing up (except on the corpse, which is ok since it's not bugged). I realized I don't mind if the painskin is disabled for a summoned monster anyway.


                            In other news, I imported several Mission Pack monsters into the SMC that can replace other monsters in the default Quake/custom maps. The Wrath now has an option to replace the Wizard, and the invisible swordsman has an option to replace the Knight or Hell Knight. As for the Centroid/Scourge, I made a "lesser" version of it that is smaller that can replace any Enforcer or Soldier (without size issues).

                            The lesser version of the Centroid, which I have called the "Skorpoid", has less health than the full size version and fires lasers instead of nails. It also has some altered sound effects and skins:




                            The Wrath has been given modified multiskins. I also noticed an unused "head" gib with the Super Wrath/Overlord in Rogue that I have altered and used for the Wrath. It's actually kind of a body gib instead of head, but that makes sense for the Wrath. Some screenshots:



                            Finally, the invisible swordsman has two versions. The version that replaces the Knight is pretty much unaltered (minus some gib/blood stuff imported from SMC 5.6), but the Hell Knight version can fire projectiles just like the Hell Knight can, has more health, and a different skin:


                            I've also imported the Overlord (Super Wrath) into the SMC to be manually placed in some of the custom levels. While I was at it, I gave the Overlord proper gibs with blood extensions effects and all from SMC 5.6. I also added a head gib just like I did wit the Wrath. Also also also, the Overlord has been given it's own, more menacing sound effects (I hated that it had the regular wrath sounds in Rogue).

                            I still haven't figured out the Rogue painskin issue. It's completely baffling since I've looked through the code a few dozen times, but nothing sticks out. I have decided to leave out painskins for Rogue. Maybe a solution will present itself down the road. At least I got them into Hipnotic!

                            Comment


                            • Hey Seven, I've been playtesting the map compilations I put together (most of the hard work is done now). I sometimes encounter a strange bug that I cannot track down. I'm sure it's related to bad coding on my behalf. Sometimes after playing for a while, my weapons will shoot a corpse instead of a bullet after killing a monster. Any idea where I should start looking to get to the root cause of this? I'm wondering if it's the pain skins, or lack of a corpse being deleted as it should, but I'm not entirely sure. Even just a few ideas might help me track it down.

                              Thanks!

                              Comment


                              • Hello Lightning Hunter,

                                I hope you had a good start into 2024.
                                I see you are still very active working on Quake and creating beautiful things.

                                To try to answer your last post:
                                One thing can be, that if you load a save game with a different/new progs.dat, these things will happen.
                                Be sure to only load save games that has been created with the current progs.dat, that you are using.
                                Maybe this is old news for you but I wanted to at least mention it.

                                Other thing are these little words: "owner", "other", "self", etc.
                                One mistake here and you are changing the properties from the wrong entity in the game.
                                That seems to be what happened in your described case.
                                Example: When 2 entities collide/touch in game, "other" is the one, that is touched from "self".
                                In this situation you can change "other" to whatever you like.
                                And "owner" is always bind to who created it (if I remember correctly, nails and shells or done that way).
                                So changing the "other" in "owner"s code can lead to this as well.
                                You could even change "owner"īs property in functions that handle "other", beeing touched from "self".


                                If you cannot find the root cause, you can always use the big hammer:
                                Set the entities model in a function that is called regularly. This will fix this issue in a blink of a second and the player will not notice it.
                                (for example in the think function of shells)

                                I hope this will help you a tiny little bit.

                                Best wishes,
                                Seven

                                Comment

                                Working...
                                X