IPB

Welcome Guest ( Log In | Register )

4 Pages V  1 2 3 > »   
Reply to this topicStart new topic
> Team Fortress 2
Venom
post Oct 12 2007, 11:51 AM
Post #1


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



Hello,
Well i have been playing TF2 basicly since beta, having been release and after playing it for 3 or 4 weeks solid now, I would like to start to turn towards bot development. After previously working with the older HL version of RCbot on Natural Selection and modifing that bot to support different game types, I will be moving my efforts towards bot development with TF2.

Like all source games and mods, they all come with basic source bots any way. The only way to activate this in games like TF2, is to make sure that -console command is on before you launch the game, and simply type "sv_cheats 1" and then "bot_add". Due to the lack of development and customisation of these standard bots, the bots will not do anything even though they can be added to the game. So I will now be looking at RCBot2 to see if i can get bots into TF2.

I will keep you posted on my efforts, i am currently downloading the Windows version of the TF2 dedicated server, having a glimps at the RCbot2 forum, people seem to be having problems with dedicated server so i hope I am able to setup and install RCbots correctly.

Wish me luck

Venom
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 12 2007, 02:38 PM
Post #2


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



Ok, bear in mind i'm doing it on and off myself both for fortress forever and TF2, but because of the limits of the plugin system I doubt it can be easily done to get a half decent working bot on any of them
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 12 2007, 03:00 PM
Post #3


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



do you have any of the source code which has been converted already? it will give me a head start.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 12 2007, 09:47 PM
Post #4


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Venom @ Oct 12 2007, 04:00 PM) *

do you have any of the source code which has been converted already? it will give me a head start.


I only started with the bot modifications and base classes

I guess i can post them here, my ftp is no longer working i would have to upload it to the filebase or I can post my changes:

new: bot_fortress.h

CODE

#ifndef __BOT_FORTRESS_H__
#define __BOT_FORTRESS_H__

typedef enum
{
    TF_CLASS_SCOUT = 1,
    TF_CLASS_SNIPER = 2,
    TF_CLASS_SOLDIER = 3,
    TF_CLASS_DEMOMAN = 4,
    TF_CLASS_MEDIC = 5,
    TF_CLASS_HWGUY = 6,
    TF_CLASS_PYRO = 7,
    TF_CLASS_SPY = 8,
    TF_CLASS_ENGINEER = 9,
    TF_CLASS_CIVILIAN = 0,
}TF_Class;

enum
{
    TF_TEAM_SPEC = 0,
    TF_TEAM_BLUE = 1,
    TF_TEAM_RED = 2,
    TF_TEAM_GREEN = 3,
    TF_TEAM_YELLOW = 4
};

class CBotFortress : public CBot
{
public:
    virtual void init (bool bVarInit=false);
    // setup buttons and data structures
    virtual void setup ();

    virtual void died ( edict_t *pKiller );

    virtual void killed ( edict_t *pVictim );

    virtual int getTeam () = 0;

    virtual void modThink () = 0;

    void setLookAtTask ( eLookTask lookTask );

    virtual bool isEnemy ( edict_t *pEdict );

    virtual void getLookAtVector ();

    virtual void startGame ();

    virtual void spawnInit ();

    virtual void checkStuck ();

    virtual bool startedGame ();

    bool isTF () { return true; }

    virtual TF_Class getClass () = 0;

protected:
    virtual void selectTeam ();
    virtual void selectClass ();
};

class CBotTF2 : public CBotFortress
{
public:
    void init (bool bVarInit=false);
    // setup buttons and data structures
    void setup ();

    void spawnInit ();

    void died ( edict_t *pKiller );

    void killed ( edict_t *pVictim );

    int getTeam ();

    void modThink ();

    void setLookAtTask ( eLookTask lookTask );

    bool isEnemy ( edict_t *pEdict );

    void getLookAtVector ();

    void startGame ();

    void checkStuck ();

    bool startedGame ();

    bool isTF () { return true; }

    TF_Class getClass ();
protected:
    void selectTeam ();
    void selectClass ();
};

class CBotFF : public CBotFortress
{
public:
    void init (bool bVarInit=false);
    // setup buttons and data structures
    void setup ();

    void spawnInit ();

    void died ( edict_t *pKiller );

    void killed ( edict_t *pVictim );

    int getTeam ();

    void modThink ();

