That which does not kill you..
29th May 2004
I'm trying to make the bots smarter. I read about luciano's changing the bots to use grenades, and I was wondering how to do this. I tried looking for tutorials (the best was on http://www.planetbattlefield.com/battlefieldsingleplayer/ai_tutorials.asp ) but I couldn't figure out how to put the \objects\HandWeapons\Common\AiTemplates.con into my level. I don't want to mess around with the default settings, but my mod doesn't include the Object.rfa file. How do you add Objects.RFA and what files need need to be changed.
I like make go boom.
19th April 2004
Hmm. Its alot of AI strategy coding to make them "Smarter", and will only work for a certain level that it is coded for. However, I found a simple way to make some of my engineers use pistols instead of the M14. It was so easy I laughed after I figured it out. First, if you don't know how to unpack and pack the object.rfa, read the Tutorials in the Mod Dev Kit. They should give you the idea for exactly how to set up a new mod and unpack the games resources to the mod root folder. Once you set up a mod and unpack the resources, use the rfapacker tool in your mods archive folder to quickly pack the resource folders into .rfa archives. So how did I make them use pistols? In each kit the weapons the soldier carries is defined. I went to ..\Program Files\EA GAMES\Battlefield Vietnam\Mods\BFDestrucktion\Objects\Items\USMarine\Engineer and opened the objects.con in the folder. ObjectTemplate.addTemplate KnifeAllies ObjectTemplate.addTemplate M19 ObjectTemplate.addTemplate M14 < this is the default weapon used ObjectTemplate.addTemplate Claymore ObjectTemplate.addTemplate BTorch ObjectTemplate.addTemplate UsWrench ObjectTemplate.addTemplate C4Detonator If you change the 3rd weapon in the kit to something else like a pistol or grenade, that is the bots new primary weapon. to get the bot to use the pistol I swapped the first two lines. like this.. ObjectTemplate.addTemplate KnifeAllies ObjectTemplate.addTemplate M14 ObjectTemplate.addTemplate M19 ObjectTemplate.addTemplate Claymore ObjectTemplate.addTemplate BTorch ObjectTemplate.addTemplate UsWrench ObjectTemplate.addTemplate C4Detonator in the chunk of code above the one I mentioned is the objects icon definition. ObjectTemplate.healthBarIcon "menu/hud/guage03empty.tga" ObjectTemplate.healthBarFullIcon "menu/hud/guage03fullorange.tga" ObjectTemplate.addWeaponIcon "Weapon/USKnife.dds" ObjectTemplate.addWeaponIcon "Weapon/M19.dds" ObjectTemplate.addWeaponIcon "Weapon/M14.dds" < calls the icon graphik ObjectTemplate.addWeaponIcon "Weapon/Claymore.dds" ObjectTemplate.addWeaponIcon "Weapon/Blowtorch.dds" ObjectTemplate.addWeaponIcon "Weapon/USWrench.dds" rem ObjectTemplate.addWeaponIcon "Weapon/Icon_repairpack.tga" make sure you swap those to or you will have the pistol icon for the m14. This actually changes the kits for you and the bot, so the m14 will be the second weapon in your kit list, and the pistol will be 3rd. (usually the 3rd weapon is designated as the primary weapon for the bot to use.) Thats it. Piece of pie, and smooth as silk. Swap your kits and your bots use different weapons. G-luck.