WindSplitter1 wrote:Hello, PR Community,
I would like to know if it is possible to make vehicles, that require a driver and gunner, to be utilized by a single crewman (me), while in Single Player (COOP) mode, and how to do it.
Thank you in advance!
Hello

As PatrickLA_CA said you can use rcon commands to turn any vehicle into a one-manned vehicle.
If you want to modify vehicles to only have one-manned variants, you can replace them with_bf2 vehicles in COOP maps. I'm guessing you want to modify them to all include one-manned vehicles?
You could edit them, although it won't allow you to play them online so a backup is necessary.
Make sure to make a copy of the level folder you want to modify so you have a backup when you want to play COOP!
It's recommended to use WinRAR although you can use any decent archive program that can read .zips.
Going into mods/pr/levels/kashan_desert (For example)/server.zip/gamemodes/gpm_coop/16 (16 = Inf, 32 = Alt, 64 = Std, 128 = Large) and open gameplayobjects.con
Search for setObjectTemplate in Notepad++ and replace each vehicle with _bf2 vehicles using the objects/vehicles/land list as a guide and save. Press yes to update archive with your modified version.
How to create One-Manned version.
We'll use the M48A1 Tank as an example.
In most cases it should be simple. However for things like for the T72, you'd need to add the setPosition value of the _Turret with the _Gunner to make the turret not sink in.
You would need the following installed:
- Notepad++ for viewing .con and .tweak files (Notepad works but this is much better)
- WinMerge to compare _bf2 with normal versions to give you an idea
1. Copy the us_tnk_m48a1 folder and rename it to us_tnk_m48a1_bf2
2. Rename the .con and .tweak file the same way.
3. Open them both in Notepad++. Replace us_tnk_m48a1 with us_tnk_m48a1_bf2, but make sure in both files that ObjectTemplate.geometry and ObjectTemplate.collisionMesh are not using the _bf2 line otherwise it'll crash
.con:
1. Add ObjectTemplate.addTemplate us_tnk_m48a1_bf2_hudPass under ObjectTemplate.geometry us_tnk_m48a1
ObjectTemplate.create SimpleObject us_tnk_m48a1_bf2_hudPass
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.geometryPart 1
2. Replace us_tnk_m48a1_gunner with us_tnk_m48a1_turret
3. Delete the code:
ObjectTemplate.create PlayerControlObject us_tnk_m48a1_bf2_gunner
ObjectTemplate.hasCollisionPhysics 0
ObjectTemplate.hasMobilePhysics 1
ObjectTemplate.addTemplate us_tnk_m48a1_bf2_Turret
.tweak:
1. Search for 'playercontrol' and copy the ObjectTemplate.addTemplate zoomGun_8x code. Delete the line starting from Line 158: ObjectTemplate.activeSafe PlayerControlObject us_tnk_m48a1_gunner to Line 215
2. Remove any Driver and Co Camera, armor_driver_, armor_commander_, zoomGun_ codes and add zoomGun_8x. In this case, just replace ObjectTemplate.addTemplate ammo_driver_noammo with ObjectTemplate.addTemplate zoomGun_8x.
3. For AI, replace the tank_driver_4010_ai with tank_driver_136_bf2_ai
4. In the VehicleHud component section (1st one), add ObjectTemplate.vehicleHud.hasTurretIcon 1 to have the Turret Icon and add ObjectTemplate.vehicleHud.useSelectionIcons 0
5. Any ObjectTemplate.create Camera code can be safety deleted too although it's not required