    void setLookAtTask ( eLookTask lookTask );

    bool isEnemy ( edict_t *pEdict );

    void getLookAtVector ();

    void startGame ();

    void checkStuck ();

    bool startedGame ();

    bool isTF () { return true; }

    TF_Class getClass ();
protected:
    void selectTeam ();
    void selectClass ();
};

#endif


new : bot_fortress.cpp

CODE

/*
*    This file is part of RCBot.
*
*    RCBot by Paul Murphy adapted from Botman's HPB Bot 2 template.
*
*    RCBot is free software; you can redistribute it and/or modify it
*    under the terms of the GNU General Public License as published by the
*    Free Software Foundation; either version 2 of the License, or (at
*    your option) any later version.
*
*    RCBot is distributed in the hope that it will be useful, but
*    WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
*    General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with RCBot; if not, write to the Free Software Foundation,
*    Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*
*    In addition, as a special exception, the author gives permission to
*    link the code of this program with the Half-Life Game Engine ("HL
*    Engine") and Modified Game Libraries ("MODs") developed by Valve,
*    L.L.C ("Valve").  You must obey the GNU General Public License in all
*    respects for all of the code used other than the HL Engine and MODs
*    from Valve.  If you modify this file, you may extend this exception
*    to your version of the file, but you are not obligated to do so.  If
*    you do not wish to do so, delete this exception statement from your
*    version.
*
*/
#include "bot.h"
#include "bot_fortress.h"
#include "bot_buttons.h"
#include "bot_globals.h"
#include "bot_profile.h"

#include "vstdlib/random.h" // for random functions


void CBotFortress :: init (bool bVarInit)
{
    CBot::init(bVarInit);
}

void CBotFortress :: setup ()
{
    CBot::setup();
}

bool CBotFortress :: startedGame ()
{
    return true;
}

void CBotFortress :: startGame()
{
    selectTeam();

    selectClass();
}

void CBotFortress :: killed ( edict_t *pVictim )
{
return;
}

void CBotFortress :: died ( edict_t *pKiller )
{
    spawnInit();

    if ( RandomInt(0,1) )
        m_pButtons->attack();
}

void CBotFortress :: spawnInit ()
{
    CBot::spawnInit();
}

bool CBotFortress :: isEnemy ( edict_t *pEdict )
{
    if ( pEdict == m_pEdict )
        return false;

    if ( !ENTINDEX(pEdict) || (ENTINDEX(pEdict) > CBotGlobals::maxClients()) )
        return false;

    if ( CBotGlobals::getTeamplayOn() )
    {
        if ( CBotGlobals::getTeam(pEdict) == getTeam() )
            return false;
    }

    return true;    
}


void CBotFortress :: modThink ()
{
    // dont use physcannon for now... switch to pistol
    if ( m_pPlayerInfo->GetWeaponName() && *(m_pPlayerInfo->GetWeaponName()) )
    {
        if ( !strcmp("weapon_physcannon",m_pPlayerInfo->GetWeaponName()) )
        {            
            m_pController->SetActiveWeapon("weapon_pistol");            
        }
        else if ( !FStrEq(m_pProfile->getWeapon(),"default") && !FStrEq(m_pProfile->getWeapon(),m_pPlayerInfo->GetWeaponName()))
        {
            m_pController->SetActiveWeapon(m_pProfile->getWeapon());
        }
    }
}

void CBotTF2 :: selectTeam ()
{
    
}

void CBotTF2 :: selectClass ()
{
}


void CBotFF :: selectTeam ()
{

}

void CBotFF :: selectClass ()
{
    
}

///////////////

void CBotTF2 :: modThink ()
{
// mod specific think code here
}

void CBotTF2 :: init (bool bVarInit)
{
    CBot::init(bVarInit);
}

void CBotTF2 :: setup ()
{
    CBot::setup();
}

bool CBotTF2 :: startedGame ()
{
    return true;
}

void CBotTF2 :: startGame ()
{
    return;
}

void CBotTF2 :: killed (edict_t *pKiller)
{

}

void CBotTF2 :: died (edict_t *pKiller)
{
    spawnInit();

    // wait for respawn
}

void CBotTF2 :: spawnInit ()
{
    CBot::spawnInit();
}

