Home » 2015 » November » 26 » How to Setup GameMods at SwatEditor
11:22 PM
How to Setup GameMods at SwatEditor
How to Setup Game Modes
This tutorial will show you how to add support for different game modes to your map. Before you get started there are two very important things you need to know:

i. You must always include a SwatPlayerStart actor some where with in your map. Other wise the following error will be displayed shortly after your map has finished loading: "(Function SwatGame.SwatGameInfo.FindPlayerStart:0331) Runaway loop detected (over 10000000 iterations)".

ii. A single map (One *.s4m file / package) cannot support both cooperative game modes and adversarial game modes; you will need to create two separate map files / packages.

Game Modes
Just in case you didn't know this is where a human player leads a SWAT element in order to complete a list of objectives, whilst being opposed by AI controlled actors. This means you will be required to careful place pathnodes and "Stack And Clear Points" around your map, so that the AI can intelligently navigate it. You may also want to create your own objectives. The first thing to do is add a SwatPlayerStart actor; this is where the player will start from in your map. This can be done by right-clicking the floor in the 3D perspective view and selecting "Add Player Start Here" from the pop-up menu. You can move and rotate it, just like any other actor until you've positioned it correctly.
Add SwatPlayerStart
Next, you need to add four SwatOfficerStart points, these are where the AI officers will start from. Similar to before, right-click the floor in the 3D perspective view and select "Add Officer Start Here" from the pop-up menu. You can move and rotate them, just like any other actors until you've positioned them correctly.
Add SwatOfficerStart

Each SwatOfficerStart point needs to be assigned to a member of the element, i.e. there needs to be a start point for Red1, Red2, Blue1, and Blue2. To do this; right-click one of the SwatOfficerStart points in any viewport and then select Properties from the pop-up menu.

SwatOfficerStart Properties Menu Selection

To assign the start point to a particular officer, select the OfficerStartType property, and then choose the appropriate officer from the drop-down box. You should only ever have one of each of the start types for every entry point.

OfficerStartType Property

You should now have five start points arranged similar to the image below. Remember to leave some space between each of the start points, and to enter the corresponding RoomName to avoid some build errors.

Single Player Start Points

Finally you need to set-up the pathnodes, "Stack And Clear Points", and some objectives. You may also want to add Multi-player Cooperativesupport as well.

Not only can players form a SWAT element and play cooperatively, but multi-player also introduces adversarial game modes. These feature players on opposing teams trying to complete objectives. There are no AI controlled actors used in adversarial game modes, so you can remove any "Stack And Clear Points" from your map. In order for your map to be displayed on the in-game menus, you need to notify SWAT about which game modes your map will support. To do this, open the Level Properties window by clicking View > Level Properties or by pressing F6.

Scroll down too, and expand the LevelSummary category. Select the SupportedModes property, click the arrow ( > ) button on the right-hand side, and then select Add from the pop-up menu. This will create a new entry, labelled [0], in the SupportedModes list.

Supported Modes Property

Make sure this first entry in the SupportedModes list is selected, and you should notice you can change the value using the drop-down box. These values correspond to the game modes available in SWAT.

Supported Modes - MPM_COOP Selected

If you want to add more than one game mode, select the SupportedModes property again, click the arrow ( > ) button on the right-hand side, and then select Add from the pop-up menu.

This will create another new entry, labelled [1], in the SupportedModes list. Simply change it's corresponding value to the game mode you want, but don't forget you cannot support both cooperative and adversarial game modes.

In order to spawn players during a multi-player game, a SwatMPStartCluster actor is needed. To add one of these, open the Class Browserand go to the SwatGame package or browse to Object.Actor along the class path; you should see it listed there.

After adding it to your map, you'll notice a number of actors have appeared in its location; by default a SwatMPStartCluster actor actually exists as a group of actors.

SwatMPStartCluster Actor (Group)
SwatMPStartCluster Actor SwatMPStartCluster: This is the parent actor of the group, all of the start points are associated to it, and it's properties govern the behaviour of the group.
 
SwatMPStartPoint Actor SwatMPStartPoint: These points are where the players will actually be spawned into your map, you need to make sure there is at least 72 Unreal Units (uu) between each one.

In order to move the start points around or change any properties you must first Unlock the group. Right-click the SwatMPStartCluster actor in any viewport, then highlight Grouping from the pop-up menu and select Unlock.

Grouping Menu Selection

Once the start points are positioned correctly, you will need to change some of the SwatMPStartCluster properties for it to function correctly. First make sure to de-select any of the start points and right-click the parent SwatMPStartCluster actor (Sun Icon), then select Propertiesfrom the pop-up menu.

