![]() |
How to integrate bot in to the game dll ?
Ok I now have a new little project. I start to make a bot for http://www.sandsofwar.net/
I get the source code of Sands of War and I think it will be better to integrate the bot in to the sow.dll file. I started from HPB bot teamplate 4 (the hook dll version). I now want to know what stuff of the bot I don't need to compile it with the sow.dll file. P.S I will work on both SoW bot and E[POD]bot so don't worry EPB fans. :) Now just waiting for MarD to test the new version 5 of EPB. |
Re: How to integrate bot in to the game dll ?
Hah following my good advice about integrated bots eh? :) Get "Bot 10" made by botman(http://hpb-bot.bots-united.com/releases/bot10src.zip) and see what he needed to do to make it work.
|
Re: How to integrate bot in to the game dll ?
also check the TheFatal's HL bot framework, which is simpler but contains everything you need to get the bot work:
http://www.telefragged.com/thefatal/ |
Re: How to integrate bot in to the game dll ?
Ok I download bot10 by botman but now I need by some tutorial. So I get the first bot spectating in game. Now first I need by some help to get the bot to navigate weapons. So I find in bot.cpp this lines :
Code:
// weapon firing delay based on skill (min and max delay for each weapon) |
Re: How to integrate bot in to the game dll ?
these are delay times of firing weapons in the HL for different level of bots.
the weapon handling in bot number 10 is hardcoded in bot_combat.cpp, just read the source code at there also if you want to make a good bot, I'd advise _not_ to use botman's bot number 10, just use TheFatal's minimal framework and do most of the work yourself. However if you simply want a work bot (even if it's "stupid"), bot10 is a good way with only a few changes for the mod's game rules. |
Re: How to integrate bot in to the game dll ?
Whistler I don't want to make fully new bot. I just want to make a simply functional bot for this mod. I don't have enough time to start from the zero and code all by myself. However I don't see any text that explain each number for what is. Yes I know that this numbers are the fire delay but I need to know each number what do.
|
Re: How to integrate bot in to the game dll ?
Just read the source code :)
PHP Code:
|
Re: How to integrate bot in to the game dll ?
Thanks Whistler if I have more questions I will ask again. :P
|
Re: How to integrate bot in to the game dll ?
I need by some help. So I have problems with getting the bot to join in game.
Here my code placed in the start of BotThink() Code:
if (not_started) not_started is settet to 1 when new bot connect. Btw I'm using bot10 by botman for integrating the bot in to the sow.dll file. |
Re: How to integrate bot in to the game dll ?
well I know nothing about that MOD, but you can read the source code of the MOD to figure out how the MOD deal with joining games.
|
Re: How to integrate bot in to the game dll ?
Yes I know how. As you see in the source that I post. But the problem is that only the first bot select correct team and class. After I type again addbot the others bots just stay spectators.
|
Re: How to integrate bot in to the game dll ?
Store not_started in the bot's variables, not in global scope.
|
Re: How to integrate bot in to the game dll ?
Yes I'm declared not_started in to the bot's variables (class CBot in bot.h). Maybe you think that this variable is global because there is not CBot:: before not_started. Well the function that I'm using the variable not_started is :
void CBot::BotThink( void ). So if you have other ideas I will be glad to hear it. :) |
Re: How to integrate bot in to the game dll ?
actually another reason one might think it's global is the inconsistent naming.. some of the variable's names use hungarian notation while others don't.
|
Re: How to integrate bot in to the game dll ?
Quote:
|
Re: How to integrate bot in to the game dll ?
Ok guys this problem is now fixed. :) The bots now join on a team and select class correct. But sinse I'm very new in to the work directly with the game data in to the game dll source, I want to ask what function must I use to get the teams IDs because now the bots are shooting their teammates.
|
Re: How to integrate bot in to the game dll ?
look directly at the bot's CBasePlayer class, most if not all games store the team ID somewhere there.
|
Re: How to integrate bot in to the game dll ?
"hungarian notation" is a way of naming variables invented by a Hungarian developer in Microsoft, it's attaching some letters to identify a variable's type, such as: iInteger, flFloat, szString, m_iIntMember, g_iGlobal, etc. Such variable names are widely used in Half-Life SDK source code.
also from this line of code you have posted: pPlayer->m_iTeam = 1;// Join Team 1 the m_iTeam seems to be the team of the player. |
Re: How to integrate bot in to the game dll ?
Yep after you give the team of the player you can directly spawn it without any problmes.
|
Re: How to integrate bot in to the game dll ?
Ey BU guys, we got a problem. The Storm is having problems with implenting the HPB bot template 4 into the source code. In order to get it to work, he has to use the old and crappy bot 10, which sucks.
Does any of you know how to get the newest HPB bot code integrated into the SoW source? |
Re: How to integrate bot in to the game dll ?
Zacker I don't need by HPBbot #4 because just there is no any AI for SoW. You must understand that. The one thing that I need is the waypoint system. Thats all. The other things I must code by myself but I don't think that I can code a fully new waypoint system so that is the reason that I want to get the HPBbot waypoint system.
|
Re: How to integrate bot in to the game dll ?
I would also like to hear if there is nothing except the waypoint system from Bot 10 to HPB bot template 4 which we can use?
|
Re: How to integrate bot in to the game dll ?
Maybe there is something but is very limited. I don't know. I will check out.
|
Re: How to integrate bot in to the game dll ?
|
Re: How to integrate bot in to the game dll ?
Thanks a lot Whistler. :) I will try to include this bot in SoW maybe tomorow. One question because today I'm very busy. I look only basic in the code and I think that this bot use a nav mesh. Is this true ?
|
Re: How to integrate bot in to the game dll ?
Yes it is, .nav files are generated at each successfull automatic map change.
|
All times are GMT +2. The time now is 04:15. |
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.