bool CBotTF2 :: isEnemy ( edict_t *pEdict )
{
    if ( pEdict == m_pEdict )
        return false;

    if ( !ENTINDEX(pEdict) || (ENTINDEX(pEdict) > CBotGlobals::maxClients()) )
        return false;

    if ( CBotGlobals::getTeam(pEdict) == getTeam() )
        return false;

    return true;    
}


patch : bot_mods.cpp

CODE

void CBotMods :: readMods()
{
    m_Mods.push_back(new CCounterStrikeSourceMod());
    m_Mods.push_back(new CHalfLifeDeathmatchMod());

    m_Mods.push_back(new CCounterStrikeSourceModDedicated());
    m_Mods.push_back(new CHalfLifeDeathmatchModDedicated());

    m_Mods.push_back(new CFortressForeverMod());
    m_Mods.push_back(new CFortressForeverModDedicated());

    m_Mods.push_back(new CTeamFortress2Mod());
    m_Mods.push_back(new CTeamFortress2ModDedicated());
}


patch : bot_mods.h

CODE

class CFortressForeverMod : public CBotMod
{
public:
    CFortressForeverMod()
    {
        setup("FortressForever","SourceMods",MOD_FF);
    }
private:

};

class CFortressForeverModDedicated : public CBotMod
{
public:
    CFortressForeverModDedicated()
    {
        setup("FortressForever","source dedicated server",MOD_FF);
    }
private:

};

class CTeamFortress2Mod : public CBotMod
{
public:
    CTeamFortress2Mod()
    {
        setup("tf","team fortress 2",MOD_TF2);
    }
private:

};

class CTeamFortress2ModDedicated : public CBotMod
{
public:
    CTeamFortress2ModDedicated()
    {
        setup("tf","source dedicated server",MOD_TF2);
    }
private:

};


patch bot_const.h

CODE


typedef enum
{
    MOD_UNSUPPORTED = 0,
    MOD_HLDM2,
    MOD_CSS,
    MOD_FF,
    MOD_TF2,
    MOD_ANY,
    MOD_MAX
}eModId;
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 13 2007, 08:02 AM
Post #5


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



If you would like, i can still provide you with FTP access to my site for you to upload your files and you can also mirror the current files which you have. I have lots of gigs free of space, so i will be happy for you to use it to mirror and to keep the community updated smile.gif

Also what version of Visual Studio are you using? with RCBot you used VS6, i take it with this new RCBot your using either 2003 or 2005? I am currently using 2005 but it requires you to convert it which of course produces horrible errors etc...so i would rather you the same version as you smile.gif

And with the code provided, what does the bots do? just join a team for the moment?

I just noticed something too while editting the bot_const.h, the MAXPLAYERS is defined as 32 players, with TF2 this will cause problems as offically the MAXPLAYERS is set to 24, also in CSS the MAXPLAYERS is 64, so maybe a check will have to be performed that based on the mod, the MAXPLAYERS is changed from the default.

Also one other thing, because of the layout of the directory setup of the TF2 game, this will affect setup and installation of the bots on clients and server.

Current Setup:
Server: SOURCEDS\orangebox\tf\
Client: team fortress 2\tf

So overall the directory change of TF2 is very different to any other source based game although i am sure its a minor issue and easy to change.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 13 2007, 11:01 AM
Post #6


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



I also forgot one thing though,

patch in bot.cpp
CODE


// I think this should be transformed into calling the current CBotMod for an array of CBot

void CBots :: init ()
{
    if ( CBotGlobals::isMod(MOD_CSS) )
        m_Bots = new CCSSBot[MAX_PLAYERS];
    else if ( CBotGlobals::isMod(MOD_HLDM2) )
        m_Bots = new CHLDMBot[MAX_PLAYERS];
    else if ( CBotGlobals::isMod(MOD_TF2) )
        m_Bots = new CBotTF2[MAX_PLAYERS];
    else if ( CBotGlobals::isMod(MOD_FF) )
        m_Bots = new CBotFF[MAX_PLAYERS];
    else
        m_Bots = new CBot[MAX_PLAYERS];
}


The bots won't do anything yet, thats just the base code ready to get used! There will be some unresolved externals though in bot_fortress.h as the new classes don't have bodies for all the functions in the cpp file yet.

The main issue is probably the VS 2003/2005 error thing

I'm using 2005 now but used to use 2003, after converting it I got a lot of unresolved externals, managed to fix it I think, had to mess around with the project settings and adding different non-vc7 HL2 files for linking.

