Custom Ticketing Flow
Custom ticketing flows are only supported if you have source code access. You can see how to purchase it here.
This ticketing "mode" enables powerful setups where the backend decides where the place the player based on the PlayerCharacter data. Clients simply call URedwoodClientGameSubsystem::JoinCustom.
Example Scenario
Here is an example flow for an MMORPG.
- If Character hasn't finished the tutorial yet, put them in
matchmakingfor a tutorial profile - If Character has finished tutorial but has no last location, put them in
queuein the starting zone for the overworld proxy using the default spawn name - If the Character level >= 5 and the date is between December 1 and December 31, place them in a special holidays proxy/zone
- If the Character was in a dungeon/player housing last, put them in
matchmakingfor that dungeon/player housing profile - Otherwise, put the Character in their last known location/proxy/zone
Setup
-
Make a new file at
packages/realm-frontend/src/routes/player/custom/custom.tswith the contents:import { CustomPlayerJoinData, CustomTicketingFunction } from ".";
import { PlayerCharacter } from "@redwoodmmo/realm-db";
import { RealmFrontendManager } from "../../../realm-frontend-manager";
import fs from "fs";
import path from "path";
import { Logger } from "@redwoodmmo/common";
const flow: CustomTicketingFunction = async (
manager: RealmFrontendManager,
character: PlayerCharacter
): Promise<CustomPlayerJoinData> => {
throw new Error("Custom module not implemented yet");
};
export default flow; -
You can safely commit this new
custom.tsin your fork of the backend repo without worrying about future conflicts -
Don't modify
packages/realm-frontend/src/routes/player/custom/default.ts -
In the new
custom.ts, replace the contents of theflowfunction below as you see fit; you will have access to the entirePlayerCharacterdata -
You can throw an error with
throw new Error("Message")and "Message" will be sent as the error to the user -
Call
JoinCustomfrom the UE plugin