Making a Red Is Sus map
- 1 Making a RedIsSus map
Making a RedIsSus map
RedIsSus is a murder mystery game mode that anyone can make custom maps to. To make a map compatible with RiS there are a few things that are needed in the Level.
To be able to make a map playable you need 4 different things:
- Player starts in the lobby area
- Spawnpoints using the actor tag "spawnpoint".
- A vote button that implements the voting interface.
- A number of tasks on the level for the map to have something for Innocents to do.
Everything that you need exists in the example map project and can be used as a starting point. The easiest way to transfer them over to your project is to use migrate.
Migrating Interfaces and Pre-made blueprints
To make it easier for modders to add the needed objects to a RiS map, there are a number of Interfaces (that makes it possible for the level to talk to game-mode) and completed Blueprints for each of the objects. These blueprints and interfaces exist in the example project.
This part of the tutorial assumes that you are familiar with the Designing Maps process as it will not go through how to make a map for Modiverse.
To migrate stuff from the example project you need to first download it and open it. When you have it open you need to first migrate over the interfaces. These live in the game-mode UGC folder (which you can see by the fact that the folder has the ID "UGC2322974461"). Right-click the folder and choose "Migrate".
Then select the content folder of your custom map project (remember to have the map project closed during this process) and press what ever the button to confirm is called.
You now have the needed interfaces that talk to the game-mode. If you want to make everything from scratch you can skip this next part.
Now that you have the interfaces you also need to migrate the example Blueprints for voting and for tasks. To do this, mark the files in the example project in the folder for the example level (the folder with the ID "UGC2327702654") that you need. In this example, the migration is bringing all task BPs, the voting buttons, and an optional RespawnTrigger (that respawns the player to a safe location if the player manages to get out of the play area) into the new project. After you have marked all the things you need, you press migrate as before, look for your content folder, and press what ever the button to confirm is called.
At this stage it should look like this:
You can now close the example project and open your own project. For all the example things that you migrated, you need to move them from the example UGC folder ("UGC2327702654") and into your folder that corresponds to your UGC. You do this by dragging the blueprints folder into yours and choosing "Move here".
You are now ready to start implementing the different objects into your map!
The lobby area is normally (but doesn't have to) a separate area that isn't connected to the rest of the level. For it to work as a lobby this area needs to have ALL of the available PlayerStarts on it. These are used for both initial spawn and for when the round has ended.
Adding a player starts
There is nothing special you need to do with player starts for RiS maps. Just place them where you want them.
Any actor marked with the tag "SpawnPoint" will act as a spawn point. The spawn points are used to position the players on Game Start and on Vote Start.
Adding a spawn points
Add an empty actor to your level and add the tag "SpawnPoint" to it. This way the game mode can find these points and use them as spawn points.
In the example project there is a completed VoteButtonSpawnerBP and a completed VoteButtonBP. The spawner handles spawning the vote button for the player which then takes in input from the player.
To add a vote button you can either just place the example SpawnVoteButtonBP into the level at a place where you want the vote button, or you can build it yourself. If you want to build it yourself you need to implement the interfaces. You need "ShowVoteInstruction", "HideVoteInstruction", and "TriggerVote".
ShowVoteInstruction - Used for changing the button instruction for space into the "trigger vote" instructions.
HideVoteInstructions - Used for changing the button instructions for space into the "do task" instructions.
TriggerVote - Used for triggering the vote session.
Tasks are the objectives that Innocents have to complete to win. These usually have 3 different parts: TaskSpawnerBP, TaskBP, and TaskWidgetBP. The spawner spawns the task when a player is close to able able to take input from the player. When the player presses space the TaskWidgetBP opens which is the UI that controls the visual part of the task.
In the example project there are completed examples of all of this which implements the needed interfaces to be able to talk to the game-mode. The ones that are used for Tasks are "RedIsSusPlayerInterface", "RedIsSusGamemodeInterface", "TaskSpawnerInterface", and "TaskInterface". If you just base it off the examples you do not have to do anything special with the Interfaces.
Adding a Task based on the BaseTask
To make a task based on the base tasks you need to copy everything from the TestTask folder into a new folder and then rename it into whatever task you want to do. Rename each of the files to correspond with the task you are making. On the spawner, you then have to connect whatever mesh you want the spawner to be (this is also what lights up with a yellow outline when players have that specific task).
After changing the spawner mesh and setting up the folder it should look like this:
While still in the Spawner we need to update the task information. This is the information that the game-mode uses to know what type of task it is and basic information about it. To update this information you have to open the function "GetTaskInformation" on the spawner and fill in whatever information you want. The location of the task will be set on the TaskSpawner when it is put into the level.
Next is the TaskBP. In the EventGraph, you need to connect the correct User Widget and the TaskBP of that widget. You will get errors when compiling if you don't, so it's easy to notice if you miss it.
After that, we need to change the actual Widget. The Widget is the 2d Graphical task that the player has to complete to be done with the task. The only thing here that is special with the TaskWidget is the TaskBP variable and the CompleteTask event that is called on it. This event sends an event to the GamemodeBP using the "RedIsSusGamemodeInterface" to tell it that the player has completed the task. In the example below this is called when pressing a button.
The CompleteTask in the BaseTaskBP handles telling the game mode that the player completed the task.
To place the task into the level you just drag and drop the TaskSpawnerBP into the level where you want it. The spawner will spawn the TaskBP when the player is close (and has that task).
Making a task from scratch
Making a task from scratch can be useful if you want to make something more advanced compared to the BaseTask. For example, this could be a 3D task instead of using 3D.
To make a task from scratch you need to use the interfaces that connect to the game-mode. For the spawner you should use: "GetTaskInformation" in SpawnerTaskInterfaceBP - This is what tells the game-mode about the basic information of the Task. Such as Name, Length, Task Class. Implement on the actual spawner. "ResetTaskSpawner" in SpawnerTaskInterfaceBP - This tells the game-mode that this task spawner should be reset. It is called during game reset. Implement on the actual spawner. "SetCanBeCompleted" in SpawnerTaskInterfaceBP - The game mode uses this to tell the task spawner that a specific player has this task. Implement on the actual spawner. "AddObjectOutline" in RedIsSusPlayerInterfaceBP - Used by the TaskSpawner to show an outline around the spawner mesh to show that the player has this task. "RemoveObjectOutline" in RedIsSusPlayerInterfaceBP - Used by the TaskSpawner to hide the outline around the spawner mesh when the player doesn't have this task anymore (used usually on complete or on reset).
When it comes to the Task that the spawner spawns you should use: "CompleteTask" in TaskInterfaceBP - Used for completing the task. This is usually called used in the Widget. Implement on the actual Task. "ActivateTask" in TaskInterfaceBP - Used for activating the usage of a task. This is usually called in the Widget. Implement on the actual Task. "HighlightTaskInstruction" in RedIsSusPlayerInterfaceBP - Used for highlighting on the hud that the player can interact with a task. This is usually called when the task spawns from the Spawner. "UnHighlightTaskInstruction" in RedIsSusPlayerInterfaceBP - Used for removing the highlight on the hud that a player can no longer interact with a task. This is usually called when the player completes a task or when a task is removed. "CompleteTask" in RedIsSusGamemodeInterfaceBP - Used for telling the game-mode that a player completed the task. This is usually called when the Widget tells the task that it has been complated. "TaskWasRemoved" in RedIsSusGamemodeInterfaceBP - Used to tell the game-mode that this task has been removed. Usually called when task was completed or the player walked away.
When you are happy with the map you have to upload it to the Workshop so that you can test it (and then play it with others). This process is basically the same as for a normal map. The main difference is that you should put "RedIsSus" as the custom label for the Gamemode. This is used to connect game modes and maps when setting up a server in the game.