The year is 2142 and the dawn of a new ice age has thrown the world into a panic. The soil not covered by ice can only feed a fraction of the Earth's population. The maths is simple and brutal: some will live, most will die. In Battlefield 2142, players choose to fight for one of two military superpowers - the European Union or the newly formed Pan Asian Coalition - in an epic battle for survival.

Report article RSS Feed How to configure a weapon

How to change weapon reload, recoil and damage amounts.

Posted by BurnerMeen on Feb 13th, 2010
Intermediate Server Side Coding.

Basically, go to the objects folder ([where u installed to]/mods/bf2142 (make a copy of bf2142 folder at this point)/objects; go to the .zip folder weapon_server

Go to the gun you want to edit (armament is all of the explosive missiles(even the sticky nade launcher) edit these for missile changes; common is stuff i have not messed with and dont plan to in the near future; handheld is...all handheld weapons (go figure); and stationary is all stationary objects like turrets, shields, orb strike controllers etc...), and find the .tweak file (i used my modded PAC pistol for this)

Edit the .tweak with notepad and look for

code:
rem ---BeginComp:SingleFireComp ---
ObjectTemplate.createComponent SingleFireComp
ObjectTemplate.fire.roundsPerMinute 600
ObjectTemplate.fire.addFireRate 2=auto
ObjectTemplate.fire.addFireRate 0=single
ObjectTemplate.fire.fireInCameraDof 1=yes
rem ---EndComp ---

For fire chars add another

code:
ObjectTemplate.fire.addFireRate

For more fire modes (can only have three, the third is burst fire, adn its number is one)

code:
rem ---BeginComp:DefaultAmmoComp ---
ObjectTemplate.createComponent DefaultAmmoComp
ObjectTemplate.ammo.nrOfMags 4=four mags
ObjectTemplate.ammo.magSize 12=twelve round clip
ObjectTemplate.ammo.reloadTime 3.2=time takes (independent of animation)
ObjectTemplate.ammo.reloadWithoutPlayer 1=reload when empty, yes

For ammo chars

code:
rem ---BeginComp:SoldierBasedRecoilComp ---
ObjectTemplate.createComponent SoldierBasedRecoilComp
ObjectTemplate.recoil.hasRecoilForce 1=% of how much recoil (1=100% 0=0% 0.5=50% etc...)
ObjectTemplate.recoil.goBackOnRecoil 0=bounce bacnk or no(like pac sniper)
ObjectTemplate.recoil.recoilForceUp CRD_UNIFORM/0.8/0.5/0=how much
ObjectTemplate.recoil.recoilForceLeftRight CRD_UNIFORM/-0.1/0.1/0=howmuch
ObjectTemplate.recoil.zoomModifier 0.5=how much when zoomed
rem ---EndComp ---

For recoil chars

code:
rem ---BeginComp:SoldierDeviationComp ---
ObjectTemplate.createComponent SoldierDeviationComp
ObjectTemplate.deviation.setFireDev 1.5 0.15 0.2
ObjectTemplate.deviation.minDev 0.5
ObjectTemplate.deviation.setTurnDev 0 0 0 0
ObjectTemplate.deviation.setSpeedDev 0.45 0.1 0.1 0.15
ObjectTemplate.deviation.setMiscDev 4.5 4.5 0.15
ObjectTemplate.deviation.devModStand 1.4
ObjectTemplate.deviation.devModCrouch 1.2
ObjectTemplate.deviation.devModZoom 0.5

For accuracy, i never fully figured out how this worked

code:
rem ---BeginComp:DefaultZoomComp ---
ObjectTemplate.createComponent DefaultZoomComp
ObjectTemplate.zoom.zoomDelay 0.1=time before full zoom
ObjectTemplate.zoom.addZoomFactor 0=base (unzoom, leave alone!)
ObjectTemplate.zoom.addZoomFactor 0.8=how much zoom (smaller=bigger)

For zoom amount

code:
ObjectTemplate.projectileTemplate "as_handgun_Projectile"=what projectile to shoot

For what to shoot ^ that must go with this

code:
rem -------------------------------------
ObjectTemplate.addTemplate "S_as_handgun_Projectile_Looping"=must match with ^
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/1/0/0=no clue
ObjectTemplate.material 38=no clue
ObjectTemplate.minDamage 10=guess
ObjectTemplate.damage 26=guess
ObjectTemplate.distToStartLoseDamage 12=how far before losing dam
ObjectTemplate.distToMinDamage 35=how far to max dam loss

Look for..never mind, everything past ^ is all sounds. be careful tho, i changed a smg to sound like a bogatyr shooting and i could hear it like it was next to me from one side to the other of the map.

Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Battlefield 2142
Platforms
Windows, Mac
Developer
DICE
Publisher
Electronic Arts
Engine
Refractor 2
Contact
Send Message
Official Page
Battlefield.ea.com
Release Date
Released Oct 17, 2006
Game Watch
Track this game
Tutorial
Browse
Tutorials
Report Abuse
Report article
Related Games
Battlefield 2142
Battlefield 2142 Single & Multiplayer First Person Shooter
Related Engines
Refractor 2
Refractor 2 Commercial Released Sep 9, 2002
Related Groups
DICE
DICE Developer & Publisher
Electronic Arts
Electronic Arts Developer & Publisher