Skip to content

Commit

Permalink
Version 2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Eisbison committed Jun 16, 2021
1 parent bf6d837 commit 9ceaa35
Show file tree
Hide file tree
Showing 54 changed files with 700 additions and 762 deletions.
Binary file added Images/TOR_colors.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Images/TOR_colors.png
Binary file not shown.
93 changes: 66 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,32 @@ This mod is not affiliated with Among Us or Innersloth LLC, and the content cont
The **The Other Roles**, is a mod for [Among Us](https://store.steampowered.com/app/945360/Among_Us) which adds many new roles, new [Settings](#settings), new [Custom Hats](#custom-hats) and support for [10+ Player Lobbies](#Custom-Servers-and-10+-Players) to the game.
Even more roles are coming soon :)

| Impostors | Crewmates | Neutral |
|----------|-------------|-----------------|
| [Evil Mini](#mini) | [Nice Mini](#mini) | [Arsonist](#arsonist) |
| [Camouflager](#camouflager) | [Detective](#detective) | [Jester](#jester) |
| [Cleaner](#cleaner) | [Engineer](#engineer) | [Jackal](#jackal) |
| [Eraser](#eraser) | [Hacker](#hacker) | [Sidekick](#sidekick) |
| [ImpLover](#lovers) | [Lover](#lovers) | |
| [Godfather (Mafia)](#mafia) | [Lighter](#lighter) | |
| [Mafioso (Mafia)](#mafia) | [Mayor](#mayor) | |
| [Janitor (Mafia)](#mafia) | [Medic](#medic) | |
| [Morphling](#morphling) | [Security Guard](#security-guard) | |
| [Trickster](#trickster) | [Seer](#seer) | |
| [Vampire](#vampire) | [Sheriff](#sheriff) | |
| [Warlock](#warlock) | [Shifter](#shifter) | |
| [Evil Guesser](#guesser) | [Nice Guesser](#guesser) | |
| | [Snitch](#snitch) | |
| | [Spy](#spy) | |
| | [Swapper](#swapper) | |
| | [Time Master](#time-master) | |
| | [Tracker](#tracker) | |
| Impostors | Crewmates | Neutral | Secondary |
|----------|-------------|-----------------|----------------|
| [Evil Mini](#mini) | [Nice Mini](#mini) | [Arsonist](#arsonist) | [Lover](#lovers) |
| [Evil Guesser](#guesser) | [Nice Guesser](#guesser) | [Jester](#jester) | |
| [Bounty Hunter](#bounty-hunter) | [Detective](#detective) | [Jackal](#jackal) | |
| [Camouflager](#camouflager) | [Engineer](#engineer) | [Sidekick](#sidekick) | |
| [Cleaner](#cleaner) | [Hacker](#hacker) | | |
| [Eraser](#eraser) | [Lighter](#lighter) | | |
| [Godfather (Mafia)](#mafia) | [Mayor](#mayor) | | |
| [Mafioso (Mafia)](#mafia) | [Medic](#medic) | | |
| [Janitor (Mafia)](#mafia) | [Security Guard](#security-guard) | | |
| [Morphling](#morphling) | [Seer](#seer) | | |
| [Trickster](#trickster) | [Sheriff](#sheriff) | | |
| [Vampire](#vampire) | [Shifter](#shifter) | | |
| [Warlock](#warlock) | [Snitch](#snitch) | | |
| | [Spy](#spy) | | |
| | [Swapper](#swapper) | | |
| | [Time Master](#time-master) | | |
| | [Tracker](#tracker) | | |

The [Role Assignment](#role-assignment) sections explains how the roles are being distributed among the players.

# Releases
| Among Us - Version| Mod Version | Link |
|----------|-------------|-----------------|
| **2021.6.15**| v2.7.0| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.7.0/TheOtherRoles.zip)
| 2021.5.25.2s| v2.6.7| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.6.7/TheOtherRoles.zip)
| 2021.5.10s| v2.6.6| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.6.6/TheOtherRoles.zip)
| 2021.5.10s| v2.6.5| [Download](https://github.com/Eisbison/TheOtherRoles/releases/download/v2.6.5/TheOtherRoles.zip)
Expand Down Expand Up @@ -70,14 +70,23 @@ The [Role Assignment](#role-assignment) sections explains how the roles are bein
<details>
<summary>Click to show the Changelog</summary>

**Version 2.7.0**
- **New Role:** [Bounty Hunter](#bounty-hunter) created by [Mallöris](https://github.com/Mallaris)
- Added more new [colors](#colors) (Thanks to [Drakoni](https://twitter.com/Drakoni13) for sorting them)
- Added a setting to the [Shifter](#shifter), that will prevent [Medic Shield](#medic) & [Lover](#lovers) Roles to be shifted
- Changed [Jackal](#jackal) & [Sidekick](#sidekick) to always be killable by [Sheriff](#sheriff)
- Changed [Jackal](#jackal) & [Sidekick](#sidekick) to not be [erasable](#eraser) anymore
- Changed [Role Assignment](#role-assignment) slightly to make chances more consistent
- Fixed a bug where votes would still count after the [Guesser](#guesser) or it's target died
- Fixed a bug where a [lover partner](#lovers) would not be shown as dead when killed by the [Guesser](#guesser)
- Fixed a bug on the Airship, where the [Jester](#jester) win was not triggered in some cases

**Version 2.6.7**
- **New Role:** [Guesser](#guesser)
- Changed the colors of some roles
- Changed name of Child to [Mini](#mini)
- Changed Version check to allow to check for modified versions of the mod. (Forks don't need to use different versioning now)
- Changed Role Assignment to make [Spy](#spy) incompatible with [Mini](#mini) (former child)
- Fixed a bug where a [Jester](#jester) win was triggered, when the partner of a [Jester Lover](#lovers) was voted out
- Fixed a bug where a [Mini](#mini) lose was triggered, when the partner of a Crew [Mini Lover](#lovers) was voted out
- We changed the colors of some of our roles
- We renamed the Child to Mini
- Fixed a bug where a Jester win was triggered, when the partner of a Jester Lover was voted out
- Fixed a bug where a Mini lose was triggered, when the partner of a Crew Mini Lover was voted out

**Version 2.6.6**
- Fixed a bug introduced in v2.6.5 that caused all player to be able to use vents when the new option for spy was enabled
Expand Down Expand Up @@ -435,7 +444,7 @@ Here are a few instructions, on how to create a custom hat:
- **Submission:** If you got a hat design, you can submit it on our [Discord server](https://discord.gg/77RkMJHWsM). We'll look at all the hats and add all the good ones to the game.

# Colors
![TOR Colors](./Images/TOR_colors.png)
![TOR Colors](./Images/TOR_colors.jpg)

# Roles

Expand Down Expand Up @@ -613,6 +622,35 @@ The Warlock can still perform normal kills, but the two buttons share the same c
| Warlock Root Time | Time the Warlock is rooted in place after killing using the curse
-----------------------


## Bounty Hunter
### **Team: Impostors**
\
Created by [Mallöris](https://github.com/Mallaris)\
\
The Bounty Hunter is an Impostor, that continuously get bountys (the targeted player doesn't get notified).\
The target of the Bounty Hunter swaps after every meeting and after a configuarble amount of time.\
If the Bounty Hunter kills his target, his kill cooldown will be a lot less than usual.\
Killing a player that's not his current target results in an increased kill cooldown.\
Depending on the options, there'll be an arrow pointing towards the current target.

\
**NOTE:**
- The target won't be an Impostor or a Spy
- Killing the target resets the timer and a new target will be selected.

### Game Options
| Name | Description |
|----------|:-------------:|
| Bounty Hunter Spawn Chance | -
| Duration After Which Bounty Changes | -
| Cooldown After Killing Bounty | -
| Additional Cooldown After Killing Others | Time will be added to the normal impostor cooldown if the Bounty Hunter kills a not-bounty player
| Show Arrow Pointing Towards The Bounty | If set to true an arrow will appear (only visiable for the Bounty Hunter)
| Bounty Hunter Arrow Update Intervall | Sets how often the position is being updated
-----------------------


## Guesser
### **Team: Crewmates or Impostors**
The Guesser can be a Crewmate or an Impostor (depending on the settings).\
Expand Down Expand Up @@ -873,6 +911,7 @@ can only use them, if the previous player did not used them before)
| Name | Description
|----------|:-------------:|
| Shifter Spawn Chance | -
| Shifter Shifts Modifiers | Sets if Lovers and/or Medic Shield will be shifted
-----------------------

## Time Master
Expand Down
4 changes: 3 additions & 1 deletion Source Code/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
bin
obj
obj
.vscode/tasks.json
.gitignore
28 changes: 0 additions & 28 deletions Source Code/AUFixes.cs

This file was deleted.

11 changes: 6 additions & 5 deletions Source Code/Buttons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ public static void Postfix(HudManager __instance)
byte targetId = 0;
if ((Sheriff.currentTarget.Data.IsImpostor && (Sheriff.currentTarget != Mini.mini || Mini.isGrownUp())) ||
(Sheriff.spyCanDieToSheriff && Spy.spy == Sheriff.currentTarget) ||
(Sheriff.canKillNeutrals && (Arsonist.arsonist == Sheriff.currentTarget || Jester.jester == Sheriff.currentTarget || Jackal.jackal == Sheriff.currentTarget || Sidekick.sidekick == Sheriff.currentTarget))) {
(Sheriff.canKillNeutrals && (Arsonist.arsonist == Sheriff.currentTarget || Jester.jester == Sheriff.currentTarget)) ||
(Jackal.jackal == Sheriff.currentTarget || Sidekick.sidekick == Sheriff.currentTarget)) {
targetId = Sheriff.currentTarget.PlayerId;
}
else {
Expand Down Expand Up @@ -460,8 +461,8 @@ public static void Postfix(HudManager __instance)
AmongUsClient.Instance.FinishRpcImmediately(writer);
RPCProcedure.jackalCreatesSidekick(Jackal.currentTarget.PlayerId);
},
() => { return Jackal.canCreateSidekick && Sidekick.sidekick == null && Jackal.fakeSidekick == null && Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; },
() => { return Sidekick.sidekick == null && Jackal.fakeSidekick == null && Jackal.currentTarget != null && PlayerControl.LocalPlayer.CanMove; },
() => { return Jackal.canCreateSidekick && Jackal.jackal != null && Jackal.jackal == PlayerControl.LocalPlayer && !PlayerControl.LocalPlayer.Data.IsDead; },
() => { return Jackal.canCreateSidekick && Jackal.currentTarget != null && PlayerControl.LocalPlayer.CanMove; },
() => { jackalSidekickButton.Timer = jackalSidekickButton.MaxTimer;},
Jackal.getSidekickButtonSprite(),
new Vector3(-1.3f, 1.3f, 0f),
Expand Down Expand Up @@ -769,8 +770,8 @@ public static void Postfix(HudManager __instance)
arsonistButton.Timer = Arsonist.dousedEveryoneAlive() ? 0 : arsonistButton.MaxTimer;
foreach (PlayerControl p in Arsonist.dousedPlayers) {
if (Arsonist.dousedIcons.ContainsKey(p.PlayerId)) {
Arsonist.dousedIcons[p.PlayerId].setSemiTransparent(false);
if (MapOptions.playerIcons.ContainsKey(p.PlayerId)) {
MapOptions.playerIcons[p.PlayerId].setSemiTransparent(false);
}
}
}
Expand Down
54 changes: 14 additions & 40 deletions Source Code/ChatCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,45 +18,9 @@ static bool Prefix(ChatController __instance) {
string text = __instance.TextArea.text;
bool handled = false;
if (AmongUsClient.Instance.GameState != InnerNet.InnerNetClient.GameStates.Started) {
using(MD5 md5 = MD5.Create()) {
string hash = System.BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes("tor@" + text.ToLower() + "§eof"))).Replace("-", "").ToLowerInvariant();
if (hash.Equals("a4eb05314008537d2832e32fa1f33b2e")) { // i am a cheater
handled = true;
byte colorId = (byte)CustomColors.pickableColors;
SaveManager.BodyColor = (byte)colorId;
if (PlayerControl.LocalPlayer)
PlayerControl.LocalPlayer.CmdCheckColor(colorId);
} else if (hash.Equals("80cc70dc5f21bc321b84ce984abd511b")) { // i dont understand hashes
handled = true;
byte colorId = (byte)(CustomColors.pickableColors + 1);
SaveManager.BodyColor = (byte)colorId;
if (PlayerControl.LocalPlayer)
PlayerControl.LocalPlayer.CmdCheckColor(colorId);
} else if (hash.Equals("3359ffcd0b14ffa39d476a5c96632032")) { // Batch 2
handled = true;
byte colorId = (byte)(CustomColors.pickableColors + 2);
SaveManager.BodyColor = (byte)colorId;
if (PlayerControl.LocalPlayer)
PlayerControl.LocalPlayer.CmdCheckColor(colorId);
} else if (hash.Equals("14056e0b9e53bc91f0c6a8b1fd5ce8b5")) {
handled = true;
byte colorId = (byte)(CustomColors.pickableColors + 3);
SaveManager.BodyColor = (byte)colorId;
if (PlayerControl.LocalPlayer)
PlayerControl.LocalPlayer.CmdCheckColor(colorId);
} else if (hash.Equals("fb00fb81b0be5177af908576e144d788")) {
handled = true;
byte colorId = (byte)(CustomColors.pickableColors + 4);
SaveManager.BodyColor = (byte)colorId;
if (PlayerControl.LocalPlayer)
PlayerControl.LocalPlayer.CmdCheckColor(colorId);
} else if (hash.Equals("a79e2bd7c9cdc723924bd4d7734ae5da")) { // Eisbison Color
handled = true;
byte colorId = (byte)(CustomColors.pickableColors + 5);
SaveManager.BodyColor = (byte)colorId;
if (PlayerControl.LocalPlayer)
PlayerControl.LocalPlayer.CmdCheckColor(colorId);
} else if (text.ToLower().StartsWith("/kick ")) {
//using(MD5 md5 = MD5.Create()) {
// string hash = System.BitConverter.ToString(md5.ComputeHash(Encoding.UTF8.GetBytes("tor@" + text.ToLower() + "§eof"))).Replace("-", "").ToLowerInvariant();
if (text.ToLower().StartsWith("/kick ")) {
string playerName = text.Substring(6);
PlayerControl target = PlayerControl.AllPlayerControls.ToArray().ToList().FirstOrDefault(x => x.Data.PlayerName.Equals(playerName));
if (target != null && AmongUsClient.Instance != null && AmongUsClient.Instance.CanBan()) {
Expand All @@ -66,9 +30,19 @@ static bool Prefix(ChatController __instance) {
handled = true;
}
}
} else if (text.ToLower().StartsWith("/ban ")) {
string playerName = text.Substring(6);
PlayerControl target = PlayerControl.AllPlayerControls.ToArray().ToList().FirstOrDefault(x => x.Data.PlayerName.Equals(playerName));
if (target != null && AmongUsClient.Instance != null && AmongUsClient.Instance.CanBan()) {
var client = AmongUsClient.Instance.GetClient(target.OwnerId);
if (client != null) {
AmongUsClient.Instance.KickPlayer(client.Id, true);
handled = true;
}
}
}
}
}
//}
if (handled) {
__instance.TextArea.Clear();
__instance.quickChatMenu.ResetGlyphs();
Expand Down
20 changes: 17 additions & 3 deletions Source Code/CredentialsPatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,32 @@ static void Postfix(VersionShower __instance) {
[HarmonyPatch(typeof(PingTracker), nameof(PingTracker.Update))]
private static class PingTrackerPatch
{
private static GameObject modStamp;
static void Prefix(PingTracker __instance) {
if (modStamp == null) {
modStamp = new GameObject("ModStamp");
var rend = modStamp.AddComponent<SpriteRenderer>();
rend.sprite = TheOtherRolesPlugin.GetModStamp();
rend.color = new Color(1, 1, 1, 0.5f);
modStamp.transform.parent = __instance.transform.parent;
modStamp.transform.localScale *= 0.6f;
}
float offset = (AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.GameStates.Started) ? 0.75f : 0f;
modStamp.transform.position = HudManager.Instance.MapButton.transform.position + Vector3.down * offset;
}

static void Postfix(PingTracker __instance){
__instance.text.alignment = TMPro.TextAlignmentOptions.TopRight;
if (AmongUsClient.Instance.GameState == InnerNet.InnerNetClient.GameStates.Started) {
__instance.text.text = $"<size=130%><color=#ff351f>TheOtherRoles</color></size> v{TheOtherRolesPlugin.Version.ToString()}\n" + __instance.text.text;
if (PlayerControl.LocalPlayer.Data.IsDead) {
__instance.transform.localPosition = new Vector3(3.45f, 2.675f, __instance.transform.localPosition.z);
__instance.transform.localPosition = new Vector3(3.45f, __instance.transform.localPosition.y, __instance.transform.localPosition.z);
} else {
__instance.transform.localPosition = new Vector3(4.2f, 2.675f, __instance.transform.localPosition.z);
__instance.transform.localPosition = new Vector3(4.2f, __instance.transform.localPosition.y, __instance.transform.localPosition.z);
}
} else {
__instance.text.text = $"{fullCredentials}\n{__instance.text.text}";
__instance.transform.localPosition = new Vector3(3.5f, 2.675f, __instance.transform.localPosition.z);
__instance.transform.localPosition = new Vector3(3.5f, __instance.transform.localPosition.y, __instance.transform.localPosition.z);
}
}
}
Expand Down
Loading

0 comments on commit 9ceaa35

Please sign in to comment.