SwatMPStartCluster Properties Menu Selection

Expand the StartCluster category at the bottom, and you should see all of the important properties listed:

ClusterTeam [Enumeration] : This property defines which team will be spawned at this cluster of start points.

IsPrimaryEntryPoint [Boolean] : Used in Cooperative mode only, if True this cluster of spawn points will be used when the primary entry point is chosen.

IsSecondaryEntryPoint [Boolean] : Used in Cooperative mode only, if True this cluster of spawn points will be used when the secondary entry point is chosen.

NeverFirstSpawnInBSRound [Boolean] : When True this spawn cluster will not be used at the start of a Barricaded Suspects round, but may be used during the round.

NeverFirstSpawnInRDRound [Boolean] : If set True this spawn cluster will not be used at the start of a Rapid Deployment round, but may be used during the round.

NeverFirstSpawnInVIPRound [Boolean] : If True this spawn cluster will not be used at the start of a VIP Escort round, but may be used during the round.

UseInBarricadedSuspects [Boolean] : When set True this spawn cluster is available to be used for Barricaded Suspects, otherwise it will be ignored during this game mode.

UseInRapidDeployment [Boolean] : If True this spawn cluster is available to be used for Rapid Deployment, otherwise it will be ignored during this game mode.

UseInVIPEscort [Boolean] : If set True this spawn cluster is available to be used for VIP Escort, otherwise it will be ignored during this game mode.

Players form a SWAT element, and work together in order to complete a list of objectives, whilst being opposed by AI controlled actors.

To begin make sure you've set MPM_COOP as a supported mode. (Note: You cannot add any other type of multi-player mode to your map), and have added at least one SwatMPStartCluster to your map.

Next go to the properties of the parent SwatMPStartCluster actor (Sun Icon), expand the StartCluster category at the bottom, and setIsPrimaryEntryPoint to True, this means the SwatMPStartCluster will only be used as the primary entry point.

Entry Point Properties

In order to ensure compatibility you must add a secondary entry point, you can do either of the following to achieve this:

i. Set IsSecondaryEntryPoint to True for the same cluster of start points. This would mean that no matter which entry point was chosen, the players would always start from the same place.

ii. Add another SwatMPStartCluster somewhere else in your map and set it's IsSecondaryEntryPoint property to True. This would mean that the players would start at different locations depending on which entry point was chosen.

Finally you need to set-up the pathnodes, "Stack And Clear Points", and some objectives.

The goal is to kill or arrest as many members of the opposite team as possible. The first team to reach the score limit, or finishes the round with the most point's wins. This is an adversarial game mode.

Before you start make sure you've added MPM_BarricadedSuspects to the list of supported modes. (Note: You will be unable to add cooperative support to this map). You will also need to add at least two SwatMPStartCluster actors to your map, one for SWAT and the second for the Suspects.

Once the start clusters are in position, you need to set one of them to be the suspects spawn point. Find the parent SwatMPStartCluster actor (Sun Icon) and open it's properties window, expand the StartCluster category at the bottom, and set ClusterTeam to MPT_SuspectsNote: The start cluster icons should now be outlined in red.

ClusterTeam Property

Obviously only using one start cluster per team isn't ideal, so you should try to spread a few more around your map. Preferably try to add start clusters in covered or easily defended areas, and you should avoid using corridors or larger open spaces for respawing players after the start of a round.

When players are killed or arrested the game will always try to respawn them at the closest start cluster to other members of their team. It will also take into account how close opposing team members are, and if anyone who spawned there last time was killed within five seconds.

Three to five bombs are randomly spawned in the map. SWAT must defuse all of the bombs before the round ends. The Suspects must defend the bombs and prevent them from being disabled. This is an adversarial game mode.

Before you start make sure you've added MPM_RapidDeployment to the list of supported modes. (Note: You will be unable to add cooperative support to this map).

The first thing needed is to create some bombs; remember that not only is the number of bombs randomly chosen (Between 3 and 5) but their locations are random as well. In order for this to happen you must create groups of bombs (SpawnerGroup), at the start of a round the game will pick a certain number of bombs from each group.

To add a bomb, open the Class Browser, go to the SwatGame package and expand the Spawner category (Or useObject.Actor.SpawnerBase.Spawner along the class path); you should see MPSpawner listed there. Once added to your map you'll notice it is represented by a sprite, but this is not very useful for correctly positioning a bomb.

MPSpawner (Editor Sprite)

