• Hey you! Yes, you! Add images to your downloads, it's free! Use the orange "Manage Download Image" button in the top right.

koth_vehicle_example A11

bsp and vmf demonstrating vehicle combat in TF2 using map logic.

Combined-arms warfare in TF2 created with map logic!

Disclaimer: Currently this example is less-than-suitable for online play due to optimisation issues, but can still be tested offline with bots or online with a friend or two. I'm still keeping this uploaded as an "open source" resource that'll hopefully be valuable as a proof-of-concept/prototype that could help spur on some cool developments in the mapping community.

Streamlined, multiplayer-functional versions of these vehicles feature in Panckakebro's cp_battlefortress! Check it out here!

vmf and accompanying assets are shared as an open resource to be used, worked on and shared alike (and so you can all pick this apart with better solutions that are outside of my Source knowledge because damn does this use a lot of entdata). Enjoy!

About


After Panckakebro gracefully provided insight into the workings of his arena_tankwar map, on top of discovering useful info from A Boojum Snark's Chairmania Derby thread, I essentially began my own fork to try and create a combined-arms combat experience within TF2, similar to what's seen in games like Battlefield and Halo.

Features

General

- Vehicles can be entered and exited during gameplay, some of which have multiple seats for gunners and passengers.​
- Vehicles are destructible and will eject their occupants upon destruction, respawning at their team's base after 30 seconds.​
- Engineers can repair friendly vehicles.​
- Spies can hijack the driver's seat of enemy vehicles, kicking out existing occupants and reassigning the vehicle to their team.​
- Land vehicles are able to run over enemy players. They will push friendly players out of the way.​
- Ubercharged players are immune to vehicles and their weaponry.​
- Players and vehicles alike are pushed away from the map boundary, rather than colliding against it.​
- The spawns are set up to push away and prevent damage from enemy players and vehicles. Enemies can't move or fire in, friendlies can move and fire out.​
- Light vehicles such as jeeps and helicopters will take collision damage if hitting something fast enough, whereas heavy vehicles like the tank and Anti-Air will not.​
Helicopter
- The pilot can fire 8 rockets that reload automatically shortly after being depleted or the user stops firing.​
- The helicopter's gunner can fire manually guided missiles!​
Jet
- Jets utilise missiles that lock on to enemy players that are inside and outside of vehicles!​
- An experienced pilot can land the jet should it need to be repaired.​
Tank
- A single occupant toggles between driving and gunning by pressing Attack2.​
- Tanks can only take damage from heavier sources such as rockets and grenades and will resist smaller arms fire.​
Anti-Air
- Like the tank, a single user switches between driving and gunning with Attack2.​
- Like the helicopter rockets, the AA cannons fire 8 rounds that will reload after the user stops firing or the rounds are depleted.​
- The Anti-Air is naturally effective against light vehicles and aircraft, but less so against infantry, heavy vehicles and buildings.​
- The AA sports the same damage resistance as the tank.​
Jeep
- The jeep occupies up to 4 players; the driver, gunner and 2 passengers.​
- The jeep gunner takes command of a rocket launcher that can be fired continuously!​

Known Issues and caveats.

- Do not manually restart the round after the vehicles have spawned. With the current setup, this can cause the camera view when using helicopters and jets to break.​
- Vehicles spawn when the hill unlocks, which is to prevent a potential softlock/crash when being inside a vehicle when a round/pre-round ends or resets. The spawning of all the vehicles at once can potentially cause a momentary lag-spike.​
- All players are kicked out of vehicles when the round reaches a conclusion, to also mitigate the aforementioned potential softlock/crash.​
- Using the "kill" or "explode" commands whilst using a vehicle will render your view stuck on the vehicle's camera. Typing "retry" in the console to reestablish your session is the only way to resolve this (works when playing on a dedicated or listen server).​
- Sometimes players will be killed when colliding with enemy vehicles even if they are not moving sufficiently fast enough.​
- These vehicle setups are quite entity-heavy. This could cause performance issues for some users.​
- Many of the models have hair-line cracks that I wasn't quite able to resolve when tinkering with Propper and the brushwork.​
- The player's view when on a bike passenger seat may be laggy, especially when playing with a higher ping. Still trying to find a fix for this.​
- Currently the jet missiles aren't damaging some vehicles properly.​
About vmf/Hammer Logic

There's quite a bit of explanation required for some of the elaborate entity setups, as a lot of it is obscure bug/crash mitigation. I'll look into doing more of a write-up later on.

Additional info will be added above as I remember/discover more.

While all this is technically possible with vanilla Hammer, it was made much easier with the following tools (kudos to their respective authors. Items in bold may be required when using the vmf):

Hammer++
Ultimate Mapping Resource Pack
TF2 Spud FGD

Propper
VIDE
VTFEdit
GCFScape

Additional kudos also to those who contributed with help and info:

Panckakebro, FiCool2, A Boojum Snark, Unicake, MrBurguers, Izotope, some other fine folks who I am probably forgetting because my memory is terrible sorry.
Author
Argo
Downloads
931
Views
931
First release
Last update
Category
Prefabs

Latest updates

  1. Known Issues

    The engineer repair function does not work correctly; hitting vehicles with any engineer weapon will invoke repair, not just melee. This seems to be because the game engine ignores weapon slot filters (but not tf class filters) when checking the...
  2. A11 - Quick hotfix (src files only)

    Fixed a damage issue on vehicle cores that allowed vehicles to be damaged indirectly.
  3. A10 - Logic Optimisation Pass #1

    Adjusted entity IO throughout the map in an attempt to reduce server load and avoid choke, which has been causing various issues in multiplayer. Continuing to investigate.