Garry's Mod

Garry's Mod

Not enough ratings
[TTT2] Beggar [ROLE]
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Comic, Fun
File Size
Posted
Updated
364.098 KB
19 Sep, 2021 @ 2:44am
3 Oct, 2021 @ 8:59am
6 Change Notes ( view )

Subscribe to download
[TTT2] Beggar [ROLE]

In 1 collection by Guardian954
TTT2 Addons
74 items
Description
He just wants an Item, why is everyone so cruel!

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]. A list of all currently available roles can be found here.

Discord: N/A
Source: https://github.com/Guardian954/TTT2-CustomRolesPort




A beggar is a Jester like role. They cannot deal damage and appear as a normal Jester to Traitors. They can die but will be resurrected to continue begging for a meaningful life. Their goal is to get dropped a bought item from any role with a shop, once they've been given an item they will convert to the persons team!

Example of interactions:
Detective drops the beggar a weapon -> Beggar becomes innocent
Traitor or Special traitor drops them a weapon -> Beggar becomes a plain Traitor
Jackal drops them a weapon -> Beggar becomes a sidekick (if installed) or a Jackal (if sidekick isn't installed)
Doppelganger drops a weapon -> Beggar becomes the same role as the Doppelganger and is on the Doppelgangers team.
Have any suggestions for some other special interactions? Drop a comment with your ideas!



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_beggar_enabled [0/1] (default: 1) # the percentage of players that are spawned as this role ttt_beggar_pct [0.0..1.0] (default: 0.15) # the limit of players that spawn as this role each round, this overwrites the percentage ttt_beggar_max [0..n] (default: 1) # the probability each round of this role being spawned at all ttt_beggar_random [0..100] (default: 30) # the amount of players needed for this role to spawn ttt_beggar_min_players: [0..n] (default: 5)

Rolespecific Convars:
# Can the Beggar damage entities or props? ttt2_beggar_entity_damage [0/1] (default: 1) # Can the Beggar explode, burn, crush, fall, drown?? ttt2_beggar_environmental_damage [0/1] (default: 1) # Should the Beggar respawn on death? ttt2_beggar_respawn [0/1] (default: 1) # How long should the Beggar take to respawn in seconds? ttt2_beggar_respawn_delay [0..60] (default: 3) # Who should be notified the Beggar has joined a team? ttt2_beggar_reveal_mode [0..3] (default: 0) # 0: Never reveal the beggar has changed team # 1: Only alert the detective or traiters the beggar has now joined their team # 2: Alert all of the beggars new team members # 3: Alert everyone of the beggars new team --
Credits:
Custom Roles for TTT: creator of the original role.
2 Comments
Pet Mudstone 2 Jan @ 4:46am 
If Beggars or Clowns spawn while the Jester addon is disabled, the round preparing phase never ends.

Now this shouldn't be surprising since Jester is listed as a dependency (even if the Swapper and Collusionist roles that also have Jester as a dependency don't have the same issue) However the error that pops up doesn't explain that the Jester addon being absent is to blame.
[code]
[TTT2 (Base) - v0.14.0b] gamemodes/terrortown/gamemode/server/sv_networking.lua:265: table index is nil
1. SendFullStateUpdate - gamemodes/terrortown/gamemode/server/sv_networking.lua:265
2. SelectRoles - gamemodes/terrortown/gamemode/server/sv_roleselection.lua:1075
3. unknown - lua/ttt2/libraries/gameloop.lua:217
[/code]
I think there should be a check if the Jester addon is absent which informs players/the host that it is needed for Beggar and Clown to function properly. It took me and friends a good long while to debug this (even if the solution was admittedly very simple).
KillerfoxyLP 23 Oct, 2021 @ 2:55pm 
what about the Beggar Lover? can it be done that the beggar changes roles but not team when is being a doppelganger/lover?