Garry's Mod

Garry's Mod

Not enough ratings
[TTT2] Leech [ROLE]
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: ServerContent
Addon Tags: Fun, Roleplay
File Size
Posted
Updated
363.097 KB
27 Oct, 2021 @ 2:59am
25 Jan @ 11:49pm
31 Change Notes ( view )

Subscribe to download
[TTT2] Leech [ROLE]

Description
You must feed from a host to survive...

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-leech




You are always hungry for the life essence of a host player. You have a hunger bar which goes down, unless you are near another alive player (then it goes up). If your hunger bar is empty, you will die. You will win with the winning team at the end of the round, provided you are still alive and in range of a host to feed. If you are not in range of a host at the end of the round, you are given time to find a host.

Convince people you are a Leech, and say that you won't do anything to annoy your host/s. Try to survive until the end while feeding on the closest people you can find.



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_leech_enabled [0/1] (default: 1) # the percentage of players that are spawned as this role ttt_leech_pct [0.0..1.0] (default: 0.17) # the limit of players that spawn as this role each round, this overwrites the percentage ttt_leech_max [0..n] (default: 1) # the probability each round of this role being spawned at all ttt_leech_random [0..100] (default: 30) # the amount of players needed for this role to spawn ttt_leech_min_players: [0..n] (default: 6)

Rolespecific Convars:
# The max squared distance a leech needs to be from another player to refill hunger bar ttt2_leech_refill_radius [0.0..1000000.0] (default: 50000.0) # When feeding, how many seconds of hunger is regenerated in 1 second ttt2_leech_refill_multiplier [0.0..100.0] (default: 5.0) # The total length of time to starve from a full hunger bar ttt2_leech_starve_time [0.0..600.0] (default: 30.0) # How long until the hunger bar updates ttt2_leech_tick_length [0.0..1.0] (default: 0.02)
7 Comments
Tim | Mineotopia 14 Dec, 2023 @ 2:10am 
I opened a pullrequest to fix issues with other HUDs
dolpin 2.0 11 Nov, 2023 @ 4:44pm 
https://github.com/TaintedEnergy/ttt2-role-leech/pull/1
this pull request was accepted but the addon was not updated, i think this is a mistake
dolpin 2.0 11 Nov, 2023 @ 4:38pm 
This addon spams my console with
[ERROR] lua/terrortown/entities/roles/leech/shared.lua:80: attempt to index global 'vics' (a nil value)
1. __event - lua/terrortown/entities/roles/leech/shared.lua:80
also the leech always loses which is incorrect behavior
Niels 25 Jul, 2023 @ 9:17am 
The leech role breaks addons like "Spectator deathmatch"
It causes the round not ending when it should.
upg. god of all titans [SC] 16 Aug, 2022 @ 9:10pm 
.:steamhappy:
upg. god of all titans [SC] 16 Aug, 2022 @ 9:10pm 
noice
upg. god of all titans [SC] 16 Aug, 2022 @ 9:09pm 
.