Frikbots & Skins
We should play STC more.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.
-
- Posts: 169
- Joined: Wed Nov 28, 2007 6:15 am
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:
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?
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: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.
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";
-
- Posts: 169
- Joined: Wed Nov 28, 2007 6:15 am
Um, I only found The following code doing a search for "putclientinserver":
In Bot_qw.qc
And in bot.qc
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.
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;
};
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;
};
-
- Posts: 169
- Joined: Wed Nov 28, 2007 6:15 am
-
- InsideQC Staff
- Posts: 1120
- Joined: Sat Oct 16, 2004 3:34 pm
Make a fresh function to set the skin, and call that AFTER:Lightning Hunter wrote:No responses? I guess it's just too much work to get new skins to work with the Frikbots + regular Quake. :?
Code: Select all
ClientConnect();
PutClientInServer();
-
- Posts: 169
- Joined: Wed Nov 28, 2007 6:15 am