Battlefield Modding Tutorials BFMODS

Battlefield Modding Tutorials
It is currently Mon Oct 15, 2018 12:24 pm

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 7 posts ] 
Author Message
PostPosted: Fri Jan 08, 2010 10:37 am 
Offline

Joined: Sat Oct 24, 2009 8:42 am
Posts: 67
Hi, i want to make a server side mod where it can only kill planes. My mod is as followed

Code:
rem***ANITI*AIR*CRAFT*GUN***
ObjectTemplate.Active Binoculars
ObjectTemplate.magType 0
ObjectTemplate.magSize 400
ObjectTemplate.numOfMag 1
Objecttemplate.projectiletemplate AA_Allies_Projectile


This works but it is very powerful, it kills soldiers and vehicles really easy.

I thought something like this:

Code:
rem *** Add gun ***
weaponTemplate.Active AA_BaseMainGun
weaponTemplate.setStrength Infantry   0.0
weaponTemplate.setStrength LightArmour 0.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Submarine   0.0
weaponTemplate.setStrength Air         5.0


Would this work?

Thanks a lot.


ok now, i have done something that has worked kind of. It takes no damage to people.

Code:
ObjectTemplate.Active AA_Allies_Projectile
ObjectTemplate.material 1
ObjectTemplate.material2 3


BUT it also makes everythingelse weaker, so it takes longer to kill planes. Any other way??

Thanks

_________________
Image


Top
 Profile Send private message E-mail  
 
PostPosted: Fri Jan 08, 2010 7:47 pm 
Offline

Joined: Tue Jul 11, 2006 7:32 am
Posts: 357
Easiest way is to define a new custom material ID and asign it to the projectile. Then only define it for the objects you want it to cause damage to, it'll ignore the rest.


Top
 Profile Send private message E-mail  
 
PostPosted: Fri Jan 08, 2010 9:55 pm 
Offline

Joined: Wed Oct 11, 2006 4:19 pm
Posts: 211
Location: Northern California
Change projectile to stinger missle :shock:

_________________
Image


Top
 Profile Send private message E-mail  
 
PostPosted: Sat Jan 09, 2010 12:13 am 
Offline

Joined: Sat May 10, 2008 5:47 am
Posts: 85
Quote:
This works but it is very powerful, it kills soldiers and vehicles really easy.

I thought something like this:

Code:
rem *** Add gun ***
weaponTemplate.Active AA_BaseMainGun
weaponTemplate.setStrength Infantry   0.0
weaponTemplate.setStrength LightArmour 0.0
weaponTemplate.setStrength HeavyArmour 0.0
weaponTemplate.setStrength NavalArmour 0.0
weaponTemplate.setStrength Submarine   0.0
weaponTemplate.setStrength Air         5.0


i thought this was just to set the ai strengths :shock: ... looks like the bots will only be shooting air vehicles

_________________
You dont know who i am or what i do. im your friend, only if...


Top
 Profile Send private message E-mail  
 
PostPosted: Sat Jan 09, 2010 8:12 am 
Offline

Joined: Sat Oct 24, 2009 8:42 am
Posts: 67
PLAYER wrote:
Easiest way is to define a new custom material ID and asign it to the projectile. Then only define it for the objects you want it to cause damage to, it'll ignore the rest.


Like this, i am a bit confused..

Code:
ObjectTemplate.Active AA_Allies_Projectile
ObjectTemplate.material 10
ObjectTemplate.material2 11


What extra code would you add on?

Sorry but i am a slow lurner at modding xD

Thanks

_________________
Image


Top
 Profile Send private message E-mail  
 
PostPosted: Sat Jan 09, 2010 9:30 am 
Offline

Joined: Tue Jul 11, 2006 7:32 am
Posts: 357
Hey battlef13ldmad,

This is old example of mine I pulled from my forum... It'll give you the basic info you'll need to create your own.




First you have to activate the projectile you wish to alter then assign it the new material ID number that youre going to create.

ObjectTemplate.Active No4Projectile
ObjectTemplate.material 900

ObjectTemplate.Active K98Projectile
ObjectTemplate.material 900

Next we build the Damage System for that Material.
I created a new material ID of 900 and assigned it a base damage value of 30HP.

MaterialManager.material 900
MaterialManager.materialAttGroup 900
MaterialManager.materialDefGroup 900
MaterialManager.materialDamage 30


At this point it will do no damage to anything you fire it at, until we define what materials this material ID will inflict damage on.


rem ***** SuperSnipers *****

rem Set the material ID we created
MaterialManager.attGroup 900

rem ID 40, 41, 42 = are soldiers Head, Torso, Limbs

MaterialManager.defGroup 40
MaterialManager.damageMod 1

MaterialManager.defGroup 41
MaterialManager.damageMod 1

MaterialManager.defGroup 42
MaterialManager.damageMod 1

We've only defined this material ID 900 to inflict damage to materials 40, 41, 42

This means this projectile will do 0 damage to all other materials

Here's the best part.. you can tweak every surface this projectile now does damage to..

MaterialManager.damageMod << value is a multiplyer of the base value

MaterialManager.damageMod 1 = 1 times base value we assigned earlier 30

so when the projectile hits material 40 (Soldiers Head) it does 30HP Damage


Top
 Profile Send private message E-mail  
 
PostPosted: Sat Jan 09, 2010 3:41 pm 
Offline

Joined: Sat Oct 24, 2009 8:42 am
Posts: 67
shall i write my code in objectSpawnTemplate?? Or where else, i want it server side.

Thanks

_________________
Image


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.  [ 7 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 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