.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Metamod and metamod plugins (http://forums.bots-united.com/forumdisplay.php?f=15)
-   -   Steam IDs and bots (http://forums.bots-united.com/showthread.php?t=621)

clamatius 05-02-2004 00:59

Steam IDs and bots
 
First of all, I'll describe the problem I'm having. I have a bot for Natural Selection and the newest version of the game has a feature that's causing me some issues. When a player joins a game in progress, the game appears to look for players it's seen playing before (including current players), matching by SteamID. If it finds one, it gives the new player the same upgrades as the previously seen player.

This allows the game to support people disconnecting and reconnecting, without them losing upgrades.

The problem is that the bots all have the same SteamID, so any bot joining while the game is in progress gets given the same upgrades as the first bot to join the round.

So:

1) Is there any way of setting the steam ID for a fake client?

2) If I do, will that have any bad effects (e.g. causing some kind of steam auth failure)?

I should note that I'm not 100% sure that's what's happening, it's just my best guess.

botmeister 05-02-2004 01:21

Re: Steam IDs and bots
 
afaik you cannot change the id of a bot. However if you can program in c/c++ you could make a plugin that passes on a unique steam id for each bot to the NS mod. You'd do this by hooking onto the egines "authid" function and overriding it with your own code. If this is something you wish to do, the let us know.

clamatius 05-02-2004 01:40

Re: Steam IDs and bots
 
Gotcha. Ok, I'll look into that.

I didn't make myself clear - this is my own bot, written from scratch in C++. All the source code is online at whichbot.com.

WhichBot and RCBot are the two "major" bots for NS (there are a couple of others but their feature coverage is fairly low).

Pierre-Marie Baty 05-02-2004 02:19

Re: Steam IDs and bots
 
Hello fellow bot coder and welcome to Bots United then! :)
Do you already have a forum ? If so, we can put a link to it at the bottom of the Bots United forum main page.

For your Steam ID problem, the function you are looking for is pfnGetPlayerAuthID(). And you DO can change the Steam ID of a bot, all you need to do is to pass on your own ID string to this function when the calling entity is one of your bots. For an example of use of this function with bots, see my logfix plugin for metamod (it's available from my site with source code).

clamatius 05-02-2004 02:28

Re: Steam IDs and bots
 
Is there any significance to the SteamID you return (i.e. does it matter what it is)?

I do have a forum, although it's the horrible Sourceforge one and very limited. It's currently at:

http://sourceforge.net/forum/?group_id=76903

BAStumm 05-02-2004 02:53

Re: Steam IDs and bots
 
I doubt the NS mod cares what the id is, its just matching... SO create your own. Id do something like Bot:1234 where 1234 is the players "userid" that way you keep getting new ones automatically as map changes occur or as bots leave and join.

botmeister 05-02-2004 19:57

Re: Steam IDs and bots
 
Quote:

Originally Posted by BAStumm
I doubt the NS mod cares what the id is, its just matching... SO create your own. Id do something like Bot:1234 where 1234 is the players "userid" that way you keep getting new ones automatically as map changes occur or as bots leave and join.

You may run into trouble in a couple of of ways, one is that some stats programs will fail if the steam id is invalid (does not follow the correct id syntax), also if you use a valid steam id you should try and make it so it cannot cause duplicates with real players, I suggest you use something like STEAM_x:x:nnnnnnn where STEAM_x:x is something that never shows up in a game eg, STEAM_9:9


All times are GMT +2. The time now is 20:23.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.