Inside3D tutorials.
Created By: [SL1CK]-=MERL1N=-
eMail: phillm@netlink.com.au
Difficulty Scale: Medium
Web Page: http://users.netlink.com.au/~phillm


R.I.P. 12

Introduction
If you are really getting into QC and want to screw about with something totally ace, you have probably already been to Inside3D and found the Reaper Bot Improvement Protocol (R.I.P.) tutorials. If you havent, do, cuz this tut wont make sense otherwise :
You have to have done them previously for this tut to work, and if you dont know what the heck im on about, you havent done the other R.I.P. tuts :)
Anyway, credit where credit is due...

Reaperbot (c) 1996 by Steven Polge
Norse_movetogoal (c) 1997 by Roscoe A. Sincero
QCBot Ranking (c) 1997 by Alan Kivlin

This is kind of a triple mini-tut. I was reading thru the tuts and found little bits that hadn't been done, plus I had improvements of my own to make :) ....

Improvement 1
Dontcha just hate playin teamplay with the bots?!? The game is ok, except for when they all huddle together sometimes :) but look at the names for your team...
WOW! There are 6 people called "bot1"! How KEWL DOOD!
We want the bots to be almost human, so lets let teamplayers have their own name...

Open up "botspawn.qc" and scroll down till you find the function:
void (entity ply, float n) addTeamBots = {

now find the bit where teamplay bots names' are defined:

      if ( (newbot.skil < TRUE) ) {
         newbot.netname = "0Bot";
      } else {
         if ( (newbot.skil < FL_SWIM) ) {
            newbot.netname = "1Bot";
         } else {
            if ( (newbot.skil < MOVETYPE_WALK) ) {
               newbot.netname = "2Bot";
            } else {
               newbot.netname = "3Bot";
            }
         }
      }
      i = (i - TRUE);
   }
};

As you can see its at the end of this particular function. Replace it with this.

   NUMBOTS = (NUMBOTS + TRUE);
   if ( (NUMBOTS == TRUE) ) {
      newbot.nextthink = (time + 0.100);
   }
   if ( (NUMBOTS < FL_INWATER) ) {
      serverflags = ((serverflags - (serverflags & BOTS)) + (FL_INWATER * NUMBOTS));
   if ( (NUMBOTS == TRUE) ) {
      newbot.netname = "ÄòÂOÏMÓTÉCË‘";		// dr. boomstick
   } else {
      if ( (NUMBOTS == FL_SWIM) ) {
         newbot.netname = "HARDCORE";
      } else {
         if ( (NUMBOTS == MOVETYPE_WALK) ) {
            newbot.netname = "ÍAÒÌYÎÍÁNOÎ";	// manson
         } else {
            if ( (NUMBOTS == MOVETYPE_STEP) ) {
               newbot.netname = "PsYcHoTiC";
            } else {
               if ( (NUMBOTS == MOVETYPE_FLY) ) {
                  newbot.netname = "Gothic Angel";
               } else {
                  if ( (NUMBOTS == MOVETYPE_TOSS) ) {
                     newbot.netname = "ÈEÌÌ‘ÓCÒAÐS";	// hell scrapz
                  } else {
                     if ( (NUMBOTS == MOVETYPE_PUSH) ) {
                        newbot.netname = "ÔHÅŽSÈAÄOב";	// the shadow
                     } else {
                        if ( (NUMBOTS == FL_CLIENT) ) {
                           newbot.netname = "St00gE";
                        } else {
                           if ( (NUMBOTS == MOVETYPE_FLYMISSILE) ) {
                              newbot.netname = "žÖIÐÅÒžŸ";	// viper
                           } else {
                              if ( (NUMBOTS == MOVETYPE_BOUNCE) ) {
                                 newbot.netname = "unnamed";
                              } else {
                                 if ( (NUMBOTS == MOVETYPE_BOUNCEMISSILE) ) {
                                    newbot.netname = "Slim";
                                 } else {
                                    if ( (NUMBOTS == 12.000) ) {
                                       newbot.netname = "D1g1TaL15";
                                    } else {
                                       if ( (NUMBOTS == 13.000) ) {
                                          newbot.netname = "THE MAN";
                                       } else {
                                          if ( (NUMBOTS == 14.000) ) {
                                             newbot.netname = "Cl0wn of d00m";
                                          } else {
                                             if ( (NUMBOTS == 15.000) ) {
                                                newbot.netname = "Fleck";
                                             }
                                          }
                                       }
                                    }
                                 }
                              }
                           }
                        }
                     }
                  }
               }
            }
         }
      }
   }
      i = (i - TRUE);
   }
};

Obviously you can change the names, they are just the ones I play with :)
See what we did? We said "screw the skill level of the bot, lets just give em a name, according to how many bots on the server (so we dont get the same name twice)". Easy eh?

Improvement 2
Still in teamplay, have you noticed the bot colors? they all have their t-shirts the same as their pants. This sux! Well, maybe you like it, I DONT!
Open up "botspawn.qc" and head down to the function...
void (entity ply, float n) addTeamBots = {

Find the lines that say:

	newbot.fClientNo = cno;
	newbot.fShirt = newbot.team - 1;
	newbot.fPants = newbot.team - 1;

Change it to this:

	newbot.fClientNo = cno;
	newbot.fShirt = floor (random() * 13);	// have own color
	newbot.fPants = newbot.team - 1;

Easy eh? This just makes the shirt color random, like in DM, but dont do it to the pants, cuz then you'll have heaps of teams in :)

Improvement 1
When bots enter the game it is so annoying. Instead of saying...

SLOPPY entered the game.

it always has to say...

Reaperbot-SLOPPY (skill 0.5) entered the game.

I hate this. Lets change it!
Open up "botspawn.qc" and find the function...
void () SpawnNewBot = {

Find the following lines of code...

   PutBotInServer ();
   bprint (self.teamname);
   bprint (self.netname);
   tmp = ftos (self.skil);
   bprint (" (skill ");
   bprint (tmp);
   bprint (") entered the game.\n");

Way too much crap! Change it to this...

   PutBotInServer ();
   bprint (self.netname);
   tmp = ftos (self.skil);
   bprint (" entered the game.\n");

Simple. If you dont understand this move look at what we took away from the original code. All that printing of the skill n stuff.

That's all Ive got to add to the superb reaper bot for now.
Compile and have fun!