Will need to debug the source directory setup to check if the current method of game finding is sufficient, some extra code for finding the game might be needed.

I've seen games with TF2 having 32 players not sure if thats using some plugin or something though ?

MAX PLAYERS is just a limit anyway, it can be set to anything, just big enough to hold the maximum number of players tongue.gif

About FTP, that would be good, I could use it to post updates like this
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 13 2007, 05:29 PM
Post #7


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



The reason you see some TF2 servers with 32 players is because they have been hacked to support that many via hex, its not an offical release.

I have sent you an e-mail with the FTP access, if you could upload the current source code as mine seems to produce 45 errors. Maybe we should focus on setting up a stable environment first, get it fully ported and supported with vs2005, that way we can work with the code without giving warning or errors.

Yeah, i noticed when i went to compile it that most of the errors i were getting were because of missing files, would it be possible to upload the latest and most complete source code to the FTP? that should solve alot of my inital problems.

If the MAXPLAYERS value is just the maximum value for the whole of RCBot then setting it to 64 would be a good idea for CSS. I think putting a check for setting MAXPLAYER based on the mod would be a good and something we can work on later.

Just wanted to make reference notes here for later (TF2):
<<Teams>>
- (1) Random
- (2) Spectate
- (3) Blue
- (4) Red

<<Classes>>
- (1) Scout
- (2) Soldier
- (3) Pyro
- (4) Demoman
- (5) Heavy
- (6) Engineer
- (7) Medic
- (8) Sniper
- (9) Spy
- (10) Random

<<Test Map>>
ctf_2fort
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 13 2007, 07:59 PM
Post #8


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



thanks for the ftp

I've uploaded my latest version to it, its "Rcbot2_VS2005_13OCT07.rar".

it compiles with VS2005, just the fortress stuff causing some problems atm

http://rcbot.dwmh.net/Rcbot2_VS2005_13OCT07.rar
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 13 2007, 09:06 PM
Post #9


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



QUOTE(Cheeseh @ Oct 13 2007, 08:59 PM) *

thanks for the ftp

I've uploaded my latest version to it, its "Rcbot2_VS2005_13OCT07.rar".

it compiles with VS2005, just the fortress stuff causing some problems atm

http://rcbot.dwmh.net/Rcbot2_VS2005_13OCT07.rar


I have work tomorrow morning, but tomorrow afternoon i will take a look at the code and see what i can do.

Feel free to upload as many files etc...as you want, i have about 250GB or more web space smile.gif

I just wanted to check, as TF2 is slightly different in terms of directory layout, where should the compiled dll file go? c:\source dedicated server\orangebox\bin\ ?


User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 13 2007, 10:55 PM
Post #10


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



QUOTE(Venom @ Oct 13 2007, 10:06 PM) *

I have work tomorrow morning, but tomorrow afternoon i will take a look at the code and see what i can do.

Feel free to upload as many files etc...as you want, i have about 250GB or more web space smile.gif

I just wanted to check, as TF2 is slightly different in terms of directory layout, where should the compiled dll file go? c:\source dedicated server\orangebox\bin\ ?


it should always be in the bin folder with the rest of the plugins (not the bin folder with the client.dll in it, the other one tongue.gif)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 14 2007, 12:29 PM
Post #11


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



Yeh, i thought that it should not go in with either the client.dll or the server.dll tongue.gif

Just got home btw so i will have a look at the code and see what i can do, i attempted to install the pre-compiled version of the current RCBot2 but had problems with it.

C:\source dedicated server\orangebox\bin\HPB_bot2.dll
C:\source dedicated server\orangebox\tf\addons\HPB_bot2.vdf
C:\source dedicated server\rcbot2\ <rest of the files goes here

I am sure of the first two but the i am unsure of where the rcbot2 directory needs to go, i wouldnt of thought it would go in your normal steam directory, but please feel free to clear things up smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 14 2007, 01:01 PM
Post #12


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



might need to change the TF2 mod class so it looks in "orangebox" instead of "source dedicated server" for the dedicated class

might also need rcbot2 in the orangebox/ folder (need to check how filenames are created using the directories in the code again )
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 14 2007, 04:36 PM
Post #13


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



First inital impression is that in order to code, you need all the files, lucky enough i know were to get them from, the source sdk, the problem is that i am unsure what ones it needs, so i am slowly building up the file list that rcbot requires through trial and error.

