Garry's Mod

Garry's Mod

TTT2 (Base) - v0.14.4b
This topic has been locked
Ostross 17 Sep, 2020 @ 3:25am
Does ttt_traitor_pct ConVar also account for other traitor roles (such as glutton or hitman)?
What the title says.

If I set it so that ttt_traitor_pct is 0.5 and we have 10 players, does that mean that there should be 5 traitors?

However, what if I also set it so that there is a 100% chance of spawning a glutton and a hitman and that there can be at maximum 1 glutton and 1 hitman?

Does that mean that the game will spawn 3 traitors, 1 hitman and 1 glutton or does that mean that the game will spawn 5 traitors, 1 hitman and 1 glutton?
< >
Showing 1-3 of 3 comments
Alf21  [developer] 17 Sep, 2020 @ 7:26am 
It‘s split into 2 layers right now. The baseroles and the subroles. Minimum amount of Innos are selected first like the traitors in the beginning.
In the next step, the other baseroles are selected out of the same pool (gonna be improved with layer indexes).
In the next step, based on the available baseroles and the current player count, subroles are selected (baserole upgrades).
After every of the selected roles were assigned to a player, the left player without any role will become innocent.
That‘s it, basically.

With that knowledge, you received your answer as well: If I set ttt_traitor_pct to 0.5 with 10 players, then there gonna be 5 Traitors in the round (no matter whether all of them are gluttons or just one), because Gluttons are just traitor subroles while the traitor role is a baserole.
Last edited by Alf21; 17 Sep, 2020 @ 7:27am
Ostross 17 Sep, 2020 @ 8:12am 
What an awesome explanation. What happens to "neutral" roles, however? Roles such as a serial killer or the amnesiac? I assume these are base roles as well. Correct?
Alf21  [developer] 20 Sep, 2020 @ 1:46pm 
That's completely correct. But without giving a look into the code, it's not every time as easy to tell the baserole out of a role combination. For example if we would make the necro a subrole of the infected (just as an example, it's not the case right now), it would be hard to tell which one the baserole is (without giving a look into the code).

In the next days this will be resolved as well: Currently we working on a layering system so that you can decide, which roles are selected in which pre-defined order (as well as creating selection groups, in which only one role can be selected). The progress can be seen here: https://github.com/TTT-2/TTT2/pull/649
As you can see in the picture, there is a DropDown / ComboBox on top. By default, "Baserole" is selected. And that's the trick, because there you can see all the (selectable) baseroles installed on your server. Using another DropDown entry to explore the subroles connected to a specific baserole.
< >
Showing 1-3 of 3 comments
Per page: 1530 50