.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Half-Life 2, Source and Source Games (http://forums.bots-united.com/forumdisplay.php?f=58)
-   -   Hl2 Sdk? (http://forums.bots-united.com/showthread.php?t=6577)

person135 14-12-2007 00:09

Hl2 Sdk?
 
http://developer.valvesoftware.com/wiki/SDK_Docs

is this it? can you make bots with it?

Ancient 14-12-2007 01:55

Re: Hl2 Sdk?
 
I believe rcBot has started to conduct / compose a bot for HL2.
http://rcbot.bots-united.com/forums

Bluesman 14-12-2007 23:46

Re: Hl2 Sdk?
 
Hurricane Bot is another bot for HL2 (HL2DM)

http://www.hurrikhan.net/

choobie 03-01-2008 16:36

Re: Hl2 Sdk?
 
Quote:

Originally Posted by person135 (Post 56779)
http://developer.valvesoftware.com/wiki/SDK_Docs

is this it? can you make bots with it?

How does one go about making a bot for cs1.6? The menu options in the sdk menu do not allow for a cs mod, and files in the cstrike directory aren't found in the .sln file.

Whistler 04-01-2008 01:52

Re: Hl2 Sdk?
 
most of the bots here work under CS 1.6. If you would like to make one yourself, check out the HPB bot source code and its README file.

person135 26-01-2008 15:21

Re: Hl2 Sdk?
 
so there aren't really any fully working source bots right?

Bluesman 26-01-2008 17:53

Re: Hl2 Sdk?
 
Quote:

Originally Posted by person135 (Post 57024)
so there aren't really any fully working source bots right?

What do you mean? Hurricane Bot and RCBots works in HL2DM

Or do you mean botsupport in the SDK?

@$3.1415rin 27-01-2008 10:14

Re: Hl2 Sdk?
 
hurricane bot also still lacks some important information which cannot be received yet from the engine. I guess it's the same problem like when the sdk came out, the folks at valve just dont like us :D

Bluesman 27-01-2008 15:09

Re: Hl2 Sdk?
 
Quote:

Originally Posted by @$3.1415rin (Post 57029)
the folks at valve just dont like us :D

Yes, Valve really don't like you bot-coders! It's a shame...as you are so nice people :)

Count Floyd 30-01-2008 13:03

Re: Hl2 Sdk?
 
At least they're still giving away source-code, which is rare these times.
And using Metamod Source I'd think you could hack your way into a lot of stuff. Probably not with as general functionality as with the old SDK but nevertheless...you could if you wanted to.
Speaking of hacking into it, has anybody else noticed the disappearance of the BotController in TF2 ? Don't know if it's back again with the new beta sdk for orange box but if it isn't this could mean either a revamped shiny new bot interface or totally removed bot support.

MarD 10-03-2008 00:03

Re: Hl2 Sdk?
 
Heyyo,

There's a new beta SDK update available.. just go into settings, and select the beta for it.. maybe hit report bug and talk about the probs?

I'm willing to do so too but I'm not sure about that url that describes it in detail of the probs.

I know there's a prob where the bot's physics don't update correctly all the time in HL2DM which causes the secondary attack of the ar2 to not always register, same with the physics items tossed via the grav gun..

and there's the prob where bots can't read ammo counts in supply and in the weapon.

Also, I believe they didn't release any of the interfacing code to use the built in navmesh with third party bots.

Other than that there was a class info bug I think?? I can't remember.. Cheeseh, you still around and want to discuss this old subject? :P

Count Floyd 11-03-2008 12:51

Re: Hl2 Sdk?
 
Quote:

Originally Posted by MarD (Post 57443)
There's a new beta SDK update available.. just go into settings, and select the beta for it.. maybe hit report bug and talk about the probs?

I currently don't have an online account @ home - why do think I'd like to have Bots in first place ? :crying:

Quote:

I know there's a prob where the bot's physics don't update correctly all the time in HL2DM which causes the secondary attack of the ar2 to not always register, same with the physics items tossed via the grav gun..
and there's the prob where bots can't read ammo counts in supply and in the weapon.
Read about those issues. At least the ammo counts etc. could be "hacked" by using signatures etc.

Quote:

Also, I believe they didn't release any of the interfacing code to use the built in navmesh with third party bots.
Are you sure there's always a navmesh generated ? I'd think this is only true for MODs where you can enable the CS:S Bots. It doesn't matter anyway since I've got my own navmesh code. There's not a lot I'd have to do for plugging the Bots into TF2, mostly just hacks to workaround the issues you mentioned and just writing the wrapper for my Interface.

MarD 11-03-2008 15:14

Re: Hl2 Sdk?
 
Heyyo,

Quote:

Originally Posted by Count Floyd (Post 57471)
I currently don't have an online account @ home - why do think I'd like to have Bots in first place ? :crying:

I have an online account.. but when my server's empty and I want it to fill up Bot's are a great way to encourage people to stick around until the server fills up.


Quote:

Originally Posted by Count Floyd (Post 57471)
Read about those issues. At least the ammo counts etc. could be "hacked" by using signatures etc.

I remember there was a mailing list/petition before about all the issues in detail.. I couldn't remember them exactly.

but for the hacked ammo count reader, would that be vac-legal? I know Dr. Evil was working on a way to have a working inventory and such via hacking into signatures.. was interesting work for HL2DM, but I think he put that on hiatus since he's now a developper for a gaming company, and also works on Fortress Forever, and an Omnibot port for it.


Quote:

Originally Posted by Count Floyd (Post 57471)
Are you sure there's always a navmesh generated ? I'd think this is only true for MODs where you can enable the CS:S Bots. It doesn't matter anyway since I've got my own navmesh code. There's not a lot I'd have to do for plugging the Bots into TF2, mostly just hacks to workaround the issues you mentioned and just writing the wrapper for my Interface.

You can generate navmeshes in any Source Engine mod. Perfect Dark Source, TF2, DODs.. anyone. I've made some for ctf_2fort for TF2 already just to see if I could get the built in bots to use them.. but instead they just randomly pick a team, and a random class, and just spawn in.. even the bot_mimic command doesn't work anymore like it did in DODs. :(

Well, I'm gonna send a report bug to valve via the beta system and ask for some of this stuff.. maybe I'll spam it a bit.....

[EDIT1]
Btw.. here's the changes log... absolutely no mention of the bots issues.. even in the currently known bugs...

http://developer.valvesoftware.com/w...eta_Changelist


and here's what I added into the discussion of the beta changelist:
Quote:

Heyyo,

I'd like to point out.. since the first time valve officially added basic third party bot support to the source sdk..

Since this update:
http://www.steamgames.com/v/index.ph...s&id=390&cc=US

BOTS CAN'T BE BUILT EFFCIENTLY FOR THE SOURCE ENGINE. vALVE has taken no actions to try and rectify the situation. So here I am trying again...
----

- They haven't made it possible to read current bot inventory (weapons/items)

- Can't use any kind of code to detect bot's (health/armor/being damaged by what kind of weapon or hazard like drowning)

- Cannot find out what is current bot ammo counts of both in the gun, and spare ammo.. so bot creators can only "guess" when the bot's out of ammo and randomly make the bot switch weapons.. which brings us to the next problem...

- Cannot switch weapons properly on bots. The way vALVE have it set up, they just spawn new weapon entities.. which is ok for singleplayer campaign where bots don't have to change weapons ever.. but in multiplayer it means the game eventually crashes since you can't just keep creating entities.

- The physics aren't updated right for the bots, so that in HL2DM, if you toss a physics object at a bot or the secondary attack of weapon_ar2 (The Combine Assault Rifle's Energy Ball) sometimes the physics objects will pass right through the bots.

- Not as important.. but there's no code that shows how to wrap the built in navmesh system of the CSS bot which is present in all Source Engine games to be used with third party bots. Most bot creators have invented different navmeshes that can wrap properly to geometry instead of just square boxes that are meant to snap to a grid.. but for some bot coders who wish to try the built in navmesh with their bots, it would probably help them out quite a bit.

- NOTE: some of the above can be hacked into the sourceSDK to read stuff like bot ammo counts... but it would be an unstable hack, and still would mean if the bot wanted to switch weapons he would still have to create those new weapon entities and end up crashing the game/server due to creating too many entities.

----
--~~~~
Ahh.. found the bugzilla again, here it is:
http://developer.valvesoftware.com/c..._bug.cgi?id=16
.. bugzilla bug 16.. near the top of the list.. and the bug's been present since 2006 in the bugzilla. :(


Here's the description:
http://developer.valvesoftware.com/c...g.cgi?id=16#c0
Quote:

The server plugin bot support is currently at a very incomplete state. It is
impossible to create a fully functional bot with what is available to server
plugins.

Overview of missing functionality
----------------------------------------------
1) Does the bot have weapon x, or accessors to a list of bot weapons?
2) How much ammo does the bot have in weapon x(both total and clip)?
3) Does the bot have item x?(kevlar, night vision, other non weapon items, mod
specific)
4) Can't get a list of dynamic objects.(props, etc)
5) Can't get bots 'class', for class based mods.
6) Can't get bots arbitrary details(more later).
7) Notification events for sounds?
8 ) Access to entity velocity(any entity, not just players as most accessors are
currently limited to).
9) Way to change model for bot?
10) How to get entity from 'userid' in some events.
11) CBotCmd.weaponselect is useless, as we have no way to access the entity
index of items possessed by the bot.
12) IPlayerInfo.SetActiveWeapon is useless. It spawns a new weapon for the bot
every time you call it. We don't want to cheat and give our bots weapons.
13) Get entity 'parent'
14) Method of feeding CBotUserCmd is inconsistant with players normal UserCmd
code path. This can cause the physics to get out of sync with the visual model
of bots.

