.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   Releases, Installers, Docs & Coding (http://forums.bots-united.com/forumdisplay.php?f=48)
-   -   POD-bot back into shape. (http://forums.bots-united.com/showthread.php?t=833)

Pierre-Marie Baty 21-02-2004 21:37

POD-bot back into shape.
 
Hi lads!

Here's something to play with.
Quote:

v2.5 metamod
+ Ported to Metamod by Pierre-Marie Baty
+ Put all this mess into shape at last (indenting, alignment, comments)
+ Fixed an impressive number of bugs
+ Added support for CS 1.6 (shield code thanks to Wei Mingzhi). Be sure to
use the new bot_weapons.cfg file else the bot will crash.
+ Fixed all v2.6 bugs (bomb planting, etc) the way it's meant to be fixed -
directly at the spot. No ugly hacks, no "patching".
+ Before I forget: ported to Linux, too
+ Forced the bots to always use the A* pathfinder. It should affect greatly
the team tactics if used with mature .pxp files.
+ Fixed waypoint 0 with 65535 danger in default experience table
+ Fixed waypoint editor not working anymore
+ Added Austin's super-kickass waypoint editor that he wrote with SoUlFaThEr
for the now defunct PoXBot. At least this code won't be lost for everyone.
+ Fixed new experience database bug related to incorrect memset usage
+ Got rid of the ugly CVAR parsing for server commands. Using a real dedicated
server command handler now. No quotes needed anymore in server commands.
+ Fixed brainless CT bots taking the hostages through impossible routes
+ CT bots now pick up abandoned defuse kits (got the idea while reading Wei
Mingzhi's YaPB code - worth a look, he ported all the POD-Bot code to C++)
+ Fixed incorrect danger estimation of waypoint #0 to 65535 the way it's
meant to be fixed (diff. between signed int and unsigned short ?? ;-))
+ Fixed bots not coming back after a map change
+ I advise you to delete all your previous .pxp files UNLESS they've been
used with POD-Bot 2.5 ONLY (and not the buggy 2.6).
+ The overall performance has been restored to what it used to be with 2.5
+ Since I'm a lazy bugger, I'll stop here and code my own bot instead.

(added after the original post)

+ (some time later) GEEZ, looks like I had rushed this version. Back to it
again, and VERY ANGRY!!!
+ Rewrote the messy CS buy routines in a clean way at last
+ Fixed Count Floyd's experimental A* pathfinder. He was using no heuristic!!!
+ Fixed bots too shy, was linked to the absence of heuristic function. I wrote
a square distance heuristic (no sqrt involved. Fast and efficient)
+ Because of an important change in the way the pathfinder behaves, you should
delete all your .pxp files again, or use untouched .pxp files from PB 2.5
+ Fixed bots don't buy in CS 1.6 after the first round.
+ Fixed BotSpawnInit() calls zapping the bot's brains several times in a row
+ Fixed bots trying to pick up a new weapon without discarding the shield
+ Fixed VERY COMMON crash bugs in bot chat functions (ThreatTab index > 31)
+ Fixed yet another whole shitload of crash bugs on bad entities (w/ FNullEnt)
+ Got rid of the unused MOTD message catching
+ Bots now know when icons are blinking on their HUD: bomb, defuser, buy zone
+ Delayed bots buying so that they don't buy all in the same frame (lag issue)
+ Fixed bots having trouble at doors. Bot navigate doors perfectly now.
+ Bots pay much more attention to the mission goals now. They don't mess
around anymore doing idle stuff, they deploy and go to the goal.
+ Fixed bots getting stuck on ladders where a func_breakable would block them
+ Now using ServerActivate() instead of StartFrame() to catch map changes
+ The A* pathfinder should be faster now
+ Took the buying code out of the message queue. WTF was it doing there ???
+ Rewrote team/class selection function: 3 times shorter, twice as efficient.
+ Now the bot is pretty much more stable.
+ Enough for today. It's 05:21 AM and I'm going to bed. Bye bye ladies.
I have made no changes relative to the behaviour of the bot. Only fixed stuff and added CS 1.6 support. I took the shield usage code from Wei Mingzhi's YaPB bot source code, so most of the credits for this release go to him.

Source code included, of course...

http://racc.bots-united.com/releases/podbot.zip
uploading right now, so please wait a little :)

please READ the readme !!!

*edited* as you can see, another whole shitload of bugs have been fixed. Those who already had grabbed the file should redownload it again. This time it WORKS with CS 1.6, and EVERYTHING works, I tested it MYSELF. Spent my night on it, damnit!!!

eAnic 21-02-2004 22:38

Re: POD-bot back into shape.
 
Is the linux version compiled on glibc 2.3? I get a badf loading error, when i try to start it up.

eAnic 21-02-2004 22:44

Re: POD-bot back into shape.
 
Btw. i tried to compile it on my linux machine, but i get this errors:

bot.cpp:21: extdll.h: No such file or directory
bot.cpp:22: dllapi.h: No such file or directory
bot.cpp:23: h_export.h: No such file or directory
bot.cpp:24: meta_api.h: No such file or directory

Austin 22-02-2004 03:48

Re: POD-bot back into shape.
 
WHOOOOAAAAAA.........

NOW I "MAY" "FINALLY" abandon the good old POD 2.5 in favor of something new!

Great news! GREAT JOB! WILL DEFINITELY check this out and let you know what I find!

PM, what would the CS bot community be like with out you ?

P.S.
Is Mingzhi's c++ source available, and if so where?


Thanks Man!!!

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

Re: POD-bot back into shape.
 
@eAnic: you need the metamod source code and the HL SDK to compile it. Check out the Makefile and adapt the paths to suit your installation.

@Austin: yes, Wei "Whistler" Mingzhi's source code is available at http://planet.time.net.my/TechnologyPark/weimingzhi - after looking it up. There seems to be a lot of cool stuff with it, especially the BotMixer port, which allows you to run the barebones PB 2.5 DLL with CS 1.6, I really wonder why none of us has thought about it yet !! Whistler, you're doing great stuff, make yourself known !

Whistler 22-02-2004 12:55

Re: POD-bot back into shape.
 
Thanks PM.

Quote:

+ Added Austin's super-kickass waypoint editor that he wrote with SoUlFaThEr
for the now defunct PoXBot. At least this code won't be lost for everyone.
Would you please tell me where I can get this PoXBot? Thanks.

Also would you mind my using your FakeClientCommand code? ;D

Pierre-Marie Baty 22-02-2004 18:32

Re: POD-bot back into shape.
 
You should ask Austin, it's him who sent me the PoXBot code, he still has it because he was helping Steve++ with coding.

And for my FakeClientCommand code, be advised that there's a copyright fee of €49,342,667 and 23 cents that you shall pay me for each line of this code you use in your bot, UNLESS the motd states explicitly that I am the greatest weirdo in the world (in which case, the fee is lowered to 2 cents per line, preferrably paid in roubles, in pesetas or in kopecks). Payments shall be directed to God the Father, cloud #3, Sky, 43276 Above (preferrably by air mail).

Now honestly, you ask me that ? :D

eAnic 22-02-2004 22:12

Re: POD-bot back into shape.
 
Where can i download the HL SDK? I could not find it anywhere.

Pierre-Marie Baty 22-02-2004 22:33

Re: POD-bot back into shape.
 
The HL SDK it available on the metamod web site too (look in the "files" section)

BTW I fixed yet another bug in the waypoint editor, caused by the fact that Count Floyd wanted to display the visibility data for each of its waypoints, leading to a huge number of beams to be displayed which could cause the engine to crash because of network message overhead. Everybody who has already downloaded the podbot.zip file should redownload it again.

And tell me if there are other bugs that I haven't noticed yet ; I'll fix them ASAP. We want to reach the same level of performance than the old POD-bot 2.5 with Steam.

Austin 22-02-2004 22:48

Re: POD-bot back into shape.
 
Pm is this version totally compatible with a non-steam 1.5 DS ???

Pierre-Marie Baty 23-02-2004 00:34

Re: POD-bot back into shape.
 
sure, I tested it on 1.5 since I don't have Steam yet.

eAnic 23-02-2004 04:20

Re: POD-bot back into shape.
 
Ok, i compiled the podbot version sucessfully but i still won't startup.
Can anyone test my glibc 2.2 podbot version?

http://80.78.255.195/new/podbot_mm_i386.so
http://80.78.255.195/new/podbot_mm_i386.so

[+Duracell-] 23-02-2004 06:30

Re: POD-bot back into shape.
 
Two problems I've noticed after playing a little bit:

-- Bots don't buy after the first round
-- Doesn't work with Realbot WIP #9

First one prevents me from playing...um..fairly...lol

Second one is not much of a problem...just annoying...just wanted to use Podbot to waypoint easier

Also, what's new in the waypoint editor?

Whistler 23-02-2004 12:18

Re: POD-bot back into shape.
 
Some bugs...

1. shield pickup.

else if (iPickType == PICKUP_SHIELD)
{
if ((pEdict->v.weapons & (1 << CS_WEAPON_ELITE)) || BotHasShield (pBot) || pBot->bIsVIP)
bCanPickup = FALSE;
else if (BotHasPrimaryWeapon (pBot))
{
if (!BotRateGroundWeapon (pBot, pent)) // BUG
bCanPickup = FALSE;
}
}

I have changed a little to the BotRateGroundWeapon function (mine returns bool, CF's returns int). In the original PODBot code it should be like this:
if (BotRateGroundWeapon(pBot, pent) <= 0))

2. two crash bugs.

BotThink (bot.cpp):
if ((pBot->iStates & STATE_SUSPECTENEMY) && pBot->bWantsToFire)
{
int iTask = pBot->pTasks->iTask; // BUG

// Don't allow shooting through walls when camping
if (iTask == TASK_PAUSE || iTask == TASK_CAMP)
pBot->bWantsToFire = FALSE;
}

BUG: pBot->pTasks may be NULL sometimes.
in the original PB code: GetBotSafeTask(pBot)->iTask. or you can also check "if (pBot->pTasks)" manually. In my code I moved this code to LastEnemyShootable() function.


SoundAttachToThreat (bot_sounds.cpp):

extern threat_t ThreatTab[32];
.......
iIndex = ENTINDEX (pEdict) - 1; // BUG
ThreatTab[iIndex].fHearingDistance = 800.0 * fVolume;

BUG: ENTINDEX(pEdict) - 1 sometimes may be "out of the range" and this will causes invalid memory access. So we had better change this as well....
(This might be what causes the hostage crash problem IMO)

Here is what I'm doing:

Vector vecPosition = pEdict->v.origin;
if (vecPosition == Vector(0, 0, 0))
vecPosition = VecBModelOrigin(pEdict);

int iIndex = ENTINDEX(pEdict) - 1;
if (iIndex < 0 || iIndex >= gpGlobals->maxClients)
iIndex = UTIL_GetNearestPlayerIndex(vecPosition);

// Hit/Fall Sound?
if (strncmp("player/bhit_flesh", pszSample, 17) == 0
|| strncmp("player/headshot", pszSample, 15) == 0)
{
// don't change iIndex here, and in any following code.....
ThreatTab[iIndex].fHearingDistance = 800.0 * fVolume;
ThreatTab[iIndex].fTimeSoundLasting = gpGlobals->time + 0.5;
ThreatTab[iIndex].vecSoundPosition = vecPosition;
}

3. weapon selecting bug.

BotSelectBestWeapon (bot_combat.cpp):
iChosenWeaponIndex %= 24; // BUG
select_index = iChosenWeaponIndex;

You have added support to new weapons, yeah? like this weapons after 24 will never be selected :) You can change the 24 to "NUM_WEAPONS + 1"

Also it seems CF learnt BASIC first - he kept using abs() when he should use fabs() ;D


P.S. Thanks for your fix. Seems Valve has changed a lot from the initial release of CS 1.6..... I'll add them to my code. Thanks.

My CS 1.6 is still the old version (I copied the required files out of the steam cache with a binary editor in order to run offline. I just don't want to redownload all things with my slow modem). So I haven't any idea about the new CS 1.6....

Pierre-Marie Baty 23-02-2004 12:57

Re: POD-bot back into shape.
 
Thanks a lot for this quality feedback ! :)

Quote:

Originally Posted by Whistler
Some bugs...

1. shield pickup.

else if (iPickType == PICKUP_SHIELD)
{
if ((pEdict->v.weapons & (1 << CS_WEAPON_ELITE)) || BotHasShield (pBot) || pBot->bIsVIP)
bCanPickup = FALSE;
else if (BotHasPrimaryWeapon (pBot))
{
if (!BotRateGroundWeapon (pBot, pent)) // BUG
bCanPickup = FALSE;
}
}

I have changed a little to the BotRateGroundWeapon function (mine returns bool, CF's returns int). In the original PODBot code it should be like this:
if (BotRateGroundWeapon(pBot, pent) <= 0))

Actually this doesn't matter much, since BotRateGroundWeapon() returns positive numbers only... There's nothing wrong in writing !BotRateGroundWeapon(), or is it ? Booleans are treated like unsigned chars by x86 compilers anyway.

Quote:

2. two crash bugs.

BotThink (bot.cpp):
if ((pBot->iStates & STATE_SUSPECTENEMY) && pBot->bWantsToFire)
{
int iTask = pBot->pTasks->iTask; // BUG

// Don't allow shooting through walls when camping
if (iTask == TASK_PAUSE || iTask == TASK_CAMP)
pBot->bWantsToFire = FALSE;
}

BUG: pBot->pTasks may be NULL sometimes.
in the original PB code: GetBotSafeTask(pBot)->iTask. or you can also check "if (pBot->pTasks)" manually. In my code I moved this code to LastEnemyShootable() function.
Right ! I missed this one... but hey, I can't just wait for ages for the code to crash at this very point in order to notice it :D Looks like you've been luckier than me ;) I'll grep in the source for every occurence of "pTasks->" and replace them with BotGetSafeTask() when necessary. (*edit*: wow, there were a LOT of them actually ! you should check it out too, there are many more than just this place)

Quote:

SoundAttachToThreat (bot_sounds.cpp):

extern threat_t ThreatTab[32];
.......
iIndex = ENTINDEX (pEdict) - 1; // BUG
ThreatTab[iIndex].fHearingDistance = 800.0 * fVolume;

BUG: ENTINDEX(pEdict) - 1 sometimes may be "out of the range" and this will causes invalid memory access. So we had better change this as well....
(This might be what causes the hostage crash problem IMO)

