xstax981
Community Modder
+93|6888
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:

Code:

ObjectTemplate.velocity 10
It should be somewhere around where the pic shows it:

https://img143.imageshack.us/img143/6250/magicky6.png

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.

https://img212.imageshack.us/img212/1116/linesan9.png

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
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:

Code:

rem ---BeginComp:DefaultCollisionComp ---
ObjectTemplate.createComponent DefaultCollisionComp
rem ---EndComp ---
After those lines, copy and paste this code underneath it:

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 ---
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:

Code:

rem ---BeginComp:DefaultCollisionComp ---
ObjectTemplate.createComponent DefaultCollisionComp
rem ---EndComp ---
Replace it with this code:

Code:

rem ---BeginComp:DefaultCollisionComp ---
ObjectTemplate.createComponent StickyCollisionComp
ObjectTemplate.collision.bouncing 1
ObjectTemplate.collision.maxStickAngle 180
rem ---EndComp ---
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
liquidat0r
wtf.
+2,223|6839|UK
How to do the following hacks:

xstax981 wrote:

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.
j/k. nice post
FFLink
There is.
+1,380|6903|Devon, England
i wudnt rly call that full on modding, more editing bf2.

but still good none the less, +1
moeskimo
Member
+2|6207|Norway
nice post
would give you +1 karma if i could!
NZ_dcoy
Member
+0|6563
i cant seem to open the files in notepad, it comes up with a program with which i can view the text, but not change it. any tips on that?
Fateless
Member
+36|6454|Jennifer Connellys Pants

NZ_dcoy wrote:

i cant seem to open the files in notepad, it comes up with a program with which i can view the text, but not change it. any tips on that?
Right click the .con, choose open with, select notepad. You should be able to change it from there.


Fateless.

Board footer

Privacy Policy - © 2024 Jeff Minard