Weapon settings

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hawk_eye477

    #1

    Weapon settings

    AIs there any way to easily change a line in a wordpad/notepad file to edit weapon settings for certain guns? Like change the ammo count, accuracy (what I want to do), damage it does etc...?

    If anybody knows if it is possible, then what file and what line(s)?
    Oh, and will it just crash the game if you edit files this fragile?

    At the moment I am looking in this directory: Objects_client.zip\Weapons\Handheld\USLMG_M249SAW

    in the file USLMG_M249SAW.tweak and i'm seeing lines like this:

    ObjectTemplate.fire.roundsPerMinute 900

    ObjectTemplate.weaponHud.disableOnSprint 1

    ObjectTemplate.ammo.ammoType 1
    ObjectTemplate.ammo.magSize 200
    ObjectTemplate.ammo.reloadTime 6.666

    Is it possible to edit these lines to change things permanently?

    eg: change the "ObjectTemplate.weaponHud.disableOnSprint 1" line to:

    ObjectTemplate.weaponHud.disableOnSprint 0?

    Would that enable firing while sprinting?

    I would try it myself but I am too scared in case it screws my game up... I want to get confirmation from someone first

    Also I found this in the Objects_client.zip\Weapons\Handheld\USLMG_M249SAW\ ai
    File: weapons.ai

    rem *** Add Saw ***
    weaponTemplate.create uslmg_m249sawAI
    weaponTemplate.indirect 0
    weaponTemplate.minRange 20.0
    weaponTemplate.maxRange 80.0
    weaponTemplate.optimalRangePercentage 80
    weaponTemplate.setFiringPose Lying
    weaponTemplate.setStrength Infantry 7.0
    weaponTemplate.setStrength LightArmour 1.0
    weaponTemplate.setStrength HeavyArmour 0.0
    weaponTemplate.setStrength NavalArmour 0.0
    weaponTemplate.setStrength Helicopter 1.0
    weaponTemplate.setStrength AirPlane 0.5
    weaponTemplate.setSoundSphereRadius 60.0

    Could you edit all these to make it that for example the AI stand up when firing?
    (weaponTemplate.setFiringPose Lying)

    btw I've done a search and found some threads pertaining to this matter, but nothing that comes to a real conclusion.
  • ironmonkaa

    #2
    Re: Weapon settings

    yes u can change the amount of the magazine size and how many mags,the damage,and the accuracy

    Comment

    • imported_CDNCommando

      #3
      Re: Weapon settings

      It sounds like you have the idea. Whenever you see a 1 or 0 remember 1 is yes 0 is no. These files arent really to fragile just becareful with what you are doing. Only edit the number value unless to need to do somthing more complex. This will not crash your game but you will get a modified conent warining if you try to go online. Make a mod to get around that. Anyway if you need more help just ask.

      Comment

      • hawk_eye477

        #4
        Re: Weapon settings

        Thanks for your replies - but I still can't find the line to change accuracy in the weapons tweak file..? For example: I've looked all over the M249 tweak file and can't see anything pertaining to the accuracy.

        Also, a bit off topic, but at what ping does BF2 start to lag real bad in multiplayer games?

        Cheers

        Comment

        • hawk_eye477

          #5
          Re: Weapon settings

          OK so I just downloaded the editor - and I'm lost.
          I've managed to make my own mod, but when I start it, it has no background and no maps in the list to try it out.. How do I add maps? And make it single player? I just want to make a crazy mod that only changes weapons and vehicles, and keeps everything like maps the same.. I want to be able to fire bodies instead of bullets etc. That'll be my test mod to get to know the editor, and after that I will try to make a mod that I want, and that includes changing the accuracy and damage for weapons. Both of these changes I can't find in BF2 Editor. Help?

          Comment

          • ironmonkaa

            #6
            Re: Weapon settings

            ok man u have to copy and paste the maps from bf2 into your mods folder,then you can go to the object editor and drag a weapon into the blank screen and edit its ammo in the tweak toolbar then save and package your mod

            Comment

            • jdrou
              Member
              • Jul 2006
              • 1860

              #7
              Re: Weapon settings

              Actually, since patch 1.03 you don't need to copy the whole map into the mod folder anymore, just the info folder. Saves a lot of space.

              Comment

              • ironmonkaa

                #8
                Re: Weapon settings

                oh...well then

                Comment

                • hawk_eye477

                  #9
                  Re: Weapon settings

                  Sweet, thanks for your help. I don't know why I didn't think of that in the first place lol. With the weapons, I still can't find where to change accuracy and damage it does.. I can see where to change the ammo type, but not the other stuff. And also things like vehicle speeds, where are they?

                  Comment

                  • imported_CDNCommando

                    #10
                    Re: Weapon settings

                    rem ---BeginCompefaultAmmoComp ---
                    ObjectTemplate.createComponent DefaultAmmoComp
                    ObjectTemplate.ammo.nrOfMags 8
                    ObjectTemplate.ammo.magSize 15
                    ObjectTemplate.ammo.reloadTime 3.2
                    rem ---EndComp ---

                    This is what you change for ammo. Rounds per mag is magSize and number of mags is nrOfMags.

                    ObjectTemplate.timeToLive CRD_NONE/0.3/0/0
                    ObjectTemplate.material 38
                    ObjectTemplate.minDamage 8
                    ObjectTemplate.damage 20
                    ObjectTemplate.distToStartLoseDamage 100
                    ObjectTemplate.distToMinDamage 200

                    Damage is right there the higher the more it hurts.

                    Comment

                    • jdrou
                      Member
                      • Jul 2006
                      • 1860

                      #11
                      Re: Weapon settings

                      Originally posted by CDNCommando
                      ObjectTemplate.ammo.nrOfMags 8
                      ObjectTemplate.ammo.magSize 15
                      Yes, the tricky part is that many weapons do not have these lines so you need to add them. If they don't exist the weapon defaults to 4 mags (including the one in the weapon) and 30 round per mag. You can also add firing modes (full, semi, burst) and change burst size of burst fire (ObjectTemplate.fire.burstSize 4).

                      Weapon accuracy is call "deviation"; high accuracy means low deviation numbers.
                      minDev = minimum deviation (actually misnamed since it isn't the minimum; it should really be called baseDev)
                      setFireDev x y z (y = added deviation per shot, x = max added deviation, z = reduction in deviation from pausing between shots [per second?])
                      devModStand, devModCrouch, devModLie are modifiers which are multiplied by minDev depending on the shooter's stance
                      devModZoom modifier for being zoomed; multiplied by (minDev*[stance modifier]+added deviation per shot)

                      See the wiki (http://wiki.bf2s.com/weapons/comparison) for some examples of deviation calculations (including recoil which I didn't go into).

                      Regarding damage: it takes 100 points to kill an unarmored soldier, damage to the head is tripled (usually), and body armor reduces damage by 34% (usually; shotguns and .50cal rifles are different).

                      Comment

                      • hawk_eye477

                        #12
                        Re: Weapon settings

                        OK thats great, but are those commands in BF2 Editor? Or do I just go into my mod and change them through the objects_client file?
                        Is it actually possible to change all this in the BF2 Mod editor program?
                        Thanks for your help

                        Comment

                        • hawk_eye477

                          #13
                          Re: Weapon settings

                          Wait - i've found it - don't worry. Thanks for helping - if I have any more problems then i'll ask here Thanks a lot!

                          Comment

                          • hawk_eye477

                            #14
                            Re: Weapon settings

                            OK three more questions -

                            How do I change the ammo type? (Like it I want the M249 to fire AA explosive rounds )

                            How do I edit the overheating of weapons?

                            And I still can't find the damage option in BF2 Editor!!

                            Thanks

                            Comment

                            • jdrou
                              Member
                              • Jul 2006
                              • 1860

                              #15
                              Re: Weapon settings

                              Sorry, I've never really used the editor. I just edit the .tweak files directly. Just open the file and search for "overheat". The ammo type is near the damage value in the file. See CDNCommando's post. The ammo type is the Material value. The ammo material gets compared with the defending "material" to determine the damage modifiers. The modifiers are in common_server.zip\Material\materialManagerSettings .con. The easy way to make exploding rounds would be to copy the material type of the attack helo guns (87). This also penetrates armor (except for frontal tank armor).

                              EDIT: Actually, to get splash damage you also need to add another section to the .tweak file after the create GenericProjectile. For example, from the AH-1 file:
                              Code:
                              rem ---BeginComp:DefaultDetonationComp ---
                              ObjectTemplate.createComponent DefaultDetonationComp
                              ObjectTemplate.detonation.explosionMaterial 87
                              ObjectTemplate.detonation.explosionRadius 3
                              ObjectTemplate.detonation.explosionForce 2.5
                              ObjectTemplate.detonation.explosionDamage 75
                              ObjectTemplate.detonation.endEffectTemplate e_exp_small
                              rem ---EndComp ---

                              Comment

                              Working...