Hey.
I was wondering if its possible to edit the amount of bombs/missles and/or the weapon systems for each vehicle?
E.g A-10 Thunderbolt without missiles/only bombs etc.
If its possible where do i find the specific files and which programs do i need to modify these files?
Greetings
Fuller
Aircraft/Vehicles weapons
-
rPoXoTauJIo
- PR:BF2 Developer
- Posts: 1979
- Joined: 2011-07-20 10:02
Re: Aircraft/Vehicles weapons
1. Grab vim... i meant notepad++.
2. Go /mods/pr/content/
3. Backup objects_vehicles_server.zip, open zip.
4. Navigate objects/vehicles/air/us_jet_a10a/
5. Open .tweak file with notepad++.
6. Find all "GenericFireArm's" - those are your weapons.
7. If need to delete weapon at all, remove initialization line at top of this file, f.e.
8. If need to adjust ammo - edit .ammo. component in firearm.
2. Go /mods/pr/content/
3. Backup objects_vehicles_server.zip, open zip.
4. Navigate objects/vehicles/air/us_jet_a10a/
5. Open .tweak file with notepad++.
6. Find all "GenericFireArm's" - those are your weapons.
7. If need to delete weapon at all, remove initialization line at top of this file, f.e.
Code: Select all
ObjectTemplate.addTemplate us_jet_a10a_agm65_launcherObjectTemplate.ammo.ammoType 15
ObjectTemplate.ammo.nrOfMags 1 - amount of magazines
ObjectTemplate.ammo.magSize 2 - amount of rounds in mag, 2 mavericks in one clip in our case
ObjectTemplate.ammo.reloadTime 7 - reload time, useful for weapons with multiple clips
ObjectTemplate.ammo.autoReload 1 - bool(1 or 0), automatically reload weapon without need to press R
ObjectTemplate.ammo.reloadWithoutPlayer 1 - bool(1 or 0), reload weapon even when switched to other one

assetruler69: I've seen things you smurfs wouldn't believe. Apaches on the Kashan. I watched burned down tank hulls after the launch of the single TOW. All those moments will be lost in time, like tears in rain.
Time to give up and respawn.
-
Fuller
- Posts: 91
- Joined: 2016-03-19 14:10
Re: Aircraft/Vehicles weapons
Thanks 
Comparing A10a with F-18c:
ObjectTemplate.addTemplate us_jet_a10a_AutoCannon
ObjectTemplate.setPosition -0.0412119/-0.970379/8.82007
ObjectTemplate.setRotation 0/-0.3/0
ObjectTemplate.addTemplate us_jet_a10a_bodyWing_horizontal
rem ObjectTemplate.addTemplate us_jet_a10a_TargetingRB
rem ObjectTemplate.setPosition 4/-1.5/2
rem ObjectTemplate.setRotation 0/30/0
ObjectTemplate.addTemplate us_jet_a10a_hydra_pods
ObjectTemplate.setPosition 5.3816/-1.6208/-0.0922
ObjectTemplate.addTemplate us_jet_a10a_CBU87_clusterbomb
ObjectTemplate.addTemplate us_jet_a10a_agm65_launcher
ObjectTemplate.addTemplate us_jet_a10a_SidewinderLauncher
ObjectTemplate.addTemplate us_jet_f18c_decoy_flare_launcher
ObjectTemplate.addTemplate us_jet_f18c_flare_counter
ObjectTemplate.addTemplate us_jet_f18c_20mmCannon
ObjectTemplate.setPosition 0/0.505/8.234
ObjectTemplate.setRotation 0/0/0
ObjectTemplate.addTemplate us_jet_f18c_SidewinderLauncher
ObjectTemplate.addTemplate us_jet_f18c_amraamlauncher
ObjectTemplate.addTemplate us_jet_f18c_EntryPoint
ObjectTemplate.setPosition -4.68061e-006/-0.510362/2.97378
ObjectTemplate.addTemplate HeatObject
ObjectTemplate.setPosition 0/0/3
ObjectTemplate.addTemplate us_jet_f18c_LandingFlap
ObjectTemplate.setPosition 0/0/-0.2
ObjectTemplate.addTemplate us_jet_f18c_bomblauncher
ObjectTemplate.addTemplate us_jet_f18c_EntryPoint_nose
ObjectTemplate.setPosition -1.75425e-005/-0.603293/7.00653
Is it possible to add f.e. "us_jet_f18c_amraamlauncher" to the A-10 ?
How many templates can be added to a specificy airplane?
Is there is difference between the "us_jet_a10a_cbu87_clusterbomb" and the "ObjectTemplate.addTemplate mk82_500lb_gpb_dummy" . It looks like that the mk82 is the model and the cbu-87 is some kind of weapon effect.
If i wanted to add more weapon station to f.e a SU25 which source code looks like this:
ObjectTemplate.addTemplate mec_jet_su25a_decoy_flare_launcher
ObjectTemplate.addTemplate mec_jet_su25a_flare_counter
ObjectTemplate.addTemplate HeatObject
ObjectTemplate.setPosition 0/0/5
ObjectTemplate.addTemplate Su-25_UB-32-57_Rocket_Pods
ObjectTemplate.setPosition 0/0.04/0
ObjectTemplate.addTemplate mec_jet_su25a_Cannon
ObjectTemplate.setPosition -0.325725/-0.570801/6.07868
ObjectTemplate.addTemplate mec_jet_su25a_S8Launcher
ObjectTemplate.addTemplate mec_jet_su25a_CBU87Launcher
ObjectTemplate.addTemplate mec_jet_su25a_KH29Launcher
ObjectTemplate.addTemplate mec_jet_su25a_ArcherLauncher
This should be the version with rocket pods and cannon (because there is no "ObjectTemplate.setPosition" for the other weapons). In order to add more weapons to the airplane do i have to add something like this?
ObjectTemplate.addTemplate mec_jet_su25a_ArcherLauncher
ObjectTemplate.setPosition -0.325725/-0.570801/6.07868
Comparing A10a with F-18c:
ObjectTemplate.addTemplate us_jet_a10a_AutoCannon
ObjectTemplate.setPosition -0.0412119/-0.970379/8.82007
ObjectTemplate.setRotation 0/-0.3/0
ObjectTemplate.addTemplate us_jet_a10a_bodyWing_horizontal
rem ObjectTemplate.addTemplate us_jet_a10a_TargetingRB
rem ObjectTemplate.setPosition 4/-1.5/2
rem ObjectTemplate.setRotation 0/30/0
ObjectTemplate.addTemplate us_jet_a10a_hydra_pods
ObjectTemplate.setPosition 5.3816/-1.6208/-0.0922
ObjectTemplate.addTemplate us_jet_a10a_CBU87_clusterbomb
ObjectTemplate.addTemplate us_jet_a10a_agm65_launcher
ObjectTemplate.addTemplate us_jet_a10a_SidewinderLauncher
ObjectTemplate.addTemplate us_jet_f18c_decoy_flare_launcher
ObjectTemplate.addTemplate us_jet_f18c_flare_counter
ObjectTemplate.addTemplate us_jet_f18c_20mmCannon
ObjectTemplate.setPosition 0/0.505/8.234
ObjectTemplate.setRotation 0/0/0
ObjectTemplate.addTemplate us_jet_f18c_SidewinderLauncher
ObjectTemplate.addTemplate us_jet_f18c_amraamlauncher
ObjectTemplate.addTemplate us_jet_f18c_EntryPoint
ObjectTemplate.setPosition -4.68061e-006/-0.510362/2.97378
ObjectTemplate.addTemplate HeatObject
ObjectTemplate.setPosition 0/0/3
ObjectTemplate.addTemplate us_jet_f18c_LandingFlap
ObjectTemplate.setPosition 0/0/-0.2
ObjectTemplate.addTemplate us_jet_f18c_bomblauncher
ObjectTemplate.addTemplate us_jet_f18c_EntryPoint_nose
ObjectTemplate.setPosition -1.75425e-005/-0.603293/7.00653
Is it possible to add f.e. "us_jet_f18c_amraamlauncher" to the A-10 ?
How many templates can be added to a specificy airplane?
Is there is difference between the "us_jet_a10a_cbu87_clusterbomb" and the "ObjectTemplate.addTemplate mk82_500lb_gpb_dummy" . It looks like that the mk82 is the model and the cbu-87 is some kind of weapon effect.
If i wanted to add more weapon station to f.e a SU25 which source code looks like this:
ObjectTemplate.addTemplate mec_jet_su25a_decoy_flare_launcher
ObjectTemplate.addTemplate mec_jet_su25a_flare_counter
ObjectTemplate.addTemplate HeatObject
ObjectTemplate.setPosition 0/0/5
ObjectTemplate.addTemplate Su-25_UB-32-57_Rocket_Pods
ObjectTemplate.setPosition 0/0.04/0
ObjectTemplate.addTemplate mec_jet_su25a_Cannon
ObjectTemplate.setPosition -0.325725/-0.570801/6.07868
ObjectTemplate.addTemplate mec_jet_su25a_S8Launcher
ObjectTemplate.addTemplate mec_jet_su25a_CBU87Launcher
ObjectTemplate.addTemplate mec_jet_su25a_KH29Launcher
ObjectTemplate.addTemplate mec_jet_su25a_ArcherLauncher
This should be the version with rocket pods and cannon (because there is no "ObjectTemplate.setPosition" for the other weapons). In order to add more weapons to the airplane do i have to add something like this?
ObjectTemplate.addTemplate mec_jet_su25a_ArcherLauncher
ObjectTemplate.setPosition -0.325725/-0.570801/6.07868
-
rPoXoTauJIo
- PR:BF2 Developer
- Posts: 1979
- Joined: 2011-07-20 10:02
Re: Aircraft/Vehicles weapons
You need to check weapons itemIndex'es first, there's shouldn't be any collisions between them withing all PCO(playercontrolobject, shortly a vehicle).Fuller wrote:Thanks
Comparing A10a with F-18c:
...
Is it possible to add f.e. "us_jet_f18c_amraamlauncher" to the A-10 ?
How many templates can be added to a specificy airplane?
F.e. you if you have a-10 with weapons with itemIndex 0(gun), 1(missiles), 2(bombs), and want to add amraam launcher from f18 that have item index of 1, then game wont like it.
But if you'll create renamed(not necessary) copy of amraam firearm in a-10 tweak with itemindex 3, then all should be fine.
Speaking of us_jet_a10a_cbu87_clusterbomb, it's just a name, we could have it named banana_launcher_lelelel and it still would work regardless. Just the naming conventions making it look betterFuller wrote: Is there is difference between the "us_jet_a10a_cbu87_clusterbomb" and the "ObjectTemplate.addTemplate mk82_500lb_gpb_dummy" . It looks like that the mk82 is the model and the cbu-87 is some kind of weapon effect.
Code: Select all
ObjectTemplate.addTemplate mk82_500lb_gpb_dummyEasily i would describe it as those dummies being replaced by actual bomb on fire(and seems like they actually it is.)
In your case you gotta look up on code in MultiFireComp component:
Code: Select all
ObjectTemplate.createComponent MultiFireComp
ObjectTemplate.fire.useDummyProjectiles 1
ObjectTemplate.fire.addBarrelName mk82_500lb_gpb_dummyThen we're telling it to use those barrels as projectiles, "disappear on fire".
And "barrel name", fake barrel that gonna shoot projectile(our real bomb) and disappear from wingtip.
Code: Select all
ObjectTemplate.addTemplate mk82_500lb_gpb_dummy
ObjectTemplate.setPosition 0.842619/-1.50233/-0.657096
ObjectTemplate.setRotation 0/5/0Code: Select all
ObjectTemplate.projectileTemplate mk82_500lb_gpbsetPositions aren't important for weapons, they're just invisible controllers of your "guns".Fuller wrote: If i wanted to add more weapon station to f.e a SU25 which source code looks like this:
ObjectTemplate.addTemplate mec_jet_su25a_decoy_flare_launcher
ObjectTemplate.addTemplate mec_jet_su25a_flare_counter
ObjectTemplate.addTemplate HeatObject
ObjectTemplate.setPosition 0/0/5
ObjectTemplate.addTemplate Su-25_UB-32-57_Rocket_Pods
ObjectTemplate.setPosition 0/0.04/0
ObjectTemplate.addTemplate mec_jet_su25a_Cannon
ObjectTemplate.setPosition -0.325725/-0.570801/6.07868
ObjectTemplate.addTemplate mec_jet_su25a_S8Launcher
ObjectTemplate.addTemplate mec_jet_su25a_CBU87Launcher
ObjectTemplate.addTemplate mec_jet_su25a_KH29Launcher
ObjectTemplate.addTemplate mec_jet_su25a_ArcherLauncher
This should be the version with rocket pods and cannon (because there is no "ObjectTemplate.setPosition" for the other weapons). In order to add more weapons to the airplane do i have to add something like this?
ObjectTemplate.addTemplate mec_jet_su25a_ArcherLauncher
ObjectTemplate.setPosition -0.325725/-0.570801/6.07868
Adding positions will give you nothing but offset for visible stuff that's being child for that firearm(dummies etc).
If you want to add more weapons to su25, first you have to create that weapons(copypasta other weapons code), then add it via addTemaplate to your PCO.

assetruler69: I've seen things you smurfs wouldn't believe. Apaches on the Kashan. I watched burned down tank hulls after the launch of the single TOW. All those moments will be lost in time, like tears in rain.
Time to give up and respawn.

