Raised This Month: $32 Target: $400
 8% 

Automatic Bot Names


Post New Thread Reply   
 
Thread Tools Display Modes
imoda
Member
Join Date: Apr 2010
Old 09-18-2010 , 00:16   Re: Automatic Bot Names
Reply With Quote #31

Getting some issues with this mod. It's overwriting people's names in my sourcemod\data\sqlite\sourcemod-local.sq3 file. Consequently I've had to disable it because it's messing with my ranking system. Would love to see a fix.
imoda is offline
FirEXE
Member
Join Date: Jun 2010
Location: Lithuania
Old 09-18-2010 , 11:05   Re: Automatic Bot Names
Reply With Quote #32

Could you make a modification of this to get random player names from hlstatsx:ce database? That would definitely pwn!
FirEXE is offline
agrif
Junior Member
Join Date: Jan 2010
Old 09-20-2010 , 02:58   Re: Automatic Bot Names
Reply With Quote #33

Quote:
Originally Posted by imoda View Post
Getting some issues with this mod. It's overwriting people's names in my sourcemod\data\sqlite\sourcemod-local.sq3 file. Consequently I've had to disable it because it's messing with my ranking system. Would love to see a fix.
Thinking it over in my head, there should be no reason for this -- the plugin is designed to skip over all clients that are real. I'll look over my code, but right now I'm thinking this might be some weird interference issue with another plugin.

Are any of the names in botnames.txt the same as your players?

As for the file: I've worked with sqlite before, but never this particular file. What does it mean for the player names to be overwritten, and how do I check for it so I know when I've fixed this bug? If there's a manual entry or something, I can't find it...

Oh, and if you're already answering that, I might as well ask: are you using the newest version (1.1), or my first version (1.0)? What game are you running?

Quote:
Originally Posted by FirEXE View Post
Could you make a modification of this to get random player names from hlstatsx:ce database? That would definitely pwn!
I'll look into it. Is there an existing table (or other part of the database) that you would want used, or do you want a whole new table?
agrif is offline
imoda
Member
Join Date: Apr 2010
Old 09-20-2010 , 17:29   Re: Automatic Bot Names
Reply With Quote #34

Quote:
Originally Posted by agrif View Post
Are any of the names in botnames.txt the same as your players?
Negative.


Quote:
Originally Posted by agrif View Post
As for the file: I've worked with sqlite before, but never this particular file. What does it mean for the player names to be overwritten, and how do I check for it so I know when I've fixed this bug? If there's a manual entry or something, I can't find it...
It will randomly change the player's name in this file. It may be another plugin causing the issue but I'm not sure.

You can view it with this program http://sourceforge.net/projects/sqlitebrowser/

Quote:
Originally Posted by agrif View Post
Oh, and if you're already answering that, I might as well ask: are you using the newest version (1.1), or my first version (1.0)? What game are you running?
1.1
TF2
imoda is offline
agrif
Junior Member
Join Date: Jan 2010
Old 09-21-2010 , 06:56   Re: Automatic Bot Names
Reply With Quote #35

Quote:
Originally Posted by imoda View Post
1.1
TF2
D'oh. I just now looked at your username and realized I already knew this. Oh well...

I just got around to going over the code today, and nothing in my code should do anything to actual, non-bot clients. There are a few iffy places, but I gave them special attention and I'm pretty sure they don't do anything either. It could still be my code, though -- it's just a more subtle bug. These are usually the worst.

One of the first things I'd try is setting "sm_botnames_enabled" to 0 in the config file, but keeping the plugin itself installed and enabled. This keeps the code in-place but basically keeps it from doing anything. If the problem still occurs, or if it doesn't, it'll really help me track this thing down.