Very time consuming sad.gif

I have decided to re-write the directory of the source code, so it will look more tidy for example:
RCBOT2_2005\sourcesdk <all files required from the sourceSDK directory will go in here
RCBOT2_2005\ <all files for RCBot will go in here, that way you keep them seperate from one another
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 14 2007, 06:25 PM
Post #14


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



The usual SDK install is to use steam tools and extract source code only to any folder, and put the rcbot source into the src/utils (I think) . It reduces the size of the bot code tremendously wink.gif the source code folder is about 100MB, unless there is someway to reduce it so you can have all the files you need in one package for at most 1 mb.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 15 2007, 03:25 PM
Post #15


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



CODE

Error    3    error LNK2001: unresolved external symbol "public: virtual int __thiscall CBotTF2::getTeam(void)" (?getTeam@CBotTF2@@UAEHXZ)    bot.obj    
Error    4    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotTF2::getLookAtVector(void)" (?getLookAtVector@CBotTF2@@UAEXXZ)    bot.obj    
Error    5    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotTF2::checkStuck(void)" (?checkStuck@CBotTF2@@UAEXXZ)    bot.obj    
Error    6    error LNK2001: unresolved external symbol "public: virtual enum TF_Class __thiscall CBotTF2::getClass(void)" (?getClass@CBotTF2@@UAE?AW4TF_Class@@XZ)    bot.obj    
Error    7    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::init(bool)" (?init@CBotFF@@UAEX_N@Z)    bot.obj    
Error    8    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::setup(void)" (?setup@CBotFF@@UAEXXZ)    bot.obj    
Error    9    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::died(struct edict_t *)" (?died@CBotFF@@UAEXPAUedict_t@@@Z)    bot.obj    
Error    10    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::killed(struct edict_t *)" (?killed@CBotFF@@UAEXPAUedict_t@@@Z)    bot.obj    
Error    11    error LNK2001: unresolved external symbol "public: virtual int __thiscall CBotFF::getTeam(void)" (?getTeam@CBotFF@@UAEHXZ)    bot.obj    
Error    12    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::modThink(void)" (?modThink@CBotFF@@UAEXXZ)    bot.obj    
Error    13    error LNK2001: unresolved external symbol "public: virtual bool __thiscall CBotFF::isEnemy(struct edict_t *)" (?isEnemy@CBotFF@@UAE_NPAUedict_t@@@Z)    bot.obj    
Error    14    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::getLookAtVector(void)" (?getLookAtVector@CBotFF@@UAEXXZ)    bot.obj    
Error    15    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::startGame(void)" (?startGame@CBotFF@@UAEXXZ)    bot.obj    
Error    16    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::checkStuck(void)" (?checkStuck@CBotFF@@UAEXXZ)    bot.obj    
Error    17    error LNK2001: unresolved external symbol "public: virtual bool __thiscall CBotFF::startedGame(void)" (?startedGame@CBotFF@@UAE_NXZ)    bot.obj    
Error    18    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFF::spawnInit(void)" (?spawnInit@CBotFF@@UAEXXZ)    bot.obj    
Error    19    error LNK2001: unresolved external symbol "public: virtual enum TF_Class __thiscall CBotFF::getClass(void)" (?getClass@CBotFF@@UAE?AW4TF_Class@@XZ)    bot.obj    
Error    20    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFortress::getLookAtVector(void)" (?getLookAtVector@CBotFortress@@UAEXXZ)    bot.obj    
Error    21    error LNK2001: unresolved external symbol "public: virtual void __thiscall CBotFortress::checkStuck(void)" (?checkStuck@CBotFortress@@UAEXXZ)    bot.obj    
Error    22    error LNK2001: unresolved external symbol "protected: virtual void __thiscall CBotFortress::selectTeam(void)" (?selectTeam@CBotFortress@@MAEXXZ)    bot.obj    
Error    23    error LNK2001: unresolved external symbol "protected: virtual void __thiscall CBotFortress::selectClass(void)" (?selectClass@CBotFortress@@MAEXXZ)    bot.obj    
Error    24    fatal error LNK1120: 21 unresolved externals    .\Debug/HPB_bot2.dll    


Ok, i have put it into the src/utils now and it has solved alot of problems smile.gif

