Halo: The Master Chief Collection
How to add friendly bots in firefight

Image information

Added on

Uploaded by

DunkSauZ3

About this image



To add bots in firefight go to "Squads" under the SCNR tag
 
You would need to edit one of the useless fireteams or create a new one.
 
Or you can modify the one I edited in my recent mod here: Sword Base - Spartan Ally bots - Xbox Players can join at Halo: The Master Chief Collection Nexus - Mods and community (nexusmods.com)
 
(Or simply go to the installation 04 map inside your maps folder so that you may observe what makes that map function)


My mod is a primitive edit compared to the better stuff out there, but it helps me get my point across.

sur_fireteam_01 and sur_fireteam_02 (and more) are the useless fireteams that are not used by Vanilla Halo reach, so I modified them. Those are the only two I modified.
 
to modify the number of bots, Find "Designer cells" and then find "Normal difficulty count" and change the number to anything you like, so long as it is reasonable and won't destroy your game.
 
If you want to replace characters and weapons, you must change the "Character type index" or "Weapon type index" to match the number provided in either "Character palette" or "weapon palette" To make sure you don't forget the numbers, write them down on paper. These numbers can change for different maps so you will need to document them for every single map.
 
If you want to add a character that does not exist you need to click the cog symbol on the character palette and then click "Click to view options relating to this field" to properly add a new character. Then add as many as you like. You can also replace redundant characters that are never used in the palette. Like skirmishers and hunters. Anything guaranteed to never spawn as a firefight Hazard/Extra. (Hazard/Extras are enabled/disabled in game type settings) (They tend to be drop pods, ODSTs, banshees, wraiths, jackal snipers on a cliff, etc)
 
If you manage to create a new fireteam and you see a glitch that forces bots to spawn inside of a vehicle, you didn't mess up, just go to vehicle type index and change it from 0 to -1
 This will always ensure they don't spawn inside a vehicle.

You aren't done yet, this is only half the battle.
 
Now you need a firefight script that looks like this (ai_place "sur_fireteam_01")
 
Your mod now knows your Character exists and how many need to spawn, but it doesn't know when to spawn. In the firefight scripts section, just copy my homework and you should be good.

Or find a good spot to put your script

Here's an easy example:



This script already exists ingame but was modified to look like this

