---On Mon, 14 Mar 2011 23:10:35 -0400, Iceyalan <email@example.com> wrote:
> Can you please explain to me in detail how to spawn AI's (such as
> banshees, warthogs, etc.) and also covenant and marine AI's. Ive read some
> of the tutorials here (HDM) but I've gotten a little confused. If u can
> direct me to a better tutorial or explain it to me I would really
> appreciate it.
> - alien
Alien, the AI must first be present within the map file, then they must be located within the scenario in some way.
Also note that if you will be adding AI to a multiplayer scenario, the other players of your mod will need to have the map file in order to join your hosted game (it won't be "CSS") and they will not be able to see where the AI actually are, since AI do not normally synchronize their positions over the net code like players synchronize positions. You will instead need to apply them to vehicle seats so they will synchronize from within vehicles, since vehicles themselves synchronize over the net code. Even so, vehicles will normally be necessary to even spawn the AI into the scenario to begin with, since current mac modding tools don't allow adding reference slots to a tag, where you would otherwise need to add AI into a reference slot directly within the scenario tag.
You can use the tool Eschaton alone for this task. The latest versions of Eschaton are available at http://tools.halodemomods.com/ .
Instructions for using AI in a multiplayer map file:
First, open Eschaton and go under "File -> Open" and choose the map file that you will be modding in order to contain AI. Since it is a multiplayer map, you will probably choose "bloodgulch.map".
Bloodgulch does not contain any AI by default, so you will need to also open The Silent Cartographer (b30.map) which contains AI. You should now have bloodgulch and b30 open in Eschaton.
Since we want to add tags (the related AI tags) to bloodgulch.map, select the map file in the left column in Eschaton (click the second drop-down arrow to see it, then click on the bloodgulch item) and choose "Expand" from the bottom of the right side. Wait for the map file to expand.
Now find the AI tags that you want to use from within the b30.map file. Navigate using the dropdown arrows until you see a bunch of "actv: Actor Variant" tags. Look at the end of each actor variant tag to observe the name of the AI, and decide which ones to use. I'll assume you want to use them all, but with whichever ones you choose to use in your mod, click on the tag name in the list and press "command-option-e" or use the menu item to "Recursively Extract Tags". Do this for each "actv" tag that you want to use. (Recursive extraction includes references within the tag such as bitmap images and character sounds and weapons. With AI, recursive extraction is quite necessary, otherwise you would have no model, collision, behavior, skin, weapon, physics, etc.)
You should now have a bunch of recursively-extracted Actor Variant tags. Close up the b30.map expansion arrow, and click on the bloodgulch.map expanded map file. On the right side, click the checkboxes next to each actv tag and click the "Import" button. It will take some time, as there are many recursions within actv tags. Click OK when it's done. Then rebuild the map file and save it with the mod's name and place it where you want. When it's done, continue.
For efficiency, quit Eschaton now and reopen it.
Now open the rebuilt map file in Eschaton and head to the "scnr: Scenario" tag. Go under the Reference Swapper menu tab on the top right and find a vehicle (vehi reference) that normally spawns in your gametype, like CTF or Slayer. For example, choose the multiplayer machine gun warthog, "vehi vehicles\warthog\mp_warthog". Double click on that tag reference to go to it. (You could have directly chosen this vehi tag, but we went through the scnr to make sure that it's in your scenario.)
Continuing the example, you should now be under the "vehicles\warthog\mp_warthog" tag, a vehi tag type. On the right side, we'll need to find some seat entries for the vehicle, so that our vehicle can spawn with AI inside of it. Click on Reference Swapper, then find some empty actv reference slots and for each one, select the slot and use the bottom right popup menu and "swap" button to choose and swap in an actor variant type into each empty actv slot.
Once you do this, the map file has been modified to contain AI that spawns in these vehicle seats in the scenario. Right now, you could test the mod in a new game by renaming it to bloodgulch.map and starting a new multiplayer game with it by using that map file in place of your original bloodgulch map file.
Always make backups. Now would be a nice time to control-click on your mod-in-progress and choose "Create Archive" to create a backup .zip file of the mod.
That's the entirety of the basics of adding AI into a map. If you want to make it look like they didn't spawn within a vehicle, you'll have to sacrifice the vehicle: go under the vehi tag that will use the AI spawns, null out its coll, mod2, antr, and phys references under Reference Swapper, then rotate the appropriate vehicle spawn(s) 180 degrees upside-down (pitch value) within the scnr tag, so the AI essentially fall out of the vehcile. You may need to experiment here, because messing with coll, mod2, and antr will usually prohibit the vehicle from being spawned in the scenario.
Good luck and have fun!