Intro: … It’s time. This is moment you have all been waiting for… Since the day you were born you knew that this day, today, was the day that was the reason of the universe. It is time for: TEAM-BASED ROLE DISTRIBUTION SYSTEM . What is that mouthful? You might ask. And I answer with: “Read the guide to find out…”
What is it?
It is time to answer the age old question: “What is a Team-Based Role Distribution System?”.
Basically what I achieved here is a system that first assigns a player a team and then assigns them a role based on their team. Not only that, the number of players per team is based on the number of players in the game.
Prequel: ⭐️ Setting Up ⭐️
Before you even DREAM of starting on this system you need to have the you will need 3 different things:
A Lobby
You can decorate the Lobby however you so choose but I would recommend you included the text box about the number of necessary players in the top left corner:
A Host-Only In Game Start Button
A little bit of a mouthful but this is essentially a button only the host can use. The easiest way to do this is to have the host Spawn Pad be separate from everyone else’s and have then spawn in a zone that transmits on host
and deactivates on host
. Then, a big button in the lobby should be activated on host
. I made my button [customizable].(Customizable Buttons) so that’s why I have the extra triggers and such.When the the button is clicked it should transmit on checkPlayers
Note the Spawn Pad/Zone combo and the button
A Loading Screen
This is the simplest. Just put a little room away from the rest with a Text on the “Above” layer that reads Loading...
Ignore the teleport for now
That was all pretty simple right? Well get ready for it to become not simple!!! Maybe?
Part 1: 😇 The Godlike Player IDs 😇
So if you haven’t heard of Player IDs, one that’s unfortunate, and two go read up on them in
getrithekd’s original guide on them. You back? Perfect! Now I hope you didn’t use his guide to set up the Player IDs because I’m using different channels and they might get mixed up if you used his channels.
Materials
- 3x Properties
- 2x Triggers
- 1x Lifecycle
- 1x Relay
Step 1: Player IDs
First, place down a Lifecyle (1/1) that on the event Game Start
, when event occurs, transmit on… gameStart
.
Next, place down your Relay (1/1) thats relay audience is All Players
. It should relay when receiving on… gameStart
and its relay channel should be playerAssignment
.
Now, add a Trigger (1/2)[1] that triggers when receiving on… playerAssignment
. Add this blockcode in:
(Running out of transition words), create a Property (1/3) thats property name should be Num Players
, property type should be Number
, and property scope should be global
.
Finally, place a Property (2/3) thats property name should be Player ID
, property type should be Number
, and property scope should be player
.
Step 2: Player ID RNG
Since I am already working a stuff that triggers at the start of the game, I wanted to get out of the way declaring this property, Player ID RNG. I’ll explain it more in-depth when we use it later.
First, place down a Trigger (2/2) that triggers when receiving on… gameStart
. Add this blockcode in:
.Lastly, place down a Property (3/3) thats property name should be Player ID RNG
, property type should be Number
, and property scope should be global
.
Glad we got the really basic stuff out of the way so we could move onto the more blocky stuff! Here’s what I have so far:
Part 2: 1️⃣ How Many Players in a Row? 🔟
The point of this section to create a system that will dictate how many players they can have during the game. You remember that text we put in the Top Left of the Lobby?
So we need to create a system that will not allow the game to continue if the amount of players is under 7 or over 40. Then as a little bonus I’m going to add something that if there is inbetween 7-11 players (the not recommended) amount it tells them it’s not recommended.
Materials
- 3x Pop-Ups
- 1x Trigger
- 1x End Game
Step 1: Checking Players
First we are going create a trigger that will check how many players are in a game and transmit on a respective channel.pa
Create a Trigger (1/1) that triggers when receiving on checkPlayers
. Inside that trigger add this blockcode:
Step 2: Alerting Host
Now we are going to add some Pop-Ups that alert the host after an event occurs.
First, place down a Pop-Up (1/3) that pop-up opens when receiving on… tooManyPlayers
. The header text should read Too Many Players!
and the content text should read Sorry, you have too many players! Please play with less then 40 players.
Add a call to action label that says Okay (End Game)
and a call to action channel of endGame
. Almost done! Set closable by player to No
. Finally, for some aesthetic, I made the pop-up color Red
.
Next, create a Pop-Up (2/3) that pop-up opens when receiving on… tooLittlePlayers
. The header text should say Not Enough Players!
and the content text should say Sorry, you don't have enough players to play! You need 7 to play, all though 12+ is recommended
Now, add a call to action label that says Okay (End Game)
and a call to action channel of endGame
. Set closable by player to No
. Finally, once again, for some aesthetic, I made the pop-up color Red
.
Getting close, make a Pop-Up (3/3) that pop-up opens when receiving on… littlePlayers
. The header text should say Not Recommended...
and the content text should say You have 7-11 players. You ***CAN*** play, however it is recommended to have 12 or more players.
Make another call to action that reads Continue Anyway
and call to action channel to assignTeam
. Add a secondary call to action that says End Game
and secondary call to action channel endGame
. Set closable by player to No
. Finally, AGAIN, for some aesthetic, I made the pop-up color Yellow
.
Finally, add a End Game (1/1) that ends game when receiving on… endGame
.
What does this do?
When the host clicks their “Host-Only Lobby Start Game” button it runs a trigger that looks at the amount of players in the game[2] and transmits on a channel. If their are 6 or less players it open a Pop-Up telling them that they don’t have enough players and forces them to end the game. If there is 7 - 11 players then it will pop up a warning that will tell them that they CAN continue if they want but its recommended they should get more players. If they have more than 40 players, a warning pop-up will tell them they have too many players and forces them to end the game. Otherwise, it will proceed to team assignment.
This is the system we have for this section:
Look at my little head
Part 3: 👥 Team Assigning 👥
In this section there isn’t too much blockcode, but the blockcode we do is a little complex[3]. We will be assigning the players to teams using blockcode. But what’s unique about this system is that the amount of players per team scales depending on the number of players.
Materials
- 6x Property
- 3x Trigger
- 3x Pop-Up
- 2x Relay
Step 1: Hide Your Screen!!!
In this section we are making a system so when the host uses the In-Game Start Button[4] to start the game, there will be a pop-up that tells them to hide their screen because their team is about to be revealed.
First, add a lovely Relay (1/2) that’s relay audience is All Players
. Relays when when receiving on… assignTeam
and relays on relay channel assignTeamAll
.
Now add another one of those Pop-Ups (1/3) that opens pop-up when receiving on… assignTeamAll
. Its header text should say Hide your Screen!!!
and its content text should say Your team is about to be revealed! Make sure no one can see your screen.
Add a call to action label that says Reveal My Team!
and call to action channel teamBlockcode
. Finally, set closable by player to No
. I added a font and color to mine so I end up with this:
It is Fungaz One & Black
Step 2: The Complex Blockcode
Now we get to make that 2 sets of blockcode that I’ve been harping on and on about!
Go back into the “Hide Your Screen!!!” Pop-Up and go into the blockcode section. Have this blockcode run when receiving on… teamBlockcode
:
In that same Pop-Up add a different section of blockcode that runs when receiving on… neutralTeamAllowed
:
Finally, place down a Property (1/6) with its property name set to Team Loop
. Its property type should be Number
with a default of 0
. Set the property scope to player
.
Was that that bad ?
Step 3: Good Guys & Bad Guys
Now we get to create a system that will make an actual difference between the Good Guys and Bad Guys.
First let’s add a Trigger (1/3) that triggers when receiving on… goodGuys
and runs this blockcode:
Now let’s add ANOTHER Pop-Up (2/3). Open pop-up when receiving on… goodGuys
. The header text should read Good Guys
and the content text should say You are on the good guys team! You can win by either the Task Masters finishing their tasks or voting out all the bad guys! You are about to get your role! | Possible Roles: Task Master, Medic, Detective, Decommissioner, Celebrity, and Role-Swapper.
Now put a call to action label that reads Reveal My Role!
and broadcasts on call to action channel roleBlockcodeCheck
. The background color can be Green
but really any color you want to associate with the Good Guys! Closable by player should be set to No
and it should close when receiving on… close1
. Last thing. Go into the blocks menu and run this blockcode when receiving on… roleBlockcodeCheck
:
Now let’s get a Trigger (2/3) that triggers when receiving on… badGuys
. In there add this blockcode:
It’s time… Our final Pop-Up (3/3)!!!
Open pop-up when receiving on… badGuys
. The header text should read Bad Guys
and the content text should say You are on the bad guys team! You can win by surviving 30 minutes or k<m>illing 1/2 of the Good Guys! You are about to get your role! | Possible Roles: Assassin, Werewolf, Engineer, Triple-Take, Vote Swapper, and Silencer.
Now put a call to action label that reads Reveal My Role!
and broadcasts on call to action channel roleBlockcodeCheck
. The background color can be Red
but really any color you want to associate with the Bad Guys! Closable by player should be set to No
and it should close when receiving on… close2
.
3 steps down, 2 more to go!!!
Step 4: All Ready?
Let’s add a Relay (2/2) thats relay audience is All Players
and relays when receiving on… checkIfReady
on relay channel checkIfReadyAll
.
Finally, add a Trigger (3/3) that triggers when receiving on… checkIfReadyAll
. Inside that trigger add this blockcode:
Now all we have left to do is declare some properties!
Step 5: Properties
Create Properties (2-6/6):
Name | Type | Default Value | Scope |
---|---|---|---|
Jester | True/False | False | Global |
Spy | True/False | False | Global |
Ghost/Time | True/False | False | Global |
Team Name | Text | Player | |
Ready for Role | Number | 0 | Global |
What does this do?
Okay this is going to be a long winded explanation.
This whole system starts when the host clicks the IGSB. Since it will only broadcast for the host (because the host is the only one who clicked the button) we run it through a relay so it will now broadcast for all players, to open the “Hide Your Screen!!!” Pop-Up. This pop-up is locked so the player cannot close it unless they click the CTA[5]. When they do that it it runs the first of our “Complex Blockcode”.
The first thing that happen is it checks if either the number of players is less than or equal to 11 OR if “Team Loop” is equal to 1. If either of those statements are true[6] it will run the “Do” code. First it declares a variable “Player ID RNG” and sets its value to the property “Player ID RNG”. If “Player ID RNG” is equal to 1 then it will it will check if the player’s Player ID is less than or equal to [Rounded Down[[Get Property "Num Players" / 3] x 2]]
opens the Good Guys pop-up, sets “Team Name” to “Good Guys” and increases “Good Guys #” by 1[7]. Otherwise it opens Bad Guys pop-up, sets the “Team Name” to “Bad Guys” and increases “Bad Guys #” by 1[8]. Else if “Player ID RNG” is equal to 2 then it will check if the player’s ID is less than or equal to [Rounded Up[Get Property "Num Players" / 3]]
it will run “Function B”, otherwise it will run “Function A”. Finally, else if the player’s ID is greater than or equal to 2 AND less than or equal to [[Rounded Down[Get Property "Num Players" / 3]] + 2]
then it will run “Function B”, otherwise run “Function A”. Going back to the beginning[9], running the else statement it will run the “neutralTeamAllowed” blockcode.
[10]
[11]
First in that blockcode, using variables, we give the player a 5% chance of even getting a neutral team assignment. If the do happen to get the assignment, it will run down the list of of Neutral Team Members[12] and if the highest one up is available it will be assigned. If it gets far enough down for Ghost/Time, it will assign either one or the other since both of their win functions are the same and they can’t be in the same map. If they aren’t in the 5% or all Neutral slots are taken, it will set Team Loop to 1 and run the “Complex Blockcode” again. See why we set that OR Statement earlier?
Back to the Pop-Ups. When the players click the “Reveal My Role!” it will close the Pop-Up and increase the Ready for Role property and relays to every player to check to see if all players are ready for role.
Does that make sense?
At this point the system starts to spread out a lot so I can’t provide pictures of the full system till the end. Don’t worry this is only 1 of the 2 complicated parts!
Part 4: 👤 Role Assignment 👤
This is the other section that contains a decent amount of blockcode. What happens here is based off role-availability the players will get a role. So lets just get right–
[[ Forums ]], NOWS YOUR CHANCE TO BE A [[ Big Shot ]] !!
Uh hey Spamton, wrong topic.
HELLO [[ '83 ]] !! I [[ Am Not ]] IN THE [[ Wrong Topic ]] …
The Undertale/Deltarune Guide is .
DO YOU WANT TO WIN [[ Pr1z3s]] ??
Yes…?
CLICK HERE → [[ Hyperlink Blocked]]
Nonononono. No sharing links
YOU DONT WANT TO BE A [[ Big Shot ]] !!
Just leave.
FINE
Materials
- 16x Properties
- 3x Triggers
- 1x Teleporter
Step 1: Loading Screen
Place down a Teleporter (1/1) and set visible in game set to No
and teleport here when receiving on… roleBlockcodeCheck
. No place the teleporter in the Loading Area we made earlier:
Step 2: The Role Assigning
First add us a Trigger (1/3) that has a delay of 0.2
and triggers when receiving on… roleBlockcode
and add some blockcode:
Add another Trigger (2/3) that triggers when receiving on… Good Guy Role
:
Add another Trigger (3/3) that triggers when receiving on… Bad Guy Role
:
Step 3: Properties
Create Properties (1 - 18/18):
Name | Type | Default Value | Scope | Value Changes; Broadcast On |
---|---|---|---|---|
Player ID Loop | Number | 0 | Player | roleBlockcode |
Role Name | Text | Player | ||
Good Guys # | Number | 0 | Global | |
Task Master # | Number | 0 | Global | |
Decommissioner # | Number | 0 | Global | |
Detective # | Number | 0 | Global | |
Medic # | Number | 0 | Global | |
Celebrity # | Number | 0 | Global | |
Roleswapper # | Number | 0 | Global | |
Bad Guys # | Number | 0 | Global | |
Assassin # | Number | 0 | Global | |
Engineer # | Number | 0 | Global | |
Silencer # | Number | 0 | Global | |
Triple-Take # | Number | 0 | Global | |
Vote Swapper # | Number | 0 | Global | |
Werewolf # | Number | 0 | Global |
What does it do?
So the main problem I came across when making this was since everyone transmitted on roleBlockcode
at the same time (because of the relay), they all got the same role. So I had to create a looping system.
When the “roleBlockcode” trigger is triggered[13], it will run a check. If the player’s ID is equal to “Player ID Loop” it will began the process of assigning their role.
Even though it is different for each team this is how the system works. First it checks to see if all the basic role[14] slots have been filled. 1/3 of the team is the basic role. If they haven’t it will assign that person the basic role. Otherwise it uses a variable to give a random chance of a role[15]. Notice that each role has a number [If “Medic” = 3 ← ] This the max amount of people that can have that role. If it is already full, it will run the blockcode again, until the players gets a role.
After all that is done. If there are more players than the current Player ID Loop listed, it will continue to increase the Player ID Loop until everyone has a role
Phew that’s done! One more part to go…
Part 5: ⚔️ Roles ⚔️
In this section we are going to be adding the final Pop-Ups for showing the player their roles and storing them in properties!
Materials
- 17x Pop-Ups
- 12x Triggers
Step 1: Good Guys
First create Triggers (1 - 6/12) and Pop-Ups (1 - 6/17) using this format:
[Role Channel] | [Role Name] | [Role Description] |
---|---|---|
taskMaster |
Task Master | It’s your job to complete 7 tasks from around the islands! If you complete all of your 7 tasks the Good Guys win! |
decommissioner |
Decommissioner | You have the ability to deactivate the robots that the evil engineers make! You can also check Vent Cameras to see if you spot any running through the vents! |
detective |
Detective | During the voting period you can run two checks on two people. Their is a 45% of an inconclusive result, 45% chance of telling you their team, and a 10% chance of telling you the wrong team. |
medic |
Medic | After each voting period you put a productive shield on someone. |
celebrity |
Celebrity | When you are killed everyone gets a notification of you killed you and where they killed you. |
roleswapper |
Roleswapper | At the end of each voting period you can swap roles with somebody on your team! |
Step 2: The Bad Guys
Now create Triggers (1 - 6/12) and Pop-Ups (1 - 6/17) using this format:
[Role Channel] | [Role Name] | [Role Description] |
---|---|---|
assassin |
Assassin | You job is to kill 1/2 the Good Guys without being caught! Be careful… Killing the Celebrity will cause a notification to alert everyone that you killed them. |
engineer |
Engineer | You can build evil sentries around the map to attack people! You can also use the vents to move around the map. Be careful though! The Decommissioner can deactivate your sentries and watch Vent Cameras. |
silencer |
Silencer | During each voting period you can choose one person to “silence”, taking away their ability to chat during the meeting. |
tripleTake |
Triple-Take | During each voting period you get 3 votes! |
voteSwapper |
Vote Swapper | After the final votes have been counted you can switch two people’s number of votes. |
werewolf |
Werewolf | When you get voted out you can choose someone to become a werewolf from the Good Guys. |
Step 3: Neutral Team
Create Pop-Ups (13 - 17/17) with the following settings:
Header Text | Content Text | Open Pop-Up (Channel) | CTA Label | CTA Channel | Closable By-Player | Close Pop-Up (Channel) |
---|---|---|---|---|---|---|
Jester | You are a Jester! You are not part of a team and in order to win you need to convince everyone that you are a Bad Guy and to get voted out. | jester |
Continue | roleBlockcodeCheck |
No | `roleBlockcodeCheck |
Spy | You are the Spy. You are not part of a team, at the beginning of the game you get to choose 2 players to “tap”. When a player is tapped, you always know their location and can read any secrets notes they send. You can also turn invisible for short periods of time. In order to win you need you need to find out the role of both your “tapped” players. | spy |
* | * | * | * |
Ghost | You are a Ghost. In order to win you need to not die. The only way they can kill you is to vote you out. | 1 |
* | * | * | * |
Time Manipulator | You are a Time Manipulator! You are not part of a team, in order to win you need to not get voted out. You also have the ability to slow down, pause, and rewind time! | 2 |
* | * | * | * |
Ready Up? | Neutral Team Role |
Let’s Go! | readyUp |
No | readyUp |
What does It do?
Sorry for the final section being so weird, it is very repetitive.
So for the Good Guys and Bad Guys, when they are assigned a role, it increase the number of players in their role property and sets the Role Name to their role. Then a pop-up pops up and tells them about their role.
For the neutral team its a bit different. Since these people are not part of a team, instead of a team pop-up it immediately tells them their role. In order to avoid suspicion, when everyone else is reading about their Role, there’s says “Ready Up?”
It’s finally over… you finished!!!
What happens next?
That’s up to you! For me when they click readyUp
, Game Overlays appear with their Roles abilities. What will yours do?
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- of 5
- of 5
- of 5
- of 5
- of 5
- of 5
Outro: Thanks for reading my guide! I always appreciate it! If you like it please click the like button :D
HEY [[ Forums ]], DONT YOU WANT TO CLICK THE [[ Hyperlink Blocked ]] !!
NooOOOOoooooooOOOOOO
[ { CONNECTION TERMINATED } ]
Unless otherwise noted all triggers should have trigger by player collision and visible in-game set to
No
. ↩︎The Property “Num Players” ↩︎
I would say ↩︎
IGSB ↩︎
Call to Action ↩︎
True + True = Do
True + False = Do
False + True = Do
False + False = Else ↩︎Call this “Function A” ↩︎
Call this “Function B” ↩︎
number of players is less than or equal to 11 OR if “Team Loop” is equal to 1 ↩︎
Let’s say there are 7 players. | Player ID RNG 1: Player IDs 1 - 4 (7/3 rounded down x 2) are Good Guys and Player IDs 5-7 (the rest of them) are Bad Guys | Player ID RNG 2: Player IDs 1 - 3 (7/3 rounded up) are Bad Guys and Player IDs 4 - 7 (the rest of them) are Good Guys. | Player ID RNG 3: Player ID 1 is a Good Guy, Player IDs 2 - 4 (greater than 1; but less than Num Players/3 rounded down + 2). ↩︎
Let’s say there are 27 players | Player ID RNG 1: Player IDs 1 - 18 (27/3 rounded down x 2) are Good Guys and Player IDs 19 - 27 (the rest of them) are Bad Guys. | Player ID RNG 2: Player IDs 1 - 9 (27/3 rounded up) are Bad Guys and Player IDs 10 - 27 (the rest) are Good Guys. | Player ID RNG 3: Player ID 1 will be a Good Guy, Player IDs 2 - 11 (greater than 1; but less than 27/3 rounded down + 2) are Bad Guys, and Player IDs 12 - 27 (the rest) are Good Guys. ↩︎
Jester, Spy, Ghost/Time ↩︎
Remember everyone triggers it at the same time ↩︎
Task Master for Good Guys, Assassin for Bad Guys ↩︎
Some higher, some lower ↩︎