Cogito, ergo sum

Legacy:Mapping For VCTF

From Unreal Wiki, The Unreal Engine Documentation Site
Revision as of 08:53, 22 June 2008 by GreatEmerald (Talk | contribs) (Discussion)

Jump to: navigation, search

Vehicle Capture the Flag (VCTF): Two teams both have a movable flag that's planted on an immobile flag base. A team scores a point by getting both flags to their home flag base. This is an extention of the Capture the Flag gametype for UT2004 with the primary difference being vehicle support. Flying Vehicles may not carry the flag and translocator use is prohibited by default. It's strongly recommended that mappers review Mapping for CTF as well.

Design considerations

Layout

An obviousbly linear layout (straight from RedFlagBase to BlueFlagBase) is very easy to make when you have a gametype with only two game objectives and the long range/fast movement of vehicles. Try to spread out (branch out) the routes between flags; spreading the field out and offering more variety in routes to and from the enemy flag. Otherwise, an obvious bottleneck or 'choke spot' will present itself, making flag capture difficult if not impossible; but definately frustrating to play, due to lack of variety.

That said, vehicles almost demand layouts of considerable size. Pedestrians should feel somewhat "stranded" in remote places in your map without a vehicle. (See ITEM PLACEMENT for pedestrian remedies)

Vehicles also add firepower and armor to each Team. Therefore, the route to the flag should be appropriately difficult. Defenses of all kinds are encouraged to help make the Capture challenging. (walls, doors, gates, turrets, custom shields, etc.)

Item Placement

The flagbases should be inaccessible by larger vehicles, either by structure, barrier or pedestal. Otherwise, players and bots will ride a tank or leviathan on top of their flag to defend and camp on it.

Neutral vehicles placed in the center can add to gameplay by providing a "soft" gameObjective; a place Teams want to control. Neutral (non-flying) vehicles placed near flagbases allow enemies to make quick getaways.

With large layouts, pedestrians can feel stranded out in remote locations. Offer them alternative travel to key points with JumpPads, Teleporters, Movers, etc. in those locations.

Vehicles

Remember: By default, flying vehicles cannot carry the flag. Also, someone riding on top of any vehicle can pick up the flag without getting off the vehicle (the Manta is excellent for this).

VehicleFactories will not spawn vehicles in a VCTF map until the gametype is set in LevelInfo to xGame.XVehicleCTFGame and both FlagBases are placed.

ONSVehicles(Factories) will spawn by automatically setting the TeamNumber to match that of the nearest GameObjective (Flag). Try the custom TeamVehicleFactory for greater control over aspects of vehicle spawning.

Botplay

Bots will not use vehicles until a proper CTF bot path network is set, with an AssaultPath set to each flag and at least one WHITE (widest) path connects the two flags. The vehicle spawn points must also be accessible to these wide pathways with their own WHITE paths.

Neutral controllers, controlling bots, turrets, etc., will attack Red and Blue Team members equally. They will ignore other Neutral controllers, as if Neutral was it's own Team. (Team 255)

Creating a VCTF Map

This is a list of critical elements needed to create a simple VCTF map.

  • Modify LevelProperties->LevelInfo->DefaultGametype to xGame.xVehicleCTFGame.
  • A big enough space for vehicles and/or flying vehicles.
  • Place two xRealCTFBases, ones for Red and Blue teams. These must be accessible to a RoadPathNode path network. (see the Botplay section above)
  • Place player starts (set PlayerStart.TeamNums: 0=red, 1=blue)
  • Place an AssaultPath near each flag (line of sight is good) for the attacking team.
  • Place VehicleFactory actors where you want vehicles to spawn. Set the direction you want them to start in. The TeamNumber for the vehicles will be set automatically when using ONSVehicleFactories; whichever gameobjective is closer; the red flag or the blue flag. By using custom actors like the TeamVehicleFactory, you can set the TeamNumber yourself. (0=red, 1=blue, 255=none or neutral)
  • When placing RoadPathNodes, keep the paths wide (white) between nodes for large ground vehicles and especially along the paths to the flags. Keep these spaced over 512 or 1024 apart because vehicles are not as agile as players on foot; they need to make wider turns. Try to keep the number of pathnodes even on each team's side of the map. There must be at least one white path connecting the flags to the path network, but more paths are recommended.
  • Place FlyingPathNodes (between 1024 and 2048 apart) about 1024 to 2048 above the ground. Don't bother making fine or complicated pathing for flying vehicles, with momentum carrying them, they need to make very wide turns, rises and dives.

Tips

Vehicle Pathing for VCTF ( by Toonces T. Cat )