But now i have 22 errors + 2 warnings, when i click on them which typically highlights the code in most cases, it does nothing.

There is no compiled .dll either in the debug folder. I thought based on the types of errors above, it was just standard errors which would still produce and output but i was wrong sad.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 15 2007, 05:01 PM
Post #16


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



as I mentioned there are no bodies for the fortress classes, either remove them from the classes header in bot_fortress.h for now or... write them in bot_fortress.cpp
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 16 2007, 07:36 AM
Post #17


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



Just playing around with the bots which came with TF2 and it seems to have alot of commands that if you know what your doing, you might be able to get them to work.

For example, the normal release of TF2 does not come with any waypoints for any of the maps, but with the right commands, you are able to generate a waypoint automaticlly (after 10 to 15min of map analyse).

The only problem is that i was unable to get to bots to move anywhere sad.gif not sure what commands are used to make bots follow waypoints or to move forward.

BTW, have you looked at any of these files:

C:\MyMod2\src\utils\serverplugin_sample\serverplugin_bot.cpp <might be of intrest
C:\MyMod2\src\dlls\sdk\sdk_bot_temp.cpp
C:\MyMod2\src\dlls\hl2mp_dll\hl2mp_bot_temp.cpp

UPDATE:
Looking at the bot sample codes which came with the source SDK, i think the serverplugin is exactly what we need, not only does it demonstrate how to write a server plugin but it also aimed at developing a bot for games and game mods which dont currently have them. I think this would be a good starting point, as it allows us to use the very advance waypoint analyse system which calculates the whole map including ladders, stairs etc...and allows you to tweak them as well.

Within any game mod, simply follow these instructions in order to get to the stage i am at atm (based on ctf_2fort):
1) sv_cheats 1
2) bot (to add a bot)
3) nav_quicksave 0
4) nav_analyse (creates a .nav file, eg ctf_2fort.nav in the map directory)
5) Move yourself out of the first respawn room into resupply room, type nav_mark_walkable
6) nav_generate (this may take 10 to 15min depending on the map and the complexity of it)
7) nav_save (just to double check its saved)

Done, thats how you create a waypoint for bots in source, very easy and no need to create your own waypoints, it will generate waypoint code for ladders, stairs and objects, the waypoint system will also generate code for possible sniper positions, hiding positions and will also generate code for dumping onto or crouching through objects such as barrels or vents smile.gif

I think this is certainly the way to go for developing bots and you had the right plan all along to develop a server plugin rather than a complete mod.

By following the resources and methods i have shown here, it should be enough to get a bot into the game, choose a team, class etc... as most of the code to do that is already provided and with testing the existing bots which comes with every source mod, alot of the commands you can learn from the existing implemented AI system, although a server_plugin would be slightly better.

Any way, let me know what you think smile.gif

Resources to help:
1) http://developer.valvesoftware.com/wiki/Navigation_Meshes
2) http://developer.valvesoftware.com/wiki/Server-Side_Bots
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 17 2007, 01:17 PM
Post #18


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



I have sent you Cheeseh additional source code to your inbox, it may be of some use to develop the bots based on the valve bot manager or if you decide to continue developing RCBot2.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Cheeseh
post Oct 17 2007, 05:02 PM
Post #19


Admin
*****

Group: Admin
Posts: 3,057
Joined: 11-September 03
From: uk
Member No.: 1



Most of these files are interesting , but I've seen much before and most of this code can't be done in a server plugin.

I've seen the serverplugin example many times before as it's the only example of a bot in a plguin environment, the problem is there is no weapon information, and class information. Of course you get this if you create your own MOD, in the other files you posted. The RCBot2 Source code as it stands is.. shall I say far superior to the server bot plugin example as it was based on that on day 1.

I've already seen and known about the NAV Mesh stuff and had provisions for it on RCbot2's source release day 1 also, just needs a new subclass.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
Venom
post Oct 17 2007, 05:56 PM
Post #20


Advanced Member
***

Group: Members
Posts: 82
Joined: 24-July 06
Member No.: 807



Ok, i understand smile.gif so we can continue to develop RCBot2 as is, then if valve decided to release more bot code, we can then convert RCBot2 to use the NAV meshes of that? or am i getting confused? tongue.gif



User is offlineProfile CardPM
Go to the top of the page
+Quote Post

4 Pages V  1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 29th April 2024 - 11:04 AM