(script static void survival_wave_loop
    (if debug 
        (print "resetting wave variables..."))
    (set b_sur_rand_wave_spawn true)
    (set k_sur_rand_wave_count 0)
    (sleep_until 
        (begin
            (survival_mode_begin_new_wave)
            (ai_place "sur_fireteam_01")Note: This is one expample of where to put your script
            (if (survival_mode_current_wave_is_initial) 
                (begin
                    (ai_place "sur_fireteam_01")NOTE: This optional script is meant for the first wave of a round, therefore it will only be used once per round
                    (surival_set_music)
                    (survival_begin_announcer)
                    (sleep 1)
                    (if (> (survival_mode_set_get) 1) 
                        (survival_respawn_crates))


Also, your fireteam doesn't have a spawn point, so you need to copy-paste from a default spawn point left behind by Bungie... So copy the address of a spawn formation that belongs to the normal firefight wave and then paste it into your original fireteam.


Tip:  In case you want your bots to spawn on red team's starting points, try using the coordinates from "player starting locations" and make sure it belongs to the survivor's team.

And if you want something better, try to find the spawning boundaries at the "scenery pallete." Find out the number belonging to the spawn boundary 
(it's not actually called "spawn boundary"), and then find the coordinates for each red team spawn at "scenery." Finally, make sure the coordinates for the boundary you seek to copy actually belongs to red team by scrolling down until you see which team it belongs to. If it doesn't work, you just did it wrong and your Character is spawning out of bounds. Please make sure you copy the coordinates and place them in their respective XYZ locations! Copy-paste the number into a notepad or write them down, you will sometimes need to do that.

 
NOTE: Somehow sniper jackals and banshees are replenished even though reinforcements are not announced. Alternative spawning methods are indeed possible.

EXAMPLE


(script continuous void gr_survival_fireteams
    (sleep_until 
        (begin
            (if (<= (ai_living_count "sur_fireteam_01") 7) 
                (begin
                    (ai_place "sur_fireteam_01")
                )
            )
            false
        )
    )
)




NOTE: The script is basically saying this

If the ai_living_count for "sq_fireteam_01"  is less than or equal to 7, spawn "sq_fireteam_01" until it reaches a number that isnt less than or equal to 7.


If you added friendlies into the map and somehow the match gets soft-locked after every enemy was killed, your game thinks your allies are part of the enemy wave and that needs to be fixed too. (probably, lol)
 
go to squad groups and find a number that belongs to the "extras" or something about a drop pod vehicle/sniper jackal. Make the parent index for your character the same as the sniper jackal or the wraith on the map. That should fix it. IT would be even better if you copy the entire number combination from a squad group belonging to a covenant drop pod.

If the characters you added are hostile to you, go to Squads and change the team to Human
 
There is still much to learn on the Assembly modding tool and I think I learn something on it every day. Most of this was accidentally learned after someone pointed me in the right direction.

I don't need credit for this mod method because someone else taught me some of these things. Everyone is using the same mod tool and all of us will encounter the same obstacles while using it.

I encourage all modders to document their findings and share them so modding can be much easier for noobs.

EDIT: Modders have a short life span before they quit and move on, so please document your discoveries so that modding can be fun for new people.

13 comments

  1. MattheusFlash
    MattheusFlash
    • member
    • 1 kudos
    Appreciate you taking the time to show us how to do this but there's one problem I'm facing and that is editing the scripts is fine but when I set the spawn formation on assembly and open the map the ai doesn't spawn, so I come to back to assembly to check what's wrong and my spawn formations is gone like I never set it. Even if I save and compile the scripts.
    1. DunkSauZ3
      DunkSauZ3
      • member
      • 14 kudos
      Ok, so saving the spawn formation does not work?
      were you creating new spawn formations? That's perfectly fine.
      Were you using spawns that already exist? That's fine too.
      I have not experienced this yet and don't know if there is a workaround for it.

      Maybe the bots have spawned out of bounds.
      Can you use a spawn formation that already exists?
      Did you set a difficulty for the designer cell? Doing that will limit spawns depending on what difficulty you are playing.
      Chosing legendary but then playing on normal will cause the bots to never spawn.
    2. MattheusFlash
      MattheusFlash
      • member
      • 1 kudos
      I'm going to try and set a new spawn formations because I do think the current spawn location does spawn my troops out of bounds. I'm testing this in glacier firefight. The main problem was that the spawn formations wasn't saving when I loaded the map.
    3. DunkSauZ3
      DunkSauZ3
      • member
      • 14 kudos
      Let me know what happens
    4. DunkSauZ3
      DunkSauZ3
      • member
      • 14 kudos
      Are you placing the script in a good place that's guaranteed to do something?

      Is your script dormant or continuous?
      Continuous will make it spam spam spam unless you put a limit or tell it to sleep_forever
  2. Halodude77
    Halodude77
    • member
    • 6 kudos
    This works for squads on "most" maps (for Halo: Reach)

    Make the Index's this
    Parent Group Squad Index: -1

    Initial Zone Index: 0

    Initial Objective Index: -1

    Initial task Index: -1

    Editor Folder Index: 2

    This should allow your squad to move freely on any map.
    But like Dunk said the drop pods Index's work well too.
  3. Halodude77
    Halodude77
    • member
    • 6 kudos
    Literally the best explanation on the internet
  4. Halodude77
    Halodude77
    • member
    • 6 kudos
    So, how do I make them respawn every wave?
    1. DunkSauZ3
      DunkSauZ3
      • member
      • 14 kudos
      For them to respawn every wave, you should observe the script example from my explanation. It was edited some time ago.
  5. Halodude77
    Halodude77
    • member
    • 6 kudos
    How do you make the AI follow you?
    1. DunkSauZ3
      DunkSauZ3
      • member
      • 14 kudos
      I am investigating that. Sometimes they will follow you around if you mess with their task/ objective index.


      I think I found a consistent workaround, but I'll confirm it and then share it here.
    2. DunkSauZ3
      DunkSauZ3
      • member
      • 14 kudos
      Ok, it looks like we should observe ai objectives and choose a role for them. I chose survival_hero_refresh_follow which happened to be the number 8. This number can change for different maps. I placed that number into initial objective index.

      I think it works. Let me know what that does. (The number won't be the same for every map, you need to investigate your map)
    3. Halodude77
      Halodude77
      • member
      • 6 kudos
      Alright ill try it out.