A few key points to note in the construction of a VCTF level.

  • Using an AssaultPath after the last RoadPathNode that vehicles can reach works, and works well, but introduces new and even more complex issues into the equation. Someone else mentioned it in another thread, but what good is it to have your bot grab the flag and then not have a vehicle available when it returns to the RoadPathed area of the map? The best bet is to have the flag in an area where it can make a double (bi-directional) white connection to one or more RoadPathNodes.
  • Think vertical and you can have your cake and eat it too. I have created a second elevated level that is pathed just for foot use and it also connects to both flags and, even though the bots use it, it does not preclude them from using the vehicles as well. In fact, combos are very possible as I have seen them use the overhead route to get the flag and then jump into a Tank or a Hell Bender that one of their team-mates is using and hitch a ride home...
  • The translocator definitely should be allowed in the game-type. The bots commonly chase a team-mate's vehicle with it and will jump on-board in mid-toss...It is extremely cool to watch them do this... (SuperApe: Toonce's is talking about ignoring the default rules for VCTF that disallow Translocators. This could be done by placing a custom actor (subclass of xPickUpBase) and specifying a XWeapon.Transpickup as it's Powerup. See also this thread (GreatEmerald: Note: dead link - any replacement?).)
  • When the flag is in a vehicle accessible area, elevate it above the floor on some type of base that the bots can climb on foot, but not in a vehicle. I am using an octagonal base that is about 256 units in diameter and about 40 units high. It has 4 narrow stairwells cut into it (one on every other side) that the bots can use. It is high enough to stop a vehicle (except for the Leviathan), but not so high that the nearby RoadPathNodes cannot make a good path connection.

Why do you need this? Because the bots playing defense will pile into a Goliath and camp the flag if they can get on top of it...and I mean literally ON TOP of it. An enemy bot cannot get to it to take the flag if they are there. This is a workaround of sorts, but it is an effective one as even if they are using a Tank, if the attacker engages them, another bot can come up form behind and take the flag...I've watched it a dozen times.

  • As I said above, the 40 unit high barrier will not stop a Leviathan...Hence, tip #5 is do not path the Leviathans if you have them in your level. If a Masterful bot gets into one of them with a couple of his pals, the other team is in big trouble. It's better to keep them out the Leviathans unless a human is driving it. (GreatEmerald: If you need a Leviathan, though, you can set some RoadPathNodes' properties, under Navigation Point, bNoSuperSize to True to keep Leviathans out of some trouble. This way you can also make a defensive Leviathan by setting bNoSuperSize properties only to those nodes that are close to flags, although bots might not want to go in. You might also path everything normally, add an AssaultPath somewhat away from the flag and make all next PathNodes/RoadPathNodes bNoSuperSize to make bots use Leviathans, but not spam with them.)
  • RoadPathNodes can be further cleaned up by changing the MaxRoadDistance value in the properties. The default distance is ten thousand. This can create ALL KINDS of unwanted clutter. In the top orthographic view measure between the nodes that you want to connect using SHIFT+MIDDLEMOUSE to bring up the ruler and adjust the nodes accordingly.

FAQ

Frequently asked questions and common problems while mapping for VCTF.

  • Where is the VehicleCTF gametype in the UT2004 menu?

The VehicleCTF gametype will not show up in the list of available gametypes until at least one VCTF map is placed in the Maps directory. (Filename syntax is : VCTF-Foo)

  • Vehicles aren't spawning

You must modify LevelProperties->LevelInfo->DefaultGametype to xGame.xVehicleCTFGame and have both the Red and Blue team FlagBases set in the map. After that, Vehicle Factories will spawn vehicles.

  • Bots won't use the vehicles

There must be at least one fully connected path from one flag to the other and at least one of these paths must be solidly white all along the route. This will indicate to bots that they can use a vehicle to reach their goal along that path. The VehicleFactories will also have to be connected to at least one of these routes with a white path.

  • Bots only use the shortest path to the enemy flag and back

Use of an AssaultPath close to and within line of sight of the target flag will help bots reach their goal, but to encourage bots to use more of the layout, use other AssaultPaths that meet up to that goal. See AssaultPath and Bot Pathing.

External Links

Related Topics

Discussion

SuperApe: Created. Most borrowed from the external link I wrote a while ago. Toonce's vehicle pathing comments added from Pathing for Vehicles and edited slightly. xVehicleCTFGame, RoadPathNode, FlyingPathNode, SpecialVehicleObjective pages added and other misc links changed. (NavigationPoint subclass list, etc.)

GreatEmerald: Saw some interesting bot behaviour when spectating a VCTF match with 2 bots. I used AssaultPaths. So when a bot with a vehicle got to one, it left the vehicle, took the flag and... Acted randomly. Usually, bots enter the vehicle with which they came, then instantly exit. Some times though, they enter the vehicle, drive in it for a few seconds and leave it. And the other times bots enter the vehicle and drive nicely. When the bots get back on foot, they can use their own vehicles near their base. Strangely, bots with flags enter the vehicle, and again, some times they drive, and some times they just leave the vehicle. Another strange addition is when a bot with a flag tries to return their own flag. One time a bot in a tank killed a bot flag carrier, then drove very near the dropped flag, returned it, then continued on foot, decided to get into the tank again, ran back and stood near the vehicle, but didn't enter. Another bot that was carrying the flag on foot killed another flag carrier (it was on foot too), ran away from its own flag, decided to return it, returned it, ran back to the AssaultPath and again tried to capture the enemy flag. Any explanation on what's happening and what to do?