(To make matters worse, for me, I don't have a "sourcemod\data\sqlite\sourcemod-local.sq3" file. I only have a local user preferences database "clientprefs-sqlite.sq3" -- unless these are the same thing?)
agrif is offline
agrif
Junior Member
Join Date: Jan 2010
Old 09-28-2010 , 15:51   Re: Automatic Bot Names
Reply With Quote #36

Quote:
Originally Posted by FirEXE View Post
Could you make a modification of this to get random player names from hlstatsx:ce database? That would definitely pwn!
Here's version 1.2, which has support for loading names via a database configured in databases.cfg.

To do this, set sm_botnames_db_name to the name of the database configuration to use, from SourceMod's databases.cfg. Then, set sm_botnames_db_table to the name of the table to load from, and sm_botnames_db_column to the name of the column that contains the bot names.

As for the (potential?) problem, I've had no success even in reproducing the bug. Unfortunately, imoda, that's where I'll have to leave it until I get either more information from you, or someone else, or something like that. Sorry.
Attached Files
File Type: sp Get Plugin or Get Source (botnames.sp - 519 views - 13.4 KB)
agrif is offline
FirEXE
Member
Join Date: Jun 2010
Location: Lithuania
Old 10-01-2010 , 11:51   Re: Automatic Bot Names
Reply With Quote #37

I'll take a look at it now, really appreciate the work.
FirEXE is offline
FirEXE
Member
Join Date: Jun 2010
Location: Lithuania
Old 10-01-2010 , 12:09   Re: Automatic Bot Names
Reply With Quote #38

Well, it connected to the DB alright, I don’t see any errors, but names still from botprofile.db file.
For some reason it doesn’t reed names from db. Until I tell anything more I want to check the code.
FirEXE is offline
FirEXE
Member
Join Date: Jun 2010
Location: Lithuania
Old 10-01-2010 , 12:33   Re: Automatic Bot Names
Reply With Quote #39

Ok, I dumped the names to log file, they seem to be correct.
19:42:23 sm_botnames_reload
19:42:23 [botnames] Loaded 35078 names.

I would use random queries for a single random name, but that’s for then it'll work in this condition. Maybe the best way would be to query top100 active players. Since 35k+ is overkill.

Code:
    decl String:networkID[32];
    GetEventString(event, "networkid", networkID, sizeof(networkID));

    if(!dontBroadcast && StrEqual(networkID, "BOT"))
I use bot ping plugin that hides the "BOT" sign with varying ping. Could this be the problem? No, I tried without it no change.

I can't think of any other quick fix right now. Could you try with table I exported. I left only id, lastname, activity field for my last request. Also it would be great if the plugin could set UTF-8 names from database correctly.

By the way, I tried the previous version and it worked, so the problem should be with names.
Attached Files
File Type: zip hlstats_players.sql.zip (408.6 KB, 1016 views)

Last edited by FirEXE; 10-01-2010 at 13:31.
FirEXE is offline
agrif
Junior Member
Join Date: Jan 2010
Old 10-01-2010 , 13:31   Re: Automatic Bot Names
Reply With Quote #40

Quote:
Originally Posted by FirEXE View Post
Well, it connected to the DB alright, I don’t see any errors, but names still from botprofile.db file.
For some reason it doesn’t reed names from db. Until I tell anything more I want to check the code.
To be clear, it's using names from "botprofile.db" and not "botnames.txt" (or the database)? Also, what game are you running?

Quote:
Originally Posted by FirEXE View Post
Ok, I dumped the names to log file, they seem to be correct.
19:42:23 sm_botnames_reload
19:42:23 [botnames] Loaded 35078 names.
Yikes! That's way more names than I ever anticipated people using. That plugin's using 1.2 MB of memory just to store all the names!

Getting the names from the database each time a bot appears rather than storing them in memory would be a much more efficient option, but unfortunately it would require a little restructuring of the code. I'll look into it, but it'll take a little longer than this last update. Memory is cheap, though -- if you're cool with that megabyte of data sitting in memory the whole time, I'll leave it.

It's good to see it's loading names, but worse to hear that the plugin should be working, but isn't. A name-loading problem is easier to fix than a name-changing problem.

Quote:
Originally Posted by FirEXE View Post
I can't think of any other quick fix right now. Could you try with table I exported. I left only id, lastname, activity field for my last request. Also it would be great if the plugin could set UTF-8 names from database correctly.
I'll definitely check it out this weekend. Naively, I think that UTF-8 names should work automatically -- we'll see.

Off the top of my head, have you tried using just botnames.txt and not the database at all?
agrif is offline
Reply



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


All times are GMT -4. The time now is 16:57.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode