.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   HPB template on CS 1.6? (http://forums.bots-united.com/showthread.php?t=1156)

MusicMan 22-03-2004 14:46

HPB template on CS 1.6?
 
Hi everybody I was just wondering what to do to make the HPB bot template source code compile to work with cs 1.6?

I really want to make it playable on cs 1.6 so I can start hacking it out slowly and become better at bot coding;)

Thanks in advance;)

MusicMan

Pierre-Marie Baty 22-03-2004 19:06

Re: HPB template on CS 1.6?
 
Well, I'd say the only thing to do at all, is to update the entities in linkfunc.cpp with the entities exported by the new CS DLL (grab them directly from another bot's source code that is known to work in 1.6). The HPB template is quite simple, it will just spawn bots and make them wander around randomly into the map (although bumping on walls). Hence it's the only real modification needed.

MusicMan 22-03-2004 19:08

Re: HPB template on CS 1.6?
 
ok thanks alot, I was thinking that might be the solution, but thanks for the confirmation PMB;)

MusicMan

Whistler 23-03-2004 12:51

Re: HPB template on CS 1.6?
 
Quote:

Originally Posted by Pierre-Marie Baty
Well, I'd say the only thing to do at all, is to update the entities in linkfunc.cpp with the entities exported by the new CS DLL (grab them directly from another bot's source code that is known to work in 1.6). The HPB template is quite simple, it will just spawn bots and make them wander around randomly into the map (although bumping on walls). Hence it's the only real modification needed.

...I'm afraid you're wrong. You have to change another whole bunch of things. (such as the weaponlist message handling, pfnSetClientmaxspeed stuff and so on)

MusicMan 23-03-2004 14:29

Re: HPB template on CS 1.6?
 
Yeah, I guess you have to because I didn't manage to get it working in 1.6 so I installed 1.5 and now it works, but If you know exactly what to do to get the hpb bot template working in 1.6 without metamod could you please send me the modified template;)

Thanks in advance;)

MusicMan

Pierre-Marie Baty 23-03-2004 15:46

Re: HPB template on CS 1.6?
 
yes but it's the HPB template, not the HPB_bot; the weaponlist message was already broken in CS with the HPB template, and pfnSetClientMaxSpeed wasn't featured, even in the HPB_bot. So we can say it is the only real modification needed, to make the bots spawn at least, which is the point of the template, since the template is not a working bot.

Oh well, nitpicking here :P

red_dots 24-03-2004 09:24

Re: HPB template on CS 1.6?
 
Well here is one more thing that needs to be change in the template unless its been updated since I last got it.

In h_export.cpp change

Code:

// find the directory name of the currently running MOD...
    (*g_engfuncs.pfnGetGameDir)(game_dir);
 
    pos = strlen(game_dir) - 1;
 
    // scan backwards till first directory separator...
    while ((pos) && (game_dir[pos] != '/'))
          pos--;
 
    if (pos == 0)
    {
          // Error getting directory name!
 
                    ALERT( at_error, "HPB_bot - Error determining MOD directory name!" );
    }
 
    pos++;
    strcpy(mod_name, &game_dir[pos]);

to this

Code:

// find the directory name of the currently running MOD...
    (*g_engfuncs.pfnGetGameDir)(game_dir);
 
    pos = 0;
 
    if (strstr(game_dir, "/") != NULL)
    {
          pos = strlen(game_dir) - 1;
 
          // scan backwards till first directory separator...
          while ((pos) && (game_dir[pos] != '/'))
                  pos--;
 
          if (pos == 0)
          {
                  // Error getting directory name!
 
                            ALERT( at_error, "HPB_bot - Error determining MOD directory name!" );
          }
 
          pos++;
    }
 
    strcpy(mod_name, &game_dir[pos]);

I got this out of botmans forum archive. You might want to download it and see if you can find anything else that needs changing for steam.

botman 24-03-2004 14:34

Re: HPB template on CS 1.6?
 
Hmmmm, maybe *somebody* should update the template code to work with Steam (deathmatch, TFC, CS, DMC, etc.) so people won't have to figure out all of the necessary changes themselves.

Note: *somebody* = somebody other than me! :D

botman

Pierre-Marie Baty 24-03-2004 16:34

Re: HPB template on CS 1.6?
 
Bah, ok, ok, *somebody* hears you, super moderator :D

Pierre-Marie Baty 25-03-2004 03:46

Re: HPB template on CS 1.6?
 
http://hpb-bot.bots-united.com/


All times are GMT +2. The time now is 02:54.

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