Here is what I'm doing:

Vector vecPosition = pEdict->v.origin;
if (vecPosition == Vector(0, 0, 0))
vecPosition = VecBModelOrigin(pEdict);

int iIndex = ENTINDEX(pEdict) - 1;
if (iIndex < 0 || iIndex >= gpGlobals->maxClients)
iIndex = UTIL_GetNearestPlayerIndex(vecPosition);

// Hit/Fall Sound?
if (strncmp("player/bhit_flesh", pszSample, 17) == 0
|| strncmp("player/headshot", pszSample, 15) == 0)
{
// don't change iIndex here, and in any following code.....
ThreatTab[iIndex].fHearingDistance = 800.0 * fVolume;
ThreatTab[iIndex].fTimeSoundLasting = gpGlobals->time + 0.5;
ThreatTab[iIndex].vecSoundPosition = vecPosition;
}
Nice solution... Although I'm not sure it REALLY can crash... from my experience I noticed that all sounds that were emitted through pfnEmitSound() (and NOT pfnEmitAmbientSound()) are attached to a client. But of course, adding this check won't cost much. Thanks :)

Quote:

3. weapon selecting bug.

BotSelectBestWeapon (bot_combat.cpp):
iChosenWeaponIndex %= 24; // BUG
select_index = iChosenWeaponIndex;

You have added support to new weapons, yeah? like this weapons after 24 will never be selected :) You can change the 24 to "NUM_WEAPONS + 1"

Also it seems CF learnt BASIC first - he kept using abs() when he should use fabs() ;D
Haha, yet one more ! there are countless little bugs like that and it's a real pain to catch them all :D and I'll have a look around and check for the fabs() issue too... Thanks for the hint !


Quote:

P.S. Thanks for your fix. Seems Valve has changed a lot from the initial release of CS 1.6..... I'll add them to my code. Thanks.
No problem, there are certainly a couple other bugs left, as you just proven me :) But what is fixed, definitely is. :)

BTW, you know you can use the [ code ] and [ /code ] tags to post C code in the forums ?

Pierre-Marie Baty 23-02-2004 15:00

Re: POD-bot back into shape.
 
Another interesting fix, in BotDoWaypointNav():
Code:

  // BEGIN UBERL33T CODE OF YO MOMMA: special door handling
  UTIL_TraceLine (pEdict->v.origin, pBot->wpt_origin, ignore_monsters, pEdict, &tr);
  if (strncmp (STRING (tr.pHit->v.classname), "func_door", 9) == 0)
  {
          pBot->iAimFlags = AIM_DEST; // look at door and only at it (so it opens in the right direction)
          // if bot hits the door, then it opens, so wait a bit to let it open safely
          if ((pEdict->v.velocity.Length2D () < 2) && (pBot->f_timeDoorOpen < gpGlobals->time))
          {
                bottask_t TempTask = {NULL, NULL, TASK_PAUSE, TASKPRI_PAUSE, -1, gpGlobals->time + 0.5, FALSE};
                BotPushTask (pBot, &TempTask);
                pBot->f_timeDoorOpen = gpGlobals->time + 1.0; // retry in 1 sec until door is open
          }
  }
  // END UBERL33T CODE OF YO MOMMA

Interesting enough for a release perhaps ? 8)

stefanhendriks 23-02-2004 15:12

Re: POD-bot back into shape.
 
although i am not fimiliar with the pod's source , i don't see why this should fix anything? When opening a door, you must look at it, true, but waiting is in my experience just unnescesary code. I mean, when you open a door, you keep walking to it untill it opens...

In fact, a 'stuck' code will not fool into this, because you detect total 'freezement' of a bot to detect if it is stuck...

Pierre-Marie Baty 23-02-2004 17:12

Re: POD-bot back into shape.
 
You're wrong Stefan... for a real client yes, you keep pressing the forward button, but for a bot which uses the obnoxious pfnRunPlayerMove, if the bot keeps trying to rush through the door both the bot and the door will get stuck. The door won't open at all, it will just play endlessly the "open door" sound, and the bot will jump/turn around like crazy because it'll believe it's stuck. ONLY if the bot steps back from the door then the door will open. I defy you to show me a RealBot navigating a door correctly if you do it this way. :P

The code I posted works; tested; 200% guarantees; the bot doesn't wait any longer than the time necessary for the door to open, due to the TraceResult check (the TraceLine passes as soon as the door is sufficiently open for a bot to pass too).

stefanhendriks 23-02-2004 18:45

Re: POD-bot back into shape.
 
I still don't see the point. I don't think the RunPlayerMove function has anything to do with this.

THe engine sees an entity that tries to open a door. Simple.

Try this, run a game, and open a door. And when you open the door, walk to it, face it , and keep pressing forward. It will work.

Now, let a bot try this. It will work aswell, why? Because there is nothing changed in the whole 'way of opening a door'. You simply 'push' it. The engine does not give a damn if its a fake client or not here. (it would not make sense).

For opening doors, i have seen RB succeed lots of times. The only failures are because doors are already open (and thus the connection is not valid), so that needs improvement. But the process of opening a closed (not using a button) door is not a problem for RB.

DreamLord34 23-02-2004 21:02

Re: POD-bot back into shape.
 
Can someone make it so that PODBot & RB play nicely without either the podbot_mm.dll or the realbot_mm.dll crashing?
I want RB to learn off podbot.

stefanhendriks 23-02-2004 21:07

Re: POD-bot back into shape.
 
that would be nice, if somehow could tell me how to keep RB alive when other bots are plugged in i'd be all ears.

DreamLord34 23-02-2004 21:40

Re: POD-bot back into shape.
 
Stefan, they seem to work ok with HPB. Maybe take something from there?
Also, which waypoint folder does podbot read from, just so I know. :D

Pierre-Marie Baty 23-02-2004 22:47

Re: POD-bot back into shape.
 
Quote:

Originally Posted by stefanhendriks
I still don't see the point. I don't think the RunPlayerMove function has anything to do with this.

THe engine sees an entity that tries to open a door. Simple.

Try this, run a game, and open a door. And when you open the door, walk to it, face it , and keep pressing forward. It will work.

Now, let a bot try this. It will work aswell, why? Because there is nothing changed in the whole 'way of opening a door'. You simply 'push' it. The engine does not give a damn if its a fake client or not here. (it would not make sense).

For opening doors, i have seen RB succeed lots of times. The only failures are because doors are already open (and thus the connection is not valid), so that needs improvement. But the process of opening a closed (not using a button) door is not a problem for RB.

Heck, I just tried realbot and shockingly, this problem doesn't happen at all !!! although I swear it DOES with all the other bots I tried previously.

