Is there a script that will...............

Is there a script that will add bots to a map that does not have any in it?

Thanks in advance

Comments

  • addbots(#); in console.
    replace # with number of bots to add.

    please note that the bots spawned will be very dumb and wont do anything. plus you might get console errors at random on some maps.
  • edited August 2010
    O'well thanks for the heads up I have alot of kool maps that I wish bots where in them. So is it hard to put bots into maps? I would not mind trying but im not a programer but if somebody gave me a hand I would not mind learning! ;D

    Cya
  • Im not a big mapper but this will help you get started:
    http://www.planettribes.com/belial/
    Click his FAQ and read up :)
  • edited August 2010
    From lagg in three parts:
    THIS TUTORIAL IS NOT FINISHED YET ! I AM STILL WORKING ON IT !
    
    Questions or comments to:    JPerricone@nyc.rr.com (Lagg-Alot)
    _______________________________________________________________________________________________
    
    Adding and Editing Lagg's Advanced Bots for Tribes 2                                  6-14-2004
    _______________________________________________________________________________________________
    
     This is not a Tribes 2 Mapping Tutorial, even though I may give some Map editing techniques.
    
     I assume that you already know how to make/edit Maps for Tribes 2, if not there is a host of
    mapping Tutorials out there. 
    
     Before I get into how you implement Lagg's Advanced Bot Support, lets go over the basics on
    adding and editing the Basic Bots for a Mission.
    
    
     1) Adding Basic AI Support to a Mission:
     -----------------------------------------------------------------------------------------------
    
     I was told that the editor can save a mission into a .vl2 file. This is not true at least on
    my computer. So unzipping the .vl2 if your mission is in .vl2 format can be helpful (use Winzip
    or similar program to unzip a .vl2 file WWW.WINZIP.COM it is free even though they ask you to pay
     The evaluation program is free and works just fine forever). At this time go to the mission file
    in the missions folder (in your Operating System, not in the game) and right click on it and view
    it's properties. (Note; Make sure the box that say's READ ONLY is not checked !). If it is simply
    uncheck it and hit APPLY then hit OK. other wise you can hit "save mission" in the game till the
    cows come home and the editor will not over write a file that is marked Read Only by the Operating
    System.
    
     a) Building Basic AI Objectives
     --------------------------------
     To make a map Bot enabled, it helps if you are finished placing all the items (turrets,
    generators, trees, inventories, flags/flipflops etc.). The next thing to do is SAVE the mission.
    Then open the AI Editor and BUILD OBJECTIVES, then after you have built the objectives. "YOU MUST
    SAVE THE MISSION AGAIN!". If you find that the "save mission option" is not available at this time
    (always has been the case for as long as I can remember). You have to play tag with the editor and
    click on something in the game (like one of the AIObjectives) and then click "APPLY". The editor
    will now think that you have changed something in the mission and the "Save Mission Option" will
    now be available. Now you can and must SAVE MISSION. Now go back to the AI Editor and Build the NAV
    Graph (Note; sometimes this can take a while, no your computer has not crashed). When finished the
    next step is to Build the LOS Graph (Note; DO NOT SAVE MISSION IN BETWEEN THE NAV AND LOS GRAPHS).
    When the LOS Graph is finished then SAVE THE MISSION. You have to exit completely out of Tribes 2
    and restart for the Bots to work in that mission. Don't try to "Build All Objectives" if you already
    have AI Objectives in the Mission already (you must remove them first, see below).
    
     b) Removing AI Objectives
     --------------------------------
     To remove all AI form a map:
     First make sure you have nothing selected in the editor (some object, item or simgroup highlighted
    blue in the Inspector Window). At the top of the Editor select "Window" then "AI Editor", the
    Inspector Window on the right will change to the AIObjectives Simroup (team 1 by default or the last
    team you had selected if you opened the AI Editor prior in this session).
     Simply "left Click" on the Simgroup to select the whole thing and press the "Delete Key" on your
    keyboard. Go back the the Top and select AI and switch to "edit for team 2" and repeat the process.
    But we are not done Removing all the AI from the Mission yet. Press "f3" or select "Window then
    Editor/Inspector" at the top and open up the "Teams Simgroup". Now Open "Team1 and find the
    AIObjectives simgroup" select the whole simgroup and hit delete. Repeat process for "Team2" and
    for "Team0" if applicable. Save the mission and you are finished Removing all AI from a map.
    
       Some map editing guidelines:
     --------------------------------
    
     Set the Mission Type to "None" in your Mission File (example: // MissionTypes = CTF DnD None;).
    Mission Type MUST equal "None" if you are making a Seige Map else you will have the worlds
    stupidest Bots when Siege game does the random team selection at Mission start time (half the
    times they will work fine and half the times they will stand there and do nothing). After you
    are finished adding and editing AI to the Mission you can change the Mission Type to "Siege"
    and play normally. It is best to host a LAN, GameType = "None", BotsEnabled = "0" if you are going
    to be working in the Editor. 
    
      Everytime before you "Save Mission" open the Consol (by pressing the "~" key and type the following
    line and then hit "Enter":
    
          stripFields();
    
      This strips a host of extra Dynamic Fields that are not needed in a Saved Mission File (it keeps
    your mission file nice and neat). Then you may "Save Mission".
    
    ----------------------------------------------------------------------------------------------------
    ----------------------------------- NAV, LOS and Spawn Graphs --------------------------------------
    ----------------------------------------------------------------------------------------------------
    
     The NAV Graph (stands for Navigational Graph) and LOS (stands for Line of Sight) are more important
    to the Bots than the Spawn Graph. If there is no Spawn Graph all players and Bots will spawn in the
    sky at the middle of the Terrain. But bots will function after they hit the ground. If there is no
    NAV Graph the Bots will just stand in the spot they started and stay there all day.
     You may already know the basics on how to add AIObjectives and Build the NAV (Navigation) and
    LOS (Line Of Sight) Graphs. Lets cover a few facts about the Nav. When the Game Engine draws
    the NAV or Spawn graph it first searches for Inventory Stations and places one Node (Green
    Dot) on each Inventory (My Advanced code will also search for Vehicle Stations and place a
    Node on each). The Game will then search for Vehicle Pads and Create a "Static Nome" (a series
    of Nodes on the Vehicle Pad Static Shape). Then it will create the Interior Nodes and Paths and
    than the Terrain Graph and Paths. After all the Nodes are placed on the Interiors, Stations and
    Terrain the Game does the long drawn out process of connecting all the Nodes with paths and
    Bridges (Green,Yellow, Blue and Brown Lines). The Yellow Lines are the Bridges that the Bots
    will use their Jets to move on. The Bots will rarely try to walk when following a Yellow Bridge
    (keep this in mind). The Brown Paths are the Hint Paths that the Bot will walk on and they
    rarely use their Jets (unless stuck) to move on the Brown Paths.
    The Green Lines are the Main Paths that the Bot will Walk on and are the most reliable Paths
    that they will follow when navigating on or inside an Interior. The Blue Paths and Blue Nodes
    are used for Terrain (Somewhat reliable, Bots will get Stuck if they try to walk on a Blue Path
    that is to steep on a hill) If you have a steep hill and the Bots constantly get stuck there,
    you may have to edit the map (place a big Rock there or change location of the bases and/or
    Inventory Stations). Keep in mind that Bots 1) Spawn, 2) Buy Inventory, 3) Move in a straight
    line to their Target.
    
     Remove all Force Fields and their Physical Zones (or don't place Force Fields til after the Graphs
    are drawn). Force Fields are problems as well as Water, Lava, Quicksand (custom water types).
    
     Lava and Water is a big pain for the Mapper that wants to use Bots. By nature the Bots will
    try to walk around or fly over Lava/Water. If the distance to fly over is to far and they can't walk
    around they will walk through Water. But remember this, the Bots will Never for any reason try
    to use their Jets to Fly up if they are standing in water (even if just a foot deep). So never place
    an Interior over or in Water or Lava (see #4 below).
    
     Some people brag that they use the Windows Cmd Line to build their Spawn and/or Nav graphs.
    This is just fine for some but will prove fruitless for Advanced AI. There are a number benifits
    by Drawing the Graphs using the Editor:
    
      1) You get to see all the Nodes, paths, brigdes and Hint lines. And should inspect them all to be
    sure that they are being placed properly (some Interriors, StaticObjects (trees and crates) will
    not be recognized by the game and cause problems for the NAV Graph. Re-edit the Map and draw Graphs
    again.
    
      2) The NAV and LOS are saved together in one file, but you can alter the map to block the
    NAV or the LOS seperately by using an Interior Object to block a certain path (build the NAV) then
    delete the Interior Object and draw the LOS. That way the Bot will never try to walk there but will
    Shoot through that area if they see an enemy.
    
      3) Sometimes you may find a spot that the Game just will not place Green Nodes inside certain
    Interiors. You can fix this by placing an Interior Block (I like to use the Square misc4 Interior
    Block), or a Inventory Station (remember all Inventories get a Green Node placed on them) and place
    the Blocks and/or Inventories in just the right spots and save mission and redraw the Graphs.
    Remember that the NAV will place the Green Nodes first and then connect them all together with
    Bridges. So we are tricking the NAV into placing Green Nodes where we need them. Place an Interior
    to block the ceiling if Bots keep hitting their head trying to fly into a shaftway. After the Spawn,
    NAV and LOS Graohs are completed you can delete all the extra Inventories and Interiors that we used
    to help build the Graphs. For some of my maps I made a new Simgroup in Team0 called NAVHelp for all
    the extra Inventories and Interiors used only for the SPN and NAV graphs. After all the Graph Files
    were done I removed (deleted) the NAVHelp Simgroup (remember to keep a backup copy of mission file
    with the NAVhelp Simgroup, in case you have to draw the Graphs again). You will have to experiment
    and redo the graphs more than a few times when you get into editing Bots. A good map takes time
    and so does good Bots. 
    
      4) If you want to use an Interior over Water or Lava and your first test of the bots don't work.
    You can try this trick that has worked for me. Place a DefaultNoPassForceField in the same
    location and dimensions as the WaterBlock and remove the water Block from the map. Save the mission
    (Note: I always completely exit Tribes 2 and restart it everytime I save a mission) and draw the
    Graphs (the Game should Not draw Nodes and Paths under the ForceField) and Save the mission again.
    You can remove the ForceField and put your WaterBlock back after the SPN and NAV/LOS Graph files saved.
    
      5) Terrain Size must be "8" meters per square in the Mission for Bots to work. I have tried to add
    Bots to missions that had a different Terrain Size and the result was nil.
    
      6) Sentry Turrets and Sensors or anything that is stuck into the surface of Interiors (buildings)
    can and usually does screw up the Bots NAV. The Bot cannot find a Path to follow to get to the Target
    and so he tries to walk there in a straight line (ignoring walls, rocks, lava and he looks really
    dumb). You will notice this right away when you see a Bot trying to walk through a wall, join the game
    walk up to him and ask him in Chat "VCW" ("What is your assignment?"). He will answer with target and
    re-edit map and draw the graphs again. Sometime the Large Sensor will just be a problem for no matter
    what you do. The Bot will never find his way to Mortar it. You can just delete the AIOMortarObject for
    that target and call it a day. Dynamix (Tribes 2 Creators) did just that in some of the maps they made. 
    
    ----------------------------------------------------------------------------------------------------
    
    --------------------  Adding and Building Lagg's Advanced AI Objectives:  --------------------------
    ----------------------------------------------------------------------------------------------------
    
     From here on I will be talking about the my Bots, how they work and how to edit them. I may refer
    back to the "Default Bots" (the Bots that came with Tribes 2) for explanation porposes. But from here
    on we are going to make some killers.
    
     I have included with my maps some custom scipts files that get called by these lines added to the
    end of your mission mission file:
    
      Lagg-Alot's Map that include the Advanced Ai Script files:
      ----------------------------------------------------------
      1) Fumarole
      2) ColdFront
      3) StangleHold
      4) AirborneRangers
    
        All of Laggs.. maps can be downloaded from www.Tribes2Maps.com.
    
      1a) Use these lines if ONLY if you have one of my missions above ".vl2" file in your
    C:/Dynamix/Tribes2/Gamedata/Base/ folder or have unzipped  the Fumarole.vl2 in the same mentioned
    folder.
    
            //--- OBJECT WRITE END ---
    
            //---------------------------------- Lagg's Default AI ---
            //Add these lines to .mis file before you build AI objectives
    
            // * NOTE * all AIOAttackObjects and AIODestroyObjects must be moved
            //to a good location for bot to stand and attack the object.
            //AIORepairObject move only if bot gets stuck trying to repair.
    
            exec("scripts/LaggsDefault2_GameType.cs");
            echo("exec LaggsDefault2_GameType.cs");
            activatePackage(LaggsDefault2_GameType);
            error("Activating Package LaggsDefault2_GameType");
    
            LaggsDefaultSetup();
    
            exec("scripts/LaggsDefault2_aiNeedRide.cs");
            exec("scripts/LaggsDefault2_aiPilotShrike.cs");
            exec("scripts/LaggsDefault2_aiDeployVehicle.cs");
            exec("scripts/LaggsDefault2_aiTank.cs");
            //-----------------------------------------------------------
    
      2a) After you have added the above lines to you .mis file (using Notepad or similar text editor program).
    Now is the time to start up your map in Tribes 2 and open the  AI Editor.
    
      3a) When you select to build all Objectives from the AI Menu the game will ask if you are sure. You click yes
    ONLY if you don't already have AI Objectives in the Mission. You have to remove all the AI Objectives from the
    map if they are there already and you wish to build them over again (See Adding Basic AI Support to a Mission:
    section above).
    
     * What exactly does the game do when it is "Building Objectives" ? *
     ____________________________________________________________________
    
     *  It creates a Simgroup named "AIObjectives" in each Teams Simgroup (0, 1 and 2).
    
     *  The game then scans through the Teams Simgroup (team0, team1, team2) and looks for Destroyable Objects, Flags,
       FlipFlops.
    
     *  AIObjective Markers are placed on the map (AIObjectiveMarkers are Grey Diamonds that you can move around in
       the AI Editor the same way you would move a building around using the Editor.
    
     *  AIOjective dataBlocks are placed in the "AIObjectives Simgroup" for teams 1 and 2 for all the Flags, Flipflops
       and Destroyable Objects.
    
     * Creates 1 AIODefendLocation for each of the Teams Flags, FlipFlops, Team Generators, Team SolarPanels and 1
      AIODefendLocation for each of the Enemy Teams Generators, Solar Panels (AIODefendLocation for the enemy's
      generators  ? Why ?) My bots are advanced and to make them act smarter we have to Defend the Enemy Generator
      after we have Destroyed it. So it makes it hard for the enemy to repair his base (details on how this works
      below in sub section Definition of AIObjectives:).
    
     * Creates 1 AIOAttackObject for each Enemy team's Generator. This is a speacial objective and requires more
      work in the ai editor later on (see below sub section Definition of AIObjectives:).
    
     * Creates 1 AIODestroyObject for each of the Enemy's Inventory Stations, Sentry Turrets, Solar Panels.
    
     * Creates 1 AIOMortarObject for each of the Enemy's Base Turrets, Sensors, Solar Panels (Solar Panels are usually
      placed outdoors and can be Mortared if your Solar Panel is not outdoors or cannot be mortared this Objective
      should be deleted).
    
     * Creates 1 AIOMissileObject for each of the Enemy's Base Turrets, Sensors, Sentry Turrets (Sentry Turrets
      that are placed out doors can be Missiled, and you should delete this Objective if your Sentry Turret is
      indoors and cannot be Missiled)
    
  •  * Creates 1 AIORepairObject for each of the teams Generators, Solar Panel, Inventory Stations, Base Turrets,
      Sensors, Sentry Turrets (Sentry Turrets and Large Sensors need more work in the AI Editor see below sub section
      Definition of AIObjectives:).
    
     * Creates 3 AIOTouchObject on Each Flag for each Team (Details below).
    
     * Creates 1 AIOTouchObject on each Flipflop for each Team (Details below).
    
     * Creates 2 AIOAttackPlayer on each Flag for each Team (Details below).
     
    
      After you have "Builded AI Objectives" you are far from finished editing the AI, The Objectives Builded are just
    a base line to get the bulk of the work automated to save you time. But to have Bots that act smart you as the Mapper
    are going to have to manipulate the AIObjective Markers and DataBlocks, add more of them or delete ones that are not
    needed.
    
      Before we get into the Manipulation and Advanced Ai Editting lets cover a few terms so we are all clear on the
    subject of AI:
    
      1b) When I say "Task". I am may be talking about a Bots "ObjectiveTask" or a Bots "DefaultTask". I will try to
    be more specific when the needs arise and the topics allow.
    
      2b) When I say "ObjectiveMarker" I am talking about the Grey Colored diamonds that you see and can move
    around in the AI Editor.
    
      3b) When I say "Field" I am talking about a "Dynamic Field". (Example of a DynamicField:
    
            description = "Destroy the StationInventory";
            mode = "inBaseAtt";
    
    are "DynamicFields". You can add more DynamicFields to anything in the Tribes 2 editor, but the Game Scripts
    may have to be modified to do something else with the new Field. I will only discuss the Fields that are relevant
    for the use of my Bots.
    
      4b) When I say "Objective dataBlock". I am talking about the AIObjective that is in the Mission File, you
    can edit any "Objective dataBlock" using the AI Editor.
    
    
          Example of AIOObjective dataBlock:
    
            new AIObjective(AIODestroyObject) { //------------------- AIOObjective "Name"
                    position = "-601.4 419.8 112.566"; //------------ Position of the Marker
    	        rotation = "1 0 0 0"; //------------------------- Rotation of the Marker (used when placing AIODeployObject Objectives)
    	        scale = "1 1 1"; //------------------------------ Size of the Marker (resizing markers have no effect on Ai Objectives)
    	        dataBlock = "AIObjectiveMarker"; //-------------- dataBlock Name
    	        lockCount = "0"; //------------------------------ lockCount (could be used by scripters)
    	        homingCount = "0"; //---------------------------- homingCount (could be used by scripters)
                    description = "Destroy the StationInventory"; //- task Description
    		mode = "inBaseAtt"; //--------------------------- task Mode
    		targetObject = "ObjectiveInventory1"; //--------- name of the Target Object
    		targetClientId = "-1"; //------------------------ id Number of Target Client (if target is a client)
    		targetObjectId = "4352"; //---------------------- id Number of Target Object (if target is an object)
    		location = "-607.8 412 112.566"; //-------------- Location of the Target Object (used for repair, attack, destroy objectives)
    		weightLevel1 = "3200"; // ----------------------- (Weights are used to consider task being choosen by game to
    		weightLevel2 = "1500"; // -----------------------  assign clients, and also the base weight to complete task.
    		weightLevel3 = "0"; // --------------------------  Weights are very delicate and should be changed with  
    		weightLevel4 = "0"; // --------------------------  care. See AIDefualtTasks below for more on Weights)
    		offense = "1"; // ------------------------------- Offense Tag used to help weights in some cases
    		defense = "0"; // ------------------------------- Defense Tag used to help weights in some cases
                    equipment = ""; // ------------------------------ Equipment that Must Be Bought (limits clients to only)
    		desiredEquipment = "Plasma PlasmaAmmo"; // ------ Equipment that could be Bought (client that has more of this gets +weight)
    		buyEquipmentSet = "randomSet"; // --------------- $AIEquipmentSet to Buy if Inventory is availible (list below)
                    chat = "ChatCmdAttack"; // ---------------------- Chat message bot will say about 7 seconds after he starts task (list below)
    		issuedByHuman = "0"; // ------------------------- Did a Human Player ask for this (from command map or verbal)
    		issuedByClientId = "-1"; // --------------------- Did a Bot ask for this (a bot can ask for this through scripts in some cases)
    		forceClientId = "-1"; // ------------------------ Force this at a higher weight (if asked by human)
    		locked = "1"; // -------------------------------- Locked in Editor (but has no effect)
            };
    
            Definition of AIObjectives:                                                          (Not Finished)
            ------------------------------------------------------------------------------------------------------
            AIOAttackObject:   You must move the Objective Marker for this to the spot you want the Bot to Stand
                              and shoot at the Target. Place the marker about one meter above the floor or ground
                              in the best spot you as a player would stand if you were destroying the target. Bot
                              will shoot at the Target if he has sight to do so but will continue moving to the
                              Marker location. Bot will NOT SHOOT at the target if he is to close to the
                              target and would damage himself if he fired his weapon. This Objective has a Max
                              Range of 40 and a Min range of 4 to the Target Object. By default the "desired
                              Equipment" field is set to "Plasma PlasmaAmmo" and "buyEquipmentSet" is set
                              "randomSet" which means that any Bot that has Plasma and PlasmaAmmo can do the task
                              and will buy a random set if Plasma PlasmaAmmo is needed. You may set the "Equipment"
                              field and the "buyEquipmentSet" field if you want but I it works very well with
                              the default settings. This AIObjective is used for Generators.
                              NOTE: make sure the $AIEquipmentSet that you set in ObjectivedataBlock contains the
                              "equipment" or the "desiredEquipment" that is required to destroy the target. Mortar,
                              Plasma and Blaster are the ONLY weapons bot will use for this objectiveTask.
                               Check with the $AIEquipmentSet lists below to confirm).
                              This one has been completely overhauled so bot will continue going for the target
                              even if he has been attacked. Bot will defend himself but the target is his priority.
                              Bot's first choice weapon to destroy the target is the Mortar (if safe range not to
                              damage himself), then Disk, Plasma and Blaster.
    
    
            AIODestroyObject:  You should move the Objective Marker for this to the spot you want the Bot to Stand
                              and shoot at the Target. Place the marker about one meter above the floor or ground
                              in the best spot you as a player would stand if you were destroying the target. He
                              will shoot at the Target if he has sight to do so but will continue moving to the
                              Marker location. Bot will NOT SHOOT at the target if he is to close to the
                              target and would damage himself if he fired his weapon. This Objective has a Max
                              Range of 40 and a Min range of 4 to the Target Object. By default the "desired
                              Equipment" field is set to "Plasma PlasmaAmmo" and "buyEquipmentSet" is set
                              "randomSet" which means that any Bot that has Plasma and PlasmaAmmo can do the task
                              and will buy a random set if Plasma PlasmaAmmo is needed. You may set the "Equipment"
                              field and the "buyEquipmentSet" field if you want but I it works very well with
                              the default settings. This AIObjective is used for InventoryStations, SolarPanels,
                              SentryTurrets, VehicleStations, Teleporters and could be used for Generators,
                              BaseTurrets and Sensors if you wanted. (NOTE: make sure the $AIEquipmentSet that you
                              are telling him to buy has the "equipment" or the "desiredEquipment" that is required
                              to destroy the target. Mortar, Plasma and Blaster are the ONLY weapons bot will use
                              for this objective. Check with the $AIEquipmentSet lists below to confirm).
    
            AIOMissileObject:  This Objective does the following; If bot needs equipment (MissileLauncher, Missile
                              LauncherAmmo) he will go buy the "buyEquipmentSet" and the move not to the Target
                              Object but to a Position that has LOS to the AIOMarker for this Objective. The reason
                              for this is that sometimes a Sensor or Turret is placed high up above the Terrain on
                              top of some type of Interior. And the Bot will not get a Missile Lock because his sight
                              to the Target will be blocked by the Interior. So you can trick the Bot into moving to
                              a better spot to fire Missiles by moving the AIObjectiveMarker down by 0.5 to 1.0 meters.
                              This will force Bot to move to a higher altitude spot to get sight to the Objective
                              marker and then aims at the target Object and fire his Missiles. I put a timer on this
                              so Bot will jump around a little and reset his position every 20 seconds just in case
                              he looses his missile lock. He usually gets this job done.
    
            AIOMortarObject:   I almost completely rewritten this one so Bots no longer mortar hillsides. The Bot
                              will move to LOS (Line Of Sight) location and fire the Mortar. Bot no longer is a
                              sitting duck as he moves around while firing mortars at Target. The Bot assigned to this
                              task will ask for someone to Laze the target for him and waits for about 20 seconds for
                              a Targetter. If no one lazes the target for him he will start shooting on his own.
    
            AIOTouchObject:    This Objective is used for Flags and FlipFlops. I have made the following changes to
                              touch a FlipFlop if in Siege game; If there is a Force Field within 12 meters of the
                              FlipFlop the bot will ignore this task (Siege game usually has a force field shielding the
                              objective FlipFlop).
                               If CTF game the bot assigned to this task will create a few more AI Objectives depending
                              on if he is Grabbing the flag, Carrying the flag or Picking up a dropped flag.
                              If carrying Flag Bot will ask for some bots to AIOEscortPlayer (protect/follow him).
                              If going in for the Flag Grab, the Bot asks for AIOMortarLocation (some Bot with Mortar
                              to clear the flag area).
                              If picking up a dropped Flag he Just goes for it.
    
            AIODefendLocation: You can move the Objective marker to the area that you want him to defend (say a room away
                              from a generator) as he will move to the "position" of the objective marker and patrol
                              a little.
                               Modified so if set to "offense = 1" in the objectives dataBlock the bot will defend a
                              destroyed enemy object (can you say Camping in enemy Base ?). Must be placed in the offense
                              teams objective simgroup and DO NOT set "dynamicField defense = 1" and a bot will defend
                              the destroyed enemy gen so defenders have a hard time trying to repair. For defense:
                              DO NOT set "offense = 1" in objective dataBlock, for Camping offense must not have
                              "defense = 1" in the objective dataBlock
                               If we are a defending with sniper gear (SniperRifle and EnergyPack) than he fights like
                              a sniper (far shots with laserrifle).
    
                               When you Build AI Objectives this will place one AIODefendLocation in the team that
                              owns the object (Defense) "AIObjective Simgroup" with the "DynamicField" for
                              "defense = 1" and the "DynamicField" for "offense = 0" (that means it is a team owned
                              Object and will only be defended if it is not badly damaged or destroyed) for each of the
                              following Objects:
    
                                 Generator, Solar Panel, Flag, Flipflop
    
                               It will also place one AIODefendLocation in the team that does not owns the object (Offense)
                              "AIObjective Simgroup" with the "DynamicField" for "defense = 0" and the
                              "DynamicField" for "offense = 1" (that means it is an enemy team owned Object and will only be
                              defended if it is destroyed) for each of the following Objects:
    
                                 Generator, Solar Panel
    
                              (just remember for defending team; offense = 0; defense = 1 / for offensive team; offense = 1
                              defense = 0;)
    
                               This Objective gets placed for every Generator in any of the Teams Simgroups. But if you have
                              2 or more Generators in one area, you can delete the extras because you really only need 1. You
                              don't want to hang up to many bots around the generators when there are so many other things to
                              do. Or if you like for some real Advanced AI thinking you can move one of the AIOdefendLocation
                              Markers to defend a generator to some spot outside the base (like on the roof). Since the bot
                              will do his little patrol dance at the Position of the Marker. You get a Bot sentry outside the
                              base. The trick here is that if the Generator gets Destroyed the Bot quits this task and gets
                              assignned to something else (like repair the Generator). If you set:
    
                                              desiredEquipment = "SniperRifle EnergyPack";
    					  buyEquipmentSet = "LightEnergySniper"; or buyEquipmentSet = "LightSniperChain"
    
                              you get a sniper on the roof that kinda annoys the hell out of players at far range. This trick
                              could work for the offensive team that is defending the enemy's destroyed generator. The more
                              you understand how the bots work. The better you can think of ways to improve on them.
    
                              NOTE: Never set the "equipment" dynamic field to anything for AIODefendLocation, leave it blank.
                              Instead you set the "desiredEquipment" field to the weapon and ammo that you wish him to defend
                              with.
    
                              Example:
    
    					  weightLevel1 = "3100";
    					  weightLevel2 = "1000";
    					  weightLevel3 = "0";
    					  weightLevel4 = "0";
    					  offense = "0";
    					  defense = "1";
                                              equipment = "";
    					  desiredEquipment = "Plasma PlasmaAmmo";
    					  buyEquipmentSet = "HeavyShieldSet";
    
                              This is because setting the "equipment" field to anything limits the bot to have this equipment
                              to do the task (Objective Task). If the Base Inventories have all been destroyed and Bots cannot
                              buy inventory you may see the Flag not getting defended at all. The "desiredEquipment" means that
                              if we have the desiredEquipment great, but if we don't have it still do the task. You will see bots
                              that just spawned and can't get inventory defending a flag.
    
  • ----------------------------------------------------------------------------------------------------------------------
       AIDefault Tasks:                                                                              (Not Finished)
       ----------------------------------------------------------------------------------------------------------------------
        Above we learned a lot about AIObjective Tasks and how to use them. Lets talk about AIDefaultTasks (by DefaultTasks
       I am not talking about the original Bot Objective tasks that came with the Game). I am talking about the  tasks (jobs)
       that the Bots do all the time reguardless of what Objective Task they are assigned to. You as the Mapper will have little
       control over the aiDefaultTasks (unless you get into scripting), but it is helpful to understand what is going on in the Bots
       mind (Bots don't have brains). The aiDefaultTasks sometimes have higher priority than Objective tasks and therefore are more
       important. Before we can understand everything about the Bots we need to talk about:
    
             Weights:      
            ---------------------------------------------
    
          I would have liked to make Weights a seperate catagory, but it is so embedded into the Defualt Tasks that we should
         cover it now. Every task that the Bots do (ObjectiveTask or DefaultTasks) are all based on weight values. You have
         seen above in the Objective dataBlocks weight values for the objective task. That is just the tip of the iceberg. The
         PC is a number comparing machine and that is exactly how the bots know if they should shoot at you or pick up the dropped
         flag. The weight value for a bot to shoot back at you if you damaged him is 4600. But if the Bot is badly damaged and he
         happens to have a Corpse (dead player) next to him, and that corpse forgot to use his RepairKit the bot should step to
         Corpse at weight 4650. This all happens very suddely and he picks up the RepairKit and uses it without really missing a
         beat while he is still fighing you. Because the two weights are so close in comparision that the Game balances the two
         Tasks (aiEngagetask and aiPickUpItemTask) switching the Bot from one task to the other a few times a second. Then
         switches the Bot back to his Objective task when the fights over (unless he is dead). My point here is the Bots are very
         sensitive to weight value changes in their Objective Tasks. The weights are also used to set speeds by the Game Engine
         on how often the the task is run through the Processor (PC's brain). A lower value equals less processes. So if you
         start changing weights in the AI Editor keep in mind that the Bot has 8 DefualtTasks (in CTF) plus his ObjectiveTask,
         thats 9 tasks the game has to balance for each Bot in the Game. The game also runs a schedule every 5 seconds for
         every bot to "AIReassessObjective" (a program loop that checks the objective weight of the bot's objective task to
         see if another bot is closer to that task, has the equipment required. Then checks the weight of the second Bots
         Objective task and if he should "Bump the first Bot off his Objective Task or not). Bots that have the required
         equipment and are closer to the objective get their weight value raised for future comparisions. For 16 Bots in a Game
         that is a lot of number crunching and it is running constantly.
          Go easy on changing weight values if you have to change them at all. I have made a few adjustments in the Objective
         weights and in the aiDefualtTask weights to get the Bots to work at peak performance. If you say want to raise the
         Objective weight to destroy a gen or repair a particular Inventory. Try raising or lowering the weight in increments
         of 50 and test it for a while, you can fine tune it later by increments of 10 to get the bots acting just the way you
         want. 
    
          -------------------------------------------------------------------------------------------------------------------
          AIEngageTask:
    
                This defaultTask has the dirty responsibility of combat fighting with other Players and Bots. It is the most
              most important task the bots have, without it there really would be no use of bots at all (except maybe to carry
              Golf clubs). This task can have 4 possible weight values depending on circumstances:
    
                 $AIWeightReturnFire       = 4600;   // defend himself if damaged
                 $AIWeightFoundToughEnemy  = 3000;   // Shoot at an enemy if we see him
                 $AIWeightFoundEnemy       = 1000;   // If the enemy is superior we are cautious
                 or we have no enemy = 0;            // 0 = don't fight anyone, do some other task
    
          -------------------------------------------------------------------------------------------------------------------
          AIPickupItemTask:
    
                This tasks first checks if bot is damaged and needs a health item. If not it them checks if bot could use some
              ammo or a weapon that may be on the ground. If this task determines that bot could use something and the item is
              availible (on ground) it uses 4 possible weight values depending on circumstances:
    
                 $AIWeightNeedItemBadly    = 4650;   // life depends on the item
                 $AIWeightNeedItem         = 4350;   // we need that item
    	     $AIWeightFoundItem        = 2500;   // the item is there
    	     we don't need item        = 0;      // we have no needs
    
          -------------------------------------------------------------------------------------------------------------------
          AITauntCorpseTask:
    
                Taunt corpse is exactly what the name implies. I have made adjustments to this task so bot only taunts if he
              close to the victim and only for a few seconds. This cuts down on the time bot is exposed to enemy fire while
              poking fun at your mangled body. This task can have 2 possible weight values:
    
                 $AIWeightTauntVictim      = 4400;   // We have a fresh kill close by
                 no victims lately         = 0;      // Come out and fight
    
          --------------------------------------------------------------------------------------------------------------------
          AIEngageTurretTask;
    
                When a Bot is damaged by a deployed turret this task kicks in and controls the bots behavor so to either return
              fire on the turret immediately or if a few seconds have passed the bot acually stalks the turret. Hides behind
              cover and than moves towards turret with guns blazing. Sometimes the bot gets hit by more than 1 turret and as he
              is stalking the first turret, he goes and blasts the new threat a few times to disable it till he finishes with
              the first one. Task can have 3 weight values:
    
                 $AIWeightReturnTurretFire = 4675;   // We just got suprised by turret
                 $AIWeightDestroyTurret)   = 4300;   // Stalking and killing weight
                 no turrets are bothering us  = 0;   // We are turret free
    
    
    
       ----------------------------------------------------------------------------------------------------------------------
       list of voice binds that command bots:                                                        (in progress)
       ----------------------------------------------------------------------------------------------------------------------
    
          Some people don't even know that some of the voice chat commands can issue AIObjectiveTasks to the bots. For instance
        if you typed "VVH" your player would say "HELP" and the game places a Task to "EscortPlayer" in the teams list of Tasks
        to do. If no one on your team answers with "VCA" that's "Command Acknowleged" in about 5 seconds. The task is handed
        over to the Bots on your team and a AIOEscortPlayer is created and added to the Bots list of tasks to do at a weight
        of 2000. But if you look directly at a Bot and say "VVH" the Bot is immediately Forced to escort you at weight 4425.
        That is a much higher weight but not higher than the weight to fight an enemy that damaged us.
    
           VVH = "Help" 
           VNC = "NeedCoveringFire"
           VNB = "NeedABombardier"
           VNS = "NeedVehicleSupport"
    
              AIOEscortPlayer is created. Bots will follow you onto vehicles if there is an open seat for them.
                              
    
       ----------------------------------------------------------------------------------------------------------------------
       list of BuyEquipmentSet and contents:                                                     (not Even Started)
       ----------------------------------------------------------------------------------------------------------------------
    
    
       ----------------------------------------------------------------------------------------------------------------------
       list of chats:                                                                            (I'll Get To It)
       ----------------------------------------------------------------------------------------------------------------------
    
          This is taken right out of "cannedChatItems.cs" file. Placing the Chat in the "Chat Field" of the "ObjectivedataBlock"
        will have the Bot say this chat about 7 seconds after getting assigned to the ObjectiveTask in question. When you type in
        the Chat and click "Apply" in the Inspector Window, you will know right away if you misspelled because it will jump to
        non-capitalized lietters. If the format jumps to or stays the way it is written here than all should be fine.
    
    
    
  • WOW! thanks for the info! Its alittle overwhelming but I'll have to sift thru this to see if i can figure this out. Thanks again bud :D
  • Im not a big mapper but this will help you get started:
    http://www.planettribes.com/belial/
    Click his FAQ and read up :)

    Sorry bud but that is a bad link :o
  • Im not a big mapper but this will help you get started:
    http://www.planettribes.com/belial/
    Click his FAQ and read up :)

    Sorry bud but that is a bad link :o
    I just clicked it and it went through to the page
  • WOW! thanks for the info! Its alittle overwhelming but I'll have to sift thru this to see if i can figure this out. Thanks again bud :D

    we should thank Lagg!
Sign In or Register to comment.