Forum

Frikbots & Skins

Discuss Artificial Intelligence and Bot programming.

Moderator: InsideQC Admins

Postby Sajt » Fri Jul 06, 2007 2:11 am

Holy cow! I saw a few apostrophes in there, scar3crow! :D
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby FrikaC » Fri Jul 06, 2007 2:16 pm

scar3crow wrote:To be honest, if it doesn't involve custom skins, I do just go with DP, whether the server is QW, NQ or DP protocol... Who cares? Its still Quake. With that line of thought, people who don't switch to something that works well between all of them is furthering the divide (which should have died the moment broadband became widely available and the source was released as well). The only difference, thats real to me, is ease of bunnyhopping in QW and NQ. And if your Quake playing is so reliant on that, then you suck at the game. Same thing goes if you only play on dm3 or dm6 or whatnot. There, I said it, I get tired of that shit.


We should play STC more.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby scar3crow » Fri Jul 06, 2007 8:13 pm

That we should, didn't Krimzon make a map for it a few years back?

I miss sneaking around and up walls as a Thief, raiding the enemy base...

Urm... Frikbot skins! Still on topic?
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby redrum » Mon Jul 23, 2007 4:11 pm

I was able to apply the custom skins to the bots!
After I did this, the bots are now removed from the scoreboard.
Why did this happen?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
User avatar
redrum
 
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Postby FrikaC » Mon Jul 23, 2007 8:21 pm

Don't mess up those messages.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby redrum » Mon Jul 23, 2007 10:06 pm

What messages?
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
User avatar
redrum
 
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Postby FrikaC » Mon Jul 23, 2007 10:34 pm

Those messages.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby scar3crow » Mon Jul 23, 2007 10:53 pm

>_<
User avatar
scar3crow
InsideQC Staff
 
Posts: 1054
Joined: Tue Jan 18, 2005 8:54 pm
Location: Alabama

Postby redrum » Tue Jul 24, 2007 2:32 pm

OK TERRIFIC!
Welcome to the Overlook Hotel: The-Overlook-Hotel.game-server.cc
User avatar
redrum
 
Posts: 410
Joined: Wed Mar 28, 2007 11:35 pm
Location: Long Island, New York

Postby Lightning Hunter » Tue Sep 15, 2009 10:27 pm

I stumbled upon this thread after trying to give the Frikbots custom skins as well, except I'm not using Quakeworld. I'm not compiling the code with any mods at all; only with Quake. I was hoping I could do it the "quick hack" way, with a player.mdl and modifying bot_misc.qc, as quoted here:

First, you'll need a player.mdl with some different skins on it. Second, look for BotName in bot_misc.qc. Just stick in some self.skin = X where X is the skin number.


So, I have a player.mdl in the /progs folder with 16 different skins. I changed the BotName section in bot_misc.qc to look like this:

Code: Select all
string(float r) BotName =
{
   self.b_num = r;
   if (r == 1)
   {   
      self.skin = 0;
      return "Vincent";
   }
   else if (r == 2)
   {
      self.skin = 1;
      return "Bishop";
   }
   else if (r == 3)
   {   
      self.skin = 2;
      return "Nomad";


Each bot after just has the next skin number. Obviously, something is wrong - because all I see now is the white team skin... Any ideas? Will the quick hack even work at all?
User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Postby FrikaC » Wed Sep 16, 2009 9:12 pm

It's white because of the missing bshirt/bpants. Likely somewhere else in the code is setting the skin back to 0. Maybe PutClientInServer?
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby Lightning Hunter » Thu Sep 17, 2009 9:43 pm

Um, I only found The following code doing a search for "putclientinserver":

In Bot_qw.qc
Code: Select all
void(float whatbot, float whatskill) BotConnect =
{
   local float f;
   local string h;
   local entity uself;
   
   f = ClientNextAvailable();
   uself = self;
   if(f == -1)
   {
      bprint(PRINT_HIGH, "Unable to connect a bot, server is full.\n");
      return;
   }

   bot_count = bot_count + 1;
   self = GetClientEntity(f);
   bot_start_topic(1);
   self.b_clientno = f;
   self.colormap = f + 1;
   if (whatbot)
      self.netname = BotName(whatbot);
   else
      self.netname = PickARandomName();
   // players can set skill all weird, so leave these checks in
   whatskill = rint(whatskill);
   if (whatskill > 3)
      whatskill = 3;
   else if (whatskill < 0)
      whatskill = 0;
   self.b_skill = whatskill;
   self.b_entertime = time;
   self.team = self.b_pants + 1;
   UpdateClient(self);
   SetNewParms();
   self.ishuman = 2;
   ClientConnect();
   PutClientInServer();
   if(f > 16)
      active_clients2 = active_clients2 | ClientBitFlag(f - 16);
   else
      active_clients1 = active_clients1 | ClientBitFlag(f);
   self = uself;
};


And in bot.qc
Code: Select all
void(float whichteam, float whatbot, float whatskill) BotConnect =
{
   local float f;
   local string h;
   local entity uself;
   
   f = ClientNextAvailable();
   uself = self;
   if(f == -1)
   {
      bprint("Unable to connect a bot, server is full.\n");
      return;
   }
   
   // chat thing

   bot_count = bot_count + 1;
   self = GetClientEntity(f);
   if (!saved_bots)
      bot_start_topic(1);
   self.b_clientno = f;
   self.colormap = f + 1;
   if (whatbot)
      self.netname = BotName(whatbot);
   else
      self.netname = PickARandomName();


   // players can set skill all weird, so leave these checks in
   whatskill = rint(whatskill);
   if (whatskill > 3)
      whatskill = 3;
   else if (whatskill < 0)
      whatskill = 0;
   self.b_skill = whatskill;

   if (teamplay && !coop)
   {
      if (whichteam)
         self.b_pants = FindAnotherColor(uself.team - 1);
      else
         self.b_pants = uself.team - 1;
      self.b_shirt = self.b_pants;
   }

   self.team = self.b_pants + 1;
   UpdateClient(self);
   SetNewParms();
   self.ishuman = 2;
   ClientConnect();
   PutClientInServer();

   active_clients = active_clients | ClientBitFlag(f);

   // this is risky... could corrupt .way files if done wrong
   // If you're not the gambling type, comment this out

   f = ClientBitFlag(self.b_num - 1);
   current_bots = current_bots | f;

   if (self.b_num <= 8)
      saved_skills1 = (saved_skills1 & (65536 - (3 * f)) | (self.b_skill * f));
   else
   {
      f = ClientBitFlag(self.b_num - 9);
      saved_skills2 = (saved_skills2 & (65536 - (3 * f)) | (self.b_skill * f));
   }

   h = ftos(current_bots);
   cvar_set("scratch1", h);
   h = ftos(saved_skills1);
   cvar_set("scratch2", h);
   h = ftos(saved_skills2);
   cvar_set("scratch3", h);
   self = uself;

};


And of course I found putclientinserver in client.qc, but I shouldn't have to change that, right? None of this seems relevant, but I could be wrong. I've only ever done very trivial coding with QuakeC in the past.
User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Postby Lightning Hunter » Fri Sep 25, 2009 6:59 pm

No responses? I guess it's just too much work to get new skins to work with the Frikbots + regular Quake. :?
User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

Postby Dr. Shadowborg » Sat Sep 26, 2009 4:27 am

Lightning Hunter wrote:No responses? I guess it's just too much work to get new skins to work with the Frikbots + regular Quake. :?


Make a fresh function to set the skin, and call that AFTER:

Code: Select all
   ClientConnect();
   PutClientInServer();


in BotConnect(); (This is located inside bot.qc)
User avatar
Dr. Shadowborg
InsideQC Staff
 
Posts: 1110
Joined: Sat Oct 16, 2004 3:34 pm

Postby Lightning Hunter » Sat Sep 26, 2009 7:17 pm

I found what you were talking about in bot.qc, but I'm not sure what "fresh function" I could create. Like I said, I'm absolutely noobish at QuakeC.
User avatar
Lightning Hunter
 
Posts: 169
Joined: Wed Nov 28, 2007 6:15 am

PreviousNext

Return to Artificial Intelligence

Who is online

Users browsing this forum: No registered users and 1 guest