Possible solutions to above
---------------------------------------
1) int IPlayerInfo::GetWeapon(const char *_weaponname); returns the entindex()
of the weapon if the bot has a weapon of this type. This would let us feed the
weaponselect the proper value in the usercmd. -1 if bot doesn't have the weapon.
Function doubles as a HasWeapon
2) Maybe void IPlayerInfo::GetAmmo(const char *_weaponname, int &_total, int
&_max, int &_curclip, int &_maxclip, int _firemode);
3) bool IPlayerInfo::HasItem(const char *_itemname); Mod implements pre-defined
strings, or for efficiency enumerated values. enum Items { Kevlar, Helmet,
RiotShield, etc };
4) We can probably search by classname perhaps.
5) int IPlayerInfo::GetPlayerClass(). returns numeric playerclass id for mod to
implement.
6) Generic information accessor, using names or enumerated messages. float
IPlayerInfo::GetInfo(INFO_CASH), or other mod specific accessors. Essentially
'how much x do i have'.
7) Haven't delved too far into the sound systems and what is server side, but
some events for sounds would be nice.
8 ) Accessors to ALL entities velocity(linear & angle), angles(local & world),
position(local & world), flags. Currently we are restricted to players.
9) IPlayerInfo::SetModel(const char *_modelname)
10) nuff said
11) see #1
12) see #1
13) GetParent() for ANY entity
14) See
http://list.valvesoftware.com/mailma...st/018935.html
for description and my the temporary solution.

