Game Development Community

How the heck do you add bots?

by Josh Albrecht · in Torque Game Engine · 08/11/2001 (8:37 am) · 32 replies

I have been searching through the scripts all morning. And I cant find how to add a bot to your server. I need this so that I can test a weapon against it once I make one. Anyone know how to add a bot!?
Page «Previous 1 2
#1
08/11/2001 (8:47 am)
Do you have FrontPage Express? I think you can add a custom bot through that.

-Brock
lonegamers.com
#2
08/11/2001 (8:50 am)
FrontPage Express?
#3
08/11/2001 (9:13 am)
Brock,

He's talking about the v12 engine, not a FrontPage "web bot" :-).
#4
08/11/2001 (9:39 am)
SO, uh, is there already a way to do it? Thats what I was wondering. I searched through all of the scripts, and changed stuff like AiEnabled ( false ) to true, and BotsEnabled to true, and numberOfBots to 2 (was 0) But I fire up the server, and ther are no bots... :(

What is the command to add them? I assume you should be able to do it from the console, right?
#5
08/11/2001 (11:05 am)
Whoops :(
#6
08/11/2001 (11:51 am)
As far as I've heard (from the horses mouth) there are no bot scripts yet. If you want a bot you'll have to create the scripts to do so. I do believe the AI and other code is there for a bot, just no scripts.
#7
08/11/2001 (11:53 am)
In theory it shouldn't be tooooo tough to spawn something destructable into the game, it doesn't have to have any AI.. But you will probably have to script it yourself.

Owen
#8
08/11/2001 (1:27 pm)
No scripts meaning that there is nothing for it to do? Or no way to spawn it?

I think you are right, because I saw that definitions for funcitons like aiConnect didnt exist in the code or scripts (though they were called by some other functions...) There was code for bots and ai in the scripts and source, but no connecting stuff that I saw. Does an employee know exactly what is missing? Or can you give me a rough idea? Is it just one or two smal functions, or is it a huge amount of stuff?

Anyway, I will investigate it on my own, and try adding some of the missing functions.

I would rather make a bot than destructable terrain, I think the bot would be easier, plus I want to eventually do alot with hit locations. Eventaully.
#9
08/11/2001 (1:30 pm)
Mainly I believe the scripts are missing to create a bot and start it doing whatever it is it does. There is already a player script that creates a player, etc. However, I haven't created a bot, so I can't give you any pointers how to go about doing it.
#10
08/11/2001 (1:38 pm)
I belive that all of the ai pathfinding code (C++) got axed by Sierra right at the end so someone is going to need to rewite some or all of that before ai can be used.
#11
08/11/2001 (2:01 pm)
Couldnt you just make a bot without the pathfinding? I dont care about the bot being entertaining, I just want to hit it with weapons in the future. I actually dont want it to move. So the pathfinding shouldnt be important really yet, right?

Yes, I was just about to copy the player script and try to modify it to create a bot. I was going to take a look at the Tribes II stuff to get some ideas. No copy and paste, just ideas... :)
#12
08/11/2001 (2:44 pm)
Well, well, well... I suggest that EVERYONE immediatley run to their nearest game store and pay the $30 for tribes II... the scripts are extremely enlightening. All you guys(gg staff) did was delete certain functions; now everyone can just run a search for them in the tribes II scripts, and voila! That is what was missing.

aiConnectMultiple. Defenition didnt exist in V12.

I searched for and found it in the Tribes II scripts. Now I can understand what they did, what was missing, and can do it myself.

Please, everyone note!!! DO NOT COPY AND PASTE!! THIS IS PROBABLY ILLEAGAL!! DO NOT DO IT!! I posted this so you could LEARN from their funcitons. Do you have any idea how long it would have taken to figure out what variables to set, etc in the bot conenct function? This allows you to learn WHAT is going on, and do something yourself.
#13
08/11/2001 (3:00 pm)
Hey Guys, I am sure that Rick and Tim and Mark will be able to help you too, but they are going to be out for a while. They basically put in a 120 hour week each to get this thing out and are taking quick breaks, but when they get back, I am sure that they will try and help you as soon as they can! So if someone here doesn't answer your question, you should be able to find out straight from Garage Games. Thanks-

Peter
#14
08/11/2001 (4:32 pm)
Hey, no problem with their break. THey deserve it.

Eventually, everything about bot creation points to
aiConnect. THere is only one reference to it anywhere, and this is it:

Con::addCommand("aiConnect", cAIConnect, "aiConnect(name [, team , skill, offense, voice, voicePitch]);", 2, 7);

Does this mean redirect all calls to aiConnect from the script files to cAIConnect? If it does, I understand this scripting system, and am much closer to my goal of creating a bot. Otherwise, I have no clue what is going on. Someone want to give their opinion?
#15
08/11/2001 (4:35 pm)
That assumption would make sense, but I can't check it, haven't bought V12 yet, got to go collect money from my team and until September they're scattered across the UK..

Owen
#16
08/11/2001 (6:30 pm)
Ok, I have an echo placed in the chat scripts, so that when I type a message it prints something to the hud. So I know the game is seeing my commands. But my aiConnect command (I have been trying to call it directly) doesnt do anything. It should, but it doesnt. Can anyone else think of any reason why the command wouldnt work?(besides the fact that I have no clue what I am doing)

here is what I have in the chat script:

$ServerGroup = new SimGroup (ServerGroup);
aiConnect("Tod", -1, 0.5, false, 1, 1.0);
echo( "adding bots..." ); //this prints to console

the second to last parameter for aiConnect is voice, and I have no clue what it is. So I just guessed and put 1. The servergroup thing was where the addmultiple bots was called from, and I think it seemed important.
#17
08/11/2001 (6:36 pm)
Calling aiConnect() should *do* something.. you just might not be getting the results you wanted?
#18
08/11/2001 (6:58 pm)
I get nothing. I tried editing out the servergroup thing, and still nothing. I get no errors or any type of response, except my echo in the console. I changed the 2nd to last parameter to bot1, and the line is now:

aiConnect("Tod", -1, 0.5, false, "Bot1", 1.0);

But still nothing. The "bot1" was in one of the Tribes II bot functions. Is there something special that needs to be on the map? Can the current maps even have bots? Does it need something special, like a spawn point? Does it need to be in a specific mode (multiplayer or not? I tried both)
#19
08/11/2001 (8:04 pm)
Ok, I have made some progress. I realized that it was calling the OnAIConnect script function, so I added the one from Tribes II, and it crashed me(because the function outputs a message, and that is how I trigger adding bots) But I fixed that, and now I dont know where to go. It just seems to do nothing, but I must be getting closer.

At the bottom of the Tribes II script OnAIConnect function it calls a code function, StartMission for the bot. THis in turn sends a command creatively named MissionStart back to the scripts. But I cant find it in the scripts... :( I see stuff about missionstart phases, but not exactly where this message is leading.
#20
08/11/2001 (8:18 pm)
If I recall correctly the AI relied heavily on the target manager system that was removed per Sierra's request (ie.. they considered it a core T2 asset).
Page «Previous 1 2