Garry's Mod

Garry's Mod

Not enough ratings
[TTT2] Duelist [ROLE]
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: ServerContent
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
361.215 KB
19 Nov, 2021 @ 6:53pm
5 Jan @ 5:18pm
5 Change Notes ( view )

Subscribe to download
[TTT2] Duelist [ROLE]

Description
Duel to the death...

WARNING: This addon may be broken due to recent updates!!!

You have to use TTT2 in order to use this role. Additionally using ULX for TTT2 is recommended. Report bugs concerning this role here[github.com] and submit new role ideas here[github.com]. A list of all currently available roles can be found here.

Discord: https://discord.gg/Npcbb4W
Source: https://github.com/TaintedEnergy/ttt2-role-duel




The Duelist is a neutral killing role that must win a duel to receive a role and team he can win on. When assigned, another player also becomes a Duelist, and their previous role will be the prize. Duellists are always notified about the names of other Duellists they need to kill. If a single Duelist survives, they victoriously won the duel and will become the prize role. Duellists will prevent the game from ending if they’re still alive and regenerate their health up to 100hp if they are below this amount when they win the duel.

With default settings, being secritive about your role might be best, as other players might just kill you to end the dueling.

Other settings/convars can be enabled to give immunity to the Duellists so no one else can interfere with the duel. Duellists can also be made public, so that others will know who the Duellists are. The prize role that a victorious Duelist can become can also be changed to a random role or specifically the "Undecided" role (if role doesn't exist, reverts back to default state).



Convars are variables that are introduced to allow server owners to customize the gameplay without changing the code. There are always a handful of convars automatically created by TTT2, that define the spawn parameters of this role and are found in ULX. Additionally there might be some role specific convars, which have to be set in the server config file.

Normal Role Convars (also found in ULX):
# enable or disable this role ttt_duelist_enabled [0/1] (default: 1) # the percentage of players that are spawned as this role ttt_duelist_pct [0.0..1.0] (default: 0.17) # the limit of players that spawn as this role each round, this overwrites the percentage ttt_duelist_max [0..n] (default: 1) # the probability each round of this role being spawned at all ttt_duelist_random [0..100] (default: 30) # the amount of players needed for this role to spawn ttt_duelist_min_players: [0..n] (default: 6)

Rolespecific Convars:
# Is Duelist public to all players ttt2_duelist_is_public [0..1] (default: 0) # Do Duellists prevent a win from occuring if still alive ttt2_duelist_prevent_win [0..1] (default: 1) # Duellists can only hurt and be hurt by other duellists ttt2_duelist_immunity [0..1] (default: 0) # Prize Role: (0)=Previous Duelist Role (1)=Random Role (2)=Undecided Role ttt2_duelist_prize_type [0..1] (default: 0) # How much health Duellists can get up to when victorious ttt2_duelist_victory_regenerate [0..200] (default: 100)
5 Comments
Benito 17 Dec, 2023 @ 2:35pm 
Unfortunately, because of a TTT2 update, the role seems to be broken. Some variables are named different.
Cpt.Haxray 28 Dec, 2021 @ 5:44pm 
Found another issue: When set to random role, a Duelist can obtain Duelist again after winning a duel. This is a problem for obvious reasons as it makes the Duelist feel like they got ripped out of a win.
Cpt.Haxray 23 Dec, 2021 @ 2:50pm 
Found an issue with the mimic interaction. if the Mimic copies a Duelist, and then one of the 2 original Duelists die, the Mimic will be stuck as Duelist without an actual dueling partner. This causes major issues if prevent win is enabled, and is annoying otherwise.
TaintedEnergy  [author] 22 Nov, 2021 @ 6:32pm 
To answer some of your questions:

1. When a mimic or doppel steals the role of a duelist, they will take their place in the duel with no issues.
2. If an amesiac remembers they were a duelist, if there is no current duel, they will turn someone else into a duelist and that person's previous role is the prize. Is also remains true if a duelist gets revived. Basically, if there is a duelist, another duelist will be created for a duel.

I like the idea of a kind of "cured deagle", the only thing that I would be concerned about is the fact that one of the two people's roles would then stop existing (as there is only 1 prize role, and 2 people with previous roles that would get turned into a duelist)
Cpt.Haxray 22 Nov, 2021 @ 1:49pm 
Neat! I wonder how this role interacts with stuff like mimic or amnesiac however. What happens if an amnesiac copies the dead duelist? does it turn someone else into a new duelist?

Also, considering this role as written basically 'steals' the role of one of the 2 duelists to offer it as a prize, i think it would be neat to consider making something similar to the Cursed Deagle, a weapon that would allow the user to mark 2 people to transform into duelists with one of their original roles chosen as the prize role.