I would personally prefer integer enumerations in place of strings for weapon,
item, etc queries, for efficiency, but strings are fine too, and more readable.

There's probably more things that I've missed. Feel free for anyone to add
additional stuff I may have missed.

Most bot authors want to create bots to support CS:S, DOD:S, etc.. and server
plugins are the only option for that, so SDK bots are out of the question.
Enhancing the bot capabilities of server plugins has been requested time and
time again since the very first SDK release.[FONT=verdana,geneva,lucida,'lucida grande',arial,helvetica,sans-serif]

Count Floyd 13-03-2008 12:18

Re: Hl2 Sdk?
 
LOL, that sounds bitter...
Ok, so you're able to spawn the in-built CS:S Bots but since they don't know which MOD they're in and don't have code assigned to it they do nothing.
I know that the SDK contains code to generate the NavMesh but of course no code for using it, the 'real' Bot code for the CS:S Bots isn't delivered with it. However I don't believe they left it in for 3rd party Bots to use, as a Bot developer you probably have your own means of having them navigate - no matter if it's waypoints or a navmesh. The existing old HL Bots would only need to parse the new BSP map file and they would be able to navigate. Anyway, once the SDK is out of Beta I would be more than willing to just hack the needed stuff together since Valve doesn't seem to care about those issues. At the moment however even this isn't possible because there's no valid bot interface returned...

