Garry's Mod

Garry's Mod

[TTT2] Undecided [ROLE]
22 kommentarer
mexikoedi 17. jan. kl. 4:44 
@blackmagicfine
All right, thanks for the explanation and the quick fix.
blackmagicfine  [ophavsmand] 17. jan. kl. 0:59 
@mexikoedi: I took a cursory glance. Presumably you are using the F1 menu to update the ttt2_undecided_ballot_timer ConVar from 60 to 20? There's a few things going on here.

Firstly, and most importantly, it seems that setting the ConVar via the F1 menu doesn't properly replicate and propagate the value to the client. So you still see the timer as 60 even if the server is interally using 20. Not entirely sure why that happened, I feel like this issue may be present on many roles. A quick workaround would be to update the client's ConVar manually via the terminal. Sometimes moving to a new map will also work. For now I have altered the logic to make it so that the client is fed the timer from the server directly, which seems to fix the issue.

Secondly, it seems like you've uncovered a bug, wherein I did not explicitly check that the client was responding to a ballot past its due date. I have fixed that issue.
mexikoedi 13. jan. kl. 12:32 
I tried this role but I encountered an issue.
If I set the timer for example to 20 seconds and do nothing I will get the penalty but the popup with the choices is still there and I can pick a role there (which I also get).
There seems to be an issue with the timer (the timer at the popup is always 60 seconds).
blackmagicfine  [ophavsmand] 4. jan. kl. 22:59 
@we are number one: When you get this role, the left hand side will show a list of potential roles. If you hold the TAB key, you can move your cursor over to the role that you want and click it. This assumes that you use the same control scheme that I use, which I believe is the default PC settings.
we are number one 1. jan. kl. 22:22 
How do you actually choose roles I cant figure it out
blackmagicfine  [ophavsmand] 1. jan. 2024 kl. 2:01 
@pawel99uk: Done. You can set "ttt2_undecided_role_enable_mode" to 1 so that it only picks disabled roles, or 2 so that it can any role regardless of whether it was enabled or disabled. I also took the liberty of extending ttt2_undecided_can_vote_for_self such that it overrides the added ConVar (in short: if this ConVar is true, then the Undecided will be able to vote for themselves even if ttt2_undecided_role_enable_mode is set to 1, and subsequently get a new ballot)
pawel99uk 30. dec. 2023 kl. 7:00 
can you add a new convar for the role to allow it to only picked disabled roles or enabled and disabled roles on a server
Cpt.Haxray 29. sep. 2021 kl. 13:07 
Cheers. If its a a bad addon that's gonna be a pain to sort out, but thanks for the change regardless.
blackmagicfine  [ophavsmand] 29. sep. 2021 kl. 12:50 
@Cpt.Haxray: ROLE_NONE showed up? I have no idea how that could possibly happen. You're certain that this player actually became the None role, not only according to the client but the server as well?

If you were to set num_choices to 99 on a server filled with many bots, the ballot will list out all roles that could possibly be chosen. Random chance won't play a factor here, as num_choices will exceed the amount of roles that you have installed on the server, and the ballot will end up just having all of the valid roles for the server's player count.

I have never seen ROLE_NONE appear on such a list, because I have a check early on that explicitly prevents its appearance. It is possible that your server has a bad addon or data corruption.

I went ahead and added an additional safety check for the Undecided. If a client somehow manages to vote for None or Sidekick or whatever invalid role, they'll now get an error message in the top right and the ballot will be regenerated.
Cpt.Haxray 28. sep. 2021 kl. 23:37 
Also, we increased the timer of the between Ballots to 180 seconds.
Cpt.Haxray 28. sep. 2021 kl. 23:37 
Quick bug report:
One player managed to see the None role appear on the Undecided's vote menu. I'm not sure as to why it showed up, and it only happened once. They were able to select it and were spawned in as the None role normally used only for Preparing.
blackmagicfine  [ophavsmand] 27. sep. 2021 kl. 16:51 
@Cpt.Haxray: I believe that you can increase past the maximum just by manually typing in a number. The slider is more of a suggestion TBH. Example: I've set num_choices to 99 in the past for debugging purposes.

But also, let me know what number for ttt2_undecided_time_between_ballots you end up using. I can increase the slider length to include that number.
Cpt.Haxray 27. sep. 2021 kl. 13:26 
Yo, sorry for not responding. The convar works great and people are loving it. I do have one request though, would it be possible to increase the Maximum amount of time before it can trigger again? A lot of people feel that even when set at the current max that it happens a bit too often. Maybe im dumb and its just the slider lying to me in the menu and it can be increased, but it would be great to have the ability to make it longer.
|UGA|PatPeter 11. sep. 2021 kl. 10:21 
Awesome, thanks for being so quick to fix it! I'll have my players try it out again.
blackmagicfine  [ophavsmand] 10. sep. 2021 kl. 20:39 
@Cpt.Haxray: I have fulfilled your request. Set ttt2_undecided_time_between_ballots to some value greater to 0 to make ballots appear at regular time intervals. I would personally suggest some time between 90-120 seconds so that the player isn't hyper-focused on the voting aspect of the game. I also suggest using a value of 1 for ttt2_undecided_no_vote_punishment_mode, which makes the player get a randomly assigned role from the ballot if they fail to vote.
blackmagicfine  [ophavsmand] 10. sep. 2021 kl. 2:38 
@|UGA|PatPeter: I rootcaused the issue. It was happening for clients who didn't have certain ConVars setup on their end (I was testing with a local server so I never caught this issue). It should be fixed now, feel free to check out the new version.
blackmagicfine  [ophavsmand] 9. sep. 2021 kl. 23:39 
@|UGA|PatPeter: So your server is playing with all of the roles then? Would you be willing to knock out a few to see if any of them are causing an issue? Some of those roles aren't on the main list (https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1737053146) .
|UGA|PatPeter 9. sep. 2021 kl. 23:25 
I created a master configuration file for all of the TTT roles in the first 3 pages of the Workshop search: https://gist.github.com/PatPeter/70b1c090d8c8c311d99632dca76ec513
blackmagicfine  [ophavsmand] 9. sep. 2021 kl. 23:00 
@|UGA|PatPeter: Huh? I've never seen that happen. What ConVar values for this role did you use, and what other addons are you using? Preferably open up an issue on GitHub:
https://github.com/AaronMcKenney/ttt2-role_undec
|UGA|PatPeter 9. sep. 2021 kl. 22:47 
Does this role still work? I got Undecided and "Choose Your Role (60)" but the timer never counted down and no roles popped up.
blackmagicfine  [ophavsmand] 9. sep. 2021 kl. 21:24 
@Cpt.Haxray: That's more or less the point. I developed it as a rare "become what role you want, no strings attached" thing for fun. Your idea is interesting though... I suppose I could extend this role to have that functionality, or make a new one that's similar to what you suggest.

Every now and then I wonder if I should make a role that constantly changes what it is... Some sort of "glitch" or "Missingno" type role. I'll think about it...
Cpt.Haxray 9. sep. 2021 kl. 21:16 
I like the idea behind this role, but it feels kinda lacking currently, especially since it only does the vote/ballot a single time during the round, and always after a minute. Compared to a lot of the other "No Team" neutrals that gain a role during the round, theres no actual work or gameplay element to it, its basically just "you get a role of your choice this round but a minute late'.

I think a more interesting twist would be if the vote kept reappearing every minute forcing them to have to keep voting and keep switching roles.