Inside3D!
     

Frikbots & Skins
Goto page Previous  1, 2, 3, 4, 5
 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Artificial Intelligence
View previous topic :: View next topic  
Author Message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Sun Sep 27, 2009 3:08 am    Post subject: Reply with quote

Lightning Hunter wrote:
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.


/me sighs

Do this:

Step 1 - Open bot_misc.qc and find where the function BotName is declared.

Step 2 - Replace it with the following. (The different names is because I don't have a stock copy of FBX Source handy atm due to recent hard drive failures, so I'm ripping this outta Hellsmash's FBX code.)


Code:

string(float r) BotName =
{
   self.b_num = r;
   if (r == 1)
   {   
      self.b_pants = 11;
      self.b_shirt = 0;
      return "Optimus";
   }
   else if (r == 2)
   {
      self.b_pants = 1;
      self.b_shirt = 3;
      return "Megatron";
   }
   else if (r == 3)
   {   
      self.b_pants = 13;
      self.b_shirt = 2;
                                return "8";
   }
   else if (r == 4)
   {
      self.b_pants = 7;
      self.b_shirt = 6;
                                return "Haro";
   }
   else if (r == 5)
   {
      self.b_pants = 12;
      self.b_shirt = 6;
                                return "Ryuuga";
   }
   else if (r == 6)
   {
      self.b_pants = 4;
      self.b_shirt = 4;
                                return "Bender";
   }
   else if (r == 7)
   {
      self.b_pants = 2;
      self.b_shirt = 5;
                                return "Gilliam";
   }
   else if (r == 8)
   {   
      self.b_pants = 10;
      self.b_shirt = 3;
                                return "Omoikane";
   }
   else if (r == 9)
   {
      self.b_pants = 9;
      self.b_shirt = 4;
                                return "Slash";
   }
   else if (r == 10)
   {
      self.b_pants = 4;
      self.b_shirt = 7;
                                return "Pyroro";
   }
   else if (r == 11)
   {
      self.b_pants = 3;
      self.b_shirt = 11;
                                return "Wingnut";
   }
   else if (r == 12)
   {
      self.b_pants = 13;
      self.b_shirt = 12;
                                return "Mike";
   }
   else if (r == 13)
   {
      self.b_pants = 11;
      self.b_shirt = 2;
                                return "Al";
   }
   else if (r == 14)
   {
      self.b_pants = 0;
      self.b_shirt = 2;
                                return "Inference";
   }
   else if (r == 15)
   {
      self.b_pants = 8;
      self.b_shirt = 9;
                                return "Lopet";
   }
   else if (r == 16)
   {
      self.b_pants = 5;
      self.b_shirt = 10;
                                return "Wodan Ymir";
   }
};


Step 3 - Put this right after where the function PickARandomName is declared:

Code:

void() SetBotSkin =
{
   if(self.netname =="Optimus")
    self.skin = 0;
   else if(self.netname == "Megatron")
    self.skin = 1;
   else if(self.netname == "8")
    self.skin = 2;
   else if(self.netname == "Haro")
    self.skin = 3;
   else if(self.netname == "Ryuuga")
    self.skin = 4;
   else if(self.netname == "Bender")
    self.skin = 5;
   else if(self.netname == "Gilliam")
    self.skin = 6;
   else if(self.netname == "Omoikane")
    self.skin = 7;
   else if(self.netname == "Slash")
    self.skin = 8;
   else if(self.netname == "Pyroro")
    self.skin = 9;
   else if(self.netname == "Wingnut")
    self.skin = 10;
   else if(self.netname == "Mike")
    self.skin = 11;
   else if(self.netname == "Al")
    self.skin = 12;
   else if(self.netname == "Inference")
    self.skin = 13;
   else if(self.netname == "Lopet")
    self.skin = 14;
   else if(self.netname == "Wodan Ymir")
    self.skin = 15;
};


Step 4 - Put this just before where the function BotConnect(); is declared in bot.qc:

Code:

void() SetBotSkin;


Step 5 - Put this right under the PutClientInServer(); in bot.qc so that it looks like this:

Code:

   PutClientInServer();
                SetBotSkin();


Compile and run.

Special Bonus cookie if you can name where all the bot names are from. (I can guarantee most people probably can't)
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
Lightning Hunter



Joined: 28 Nov 2007
Posts: 61

PostPosted: Sun Sep 27, 2009 6:33 am    Post subject: Reply with quote

Thanks, that worked - but there is a slight issue. When the bots die, their skin changes to skin 0. Is there a way to stop this from happening? I know it's supposed to be for Team games, so the dead bodies don't have a team color, but it kind of ruins it with custom skins. Surprised

I really appreciate you taking the time to put up this code!
Back to top
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Sun Sep 27, 2009 2:33 pm    Post subject: Reply with quote

Lightning Hunter wrote:
Thanks, that worked - but there is a slight issue. When the bots die, their skin changes to skin 0. Is there a way to stop this from happening? I know it's supposed to be for Team games, so the dead bodies don't have a team color, but it kind of ruins it with custom skins. Surprised

I really appreciate you taking the time to put up this code!


/me sighs again

Open world.qc and put at the top of the CopyToBodyQue(); Function:

Code:

bodyque_head.skin = ent.skin;

_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
Lightning Hunter



Joined: 28 Nov 2007
Posts: 61

PostPosted: Sun Sep 27, 2009 4:28 pm    Post subject: Reply with quote

Awesome, thanks a lot Shadowborg! I'll give back to the community by releasing some waypoints. Is there any map you would like to request?
Back to top
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Sun Sep 27, 2009 7:15 pm    Post subject: Reply with quote

Lightning Hunter wrote:
Awesome, thanks a lot Shadowborg! I'll give back to the community by releasing some waypoints. Is there any map you would like to request?


Dunno, I've been too busy in RL(tm), and Developing / Mapping for Hellsmash (my quake mod) to actually play any new maps these days...

That said, feel free to upload any .way files you create to the FXRC:

http://tlb.quakedev.com/files/fbxways/

Also feel free to download any that catch your fancy, that's what FXRC is there for. Wink
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
Team Xlink



Joined: 25 Jun 2009
Posts: 320

PostPosted: Mon Sep 28, 2009 12:06 am    Post subject: Reply with quote

Are they from the Metroid Games?
_________________
Anonymous wrote:
if it works, it works. if it doesn't, HAHAHA!
Back to top
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Mon Sep 28, 2009 12:10 am    Post subject: Reply with quote

Team Xlink wrote:
Are they from the Metroid Games?


Um...What? Question Confused Question

Edit: Ooooh, you mean the bot names? No. At least three of those should be pretty obvious, and none of them have ever appeared in a metroid game, unless there was a sudden interdimensional rift opened up due to Autobots and Decepticons fighting over Energon with Bender acting referee whilst smoking a cigar and swigging Olde Fortran that nobody told me about. Wink

Here's a hint: All of them are either robots / androids, fictional quantum / high performance AI computers, with the sole exception being a possessed T-72 Main Battle Tank.
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
Team Xlink



Joined: 25 Jun 2009
Posts: 320

PostPosted: Mon Sep 28, 2009 1:39 am    Post subject: Reply with quote

Dr. Shadowborg wrote:
Code:

void() SetBotSkin =
{
   if(self.netname =="Optimus")
    self.skin = 0;



Optimus Prime?

Yeah, he was in some of those games.
_________________
Anonymous wrote:
if it works, it works. if it doesn't, HAHAHA!
Back to top
View user's profile Send private message
Dr. Shadowborg
Inside3D Staff


Joined: 16 Oct 2004
Posts: 726

PostPosted: Mon Sep 28, 2009 3:02 am    Post subject: Reply with quote

Team Xlink wrote:

Optimus Prime?

Yeah, he was in some of those games.


Seriously?

Screenshots or it never happened!
_________________
"Roboto suggests Plasma Bazooka."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Artificial Intelligence All times are GMT
Goto page Previous  1, 2, 3, 4, 5
Page 5 of 5

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group