![]() |
The Bots SteamId?
Hi!
I wonder if theres a way to get rid of the zero in the bots faked "steamid" tex bot<1><0><CT> Im using psychostats for the stats and it selects by the steamid. And since the bots have <0> as id theres stats are collected to. And I dont want that. |
Re: The Bots SteamId?
Yes, you just have to remove the hook for pfnGetPlayerAuthId() in the bot source code.
I had added it because some people wanted exactly the contrary: that bot stats be logged too. |
Re: The Bots SteamId?
Quote:
sm_rankbots 1 So - maybe in Psychostats there can be some variable for this, too. Another thing can be some possibility of using some clients commands like Slap, Slay, etc on bots. Latest Clanmod lets use some of these commands on bots, too (if the variable cm_botsmcds 1), but nobody can say if this change You proposed above do some unwanted result for some other plugins (for example AMX) or not. If sPlOrYgOn will prepare new dll with this change, I can test it with StatsMe and Clanmod, but need somebody to test with AMX - these plugins are the most frequently used by people.:) |
Re: The Bots SteamId?
PMB
I found this in engine.cpp Line 324 Code:
Code:
Will this change to the code do something strange to something else? tex. amxx? Oki I will try and see what happends.. |
Re: The Bots SteamId?
Quote:
Without tests nobody can say something more. |
Re: The Bots SteamId?
ehhhh we dont want this removed from the actual pb do we?..i like seeing which bot is better than me .....so i can hunt em down next round :P
|
Re: The Bots SteamId?
After removing that code..
I didn't crash nor did anything go wrong.. in CS 1.5 their WONids became "BOT" but in CS 1.6 their steam ids became "UNKNOWN" So in the "logging question" thread someone asked why they now show "0" instead of "BOT" and this is the reason.. I was thinking of just removing it but that would make them "UNKNOWN" in CS 1.6 so I think we should put "BOT" instead of "0" there.. anyone agree? |
Re: The Bots SteamId?
The fact why I wanted it to be a number was that some stats servers expected to see a number here, and not a character string. That's just it.
But if after all you test it and you see it works as well with a character string, sure, go ahead then. |
Re: The Bots SteamId?
Splo!
I took that function away and in Cz theres steamid are <BOT> and not unknown.. How hard would it be to code to have the opportunity to be able to choose this on a fly? I mean do I want <BOT> or <0>? |
Re: The Bots SteamId?
very simple :)
|
Re: The Bots SteamId?
Quote:
|
Re: The Bots SteamId?
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..
|
Re: The Bots SteamId?
I don't think that's the reason.
@Krush: HOW did you try that ? |
Re: The Bots SteamId?
Quote:
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. |
Re: The Bots SteamId?
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.
|
Re: The Bots SteamId?
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. |
Re: The Bots SteamId?
Quote:
|
Re: The Bots SteamId?
What's the (edict) in there cause I'm not sure and the compiler don't know either.
|
Re: The Bots SteamId?
I thought maybe you meant it was the edict_t passed into the function but INDEXENT can't convert it to a int.
|
Re: The Bots SteamId?
Got it all coded in testing now.
|
Re: The Bots SteamId?
Works fine except if the bot spawns with bot when it spawns the game reads it's id as BOT
-added Well i updated to the latest code and added my stuff in the only problme is the authid part is stubbed out, and even if i uncomment it the steamid is always BOT -added now i got it back to using my steamids bot when the bot is disconnected or spawns with the bot (only 2 cases found so far) it's making it's ID BOT -added i'm going to guess the disconnect part is because we delete the bots info before it calls the AuthID function? not sure about the bomb though. |
Re: The Bots SteamId?
Try to use EDIT function to re-edit Your latest post. In this case You will not be a multi-poster...:D
|
Re: The Bots SteamId?
OK i found it
Code:
const char *pfnGetPlayerAuthId (edict_t *e) so what i think to do is this Code:
const char *pfnGetPlayerAuthId (edict_t *e) -added right now Im testing it on my server with a full load of bots. I don't think there should be a problem since that function shouldn't be called on anyone but a bot. -added it fixes the bomb problem but the dsconnect is now getting UNKNOWN when it shows the console kick and just <> (nothing in the id) on the drop -added this is what the logs look like Code:
L 07/05/2004 - 22:57:45: Kick: "[AGR][43]E3<22><UNKNOWN><>" was kicked by "Console" |
Re: The Bots SteamId?
that'll make it stop every call even for players..
and FL_FAKECLIENT check does work.. I used it to change the authid of the bots to all sorts of things :D |
Re: The Bots SteamId?
Quote:
How do I fix the part that has the bots not getting the correct STEAM ID when they spawn with bomb or when they disconnect then? (bomb is the main one) -added Somehow when it calls to get the AuthID when they spawn with the bomb or they disconnect it is getting the ID as BOT still look, i'm including the logs above it showing they do ahve the ids i gave them Code:
L 07/06/2004 - 00:14:35: "[AGR][62]Jesus<3><STEAMID_0:0:0000008><>" entered the game |
Re: The Bots SteamId?
-update
well I'm stumped, although i know it's this check Code:
if (e->v.flags & FL_FAKECLIENT) |
Re: The Bots SteamId?
Try intercepting pfnGetPlayerWONId, maybe for the bomb person they use that..
|
Re: The Bots SteamId?
Quote:
Can't figure out why the bomb one is getting false as the condition -added and if it was the WONId then the id wouldn't show up as BOT it'd show as 0 since Wonid is expecting a number |
Re: The Bots SteamId?
try this
Code:
const char *pfnGetPlayerAuthId (edict_t *e) this shouldn't affect humans.. |
Re: The Bots SteamId?
replace
Code:
if (e->v.flags & FL_FAKECLIENT) Code:
if (bots[ENTINDEX (e) - 1].is_used) |
Re: The Bots SteamId?
yea I think thats more smart than looping through the entire structure to see if the edict was the same as the edict in the bot structure, like how i told him in the irc channel :|
|
Re: The Bots SteamId?
Problem on dedicated server.
Well before when we used the old check on the Players tab of the server I could see the AuthID i changed it to. But now all I'm getting is UNKNOWN. I'll test it some more and see what happens. |
Re: The Bots SteamId?
Put this in for now. There is still a bug though when the bot gets kicked the ID becomes UNKNOWN.
Code:
if(e->v.flags &FL_FAKECLIENT) |
Re: The Bots SteamId?
Can anyone give me plugin for bots with steam id?
|
Re: The Bots SteamId?
Same needed here, since bots are not considered like real players, server seems to be empty from Steam, event if server is full of bots.
I don't think we can find a solution, but could you confirm? (any solution about this "feature" is welcome) Regards. |
All times are GMT +2. The time now is 18:04. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.