Cheeseh 15-03-2008 13:35

Re: Hl2 Sdk?
 
Hi, I haven't had a good look at the new SDK yet. But first of all I'm not sure if the "Orange Box" SDK will work with older MODs (I'm guessing it should but I could be wrong).

You can catch the MOD by checking the names of the current steam/game directory, that's about it.

The example bot that you get with the new SDK is still braindead, you have to select its weapon/behaviour using console commands, not exactly autonomous :)

I think the NavMesh stuff requires the old GAME_DLL hack to compile If I remember right, even then I don't know if it will work with server plugins.

Basically the stuff that marD mentioned is obv. still required. Although to develop bots in any MOD requires some sort-of interface to the rules of the game also. Such as in TF2, we need to know where the capture points are, what capture points are locked, sentry gun level, if a medic is currently healing a bot or not, determining spies disguises and so forth... I don't beleive theres any simple way of finding this out.

Cheeseh 26-03-2008 12:27

Re: Hl2 Sdk?
 
I've compiled my bot to work with the Orange Box (TF2 etc) however whenever I add a bot the game just crashes, but it seems to crash just after the bot is added and after the GameFrame code has executed ... (not instantly)

http://rcbot.bots-united.com/forums/...indpost&p=7491

source : (gpl) http://rcbot.dwmh.net/RCBot2_OrangeBox_VS05.rar

Count Floyd 26-03-2008 13:05

Re: Hl2 Sdk?
 
That probably confirms my old question:
Quote:

Speaking of hacking into it, has anybody else noticed the disappearance of the BotController in TF2
This is off the top of my head because it's been some time I've played around with it but I guess it still holds true:
When I tried spawning Bots in Orange Box the BotCtrl Interface was always NULL so it would crash once a usercmd would be performed. This would explain why your Bots are crashing at the end of the frame (when the movement etc. is applied). Try debugging, I'd bet that's the reason. I also had no problems spawning them in first place.
About the navmesh etc., I won't use it and btw. can't you just supply the desired weapon as a weaponselect in the usercmd ? That's the way it always worked in quake engines...(I know you'd have to know beforehand if the Bot even carries that weapon but that's another challenge)

Cheeseh 26-03-2008 13:29

Re: Hl2 Sdk?
 
Hmm, well whenever I add a bot it succesfully retrieves a bot controller object (at least a non NULL object) but it still crashes after the first frame, but not inside any call to the RunPlayerMove function.???

Count Floyd 28-03-2008 15:01

Re: Hl2 Sdk?
 
Is the memory ptr "badf00d" perhaps ? ;)
Are you eventually calling another specific method to select a weapon ?
Is it even possible to get at a meaningfull call stack ?
It must be happening because of wrong interpretation of something in the server dll...do you remember the issue with the fakeclient flag in cs:cz ? Either something like that or a bad ptr.

Cheeseh 30-03-2008 15:44

Re: Hl2 Sdk?
 
The bot controller seems to be a valid pointer. As far as I can see the call stack is also valid, as it is initiating on my bot add command it is simplty working through from there. In game frame it also seems to be valid coming from engine.dll

I commented out the run player move command and the bot's think command, and the game still crashed. All it was doing was adding a bot and setting up data structures (but not using them).

Code:

