.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Cyborg Factory > POD-Bot mm > Releases, Installers, Docs & Coding
Releases, Installers, Docs & Coding Where the official development happens

Reply
 
Thread Tools
Re: The Bots SteamId?
Old
  (#11)
Krush
Member
 
Status: Offline
Posts: 23
Join Date: Jul 2004
Default Re: The Bots SteamId? - 04-07-2004

Quote:
Originally Posted by Pierre-Marie Baty
very simple
Well how hard would it be to give each botname it's own AuthID ? I've been trying to with the code but keeps causing crashes when bot tries to login.
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#12)
sPlOrYgOn
<-- He did it.
 
sPlOrYgOn's Avatar
 
Status: Offline
Posts: 1,558
Join Date: Jan 2004
Location: Los Angeles, California, USA, North America, Earth, Solar System, Milky Way.
Default Re: The Bots SteamId? - 04-07-2004

you shouldn't because 0 or "BOT" means it's a bot and if it's not 0 or "BOT" the game might not know it's a bot and think it's an actual player.. thats what causes the crash.. because something might send a network message to the bot that isn't connected through a network connection..
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#13)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: The Bots SteamId? - 05-07-2004

I don't think that's the reason.

@Krush: HOW did you try that ?



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#14)
Krush
Member
 
Status: Offline
Posts: 23
Join Date: Jul 2004
Default Re: The Bots SteamId? - 05-07-2004

Quote:
Originally Posted by Pierre-Marie Baty
I don't think that's the reason.

@Krush: HOW did you try that ?
I ended up fixing the crash. What I did was giving each bot a id like STEAM_0:0:0000001 that was going up. But the prob was for some reason everytime const char *pfnGetPlayerAuthId (edict_t *e) was called the id would do something weird and go STEAM_0:0:00000011 and keep adding up til it was so damn big the game didn't know what to do and it would crash the server. So I decided maybe for now I should hard code alist of ids for the bots just til I did a better way. Only prob is now it was crashing on map change if anybots were left on the server.

So I just removed them entirely and made it be BOT. The reason I"m trying to give them fake STEAM IDs is I want killing of them to count towards psychostats.
Let me explain what I think could be done:

void ServerActivate (edict_t *pEdictList, int edictCount, int clientMax)

in there where it's reading the BotNames.txt we could have the line directly under the name be it's Steam ID and shove that into an array. Just like botnames. My only issue is if there are multiple bots on the server when it tries to get the AuthID for a kill or something how do we retreive the ID from that array. Just assume the array is char* szBotIDs[100][32] like the botnames. I've tried doing something with hardcoding in steamIDs for the anmes I have in my BotNames and it worked fine for setting them up at the start but after that everytime it wanted a botid it got the last one it sent in. So I made a function CheckNameID where it just did a compare to find the name of the bot and then set the value we give to the output in the AuthID function to the right value. Only prob with that is getting it to update enough for it to always be right. But like I said I ran out of ideas and just made it BOT for now until someone has an idea.
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#15)
Krush
Member
 
Status: Offline
Posts: 23
Join Date: Jul 2004
Default Re: The Bots SteamId? - 05-07-2004

I should add the STEAM ids I made up worked fine in fooling PsychoStats to thinking they are real players, but due to the AuthID not getting sent out right each time none of the players meet ranking criteria except in one case where the bot managed to kill it's own steam id like 30 times. (prob when it was getting stuck on the 1 id.
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#16)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: The Bots SteamId? - 06-07-2004

Add a field in the bot_t structure

char steamid[32];

once the bot gets attributed a name in BotCreate(), fill up this bot's steamid as well

strcpy (pBot->steamid, "0123456789");

Make sure you give this bot the right steamid that is associated with its name

then for each pfnGetPlayerAuthId() call, do a

RETURN_META (MRES_SUPERCEDE, bots[INDEXENT (edict) - 1].steamid);

in my opinion that should work.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#17)
Krush
Member
 
Status: Offline
Posts: 23
Join Date: Jul 2004
Default Re: The Bots SteamId? - 06-07-2004

Quote:
Originally Posted by Pierre-Marie Baty
Add a field in the bot_t structure

char steamid[32];

once the bot gets attributed a name in BotCreate(), fill up this bot's steamid as well

strcpy (pBot->steamid, "0123456789");

Make sure you give this bot the right steamid that is associated with its name

then for each pfnGetPlayerAuthId() call, do a

RETURN_META (MRES_SUPERCEDE, bots[INDEXENT (edict) - 1].steamid);

in my opinion that should work.
I'll try that but I just found out if the id is BOT it does work for stats but the issue comes up where it's not basing the id on name so that's still a problem. i'll try this.
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#18)
Krush
Member
 
Status: Offline
Posts: 23
Join Date: Jul 2004
Default Re: The Bots SteamId? - 06-07-2004

What's the (edict) in there cause I'm not sure and the compiler don't know either.
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#19)
Krush
Member
 
Status: Offline
Posts: 23
Join Date: Jul 2004
Default Re: The Bots SteamId? - 06-07-2004

I thought maybe you meant it was the edict_t passed into the function but INDEXENT can't convert it to a int.
  
Reply With Quote
Re: The Bots SteamId?
Old
  (#20)
Krush
Member
 
Status: Offline
Posts: 23
Join Date: Jul 2004
Default Re: The Bots SteamId? - 06-07-2004

Got it all coded in testing now.
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com