PDA

View Full Version : how to make a rifle damage armored vehicles?


Warm Pudgy
03-15-2006, 09:44 PM
im thinking all it would require would be changing some tweak file
but i cant seem to figure it out

any one got any ideas?

|D|-Char-ley_Killa
03-15-2006, 09:45 PM
yeah u would have to tweak the configs i think, but io dont knwo much bout modding

jdrou
03-15-2006, 11:15 PM
You'd need to change the ammo material in the rifle's .tweak file.

e.g. the AK-47 of the Chinese Assault soldier (medic's is RURIF_AK47):
Objects_server.zip\Weapons\Handheld\RURIF_GP30\RUR IF_GP30.tweak :

ObjectTemplate.create GenericProjectile RURIF_GP30_Projectile
ObjectTemplate.modifiedByUser dsu
ObjectTemplate.createNotInGrid 1
ObjectTemplate.createdInEditor 1
rem ---BeginComp:DefaultCollisionComp ---
ObjectTemplate.createComponent DefaultCollisionComp
rem ---EndComp ---
rem ---BeginComp:DefaultDetonationComp ---
ObjectTemplate.createComponent DefaultDetonationComp
ObjectTemplate.detonation.useMMOnEndEffect 1
rem ---EndComp ---
rem ---BeginComp:DefaultProjSoundComp ---
ObjectTemplate.createComponent DefaultProjSoundComp
rem ---EndComp ---
rem ---BeginComp:DefaultRicochetComp ---
ObjectTemplate.createComponent DefaultRicochetComp
rem ---EndComp ---
rem ---BeginComp:DefaultPenetrateComp ---
ObjectTemplate.createComponent DefaultPenetrateComp
ObjectTemplate.penetrate.allowSolidPenetration 1
ObjectTemplate.penetrate.allowLiquidPenetration 1
rem ---EndComp ---
ObjectTemplate.floaterMod 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.hasCollisionPhysics 1
ObjectTemplate.physicsType Point
ObjectTemplate.collisionGroups 8
ObjectTemplate.material 38
rem -------------------------------------
ObjectTemplate.addTemplate S_RURIF_GP30_Projectile_Looping
rem -------------------------------------
ObjectTemplate.timeToLive CRD_NONE/0.5/0/0
ObjectTemplate.material 38
ObjectTemplate.hasOnTimeEffect 1
ObjectTemplate.damage 37

I'd suggest changing the material to type 42 (same as APC round) or 43 (same as a tank round). 42 does more damage against humans and less against armor while 43 is the opposite. This also gives you the sound and visual effects of these rounds but no actual splash damage.

Major-BG
03-16-2006, 03:22 AM
BEST IDEA ABOUT TO BE SAID!! ok imagine this mess with the config files until you can make a rifle shoot a tank bullet or an arty bullet!

Warm Pudgy
03-16-2006, 02:12 PM
BEST IDEA ABOUT TO BE SAID!! ok imagine this mess with the config files until you can make a rifle shoot a tank bullet or an arty bullet!


thats what i was wanting to do :cool:
thanks jdrou

Archer.
03-18-2006, 02:26 AM
How do I edit it, then save it in the zip file?

wolfi
03-18-2006, 04:43 AM
No. The best way is to create a new mod with the editor.
Then edit the weapon and pack the mod.
DO NOT edit zip files from the mods/bf2/ folder ;)

jdrou
03-18-2006, 07:04 AM
Yes, it is best to set it up as a separate mod since changing these files would otherwise prevent you from playing online. If you don't want to install the editor another quick way to do it would be to install a mod (like the EF/unlocks tryout mod) which will do the mod folder setup work for you and do your mods there. A good way to edit the files is to open the zip with a zip program (I use 7-zip: http://www.7-zip.org/) extract the file, edit it, and drag it back into the zip. Many of the files are read-only so you'll need to change that before you can save it.

IntensivCareBear
03-21-2006, 10:52 PM
whats the M82A1 doing in the hand held weapons files?

same in the localization files, i find all these weird weapon and vehicle names that arent in the game....yet...

jdrou
03-22-2006, 12:48 AM
whats the M82A1 doing in the hand held weapons files?

same in the localization files, i find all these weird weapon and vehicle names that arent in the game....yet...
Except for the SIMRAD and the M82 I believe they are all in the game. They don't necessarily have the same name in the game files as gets displayed in-game. For example, chrif_type95 is actually the QZB-97 in-game, usaav_m6 is the Linebacker, and some of the "stationary" weapons are actually vehicle-mounted. Also, the SF unlocks and EF weapons are in the vanilla files even though you can't normally use them without running those expansions.

IntensivCareBear
03-22-2006, 01:22 AM
also, how do i make it so that the tank material round has the damage of a tank?

i made it so the SAW material was 43, and when i shot it it acted like a tank shot, exploding on walls and such, but the explosions didnt kill people or send them flying?

it also took quite a few rounds to blow up a tank, maybe 100, instead of 3 normal tank rounds.

anybody know how to change that?

jdrou
03-22-2006, 03:02 AM
also, how do i make it so that the tank material round has the damage of a tank?

i made it so the SAW material was 43, and when i shot it it acted like a tank shot, exploding on walls and such, but the explosions didnt kill people or send them flying?

it also took quite a few rounds to blow up a tank, maybe 100, instead of 3 normal tank rounds.

anybody know how to change that?
If you actually want to kill tanks with only a few rounds you'll also need to change this line:
ObjectTemplate.damage 37
to 500 or so.

To make it do splash damage like a tank round you'd need to add something like this (from USTNK_M1A2.tweak):

rem ---BeginComp:DefaultDetonationComp ---
ObjectTemplate.createComponent DefaultDetonationComp
ObjectTemplate.detonation.explosionMaterial 70
ObjectTemplate.detonation.explosionRadius 5
ObjectTemplate.detonation.explosionForce 15
ObjectTemplate.detonation.explosionDamage 125
ObjectTemplate.detonation.endEffectTemplate e_exp_medium
ObjectTemplate.detonation.useMMOnEndEffect 1
ObjectTemplate.detonation.detectionRadius 0
ObjectTemplate.detonation.useCollisionNormal 0
ObjectTemplate.detonation.maxDepthForExplosion 2
rem ---EndComp ---

to replace the DefaultDetonationComp that exists already (4 lines).

IntensivCareBear
03-22-2006, 08:23 PM
thanks jdrou.

does that damage apply to both vehicles and personnel? also, is that damage the actual damage it deals to people in game? so we can check these files to find out how powerful each weapon is?

also, how come it was possible to destroy vehicles quickly, with maybe 50 rounds, when damage was 37 and material was 43?

jdrou
03-23-2006, 01:25 AM
The base damage is in the .tweak files. This is multiplied by the damage modifier that depends on the ammo material and the defending material (e.g. unarmored soldier torso is 24, tank front armor is 30, sides 29, rear 28, tracks 86, APC armor 27). The material modifiers are in common_server.zip.

A tank has 1000 hit points and will start counting down to auto-destruct at 900. If base damage is 37 then each hit does 37 x 0.52 = 19.24 points of damage to a tank's front armor. 50 hits x 19.24 = 962 damage so that would put it well into the range where it would auto-destruct and a couple more hits would make it blow up immediately.

Damage modifier for ammo type 43 vs. humans is 1 for all locations so it would take 3 hits to kill regardless of body armor or headshots.