.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   YaPB (http://forums.bots-united.com/forumdisplay.php?f=55)
-   -   First beta release of YaPB 2 (http://forums.bots-united.com/showthread.php?t=5283)

Whistler 18-05-2006 07:14

First beta release of YaPB 2
 
Download:
http://yapb.bots-united.com/files/yapb-2_0-beta.zip

YaPB 2 is based on JetBot by Dmitry Zhukov, who is known as "strelomet" in this forum. Jetbot was a fork of my original version of YaPB.

This version is maintained by him.

INSTALLATION:
1. Download YaPB from http://yapb.bots-united.com and install
2. Download this file, and uncompress it to [CS install dir]\cstrike\addons\yapb
3. Edit liblist.gam:
PHP Code:

gamedll "addons/yapb/dlls/yapb.dll"
gamedll_linux "addons/yapb/dlls/yapb_i386.so" 

Or configure the Metamod to load these files as plugins.


Please report bugs in this forum.

KWo 18-05-2006 07:30

Re: First beta release of YaPB 2
 
Quote:

Originally Posted by Whistler
YaPB 2 is based on JetBot by Dmitry Zhukov, who is known as "strolemet" in this forum, which was a fork of my original version of YaPB. This version is maintained & developed by him.

That's strelomet, not strolemet :)

Whistler 18-05-2006 07:37

Re: First beta release of YaPB 2
 
Corrected :P Thanks :)

The Storm 18-05-2006 11:44

Re: First beta release of YaPB 2
 
JetBot is based on the old PODbot 2.6 sources. In the begining Dmitry Zhukov first started with the sources of YaPB but later he started again with the sources of the old PODbot 2.6. :)
EDIT: I downloaded the latest sources of JetBot and I'm now confused...
Code:

// Jetbot - AI Development project for Counter-Strike. Remake of POD-Bot 2.6.
// Copyright (c) 2005-2006, by Dmitry Zhukov. All Rights Reserved.
//
// Copyright (c) 2000-2001, by Markus Klinge. All Rights Reserved.
// Copyright (c) 2003-2005, by Wei Mingzhi. All Rights Reserved.

In the old sources I think that the last line was not there but I don't have backups. Oh never mind. :P

Ancient 18-05-2006 22:34

Re: First beta release of YaPB 2
 
There are no way points.

And I don't know if putting addbot in yapb.cfg will help any.

jeefo 19-05-2006 07:52

Re: First beta release of YaPB 2
 
@THE_STORM:
What ever it was, it's now YAPB :)

@Ancient:
First downlaod http://yapb.bots-united.com/files/yapb.exe (with waypoints), and then update with this zip.

Ancient 19-05-2006 13:45

Re: First beta release of YaPB 2
 
Yes, I know what your thinking; I'm dumb :P

I'll be testing it later after school and this weekend and will report bugs when I see them.
Thanky ou.

Whistler 19-05-2006 16:21

Re: First beta release of YaPB 2
 
I've found a bug which causes the language files not correctly loaded.

The details is that the InitConfig() is called before the settings in yapb.cfg take effect. So the language which is set in yapb.cfg is never actually loaded.

and the patch may be adding this into the InitConfig():
PHP Code:

   ServerCommand ("exec addons/yapb/config/yapb.cfg"); 

btw, I would recommend using dynamic memory allocation for the translator which can save a lot of memory.

jeefo 19-05-2006 16:32

Re: First beta release of YaPB 2
 
Thanks, i've already found this bug, while porting bot to be able use different botnames & chat using language cvar. i've simply put InitConfig () into ServerActivate (), and add yapb.cfg exec into GameDLLInit ().

So names.cfg & chat.cfg is now affected by language cvar, and located in language directory...

Quote:

btw, I would recommend using dynamic memory allocation for the translator which can save a lot of memory.
ok :)

P.S.
Adding execution of config onto top of InitConfig () has no effect (but i don't know why). Language is changing but not after execution.

P.P.S
Also fixed crash, when bots trying to use chat, when it wasn't loaded correctly...

The Storm 19-05-2006 17:40

Re: First beta release of YaPB 2
 
Yeah dinamic memory safe a lot of resources. Check out EPB source, all the config and languarge files code use dinamic memory, the .dll is less bigger than before too. :)

jeefo 19-05-2006 18:01

Re: First beta release of YaPB 2
 
Make dll less biggger is not a point to use dynamic memory allocation. Dynamic memory allocation allows to save memory at runtime (ie. RAM). Currently yapb2 uses old method for storing language translations, ie. there are predefined arrays of chars that uses constant array size (512), whatever the size of the string stored in this array.

Currently yapb2 uses something like that:
PHP Code:

char szTextStr[512];
char szCpy[] = "this is string";

strcpy (szTextStrszCpy); 

So the source string has length = 14, and allocated size = 512, so we waste 498 bytes of memory.

And the original yapb uses something like that:
PHP Code:

char *szTextStr;
char szCpy[] = "this is string";

szTextStr strdup (szCpy); 

In this way we waste nothing :)

The Storm 19-05-2006 18:34

Re: First beta release of YaPB 2
 
Check EPB. With std:string you waste nothing too. :) Dinamic string... ;)

jeefo 19-05-2006 18:39

Re: First beta release of YaPB 2
 
Ofcourse, but i'm don't like to use Standard Template Library, because of several reason, thats why i've write "handmaded" versions of std::vector and std::string.

The Storm 19-05-2006 21:01

Re: First beta release of YaPB 2
 
Can you tell me the reasons that you don't like to use STL ? I'm interested. :)

jeefo 19-05-2006 21:49

Re: First beta release of YaPB 2
 
Well i can't explain everything in english, but main reasons is that it's make output binary more huge (yapb2 with debug build = 1.02Mb, yapb2 with debug build + STL = 1.37Mb, on VC++Pro8), staticly linked against STL because "new" versions of VC uses non-standard dll binaries (msvcp80.dll), sometimes my friends has some errors using soft on different linux distros, with segmentation faults on libstdc++.so, and i don't like to code with STL, code style, tons of template parametrs, and all those allocators and stuff.

It's just my opinion... :)

The Storm 20-05-2006 10:46

Re: First beta release of YaPB 2
 
I have VC++ 2005 and VC++ 2003. The 2003 one is much better for such stuff than 2005. In 2005 MS try to import their own standart witch I don't like. I think that VC++ 2003 fits the C++ standarts perfect and you will not have problems running you app on differend Windows OS's because it use the standart dll binaries. :) Btw STL have most of the power in C++. You can do some things very easy with already predefined functions.

jeefo 20-05-2006 11:48

Re: First beta release of YaPB 2
 
Ok lets stop this. Its a complete offtop. :) The ms standard can be switched off by #pragma warning (disable : 4996) :) And i don't own VS 2003.

Ancient 20-05-2006 19:59

Re: First beta release of YaPB 2
 
Everything seems fine, but the yapb_quota thing is kind of confusing at first, I added like 17 addbot's at the end of the cfg file..

The bot's skill I set them at 60 - 70 and it seems like 2 or 3 shots and your dead, these bot's are alot harder than podbot mm.
The aim is deadly accurate.
I like it :)
Everything works well, it's just the bot's take forever for all of them to join the server.
I use listenserver.

Seems like old pb 2.6, like nothing has been changed just few commands and verion sayings and thats it :P
It was frustrating to edit the liblist.gam because the attributes were changed to read-only.
I see that there are 2 dll's, 1 PODBot.dll and other yapb.dll, which one should be directed to by metamod plugins.ini?

Whistler 21-05-2006 03:42

Re: First beta release of YaPB 2
 
podbot.dll is the old YaPB while the yapb.dll is this version.

and actually there _are_ a lot of changes :)

The Storm 21-05-2006 09:23

Re: First beta release of YaPB 2
 
Where I can see the changes? :)

jeefo 21-05-2006 14:33

Re: First beta release of YaPB 2
 
@Ancient:
Default installer for "old" yapb, is overriding liblist.gam with new one, to use update you must change "addons/yapb/dlls/podbot.dll" to "addons/yapb/dlls/yapb.dll', in liblist or plugins.ini.

@TS:
Common changes:
Code:

YaPB 2.0 Beta (1):
° A Tons of internal and code changes (no needed for users (non-programmers)).
° Bots now can escape from ticking bomb (both teams).
° Implemented BotAim2 plugin (code taken from PODBot mm).
° Bots is now a bit harder that before (maybe twice as hard).
° Bots now using sniper-zoom all the time.
° Bots switching to pistol if own sniper weapon, and enemy is too close.
° Bots switching to pistol if own shotgun, and enemy is too far.
° A bit imporoved explosive grenade usage.
° Improved usage of flashbang grenade (thanks to PODBot mm).
° Added weapon buying economics system. (with complete configuring).
° Added support for specifing buy precents for grenades.
° Added three different Msec calculation methods (to choose the best).
° When adding/kicking one bot from server cvar yapb_quota automatically incrementing/decrementing.
° Little changes in bot pathfinding system.
° Bots now switching to knife to jump somewhere only if sure that he can't jump there with current weapon
  (thanks to PODBot MM).
° Added more random personality select when creating bot with random parameters.
° Lowered a bit memory usage by chat system.
° Added voice communication (aka chatter) (you must own CSBot chatter files).
° Added support for "Double Jump" (ie bots can help you to get to higher places).
° CT bots, now in 80% times guarding droped C4 bomb.
° User now able to request bot to drop him C4 bomb or weapon.
° Bots now can shoot their target, when target sitting in water (f.e. in fy_poolday).
° Bots updated to use with latest metamod and half-life sdk.
° For those peoples who want to beta-test this bot, added many debugging info.
° Added ability for saving visibility tables to file on disk (increasing map load process).
° Added ability for saving pathmatrix for Floyd pathfinder to file on disk (increaing map load process in a bit
 (after first load)).
° Bots can take revenge from their teamkillers (humans).
° Partially fixed, bug where bots duck for less than half second, when seeing random part of enemy body.
° Changed the main menu. (and some other bots menu, and some menus added :)
° Bots reloading weapons now more often.
° Bots now have a clue for using burst mode for FAMAS and GLOCK18.
° VIP Bot and bot that own C4 is now forbiddent to camp.
° Changed values for bots walk speed (now it's calculated, instead of beeing hardcoded).
° Bots don't buy new pistols in a first round of game.
° Bots is now able to defuse bomb without pressing duck button (when no enemies running around).
° Added much of server commands (type yapb help ?, for a complete* list of commands).
° Added much of new cvars, just type yapb_, and you will see the rest (cs16 only).
° Added support to use menu & bot commands from client of DS server (thanks to PODBot mm).
° All terrorists knows where the droped bomb is and moving to it immideately.
° Extended chat system, by adding some more chat sections.
° Redone all pathwaypoint operations (code taken without modifications from PODBot mm).
° Improved shield usage [1. Bots use it more tactically. 2. Bots don't shoot shielded guy (if shield drawn).].
° Added support for restricting specific weapons (not podbotmm version, but will be added and podbotmm version).
° Bots now turning to to direction of damage he's get (using dmg_inflictor).
° Bots (CTs) switching to knife and running to bomb (if planted), when all enemies is killed.
° Fixed CTs behaviour when bomb planted (ie Staying on one place, and not moving anywhere).
° Bots don't look at wall tracking his last enemy all the time (thanks to PODBot mm).
° Changed a little bit recoil compenstaion code (a very little bit).
° Bots don't try to buy anything on the fun maps (like fy_, aim_, awp_ etc).
° Added menu to kick specific bots (thanks to PODBot mm).
° Added cvar to force bots to join specific team (yapb_forceteam).
* There a lot of more little changes not listed here, and some changes i've just can't translate (because of my limited
  knowledge of english).

YaPB 2.0 Beta (2): incoming (not available yet):
° Reduced a bit CPU usage by removing the call to CVAR_GET_FLOAT, because i've got too many lags on my old computer
  i've counted calls in one second for 10 bots, and result shocking me, about 8000 calls per second!, now all cvars
  updating every second, and stored in internal bot variable.
° Fixed ignoring of yapb_language variable, now it works 100%.
° Renamed all bot cvars from yapb_* to yb_* for faster access.
° Added alias to yapb server command, also called yb.
° Added english and russian documentaions (in process).
° Added completely automatic bot installer (in process).
° Some little tweaks to AI.


KWo 21-05-2006 22:06

Re: First beta release of YaPB 2
 
Quote:

Originally Posted by strelomet
° Reduced a bit CPU usage by removing the call to CVAR_GET_FLOAT, because i've got too many lags on my old computer
i've counted calls in one second for 10 bots, and result shocking me, about 8000 calls per second!, now all cvars
updating every second, and stored in internal bot variable.



I believe You've forgotten to add again "thanks to podbot mm" :)
I did it about 2 months ago. ;)


jeefo 21-05-2006 22:17

Re: First beta release of YaPB 2
 
Quote:

Originally Posted by KWo
I believe You've forgotten to add again "thanks to podbot mm" :)
I did it about 2 months ago. ;)

[/FONT]

Nope, in original yapb, this cvars update every second, but later i remove all less used global variables, but now i notice lags, and restored this stuff :) Whatever thanks to podbot mm :)

KWo 21-05-2006 23:40

Re: First beta release of YaPB 2
 
Quote:

Originally Posted by strelomet
Nope, in original yapb, this cvars update every second, but later i remove all less used global variables, but now i notice lags, and restored this stuff :) Whatever thanks to podbot mm :)

Yep - You are right - just noticed some cvars were really updated not every frame, but.. every 0.5s in some sources of YapB dated 25.11.2005
Code:

void StartFrame( void )
{
  static int i, index, player_index;
  static float msecdel = 0, msecnum = 0;

  if (g_flCvarUpdateTime < gpGlobals->time)
  {
      g_iBotQuota = (int)CVAR_GET_FLOAT(g_cvarBotQuota.name);
      g_iMinBotSkill = (int)CVAR_GET_FLOAT(g_cvarMinBotSkill.name);
      g_iMaxBotSkill = (int)CVAR_GET_FLOAT(g_cvarMaxBotSkill.name);
      g_iMaxNumFollow = (int)CVAR_GET_FLOAT(g_cvarMaxNumFollow.name);
      g_fTimeSoundUpdate = CVAR_GET_FLOAT(g_cvarTimeSoundUpdate.name);
      g_fTimePickupUpdate = CVAR_GET_FLOAT(g_cvarTimePickupUpdate.name);
      g_fTimeGrenadeUpdate = CVAR_GET_FLOAT(g_cvarTimeGrenadeUpdate.name);
      g_iDebugGoalIndex = (int)CVAR_GET_FLOAT(g_cvarDebugGoalIndex.name);

      g_bUseExperience = CVAR_GET_FLOAT(g_cvarUseExperience.name) > 0;
      g_bAutoSaveExperience = CVAR_GET_FLOAT(g_cvarAutoSaveExperience.name) > 0;
      g_bBotChat = CVAR_GET_FLOAT(g_cvarBotChat.name) > 0;
      g_bBotUseRadio = CVAR_GET_FLOAT(g_cvarBotUseRadio.name) > 0;

      g_bJasonMode = CVAR_GET_FLOAT(g_cvarJasonMode.name) > 0;
      g_bDetailNames = CVAR_GET_FLOAT(g_cvarDetailNames.name) > 0;
      g_bInstantTurns = CVAR_GET_FLOAT(g_cvarInstantTurns.name) > 0;
      g_bShootThruWalls = CVAR_GET_FLOAT(g_cvarShootThruWalls.name) > 0;
      g_bAllowVotes = CVAR_GET_FLOAT(g_cvarAllowVotes.name) > 0;
      g_bBotSpray = CVAR_GET_FLOAT(g_cvarBotSpray.name) > 0;
      g_bBotBuy = CVAR_GET_FLOAT(g_cvarBotBuy.name) > 0;
      g_bBotAutoVacate = CVAR_GET_FLOAT(g_cvarBotAutoVacate.name) > 0;

      g_flCvarUpdateTime = gpGlobals->time + 0.5;
  }

Seems I discovered something what Whistler found few months before me. I didn't see it before. I was talking toTHE_STORM about that optimization of code (I was believing it was only my idea). :)

Whistler 22-05-2006 11:23

Re: First beta release of YaPB 2
 
actually that has been in YaPB for about 3 years :) However that sometimes will result in e.g., bots kicked strangely sometimes as the cvar values are not take effect immediately so I removed that in the January 2006 release. Maybe a better method is to use the pfnCvarGetPointer() (or something like that).

KWo 22-05-2006 13:08

Re: First beta release of YaPB 2
 
Quote:

Originally Posted by Whistler
actually that has been in YaPB for about 3 years :) However that sometimes will result in e.g., bots kicked strangely sometimes as the cvar values are not take effect immediately so I removed that in the January 2006 release. Maybe a better method is to use the pfnCvarGetPointer() (or something like that).

Well - I didn't notice yet such problems. Splorygon registers the cvars in
C_DLLEXPORT int Meta_Attach( ... ), but yapb has it in void GameDLLInit( void ) - maybe it works different way. I'm not good with mm stuff - so You need to figure out Your-self - it both method are equal or some of them is better. In ServerActivate we execute podbot.cfg (the first map only) - so they are setuped correctly.
About that pfnCvarGetPointer - AMX X is using similar method:
Code:

cvar_t *csstats_rankbots
cvar_t init_csstats_rankbots ={"csstats_rankbots","1"};

CVAR_REGISTER (&init_csstats_rankbots);
csstats_rankbots = CVAR_GET_POINTER(init_csstats_rankbots.name);

bool ignoreBots (edict_t *pEnt, edict_t *pOther){
  rankBots = (int)csstats_rankbots->value ? true:false; // unnoficial line added by KWo to get it working
    if ( !rankBots && ( pEnt->v.flags & FL_FAKECLIENT || ( pOther && pOther->v.flags & FL_FAKECLIENT ) ) )
        return true;
    return false;
}


jeefo 22-05-2006 14:32

Re: First beta release of YaPB 2
 
I've not noticed problems Whistler write (yet). I will test that.

Minh-Lo-Hwang 23-05-2006 10:36

Re: First beta release of YaPB 2
 
Hi Peeps :)!
It's wonderful to see , that there are still Bots in the Work for good ole' Cs ;).
Have a nice Day! :)

weeshna 21-05-2008 04:42

Re: First beta release of YaPB 2
 
] yapb_quota 1
"yapb_quota" changed to "1"
"yapb_quota" changed to "0"

it's been doing that by itself! i need help!!! when i try to add bots it changes the quota back to 0. what do i do to add bots now?!

-sorry for posting on a 2 year old post.. =9


All times are GMT +2. The time now is 10:16.

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