Battlefield Modding Tutorials BFMODS

Battlefield Modding Tutorials
It is currently Sun Aug 25, 2019 4:56 am

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 49 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next
Author Message
PostPosted: Fri Jan 26, 2007 8:47 am 
Offline

Joined: Thu Jun 15, 2006 9:36 am
Posts: 2015
Code:
rem ***single shot rifles or pistols***
weaponTemplate.create singleshotAI
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.minRange 0.0
weaponTemplate.maxRange 70.0
weaponTemplate.weaponActivate PIMenuSelect3 <--- pistol uses #2
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry    5.0
weaponTemplate.setStrength LightArmour 1.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 1.0
weaponTemplate.setStrength Air         1.0
weaponTemplate.setStrength Structure   0.0
weaponTemplate.SoundSphereRadius 10.0
weaponTemplate.deviation 0.7
weaponTemplate.AIStationaryFreePos 1
weaponTemplate.chargeTowards 1
weaponTemplate.ChargePossibility 0.4


Now for some fun stuff, buggeli buggeli.

Code:
rem ***Rocket Launcher***
weaponTemplate.create RocketAI
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.minRange 0.0
weaponTemplate.maxRange 80.0
weaponTemplate.weaponActivate PIMenuSelect4 <--- #4
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry    1.0
weaponTemplate.setStrength LightArmour 2.0
weaponTemplate.setStrength HeavyArmour 3.0
weaponTemplate.setStrength NavalArmour 2.0
weaponTemplate.setStrength Air         2.0
weaponTemplate.setStrength Structure   0.0
weaponTemplate.SoundSphereRadius 10.0
weaponTemplate.deviation 0.8
weaponTemplate.AIStationaryFreePos 1
weaponTemplate.chargeTowards 1
weaponTemplate.ChargePossibility 0.4


RPG/LAW you find on#4, ok.
That's why they did this code for SA-7 witch uses #3?

Code:
rem ***Special for SA7 since it resides under a different weapon slot than other RPGs
weaponTemplate.create SA7AI
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.minRange 0.0
weaponTemplate.maxRange 50.0
weaponTemplate.weaponActivate PIMenuSelect4 <--- #4
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry    1.0
weaponTemplate.setStrength LightArmour 2.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 2.0
weaponTemplate.setStrength Air         1.0
weaponTemplate.setStrength Structure   0.0
weaponTemplate.SoundSphereRadius 10.0
weaponTemplate.deviation 0.4
weaponTemplate.AIStationaryFreePos 1
weaponTemplate.chargeTowards 1
weaponTemplate.ChargePossibility 0.8


It even says that SA-7 is used by another slot then RPG but still the DICE morons put a #4 there.

Now why does it work?
Well bots are not allowed to play with TNT so they can't select #4.
That's why they run around with SA-7 all the time.

But.......

Making a new template with pistol in it.

Code:
rem ***single shot pistols***
weaponTemplate.create pistolAI
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.minRange 0.1
weaponTemplate.maxRange 15.0
weaponTemplate.weaponActivate PIMenuSelect2 <--- #2
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry    9.0
weaponTemplate.setStrength LightArmour 1.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Air         2.0
weaponTemplate.setStrength Structure   0.0
weaponTemplate.SoundSphereRadius 10.0
weaponTemplate.deviation 0.3
weaponTemplate.AIStationaryFreePos 1
weaponTemplate.chargeTowards 1
weaponTemplate.ChargePossibility 0.9


and ad it to revolvers and pistols

Code:
ObjectTemplate.active 44Magnum
objectTemplate.aiTemplate pistolAI


And finaly give SA-7 gunner his right number.

Code:
rem ***Special for SA7 since it resides under a different weapon slot than other RPGs
weaponTemplate.create SA7AI
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.minRange 1.0
weaponTemplate.maxRange 65.0
weaponTemplate.weaponActivate PIMenuSelect3 <--- #3
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry    5.0
weaponTemplate.setStrength LightArmour 4.0
weaponTemplate.setStrength HeavyArmour 3.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Air         18.0
weaponTemplate.setStrength Structure   0.0
weaponTemplate.SoundSphereRadius 10.0
weaponTemplate.deviation 4.0
weaponTemplate.AIStationaryFreePos 1
weaponTemplate.chargeTowards 1
weaponTemplate.ChargePossibility 0.85


And now you have a mean mother f***er with a pistol that will tear you a new #2 hole in close combat.

Does it work server side, bet your ass it does.

_________________
In the beginning everybody was a SSM NooB.
BFV SSM on server 66.55.142.243
Server Homepage http://forum.griffinclan.org


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sun Jan 28, 2007 6:55 am 
Offline

Joined: Thu Jun 15, 2006 9:36 am
Posts: 2015
Looking into the AI code of BFV and it's pretty much rubbish.
They put so much code in there but they didn't connect it to wepons.
Why bother doing so much code and not connect it?
Damn I got bots fighting like crazy now, with all sorts of wepons, even vehicle wepons. It's amazin how much you can make bots do actually.

