First off, if it wasn't for FFOLKES and a bunch of other people, this tutorial wouldn't be possible. They taught me most of the stuff.
Another note, do this in a separate mod. You will lose your online play capabilities if you use this on your bf2 mod.
So this is a basic tutorial (I'll write an advanced one later), on for examples:
1. Changing the range of a knife
2. Changing vehicle drop times.
3. Changing the projectile of a gun to an artillery bolt.
4. Making a sticky projectile.
1. Changing the knife range
We're going to start simple. We're going to change the range of a knife to infinite range, for example purposes. First, we would open up our .zip archiver. You'd open your mod folder, then open the Objects_server.zip file. Now, go to the Weapons directory, and then go to handheld. You should find a whole list of files. Its pretty obvious that you should open the KNI_KNIFE folder. The .con file won't give you many options. You want to open the .tweak file with notepad. This is where the meat of the weapon is. Weapon sounds, range, etc. etc. is here. Now find this line:
It should be somewhere around where the pic shows it:
Change it to something ridiculously high. Save the file, and play around with it in a game.
2. Changing vehicle drop times
Next, something that falls under simplistic. Go to the root directory of the Objects_server.zip file. Go to the Weapons folder, then go to the Common folder. Next, go to RemoteControlObjects, then go to the DropVehicle.con file.
As you can see in the picture, the lines circled are the ones that actually seem to affect the game.
ObjectTemplate.NoPassengerTimeToLive defines how long the car waits to have a passenger get in before it blows up. For example, if I set it to 1, I'd immediately have to get in, or it'd explode. If I set the value to 4325825, I could wait years before I decided to get in. Choose a value that best suits you.
To change the time, you'd simply change the:
CommanderMenu.VehicleDropReloadTime value to something like 1 if you want to have a short wait. This does not work the same for UAV, Satellite, Arty, or Supply drops! It doesn't do anything if you do this to anything else but Vehicle drops. If you do it to arty, the artillery does not work at all.
gameLogic.VehicleDropHeight 50 changes how high the vehicle drops from. You can set it to like 5 and it will have a .5 millisecond fall, as if you change it to like 2000, you'd have a .5 hour wait. I don't know how to set the maximum number of drops at a time.
3. Changing the projectile of a weapon to an artillery bolt
A more advanced mod, but still relatively simple. Go back to the root directory of your Objects_server.zip file, then go to the Weapons folder. Next, go to handheld, and just for an example, lets use the M4. Go to the USRIF_M4 folder, then go to the .tweak file.
Search for this line:
To change it to an artillery round, change the value to 44. It'd be best to change the line below it from 38 to 44 as well. Now, it will shoot arty rounds, but we want the explosion effect as well. So, go to the top of the file, and search for:
After those lines, copy and paste this code underneath it:
Play around with the values, find out what they do. Change them to your liking. You should now have a fully fledged arty gun.
4. Making a sticky projectile
Another, sort of simplistic change. For the sake of simplicity, lets use the grenade. This is a different weapon name. Its called the ushgr_m67. Go to the top of its .tweak file (you should know where the .tweak file is by now). Search for this code:
Replace it with this code:
The SP bots have a behavior problem with this though. They will always run up to the target, and place the nade on it instead of throwing the nade. Its hardcoded, and cannot be helped.
Hope you guys learned a bit, I'm tired and I'm going to bed. Happy modding
Another note, do this in a separate mod. You will lose your online play capabilities if you use this on your bf2 mod.
So this is a basic tutorial (I'll write an advanced one later), on for examples:
1. Changing the range of a knife
2. Changing vehicle drop times.
3. Changing the projectile of a gun to an artillery bolt.
4. Making a sticky projectile.
1. Changing the knife range
We're going to start simple. We're going to change the range of a knife to infinite range, for example purposes. First, we would open up our .zip archiver. You'd open your mod folder, then open the Objects_server.zip file. Now, go to the Weapons directory, and then go to handheld. You should find a whole list of files. Its pretty obvious that you should open the KNI_KNIFE folder. The .con file won't give you many options. You want to open the .tweak file with notepad. This is where the meat of the weapon is. Weapon sounds, range, etc. etc. is here. Now find this line:
Code:
ObjectTemplate.velocity 10
Change it to something ridiculously high. Save the file, and play around with it in a game.
2. Changing vehicle drop times
Next, something that falls under simplistic. Go to the root directory of the Objects_server.zip file. Go to the Weapons folder, then go to the Common folder. Next, go to RemoteControlObjects, then go to the DropVehicle.con file.
As you can see in the picture, the lines circled are the ones that actually seem to affect the game.
ObjectTemplate.NoPassengerTimeToLive defines how long the car waits to have a passenger get in before it blows up. For example, if I set it to 1, I'd immediately have to get in, or it'd explode. If I set the value to 4325825, I could wait years before I decided to get in. Choose a value that best suits you.
To change the time, you'd simply change the:
CommanderMenu.VehicleDropReloadTime value to something like 1 if you want to have a short wait. This does not work the same for UAV, Satellite, Arty, or Supply drops! It doesn't do anything if you do this to anything else but Vehicle drops. If you do it to arty, the artillery does not work at all.
gameLogic.VehicleDropHeight 50 changes how high the vehicle drops from. You can set it to like 5 and it will have a .5 millisecond fall, as if you change it to like 2000, you'd have a .5 hour wait. I don't know how to set the maximum number of drops at a time.
3. Changing the projectile of a weapon to an artillery bolt
A more advanced mod, but still relatively simple. Go back to the root directory of your Objects_server.zip file, then go to the Weapons folder. Next, go to handheld, and just for an example, lets use the M4. Go to the USRIF_M4 folder, then go to the .tweak file.
Search for this line:
Code:
ObjectTemplate.material 38
Code:
rem ---BeginComp:DefaultCollisionComp --- ObjectTemplate.createComponent DefaultCollisionComp rem ---EndComp ---
Code:
rem ---BeginComp:DefaultDetonationComp --- ObjectTemplate.createComponent DefaultDetonationComp ObjectTemplate.detonation.explosionMaterial 44 ObjectTemplate.detonation.explosionRadius 15 ObjectTemplate.detonation.explosionForce 30 ObjectTemplate.detonation.explosionDamage 900 ObjectTemplate.detonation.detonateDistanceToTarget 5 ObjectTemplate.detonation.endEffectTemplate e_exp_Xlarge ObjectTemplate.detonation.useMMOnEndEffect 1 rem ---EndComp ---
4. Making a sticky projectile
Another, sort of simplistic change. For the sake of simplicity, lets use the grenade. This is a different weapon name. Its called the ushgr_m67. Go to the top of its .tweak file (you should know where the .tweak file is by now). Search for this code:
Code:
rem ---BeginComp:DefaultCollisionComp --- ObjectTemplate.createComponent DefaultCollisionComp rem ---EndComp ---
Code:
rem ---BeginComp:DefaultCollisionComp --- ObjectTemplate.createComponent StickyCollisionComp ObjectTemplate.collision.bouncing 1 ObjectTemplate.collision.maxStickAngle 180 rem ---EndComp ---
Hope you guys learned a bit, I'm tired and I'm going to bed. Happy modding