Quick question: How do I use the BF2 editor to do the following to the US Apache Helicopter:
Adjust weapon assignments such that they are like this:
Weapon 1: Hydras on primary fire, Sidewinder on secondary fire
Weapon 2: Mystery new weapon (not default Hydras) on primary fire, whatever the current secondary fire weapon is.
Create a new weapon to assign to the mystery slot that starts out as a duplicate of the Weapon 1 Hydra.
[Help] Changing primary-fire weapons on Attack Helos
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: Changing primary-fire weapons on Attack Helos
Hydras are already on primary fire, sidewinders are already on secondary.
2 very much depends on the code itself on how you go about it but really its just about adding a new weapon, but it would have to be on secondary fire most likely. You should also do the coding in a text editor, not the BF2 editor, just use the BF2 editor for testing and feedback of your code.
2 very much depends on the code itself on how you go about it but really its just about adding a new weapon, but it would have to be on secondary fire most likely. You should also do the coding in a text editor, not the BF2 editor, just use the BF2 editor for testing and feedback of your code.
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: Changing primary-fire weapons on Attack Helos
BTW: I'm implementing and testing the Rocket pod Elevation suggestion I posted on the other forum.
I HAVE IT WORKING... with an odd bug: Both rocket variants are on primary fire, and I can swap between them (toggle sound effect plays as well)... using the weapon toggle key, but no swap happens when pressing what should be the corresponding HUD key, or any other key (no sound effect either). Furthermore, it will swap between the hydra modes every time I press the toggle weapon key, even if I'm going through the 7 8 9 view "weapons".
I.E. Starting out, it's on the main fire mode. I press toggle weapon, I have the alternate fire mode and the HUD that displays rockets and flare counter. I press it again and I have the main fire mode and am in the '7' view; I can press any of the numrow keys and I'll still remain in main fire.
How do I fix/work around this? Only text modding I've done is to duplicate the Hydra weapon, rename the appropriate references for the alternative launcher, add maglinking function, and give the alternate weapon barrels rotation 11 degrees downward.
I HAVE IT WORKING... with an odd bug: Both rocket variants are on primary fire, and I can swap between them (toggle sound effect plays as well)... using the weapon toggle key, but no swap happens when pressing what should be the corresponding HUD key, or any other key (no sound effect either). Furthermore, it will swap between the hydra modes every time I press the toggle weapon key, even if I'm going through the 7 8 9 view "weapons".
I.E. Starting out, it's on the main fire mode. I press toggle weapon, I have the alternate fire mode and the HUD that displays rockets and flare counter. I press it again and I have the main fire mode and am in the '7' view; I can press any of the numrow keys and I'll still remain in main fire.
How do I fix/work around this? Only text modding I've done is to duplicate the Hydra weapon, rename the appropriate references for the alternative launcher, add maglinking function, and give the alternate weapon barrels rotation 11 degrees downward.
-
ballard_44
- Retired PR Developer
- Posts: 1204
- Joined: 2007-05-30 22:47
Re: Changing primary-fire weapons on Attack Helos
Try giving them their own index number...
This is what makes 'cycling' between weapons possible with the 'F' key or hitting the corresponding number key on the keyboard.
Could be a conflict in the GUIindex numbers, also?
The Hydras are -1 meaning they are the permanent primary weapon = PIFire/left mouse click.
You might need to create a new HUD altogether so this works the way you want it.
Take a look at some various vehicles to get what I mean...
Plus, with the setup you are trying, the sidewinders would need to be the secondary weapon = PIAltFire/right mouse click (which it is), but would need to be added as a 'child' much like the co-axial mgs on the tanks.
Or make it where all 3 (hydras, elevated hydras and sidewinders) are primary fire weapons.
Would use index number 1, 2 and 3 with new individual GUIindexes.
Pretty fun, huh!!!
Code: Select all
ObjectTemplate.itemIndex XCould be a conflict in the GUIindex numbers, also?
The Hydras are -1 meaning they are the permanent primary weapon = PIFire/left mouse click.
You might need to create a new HUD altogether so this works the way you want it.
Take a look at some various vehicles to get what I mean...
Code: Select all
Battlefield 2\mods\pr\menu\menu_server-zip\HUD\HudSetup\VehiclesOr make it where all 3 (hydras, elevated hydras and sidewinders) are primary fire weapons.
Would use index number 1, 2 and 3 with new individual GUIindexes.
Pretty fun, huh!!!