This problem happens less with swinging doors like in cs_militia, because the doors open in front of the bot (as long as the bot is FACING the door and not trying to run backwards to it). But with sliding doors, the bounding boxes of the door and a podbot DO collide.

That's the reason why Austin wrote plugins to remove all doors in all maps for his bot servers, because bots could not navigate them fluently. Campers only had to sit behind a door, wait for a bot to come by and spray bullets at a stuck bot.

*********LAST MINUTE BREAKING NEWS**********
I HAVE FOUND WHY!!! it's because of that aimbug fix bug from Paulo-La-Frite again !! And since we talked about it some time ago you already gave a solution and fixed all the angle bug problems in RealBot already. That's why your bot is not affected. Lucky ole man ;)

DreamLord34 23-02-2004 22:56

Re: POD-bot back into shape.
 
Pierre-Marie Baty, what is the add bot command? addbot doesn't do anything, they also don't rejoin at map change.

stefanhendriks 23-02-2004 23:03

Re: POD-bot back into shape.
 
w00t! Finally some good news pmb ;) Hehe. Well i am glad to hear this.

I was hoping you could shed a light on 'multiple bots working together on metamod'. I know it has something to do with the indexes not being updated properly or something. But i have not taken a look into this properly yet.

I think something like a bool bIsOtherBot is needed, so when a fakeclient is found, but is not created using botCreate it is automaticly an 'otherbot'. Therefor it should not 'think'. But as i said i don't know the exact problems so i cannot say what a fix can be :)

DreamLord34 23-02-2004 23:13

Re: POD-bot back into shape.
 
Hey guys, I did have both the HPB_bot_mm.dll & the realbot_mm.dll working together, mind you with the odd crash but still worked.
Maybe that's one place to look? The reason why I stopped using HPB is due to lack of waypoints for it. That's why I want to use PODBot as it has quite afew.

stefanhendriks 23-02-2004 23:24

Re: POD-bot back into shape.
 
if HPB does work fluently then i think there is something with pod's code? But... logically thinking of it, POD & RB are based off HPB. Although they have underone quite some changes ever since.

DreamLord34 23-02-2004 23:32

Re: POD-bot back into shape.
 
If someone has a fair amount of HPB waypoints, I'll test it again to see if there's any random crashing.

Pierre-Marie Baty 24-02-2004 01:35

Re: POD-bot back into shape.
 
Quote:

Originally Posted by stefanhendriks
w00t! Finally some good news pmb ;) Hehe. Well i am glad to hear this.

I was hoping you could shed a light on 'multiple bots working together on metamod'. I know it has something to do with the indexes not being updated properly or something. But i have not taken a look into this properly yet.

I think something like a bool bIsOtherBot is needed, so when a fakeclient is found, but is not created using botCreate it is automaticly an 'otherbot'. Therefor it should not 'think'. But as i said i don't know the exact problems so i cannot say what a fix can be :)

Actually the solution is simple: put the FL_FAKECLIENT flag (as Turtle Rocker says), but NEVER rely on him to tell if an edict is one of your bots or not.

I.e, never do
Code:

if (pEdict->v.flags & FL_FAKECLIENT)
// this beast is a bot

but do (a la botman)
Code:

int bot_index = UTIL_GetBotIndex (pEdict);
if ((bot_index != -1) && bots[bot_index].is_used)
// this beast is one of MY bots

Note that you can simplify all this by always filling the bots array according to their entity index (which range from 1 to 33). That is, instead of "finding a free slot in the bot's array" to stuff this bot in it during BotCreate(), ask for the entity index once the player() function has been called, and it will give you directly the right slot index in the bots array in which to put your bot. You can then get rid of UTIL_GetBotIndex() and the likes, and replace them all with ENTINDEX (pEdict) - 1.

I have RACC and POD-bot running at the same time, so I don't think the problem is in the POD-bot code. See where I'm looking at ? ;)

Pierre-Marie Baty 24-02-2004 04:22

Re: POD-bot back into shape.
 
DreamLord, could you test this podbot.dll with Steam and tell me if the bots come back after a map change ?

BTW the command for adding bots is "pb addbot" for dedicated servers and "addbot" in the client console for listen servers.

DreamLord34 24-02-2004 04:26

Re: POD-bot back into shape.
 
Ok gimme a few & I will get back to you.

V or 'Tex 24-02-2004 04:29

