Thread: Hl2 Sdk?
View Single Post
Re: Hl2 Sdk?
Old
  (#13)
MarD
Waypointer/Moderator
 
MarD's Avatar
 
Status: Offline
Posts: 1,184
Join Date: Jan 2004
Location: Canada.. EH!?
Default Re: Hl2 Sdk? - 11-03-2008

Heyyo,

Quote:
Originally Posted by Count Floyd View Post
I currently don't have an online account @ home - why do think I'd like to have Bots in first place ?
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 View Post
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 View Post
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]


Later-a-much, and LONG LIVE THE D!,
(Link>>>MarD's Moddin' Site<<<Link) MarD

Rock Hound. (<Link)

Last edited by MarD; 11-03-2008 at 16:42..
  
Reply With Quote