0E44901C  call        eax 
(--> end of game frame function)
0E44901E  add        esi,1
0E449021  cmp        esi,dword ptr [edi+10h]
0E449024  jl          0E448FF0
0E449026  pop        ebx 
0E449027  mov        ecx,dword ptr ds:[0E68DFFCh]
0E44902D  mov        edx,dword ptr [ecx]
0E44902F  mov        eax,dword ptr [edx+10h]
0E449032  push        ebp 
0E449033  call        eax  <-- crashes in this call somewhere (lonnnng function...)

I also don't know how to get the correct origin from an arbitrary entity in the Orange box code ? My old commands using the Networkable and PVS info won't work any more. I just need to use PlayerInfo to get the origin but that only works for players, and n TF2 the origin seems to be at the feet of the player model, no in the middle

And the problem with using weapon select cmd is that we don't know if the bot actually has the weapon (or we don't know if we have enough ammo left in the weapon to actually use it)

MarD 02-04-2008 06:53

Re: Hl2 Sdk?
 
Heyyo,

AMAZING NEWS! They are going to setup proper 3rd party bot support on Source Engine 14 (aka, orange box source engine). :D

Quote:

------- Additional Comment #5 From Tony Sergi 2008-04-01 13:50 ------- As Jeremy is already aware, I've been working on this for the past week and he's
already got his hands on a beta to experiment with, so I can nail down whatever
else is needed for the first update to the interfaces that we're making. The
first valve game to support it should be TF2 with the others falling in-line
once they're up and running on the new engine.

------- Additional Comment #6 From Tony Sergi 2008-04-01 13:53 ------- Oh, and also; if you have any questions feel free to shoot me off an email and
I'll answer them as best as I can, ALSO, throw your requests/suggestions at me,
and If I haven't already handled them, I'll make sure I've gotten a solution for it.
omegallah@gmail.com

GO! GO! GO! Email him EXACTLY what you guys need! :)

http://developer.valvesoftware.com/c..._bug.cgi?id=16

This could truly be our actual first chance to set things right! I mean, he's working on a beta so with good measure maybe in a few months we'll even see it come out.

That means.. once all Source SDK mods move over to the new Orange Box SDK we'll even be able to do support for those, and CSS and DODS and HL2DM. :D

Oh shit.. just noticed it was today.. hmm, hopefully it's not an april fools joke...

DrEvil 02-04-2008 07:36

Re: Hl2 Sdk?
 
It's not an April fools. I am the Jeremy he speaks of. I have been helping out with figuring out what the new interfaces need and stuff. Things are looking very promising in the WIP source he gave me yesterday. These new interfaces will be Orange Box SDK only, so only games that run on that SDK will be able to use them. TF2 is the first target, followed by other Valve games when they are upgraded to OB. Good news for all. It's been a long time coming.

MarD 02-04-2008 07:39

Re: Hl2 Sdk?
 
Heyyo,

Quote:

Originally Posted by DrEvil (Post 57626)
It's not an April fools. I am the Jeremy he speaks of. I have been helping out with figuring out what the new interfaces need and stuff. Things are looking very promising in the WIP source he gave me yesterday. These new interfaces will be Orange Box SDK only, so only games that run on that SDK will be able to use them. TF2 is the first target, followed by other Valve games when they are upgraded to OB. Good news for all. It's been a long time coming.

Did I ever forget to tell you man.. that I :wub: u? cause I do. :D

Omg, lol, this will pwn! proper bots to help fill up servers. Do behemoth spy vs spy server nights.. oh man.. oh man, lol. :P

MarD 24-12-2008 22:01

Re: Hl2 Sdk?
 
Heyyo,

I have a TF2 server again Dr.Evil... any chance I can beta-test your bots on it? :P

DrEvil 05-01-2009 19:20

Re: Hl2 Sdk?
 
I'm not allowed to give out the modified engine and tf2 dlls needed to run the bot. I'm trying to be persistent with pushing them to release the updates to the public.


All times are GMT +2. The time now is 17:31.

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