Look at this code...
Code:
rem * MUTT *
weaponTemplate.create Mutt_RocketLauncherAI
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.minRange 5.0
weaponTemplate.maxRange 500.0
weaponTemplate.weaponActivate PINone
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry    3.0
weaponTemplate.setStrength LightArmour 4.0
weaponTemplate.setStrength HeavyArmour 8.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Structure   15.0
weaponTemplate.setStrength Air         0.0 <--- 0 how can it be ZERO?
weaponTemplate.precision 5.0


Basicly you want bots to use this wepon against air targets, or?
They told bots to shoot at ditches with this code, with the structure set to 15. :?
From freeking 500 meters! Yeah it will hit, ditches doesn't even give a heat signal.

The more I look at this code the more I think they where droged by something.

_________________
In the beginning everybody was a SSM NooB.
BFV SSM on server 66.55.142.243
Server Homepage http://forum.griffinclan.org


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sun Jan 28, 2007 7:46 am 
Offline
User avatar

Joined: Thu Oct 19, 2006 5:03 am
Posts: 1209
I'd love to do tons of things with bots, but unless I can include them in a Conquest game I can't use them. I've failed in all my attempts unfortunately.

_________________
Image

Image


Top
 Profile Send private message E-mail  
 
 Post subject: bots
PostPosted: Mon Jan 29, 2007 11:27 am 
Offline

Joined: Wed Jan 17, 2007 11:51 am
Posts: 18
Thx Urglub, i always wondered why bots would use sa7 on city maps ect, now it makes perfect sence. Yeh someone really screwed up the ai big time LOL


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Wed Jan 31, 2007 1:45 pm 
Offline

Joined: Wed Jan 17, 2007 11:51 am
Posts: 18
I took a look at this again and its actually very interresting, nice work Urglub.

I was kind of surprised that u where able to make your own weaponTemplate (pistolAI) as i thought we where bound here to only edit templates too, but we can actually create new ones? Did u add the pistolAI to objects/HandWeapons/Commen/AITTemplates.con ?


Top
 Profile Send private message E-mail  
 
 Post subject:
PostPosted: Sun Feb 18, 2007 8:17 pm 
Offline

Joined: Thu Jun 15, 2006 9:36 am
Posts: 2015
You can ad it there, but....
As I always say, if you like to tweak it for every map you put it into ObjecSpawnTemplate.con.
Now you can finetune bots for every map.

Something that makes bot use more wepons on tank.
MG will go hot now.
Code:
weaponTemplate.create SheridanMachineGun
weaponTemplate.burst 1
weaponTemplate.indirect 0
weaponTemplate.useAimerOnly 1
weaponTemplate.minRange 1.0
weaponTemplate.maxRange 100.0
weaponTemplate.weaponActivate PINone
weaponTemplate.weaponFire PIAltFire
weaponTemplate.setStrength Infantery  15.0
weaponTemplate.setStrength LightArmour 1.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 2.0
weaponTemplate.setStrength Air         8.0
weaponTemplate.setStrength Structure   0.0
weaponTemplate.deviation 0.5
weaponTemplate.ChargePossibility 0.8

ObjectTemplate.active Driver_MG
objectTemplate.aiTemplate SheridanMachineGun


Now amfibi vehicles will shoot from water.
Code:
rem *** AITemplate ***
aiTemplate.active M113TopMG
aiTemplate.addType ITAmfibious
aiTemplate.addType ITNaval

rem *** AITemplate ***
aiTemplate.active PT76
aiTemplate.addType ITNaval

rem *** AITemplate ***
aiTemplate.active PT76TopMG
aiTemplate.addType ITAmfibious
aiTemplate.addType ITNaval

rem *** AITemplate ***
aiTemplate.active BTR60TopMG
aiTemplate.addType ITAmfibious
aiTemplate.addType ITNaval


Now NVA will shoot the shit out of box in no time, not like before.
Just stand there looking at it.
Code:
rem *** AITemplate ***
ObjectTemplate.active USMobileSpawn01
objectTemplate.aiTemplate USMobile

aiTemplatePlugIn.create Physical USMobilePhysical
aiTemplatePlugIn.setStrType Structure

aiTemplate.create USMobile
aiTemplate.addType ITStructure
aiTemplate.addType ITTargetTemperature
aiTemplate.degeneration 1
aiTemplate.allowedTimeDiff -1
aiTemplate.basicTemp 200
aiTemplate.commonKnowledge 1
aiTemplate.addPlugIn USMobilePhysical
aiTemplate.side 2


Ever wondering why Huey co-pilot is so stupid?
Not any more...
Code:
weaponTemplate.active UH1_AutoCannon
weaponTemplate.burst 1
weaponTemplate.indirect 0
weaponTemplate.useAimerOnly 1
weaponTemplate.minRange 15.0
weaponTemplate.maxRange 200.0
weaponTemplate.weaponActivate PINone
weaponTemplate.weaponFire PIAltFire
weaponTemplate.setStrength Infantry    15.0
weaponTemplate.setStrength LightArmour 6.0
weaponTemplate.setStrength HeavyArmour 5.0
weaponTemplate.setStrength NavalArmour 4.0
weaponTemplate.setStrength Air         10.0
weaponTemplate.setStrength Structure   0.0
weaponTemplate.precision 30.0
weaponTemplate.ChargePossibility 0.95

