R.I.P. 12
Introduction
Reaperbot (c) 1996 by Steven Polge 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
Open up "botspawn.qc" and scroll down till you find the function: 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 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 SLOPPY entered the game. it always has to say... Reaperbot-SLOPPY (skill 0.5) entered the game.
I hate this. Lets change it! 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.
|