-
Alex6714
- Posts: 3900
- Joined: 2007-06-15 22:47
Re: Changing primary-fire weapons on Attack Helos
In CA and on my helicopters I made everything primary fire (how it should be tbh) and adjusted the hud to suit (although this isnt necessary for basic functionality.
I recommend you put all weapons on primary fire, leave flarelauncher on flarefire and all the viewpoints and flarecounter need to be on primary fire too. Change the itemindexes to suit.
Hydras - Primary fire, item index 1
Hydras 2 (mystery weapon) - Primary fire, item index 2
Sidewinders - Primary fire, item index 3
Flarecounter - Primary fire, item index 4
View point - Primary fire, item index 7 (can leave as is)
View point - Primary fire, item index 8 (can leave as is)
View point - Primary fire, item index 9 (can leave as is)
Flarelauncher - Flarefire
The problem you will have is with the sidewinder visual locking cues on the hud and the ammo designation, but apart from that itl all work.
I recommend you put all weapons on primary fire, leave flarelauncher on flarefire and all the viewpoints and flarecounter need to be on primary fire too. Change the itemindexes to suit.
Hydras - Primary fire, item index 1
Hydras 2 (mystery weapon) - Primary fire, item index 2
Sidewinders - Primary fire, item index 3
Flarecounter - Primary fire, item index 4
View point - Primary fire, item index 7 (can leave as is)
View point - Primary fire, item index 8 (can leave as is)
View point - Primary fire, item index 9 (can leave as is)
Flarelauncher - Flarefire
The problem you will have is with the sidewinder visual locking cues on the hud and the ammo designation, but apart from that itl all work.
"Today's forecast calls for 30mm HE rain with a slight chance of hellfires"
"oh, they're fire and forget all right...they're fired then they forget where the target is"
-
Jafar Ironclad
- Retired PR Developer
- Posts: 2203
- Joined: 2008-11-26 00:45
Re: Changing primary-fire weapons on Attack Helos
I have what I believe is a satisfactory workaround: the angle swap is functional and usable on the battlefield, although the weapon swap vs. weapon key bug is still present. The cue to the pilot telling him what mode he's in BEFORE he fires is the sound effect that plays when he hits the cycle weapon key; if it plays the flare reload sound, he just switched to angled rockets, if it plays the normal toggle sound, his next rockets will be level. A pilot flying with a joystick with proper POV mapping (I.E. lets him use the side and high views, then switch back to normal views) can simply hit the toggle weapon button, then the center view/weapon 1 button to keep from cycling inadvertently into the view weapons. Same process for a keyboard/mouse pilot as well.
There's some imprecision with the rockets with respect to distance when they're in angled mode (I.E. where they land relative to the gunner trackbox), but it's negligible, and with the deviation already present in rockets, some rockets will always land on target in a barrage; furthermore, the co-pilot can communicate adjustments.
If the DEV team would like the Apache tweak con file with the angled rockets implemented in their current form, let me know. If you guys deem the code acceptable for inclusion, I will perform and test the same process on all the other attack helos (Havoc, Cobra, Z-10, Tiger, all factions) and submit code as appropriate.
I don't have a great ingame recording program; if anyone wants the code so they can do a demonstrator video, I'd be very appreciative.
There's some imprecision with the rockets with respect to distance when they're in angled mode (I.E. where they land relative to the gunner trackbox), but it's negligible, and with the deviation already present in rockets, some rockets will always land on target in a barrage; furthermore, the co-pilot can communicate adjustments.
If the DEV team would like the Apache tweak con file with the angled rockets implemented in their current form, let me know. If you guys deem the code acceptable for inclusion, I will perform and test the same process on all the other attack helos (Havoc, Cobra, Z-10, Tiger, all factions) and submit code as appropriate.
I don't have a great ingame recording program; if anyone wants the code so they can do a demonstrator video, I'd be very appreciative.

