Announcement

Collapse
No announcement yet.

QC Coding Question...

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

  • QC Coding Question...

    Hi, I was wondering if it's possible to change the health of bots to something like 20000. (yes, i know it's weird don't ask, lol) But I'm not sure where to put it in the source. I see that in client.qc you can edit your starting health, but does it affect the bots as well? If not, what should I edit to make it work? Thanks!

  • #2
    20000?

    That's crazy high. If you want a real tough enemy try 2000. I can't tell you where to change the bot code, cause I have never experimented with bots.
    Last edited by MadGypsy; 02-21-2013, 01:28 PM.
    http://www.nextgenquake.com

    Comment


    • #3
      What bots? Quake doesnt have bots originally.
      www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

      Comment


      • #4
        ^I was wondering about that. I figured he had some mod.
        http://www.nextgenquake.com

        Comment


        • #5
          Originally posted by MadGypsy View Post
          ^I was wondering about that. I figured he had some mod.
          Sorry forgot to mention that I am using a mod. It's called Killer QC Bot and I have the source.

          Comment


          • #6
            Ya i figured Frikbots but wasnt sure which bot mod...

            are u talking about the zues bots?

            in combat.qc why not just in t_damage
            if (!(targ.flags & FL_CLIENT)) damage = damage / 10;

            or something like that

            I'm assuming, you want to give your bots more health, (or take less damage) to prolong the battling?
            www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

            Comment


            • #7
              Originally posted by R00k View Post
              Ya i figured Frikbots but wasnt sure which bot mod...

              are u talking about the zues bots?

              in combat.qc why not just in t_damage
              if (!(targ.flags & FL_CLIENT)) damage = damage / 10;

              or something like that

              I'm assuming, you want to give your bots more health, (or take less damage) to prolong the battling?
              It's not called Zeus, it's the Killer QC Bot, and it was before the FrikBot I believe. Also, I've found some areas in thes source where it says health.amount or something like that, and it was at a set 100, but I changed it to like 9999 at first, but didn't notice any difference after recompiling it :/ The bot still dies with one rocket (in fact he's gibbed) So, not sure why it's not doing anything...

              Comment


              • #8
                It's not doing anything cause you changed the wrong thing o.O

                You probably need to find the "absolute" bot player function (?player_bot?) or maybe in (?bot_client.qc or client.qc if a new one was introduced with the mod?) there may be something like void() PutBotInServer - you want to change self.health somewhere. That's how I would have searched it, anyway.

                Or just do what r00k said

                EDIT:

                Open the entire mod (only) in notepad++ and do a "find all in all opened documents" on the term .health

                That will return an output panel of every place .health is set. You can click these results and go straight to the line. One of those results is what you are looking for.

                * self.health is a more refined search
                Last edited by MadGypsy; 02-21-2013, 02:56 PM.
                http://www.nextgenquake.com

                Comment


                • #9
                  Originally posted by MadGypsy View Post
                  It's not doing anything cause you changed the wrong thing o.O

                  You probably need to find the "absolute" bot player function (?player_bot?) or maybe in (?bot_client.qc or client.qc if a new one was introduced with the mod?) there may be something like void() PutBotInServer - you want to change self.health somewhere. That's how I would have searched it, anyway.

                  Or just do what r00k said

                  EDIT:

                  Open the entire mod (only) in notepad++ and do a "find all in all opened documents" on the term .health

                  That will return an output panel of every place .health is set. You can click these results and go straight to the line. One of those results is what you are looking for.

                  * self.health is a more refined search
                  Thanks, I ended up just changing the rocket damage/ radius damage to 1. That way it lasts a LOT longer!

                  Comment


                  • #10
                    Ok found more info on your cross-post on that nazi zombie forum.

                    The code example i posted above will make all non players take 1/10th the damage from any weapon you shoot at it. So you can shoot 10 times longer.

                    or look for ".health" use find in files in your editor (notepad+ is nice).
                    until u find where the part of the code when the bot spawns.

                    I cannot find the mod so I cant see the exact source.
                    www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                    Comment


                    • #11
                      IDK how your mod handles the bots but if they are using the params from client.qc you can add something like this:

                      (This was just written from my head but it should work that way)

                      add this to defs.qc:

                      Code:
                      .float isbot
                      Find the Botconnect function and add this:

                      Code:
                      self.isbot = TRUE;
                      In client.qc find SetNewparms and add this:
                      Code:
                      void() SetNewParms =
                      {
                      	parm1 = IT_SHOTGUN | IT_AXE; 	
                      	if(self.isbot == TRUE)		// IF I AM A BOT
                      	parm2 = 400;			// GIMME 400 HEALTH
                      	else				// IF NOT
                      	parm2 = 100;			// GIMME 100 HEALTH		
                      	parm3 = 0;
                      	parm4 = 25;
                      	parm5 = 0;
                      	parm6 = 0;
                      	parm7 = 0;
                      	parm8 = 1;
                      	parm9 = 0;
                      };
                      That should work, but it was just smashed togheter from my head..
                      i have a similar thing for the frikbots for my game.

                      Comment


                      • #12
                        Originally posted by dr_mabuse1981 View Post
                        IDK how your mod handles the bots but if they are using the params from client.qc you can add something like this:

                        (This was just written from my head but it should work that way)

                        add this to defs.qc:

                        Code:
                        .float isbot
                        Find the Botconnect function and add this:

                        Code:
                        self.isbot = TRUE;
                        In client.qc find SetNewparms and add this:
                        Code:
                        void() SetNewParms =
                        {
                        	parm1 = IT_SHOTGUN | IT_AXE; 	
                        	if(self.isbot == TRUE)		// IF I AM A BOT
                        	parm2 = 400;			// GIMME 400 HEALTH
                        	else				// IF NOT
                        	parm2 = 100;			// GIMME 100 HEALTH		
                        	parm3 = 0;
                        	parm4 = 25;
                        	parm5 = 0;
                        	parm6 = 0;
                        	parm7 = 0;
                        	parm8 = 1;
                        	parm9 = 0;
                        };
                        That should work, but it was just smashed togheter from my head..
                        i have a similar thing for the frikbots for my game.
                        Hey that might work. I can do this, but I'm not sure if there's a limit to how much health I can give a bot. I'm assuming it's 65536, but I could be wrong.

                        Thanks, Mabuse!

                        Comment

                        Working...
                        X