.:: Bots United ::.  
filebase forums discord server github wiki web
cubebot epodbot fritzbot gravebot grogbot hpbbot ivpbot jkbotti joebot
meanmod podbotmm racc rcbot realbot sandbot shrikebot soulfathermaps yapb

Go Back   .:: Bots United ::. > Developer's Farm > General Bot Coding
General Bot Coding See what a pain it is to get those little mechs shooting around

Reply
 
Thread Tools
HPB template on CS 1.6?
Old
  (#1)
MusicMan
Member
 
Status: Offline
Posts: 236
Join Date: Feb 2004
Default HPB template on CS 1.6? - 22-03-2004

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
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#2)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: HPB template on CS 1.6? - 22-03-2004

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.



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#3)
MusicMan
Member
 
Status: Offline
Posts: 236
Join Date: Feb 2004
Default Re: HPB template on CS 1.6? - 22-03-2004

ok thanks alot, I was thinking that might be the solution, but thanks for the confirmation PMB

MusicMan
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#4)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: HPB template on CS 1.6? - 23-03-2004

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)
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#5)
MusicMan
Member
 
Status: Offline
Posts: 236
Join Date: Feb 2004
Default Re: HPB template on CS 1.6? - 23-03-2004

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
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#6)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: HPB template on CS 1.6? - 23-03-2004

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



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#7)
red_dots
Member
 
Status: Offline
Posts: 4
Join Date: Jan 2004
Location: alaska
Default Re: HPB template on CS 1.6? - 24-03-2004

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.
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#8)
botman
Super Moderator
 
Status: Offline
Posts: 280
Join Date: Jan 2004
Location: Plano, TX
Default Re: HPB template on CS 1.6? - 24-03-2004

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!

botman
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#9)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: HPB template on CS 1.6? - 24-03-2004

Bah, ok, ok, *somebody* hears you, super moderator



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Re: HPB template on CS 1.6?
Old
  (#10)
Pierre-Marie Baty
Roi de France
 
Pierre-Marie Baty's Avatar
 
Status: Offline
Posts: 5,049
Join Date: Nov 2003
Location: 46°43'60N 0°43'0W 0.187A
Default Re: HPB template on CS 1.6? - 25-03-2004

http://hpb-bot.bots-united.com/



RACC home - Bots-United: beer, babies & bots (especially the latter)
"Learn to think by yourself, else others will do it for you."
  
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles.com