Open the Static Mesh Browser then load the Redlibrary_sm package and select red_bomb_on from the list. Close the Static Mesh Browser and open the properties window of the MPSpawner, then scroll down too and expand the Display category. Now change the DrawType toDT_StaticMesh, next select the StaticMesh property and click the arrow ( > ) button, finally select Use from the pop-up menu. (Image edited to size)

MPSpawner Display Properties

Close the properties window and you can now see the MPSpawner is displayed as a Static Mesh; this is much better for positioning the bomb.Note: This will only take affect in the editor, it is not the mesh used in-game.

MPSpawner (Static Mesh)

The bomb now needs to be assigned to a group, so return to the MPSpawner's properties window and select the SpawnerGroup property. Enter a sensible name so that this group of bombs can be easily referenced later on, a good choice would be a room name, and remember you cannot use spaces. For this example I'm going to use Group1.

SpawnerGroup Property

Next add another bomb using the steps above and add it to the same SpawnerGroup, in this example Group1. Now when this group is chosen, one of the bombs will be randomly selected for use during the round, this gives the illusion of the bomb changing locations. The more bombs you add to a single group the more locations a bomb can appear in.

Now you need to create some more groups, smaller maps will have enough with only 3 groups, while larger maps should have 5. Remember the number of groups is the actual number of bombs that may be spawned into your map, so you must have at least 3.

To clarify this see the image below; there are 6 bomb locations split into 3 different groups, this means there will only be 3 bombs in the map.Group A only has 1 bomb location, this means the bomb will always appear in the same place. In Group B there are 2 bomb locations, so the bomb may appear at either end of the table. Group C has 3 bomb locations, this means the bomb could appear on the desk or either side of the doorway.

Bomb Groups

Once you have the bombs organised into groups and correctly positioned you need to create some BombRoster's; these are used by the game to choose which bombs will be spawned. To do this, open the Level Properties window by clicking View > Level Properties or by pressing F6.

Scroll down too, and expand the SpawningManager category. If you have not yet created a SpawningManager, simply click the New button on the right-hand side to make one.

SpawningManager Property

Select the MPRosters property, click the arrow ( > ) button on the right-hand side, and then select Add from the pop-up menu. This will create a new Multi-player Roster entry in the list.

MPRoster Property

Highlight the bottom section of the newly created MPRoster, then select BombRoster from the drop-down box, and click the New button on the right-hand side to create it.

Creating A BombRoster

The Count property is used to determine the number of bombs that should be spawned from each group. A Min of 0 and Max of 1 would mean that a bomb may be spawned from that group, while a Min of 1 and Max of 1 would mean that a bomb will always be spawned from that group. Remember you need to have at least 3 bombs in your map that will always be spawned, and you could have 2 other bombs that may be spawned.

BombRoster - Count Property

Next select the Archetypes property, click the arrow ( > ) button on the right-hand side, and then select Add from the pop-up menu. This will create a new Archetype entry; how the bomb will be displayed in-game.

New BombRoster Archetype

Now select the Chance property and set it to 100. This is the chance of the archetype being used to display the bomb, but since there is only 1 archetype it should always be chosen. Next select the Archetype property and set it to Bomb, this is the archetype that will appear in-game and corresponds to SwatDesignerClasses.Bomb.

Archetype Properties

Finally you need to assign this roster a list of locations where it can spawn a bomb. So select the SpawnerGroup property, and enter a value you earlier gave to one of the groups of bombs. I've used Group1 as shown in the previous example.

Archetype Properties

The BombRoster is now complete. All you have to do now is create a roster for each of the remaining groups of bombs, using the same steps above.

You will also need to add at least two SwatMPStartCluster actors to your map, one for SWAT and the second for the Suspects.

Once the start clusters are in position, you need to set one of them to be the suspects spawn point. Find the parent SwatMPStartCluster actor (Sun Icon) and open it's properties window, expand the StartCluster category at the bottom, and set ClusterTeam to MPT_SuspectsNote: The start cluster icons should now be outlined in red.

ClusterTeam Property

Obviously only using one start cluster per team isn't ideal, so you should try to spread a few more around your map. Preferably try to add start clusters in covered or easily defended areas, and you should avoid using corridors or larger open spaces for respawing players after the start of a round.

When players are killed or arrested the game will always try to respawn them at the closest start cluster to other members of their team. It will also take into account how close opposing team members are, and if anyone who spawned there last time was killed within five seconds.

Rapid Deployment also introduces checkpoints for larger maps; when a bomb is defused the available start clusters are altered so that team members will always respawn at a cluster that is close to a bomb's location.