weaponTemplate.active UH1_GrenadeLauncher
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.useAimerOnly 1
weaponTemplate.minRange 15.0
weaponTemplate.maxRange 100.0
weaponTemplate.weaponActivate PINone
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry    0.0
weaponTemplate.setStrength LightArmour 3.0
weaponTemplate.setStrength HeavyArmour 2.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Structure   15.0
weaponTemplate.setStrength Air         0.0
weaponTemplate.precision 10.0
weaponTemplate.ChargePossibility 0.4


Planes bomb out towers! Oh yeah.
Code:
weaponTemplate.active Mig17Bomb
weaponTemplate.burst 1
weaponTemplate.indirect 0
weaponTemplate.minRange 15.0
weaponTemplate.maxRange 100.0
weaponTemplate.weaponActivate PINone
weaponTemplate.weaponFire PIAltFire
weaponTemplate.setStrength Infantry     8.0
weaponTemplate.setStrength LightArmour 16.0
weaponTemplate.setStrength HeavyArmour  14.0
weaponTemplate.setStrength NavalArmour  3.0
weaponTemplate.setStrength Structure   18.0
weaponTemplate.setStrength Air          0.0
weaponTemplate.precision 100.0
weaponTemplate.ChargePossibility 0.9

weaponTemplate.active CorsairBomb
weaponTemplate.burst 1
weaponTemplate.indirect 1
weaponTemplate.minRange 10.0
weaponTemplate.maxRange 80.0
weaponTemplate.weaponActivate PINone
weaponTemplate.weaponFire PIAltFire
weaponTemplate.setStrength Infantry    12.0
weaponTemplate.setStrength LightArmour 10.0
weaponTemplate.setStrength HeavyArmour 10.0
weaponTemplate.setStrength NavalArmour 3.0
weaponTemplate.setStrength Structure   15.0
weaponTemplate.setStrength Air         0.0
weaponTemplate.precision 80.0
weaponTemplate.ChargePossibility 0.8


And there is no end of this error in code for AI.
I think they basicly patched BFV ai to death.
Changed it for conquest and didn't give a shit about Co-op.
But most things are just simple misstakes by coders.

_________________
In the beginning everybody was a SSM NooB.
BFV SSM on server 66.55.142.243
Server Homepage http://forum.griffinclan.org


Top
 Profile Send private message E-mail  
 
PostPosted: Sat Feb 09, 2008 8:31 pm 
Offline

Joined: Thu Apr 19, 2007 7:38 pm
Posts: 177
Quite an old post but i'm interesting in AI nowadays
I tried this one (was rem'ed) but will this work?...haven't been knifed by a bot yet :p
Code:
rem ***Knifes***
weaponTemplate.create KnifeAI
weaponTemplate.burst 0
weaponTemplate.indirect 0
weaponTemplate.isThrown 0
weaponTemplate.minRange 0.0
weaponTemplate.maxRange 5
weaponTemplate.weaponActivate PIMenuSelect1
weaponTemplate.weaponFire PIFire
weaponTemplate.setStrength Infantry    18.0
weaponTemplate.setStrength LightArmour 0.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Air         0.0
weaponTemplate.setStrength Structure   0.0
rem weaponTemplate.precision 0.3
weaponTemplate.chargeTowards 1
weaponTemplate.ChargePossibility 0.9

ObjectTemplate.active KnifeAllies
ObjectTemplate.aiTemplate KnifeAI

ObjectTemplate.active KnifeAxis
ObjectTemplate.aiTemplate KnifeAI

ObjectTemplate.active PlantationKnife
ObjectTemplate.aiTemplate KnifeAI

_________________
Image


Top
 Profile Send private message E-mail  
 
PostPosted: Sat Feb 09, 2008 9:10 pm 
Offline

Joined: Thu Jun 15, 2006 9:36 am
Posts: 2015
Maxrange should be 0.5 or so.
Precision 100 or more would work.
Might be some more problem with this code.
Don't remember all you have to do to make them use knife.
Projectile must be moving with more then 10 in velocity, otherwise they don't even bother.
Might have to make TTL a bit more aswell.
Knife is a tricky thing to make bots kill with it.

When you get RPG7v working, let me know. :cry:

Hey, Enclaven up and running again?

_________________
In the beginning everybody was a SSM NooB.
BFV SSM on server 66.55.142.243
Server Homepage http://forum.griffinclan.org


Last edited by Urglub on Sat Feb 09, 2008 10:40 pm, edited 1 time in total.

Top
 Profile Send private message E-mail  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 49 posts ]  Go to page 1, 2, 3, 4, 5 ... 7  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Group