------------------------------------------------------------------------------ Piloting AI - Version 2.0 (c) 2001 Josef "Werewolf" Jahn http://www.playspoon.com ------------------------------------------------------------------------------ based on code in "AiDebug.cs" by Dynamix This code is free for everyone to use but if you do, please write a short email to werewolf359@playspoon.com so I can check out your cool mod too. Dedicated to everyone with a slow or no internet connection. Botfighting rules. It's not about how "l33t" some folks are - it's just a game, hence it's about having fun. Don't let slobs and morons ruin your day. They don't count. Maybe some of them can disc you in mid-air and rub the fact under your nose everytime, but therefore they don't have a life. - Sorry, I just had to let this out :) ------------------------------------------------------------------------------ Credits: ============ Main Programmer & Idea: Josef Jahn Navigation Code: Nathan Vegdal Vehicle Team fix: {USB}Spiderman and {USB}|Hypn0tik| Here's their message: {USB}Spiderman and {USB}|Hypn0tik| have collaborated to produce BOT Pilot v1.7 which fixes the BuyVehicle function so NOW BOTs can hop into vehicles without having to wait for a Human to buy a vehicle for a BOT Pilot. BOT Pilot has been made an integral feature of the {USB}Mayhem Mod Vers 1.60 and later which is to be released on/after Monday 06-18-2001, pending a Patch from Dynamix before then. You can download the {USB}Mayhem Mod from http://storm.prohosting.com/usbrocks or http://Tribes2ModCentral.com . {USB}Spiderman and {USB}|Hypn0tik| have begun working on some additional enhancements to BOT Pilot so stay tuned to the {USB}Mayhem Mod for some really cool BOT Pilot features. What's New in v2.0: =================== X) Updated code to the latest patch (24something) What's New in v1.9: =================== X) Fixed a nasty bug in the vehicle navigation code X) Bots won't fly to a random spot on the map and stay there forever anymore! X) Bots will now use vehicles less often on their own X) Bots will FIRST buy their inventory before using a vehicle X) Flag-capping bots can now use vehicles too, in both directions! X) Bots will sense if they don't fit into a vehicle because of their backpack. What's New in v1.8: =================== X) Updated code to the latest patch (23669) - This should fix the exception errors. What's New in v1.7: =================== X) Fixed Vehicles not belonging to the proper team (Thanks {USB}Spiderman and {USB}|Hypn0tik| !) X) Updated code to include the latest patch (23115) What's New in v1.6: =================== X) Bots now shoot at enemy vehicles with the missile launcher What's New in v1.5: =================== X) Updated code to include the latest patch X) Added Nathan Vegdal's improved navigation code What's New in v1.4: =================== X) Updated code to include the latest patch X) Removed some debug console spam What's New in v1.3: =================== X) Many Bugfixes X) Bots buy vehicles on their own! Installation: ============= There are two ways of installing BotPilot. One way is to simply copy all the files in the "botpilot" subdirectory of this archive into your "Tribes2\GameData\base\" directory. However this isn't recommended and it's likely that Dynamix will prevent users from using modified code in the "base" directory in the future. PLEASE extract with pathnames, or it won't work! I recommend that you make a new subdirectory called "botpilot" under your Tribes2 directory (i.e. c:\Dynamix\Tribes2\GameData\botpilot\) and copy the contents of "botpilot\" there. So after extracting, these files should exist in these locations: c:\Dynamix\Tribes2\GameData\botpilot\scipts\ai.cs c:\Dynamix\Tribes2\GameData\botpilot\scipts\aiDefaultTasks.cs c:\Dynamix\Tribes2\GameData\botpilot\scipts\aiPilot.cs c:\Dynamix\Tribes2\GameData\botpilot\scipts\player.cs c:\Dynamix\Tribes2\GameData\botpilot\scipts\station.cs c:\Dynamix\Tribes2\GameData\botpilot\scipts\vehicles\vehicle.cs NOTE: You'll have to start Tribes2 with the parameter "-mod botpilot" if you follow my recommendation, or else you'll be playing normal "base" Tribes. For offline playing you should start Tribes2 with "-nologin -mod botpilot". Just create a shortcut on your desktop, and add these parameters under Properties, right after Tribes2.exe in the "target" box. Or use the shortcut I supplied in the zip. ****************************************************************************** IMPORTANT: If BotPilot refuses to work despite all this, please delete ALL *.dso files in your /gameData/base directory and below, especially the .dso files in GameData/base/scripts - Then start Tribes again and see if it works now. ****************************************************************************** What do the bots do? ==================== The bots are programmed to use nearby unused vehicles in order to reach far-away objectives. They use everything except the Mobile Point Base. If a deserted Shrike or a Grav Bike is nearby, they'll hop on and take off. They will ONLY mount Bombers/Transports/Tanks as PILOT if at least ONE passenger is already inside. That means you can hop into a bomber as canonier, and wait for a bot to pilot you. Now they can also fly as passengers automatically. If there's a vehicle with a pilot waiting for passengers, they'll hop on if their objective is far away. They will hop off automatically when you get near their objective, or when the pilot abandons the vehicle. This means that you no longer have to give them orders, they'll sense automatically whether using a vehicle is "smart" or not. And yet the latest feature is the bot's ability to "buy" vehicles. At the moment this is solved with a hack, i.e. when a bot needs a vehicle, it simply appears at the team's vehicle pad. You can still go there and manually buy some other vehicle, and the bot's choice will disappear. Also, the bot's won't use up all the available vehicles, they'll leave at least one vehicle available for manual purchase. Note that in this version they only buy the shrike. If you don't want the bots to buy vehicles on their own, set $PilotDontBuy=1; in your autoexec.cs This is how you try it out: Just get to an inventory station and watch. Eventually a bot will buy a vehicle. Note how the bot goes to the Shrike, mounts it, and takes off towards the objective. The bots will also do this on their own when capping flags, etc. - Everytime their movement target is farther than 500 meters away and there's a vehicle around that isn't occupied, they go for it - be it as a pilot or just as a passenger. In this version, they DO NOT use the on-board weapons. Bugs: ==== x) They are prone to get stuck if the terrain is very bumpy and you give them a ground vehicle. They shouldn't have any problems with the Shrike though. x) When a bot buys a vehicle, the vehicle's team isn't set properly, and the defense systems will start to attack the vehicle unless the bot mounts it first - thus converting it to his team. x) They do not use the on-board weapons, and I haven't figured out why yet. Future Plans: ============= I'd like to have the bots use at least the airborne vehicles properly and with common sense, i.e. teaming up to use a bomber, and sensing automatically when a human needs either a pilot or a gunner. Also, they currently drop their packs when piloting, and I'd like them to behave just like players in that matter. About "allmp3": ======================= To install, just extract the contents of it into the same folder as the "botpilot" directory. Copy your favourite MP3s into the GameData\base\music directory. While playing the game this mod will select a random mp3 and play it instead of the default soundtrack.