One player on the SWAT team is randomly chosen to be the VIP. SWAT must escort the VIP to the escape point, while the suspects must try to capture him. This is an adversarial game mode.

Before you start make sure you've added MPM_VIPEscort to the list of supported modes. (Note: You will be unable to add cooperative support to this map).

The first thing to do is find a suitable location for the escape point, normally this would be on the opposite side of the map from where SWAT first spawns.

To add an escape point, open the Class Browser, go to the SwatGame package and expand the Spawner category; you should seeMPSpawner listed there. Once added to your map you'll notice it is represented by a sprite, but this is not very useful for correctly positioning the escape point.

MPSpawner (Editor Sprite)

Open the Static Mesh Browser then load the SWATmeshFX_sm package and select mpVIPexit from the list. Close the Static Mesh Browser and open the properties window of the MPSpawner, then scroll down too and expand the Display category. Now change the DrawType toDT_StaticMesh, next select the StaticMesh property and click the arrow ( > ) button, finally select Use from the pop-up menu. (Image edited to size)

MPSpawner Display Properties

Close the properties window and you can now see the MPSpawner is displayed as a Static Mesh; this is much better for positioning the escape point. Note: This will only take affect in the editor, it is not the mesh used in-game.

MPSpawner (Static Mesh)

Now you need to assign a SpawnerGroup name to the escape point, this is so it can be identified by the SpawningManager and spawned into a VIP Escort game. Return to the MPSpawner's properties window and select the SpawnerGroup property. Enter a sensible name so that can be easily referenced later on, and remember you cannot use spaces. For this example I'm going to use VIPExit.

SpawnerGroup Property

Once you have the escape point correctly positioned you need to create a VIPGoalRoster; this is used by the game to spawn the escape point when the game mode is set to VIP Escort. To do this, open the Level Properties window by clicking View > Level Properties or by pressing F6.

Scroll down too, and expand the SpawningManager category. If you have not yet created a SpawningManager, simply click the New button on the right-hand side to make one.

SpawningManager Property

Select the MPRosters property, click the arrow ( > ) button on the right-hand side, and then select Add from the pop-up menu. This will create a new Multi-player Roster entry in the list.

MPRoster Property

Highlight the bottom section of the newly created MPRoster, then select VIPGoalRoster from the drop-down box, and click the New button on the right-hand side to create it.

Creating A VIPGoalRoster

Set the Count property so that it has a Min of 1 and Max of 1, this ensures the escape point will always be spawned.

VIPGoalRoster - Count Property

Next select the Archetypes property, click the arrow ( > ) button on the right-hand side, and then select Add from the pop-up menu. This will create a new Archetype entry; how the escape point will be displayed in-game.

New VIPGoalRoster Archetype

Now select the Chance property and set it to 100. This is the chance of the archetype being used to display the escape point, but since there is only 1 archetype it should always be chosen. Next select the Archetype property and set it to VIPGoal, this is the archetype that will appear in-game and corresponds to SwatDesignerClasses.VIPGoal .

Archetype Properties

There are 3 different archetypes you could use for the escape point; VIPGoal is the one currently used, as well as VIPGoal_Flare andVIPGoal_RedSmoke shown in the image below.

VIPGoal Archetypes

Finally you need to assign the escape point to this roster; so select the SpawnerGroup property and enter the value you earlier gave toMPSpawner. I've used VIPExit as shown in the previous example. The VIPGoalRoster is now complete.

Archetype Properties

The VIPGoalRoster is now complete. However you still need to add at least two SwatMPStartCluster actors to your map, one for SWAT and the second for the Suspects.

Once the start clusters are in position, you need to set one of them to be the suspects spawn point. Find the parent SwatMPStartCluster actor (Sun Icon) and open it's properties window, expand the StartCluster category at the bottom, and set ClusterTeam to MPT_SuspectsNote: The start cluster icons should now be outlined in red.

ClusterTeam Property

Obviously only using one start cluster per team isn't ideal, so you should try to place a few more at intervals around your map. The Brewer County Courthouse is a good example since it has start clusters located on each floor. Preferably try to add start clusters in covered or easily defended areas, and you should avoid using corridors or larger open spaces for respawing players after the start of a round.

When players are killed or arrested the game will always try to respawn them at the closest start cluster to other members of their team. It will also take into account how close opposing team members are, and if anyone who spawned there last time was killed within five seconds.

VIP Escort also introduces checkpoints for larger maps; when triggered by the VIP the available start clusters are altered so that team members will always respawn at a cluster that is close to the VIP's location.

Brought 

Views: 379 | Added by: Hot | Rating: 0.0/0
Total comments: 0
avatar