Re: POD-bot back into shape.
 
Having the bots buy equipment might be a bonus.

DreamLord34 24-02-2004 04:31

Re: POD-bot back into shape.
 
Ok they still don't like realbot as they caused hlds to crash within less then one minute, it was the realbot_mm.dll that crashed after adding podbots.
Server runs at a higher fps then with RB.....
Ok they still don't join at map change, Pierre.
The dll unloads at mapchange but fails to reload & sits as open when I do meta list.

Whistler 24-02-2004 06:19

Re: POD-bot back into shape.
 
about the door: IMO it's because bots just consider being stuck when they're passing through a door.

This works very well on my machine:
Code:

    if (m_iAimFlags < AIM_LASTENEMY)
    {
          // check if we're going through a door...
          UTIL_TraceLine(pev->origin, m_vecDestOrigin, ignore_monsters, edict(), &tr);
 
          if (tr.flFraction < 1.0 && !FNullEnt(tr.pHit))
          {
                  if (FClassnameIs(tr.pHit, "func_door") ||
                        FClassnameIs(tr.pHit, "func_door_rotating"))
                  {
                        // Always face the door when going through it
                        m_iAimFlags |= AIM_ENTITY;
                        m_vecEntity = VecBModelOrigin(tr.pHit);
                        // If the door is near enough...
                        if (Length2(m_vecEntity - pev->origin) < 2500)
                        {
                            m_flNoCollTime = gpGlobals->time + 0.5; // don't consider being stuck
                            if (RANDOM_LONG(1, 100) < 50)
                                  MDLL_Use(tr.pHit, edict()); // Also 'use' the door randomly
                        }
                  }
          }
    }
 
    ChooseAimDirection();
    FacePosition(m_vecLookAt);

Also the BotRateGroundWeapon function doesn't always return positive.

Pierre-Marie Baty 24-02-2004 06:20

Re: POD-bot back into shape.
 
@Vor'Tex: they don't ? ???:(

@DreamLord: if it crashed in realbot_mm.dll it's RealBot's fault, we'll have to wait for Stefan. Additionally I know that he had the exact same problem of DLL not reloading after map change with RealBot and so I'd like to know what he did about it to get it fixed.

I will make the bots use the buy menu shortcuts in CS 1.6 and not browse through the normal buy menus, that might help them buying stuff.

V or 'Tex 24-02-2004 06:31

Re: POD-bot back into shape.
 
They only buy on first round, and with $800 thats not much.

After that, if I drop something they may pick it up, but thats it.

Pierre-Marie Baty 24-02-2004 06:33

Re: POD-bot back into shape.
 
@Whistler: it's not necessarily a good idea to make bots look at the door's origin. The origin of a door entity behaves VERY strangely in the game. When the door has never been opened yet, the origin of its bounding box is normal (in the middle of the door), but once the door becomes pushed only once, its origin jumps 200 ft further although the model stays here!!! And this no matter if you read v.origin or go with VecBModelOrigin. Try it if you don't believe me, it's hallucinating =)

Anyway that's why I prefer the bot to look at the waypoint that's behind the door.

P.S: calling MDLL_Use() is cheating, you know that right ? ;) You should consider doing pEdict->v.button |= IN_USE rather...

DreamLord34 24-02-2004 07:25

Re: POD-bot back into shape.
 
Pierre, when I said that the podbot_mm.dll was sitting as open, RB wasn't loaded at the time as I disabled it. Just so you know. Haven't tried it since.

DreamLord34 24-02-2004 07:35

Re: POD-bot back into shape.
 
Ok now this is strange..... I tried meta reload podbot & this is what I get;

L 02/24/2004 - 00:34:15: [META] ERROR: dll: Not unloading plugin 'POD-Bot'; already unloaded (status=opened)
L 02/24/2004 - 00:34:15: [META] ERROR: dll: Failed to unload plugin 'POD-Bot' for reloading
Reload failed for plugin 'POD-Bot'
If it's already unloaded, why won't mmeta rerload reload the dll?

Pancak3 24-02-2004 09:21

Re: POD-bot back into shape.
 
which is better ivpbot or pb podbots version?
cuz i need a bot to teach my realbots. Ivpbot works well with realbot. i c that u guys have problems works realbot and pb podbots together. so which is better??


All times are GMT +2. The time now is 08:52.

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