VU Gunfight

VU Gunfight

Gunfight is a recreation of Modern Warfare’s gunfight mode for Venice Unleashed. It is a 1v1/2v2/3v3 round based deathmatch. Win a round by eliminating the enemy team. First team to win 6 rounds wins the game. Both teams will receive the same loadout, changing every round.

Gunfight is not intented to be used with a specific map. Instead it is designed to be used with custom maps. An integrated lobby system allows multiple matches to run at the same time on the same server.

Some pictures





How to set up Gunfight

Setting up the server

The following vars must be set in Startup.txt, roundStartPlayerCount must be greater than the actual playercount to ensure the round never starts.

vu.SunFlareEnabled false
vu.SuppressionMultiplier 0
vu.ColorCorrectionEnabled false
vars.roundStartPlayerCount 32

The server must also be running TDM

Enabling setup mode

Setup mode will disable the lobby and allow you to spawn in normally. In this mode, extra commands are available which can help you setup your maps and to test loadouts. You can enable setup mode by setting setup to true in ext/shared/settings

The following commands are available:

Command Description
gunfight.transform Prints the current player’s linear transform (location + direction). This command can be used to set the maps spawnpoints
gunfight.position Prints the current player’s position. This command can be used to set the map’s area
gunfight.spawn mapId loadoutIndex Respawns the player with the loadout with the given index of the given map

Adding maps

Maps are configured in ext/shared/maps. This files returns an table of maps. Whenever setup mode is disabled maps in this array will be loaded. Each map has a mapId or key to uniquely identity a map. An example map can be seen below:

  ['METRO_1'] = {
    displayName = 'Metro inside',
    teamSize = 2,
    spawnpoints = {
      A = {
        --omitted
      },
      B = {
        --omitted
      }
    },
    area = Rectangle(-235.319336, -483.191406, -164.212891, -363.029297),
    loadouts = loadouts
  },

spawnpoints contains the spawnpoints for both sides of the map. A and B must both be an array of LinearTransform. The gunfight.transform will pretty print the LinearTransform for you. You must also make sure each side has atleast teamSize spawnpoints.

area is used to clean up the map after each round. It is a rectangle that contains the whole playable area of the map. Use the command gunfight.position to print your position. Take note of two points at opposite ends of the playable area (going outside is preferred): (x1, y1, z1) and (x2, y2, z2). Now you can construct a Rectangle using the min and max of the x and z values of both positions:

Rectangle(xMin, zMin, xMax, zMax)

loadouts contains the loadouts used for a specific map. The correct paths for weapons, attachments and accessories can be found in the Venice EBX dump. Make sure to test whether each loadout works as expected, otherwise the game will crash. You can test whether a loadout works by using the gunfight.spawn command.

Designing Custom Maps

As mentioned before the mod is designed to work with custom maps. If you are creating custom maps for this gamemode keep the following things in mind:

  • There is no mechanic which prevents players from leaving one map (read: section) , entering another map and interfering with another match. You should map sure the players cannot leave the map (read: section)
  • Leaving space between maps can be helpful. This prevents players from one match from hearing audio from another. It also makes it easier to setup the area for a map.

Releases

A download of the mod with the compiled ui can be found under releases on Github.

Planned features

TODO

13 Likes

thank you for the amazing work , i love it .

Nice. Looks very good.

I was going to get into modding myself to make exactly this!
Awesome mod!

but is there a way to start the match with only 1 player?
I cannot test anything as I don’t have another player to join at this time.

There’s currently no way to start the game with only one player. I test using two accounts myself.

I actually got it working.

If you edit the ext/server/match.lua

You can change the line “Match.TEAMS * self.map.teamSize” to just “1” in the folling statement:

If GetCount(self.players) == Match.TEAMS * self.map.teamSize then
print(‘Enough players, starting game’) self:_initializeLoadouts()

The game will start as soon as 1 person joins.

I saw somebody was running a gunfight server with a map which looks exactly like the map from COD16, is that map included in the mod? what’s the name of the map?