Contractors VR

Contractors VR

Create and play mods in VR for this shooter.

Learn more and find the game on Steam, Oculus.

Create GameMode Mod in Contractors VR

This is a guide for creating GameMode Mod in Contractors VR

Posted by on (updated ago)


How to create a GameMode Mod

In this Tutorial, we will walk through some basics about how to create GameMode Mod for Contractors VR.

Pre Requirements

Making a GameMode Mod requires you have some basic knowledge on Blueprint programming and Unreal's GameMode and Network framework

Docs.unrealengine.com

Docs.unrealengine.com

Getting Started!

To get started, you will need to create a GameMode Mod in Contractors Mod Editor, you could do so by clicking on "Create Mod" button, select "New GameMode" and fill in the name for your Mod.

creategamemodemod


*Very Important!!! Your mod name must only contains alphabet characters ,numbers and ASCII special characters. Otherwise you mod will not allowed to be uploaded to mod.io service.

A content folder will be created for your Mod, All the Blueprints and Sssets you created for this mod need to be put in this directory.

gamemodemodcontent

Pre Requirements

GameMode related blueprints need to derive from specific classes

  • Your GameMode Blueprint need to derive from /Game/Blueprints/GameModes/CS_GameMode
  • Your GameState Blueprint need to derive from /Game/Blueprints/GameModes/CS_GameState
  • Your PlayerState Blueprint need to derive from /Game/Blueprints/GameModes/CS_PlayerState
  • Your PlayerController Blueprint need to derive from /Game/Blueprints/GameModes/CS_PlayerController
  • Your Character need to derive from /Game/Blueprints/Player/CS_Character


blueprintsetup

Team Assignment

GameMode Mod currently support the following team assignments:

  • Team based GameMode with 2 teams with team number 1 and 2.
  • Free For All GameMode where each player have their own team number assigned to them.

You can change Team Assignment style for your GameMode by changing "Free For All" property in your GameMode blueprint.

gamemodeteamassignment

Setup Sub-Level and Player Spawn Style

Your GameMode Mod will reuse exsisting Sublevels from official GameModes, You need to choose which one fit your GameMode the best. Sub-Levels contains PlayerStarts and Objective Markers which you can use to make your GameMode logic work.

dominationsublevel

ie. PlayerStarts and ObjectiveMarkers contained in domination sublevel

Sublevels available for your are:

  • tdm
  • control
  • domination
  • bomb_defusal
  • extraction

Set the "Spawn Type" Property in your GameMode actor to choose which official GameMode's sublevel you want to use

sublevelsetup

Setup PlayerCharacter

charactersetup 3

Add the PlayerCharacter you want to use into "Team #Pawn Class Array" property of your GameMode blueprint.

Your PlayerCharacter must inherit from CS_Character.

Find Player a PlayerStart

You can override "FindPlayerStart" function in your GameMode to implement your custom player spawn logic

findplayerstartoverride

findplayerstartoverrideexample

An example for TDM style player spawn

You must return a valid "PlayerStart" in this function.

We have implemented some helper functions for finding player a PlayerStart under certain rules, you can use them if they fit your gamemode design needs.

FindPlayerStartDynamic

finddynamicplayerstart

Find a Dynamic PlayerStart under the rules you select. It will evaluate all the PlayerStarts of the type you specified, and find one fits your rules the best.

params:

"Player Start Class": The PlayerStart class you want to use for PlayerStart evaluation.

"Use Explicit Player Start Class": if checked, the function will only evaluate the PlayerStarts with the PlayerStartClass you specified, excluding all the ones inheriting from this PlayerStartClass.

"Enemy/Friendly PlayerStart Policy": There are three options you can choose from: Away From, Close To, Don't Care

FindPlayerStartDynamicWithFocus

findplayerstartdynamicwithfocus

Same as FindPlayerStartDynamic by take objectives you want to focus on into consideration

Params:

"Focus Array": An Array of "ObjectiveFocusInfo" to use for PlayerStart evaluation.

ObjectiveFocusInfo Params:

"Focus": The Actor you want to take in consideration when evaluating PlayerStarts.

"Desired Dist": Combined with "Focus Policy", this parameter decide how far/close you want the PlayerStart from the Focused Actor during PlayerStart evaluation.

"Focus Policy": There are three options: Away From, Close To, Desired Distance.

FindTeamedPlayerStart

findteamedplayerstart

Find a TeamedPlayerStart with same Team Number as respawning player.


End the Match

When you wan to end the match, you could call "Finish Match" to end the match and decide Winner Team.

finishmatch


UI Customization

customuipanel

Contractors VR allow you to customize each UI elements for your GameMode individually.

You can look at some official GameModes as an example on how it's done.

Comments

Join the community or sign in with your gaming account to join the conversation: