Author Topic: [Help] Gamemode in TTT using excisting commands  (Read 108 times)

0 Members and 1 Guest are viewing this topic.

Offline Wolviller111

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
[Help] Gamemode in TTT using excisting commands
« on: November 13, 2017, 09:40:31 AM »
Hello everyone,

i was wondering if it was possible to add/change one of the commands to add some sort off small gimmick. Basically it is supposed to make 50% of the player's Detectives and 50% traitor (at the start of the round). This could be done using the "forcenr" command. But i would love the players to actually be assigned to a team randomly. And, if that is not too complicated, to have the "event" once the command is activated, happen at the start of each round with a chance increasing over time (when it didn't trigger).

I have looked through the lua files and it doesn't seem all that complicated, but i really do not know how to do it myself.
If someone has the time and is willing to help, i would love to see how it can be done.
Just a "Mass forcern randomly" CMD without the rdm chance of it happening would just be as good.
Or just a hint on how to get me started with that whole command (i have some super basic programming knowledge)

Thanks to all the answers in advance.
Regards
Wolviller111

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 691
  • Karma: 37
    • View Profile
    • iViscosity Gaming
Re: [Help] Gamemode in TTT using excisting commands
« Reply #1 on: November 14, 2017, 12:32:07 PM »
I'm a bit confused as to what you mean... So you're saying you want a command that overwrites the role selection and instead gives only T's and D's like a DM?

I'm willing to help but I've got to understand what you mean first lol
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Forums
Public Discord
Teamspeak

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline Wolviller111

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: [Help] Gamemode in TTT using excisting commands
« Reply #2 on: November 14, 2017, 01:59:44 PM »
Yes. That's pretty much what i mean. I do not want it to be replaced completely, but i would like to have a command (or have another one replaced) that when i activate it, all players are assigned to either Detective or Traitor  for the next round, equally.

So should just be a fair D vs T deathmatch for the next round, when you activate the command
If the number is not equal could be something like: 1 innocent, or just 1 extra for either side.

I have tried do edit the lua code myself... but honestly... i have never worked with lua before and i don't just want to dive in & break stuff ^^
I kinda get how it works... but then there is also the ulx. stuff

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 691
  • Karma: 37
    • View Profile
    • iViscosity Gaming
Re: [Help] Gamemode in TTT using excisting commands
« Reply #3 on: November 15, 2017, 11:07:28 AM »
Yeah that shouldn't be too hard. Just a command that can trigger a variable that will add a hook to assign roles. Do you want it only for the next round or until it's turned off?
I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Forums
Public Discord
Teamspeak

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.

Offline Wolviller111

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
    • View Profile
Re: [Help] Gamemode in TTT using excisting commands
« Reply #4 on: November 15, 2017, 11:31:42 AM »
No thank you. Only for the next round will do just fine ^^

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7734
  • Karma: 351
  • Sertafide Ulysses Jenius
    • View Profile
    • Team Ulysses [ULib/ULX, other fine releases]
Re: [Help] Gamemode in TTT using excisting commands
« Reply #5 on: November 15, 2017, 03:09:57 PM »
iViscosity - Though you might be planning to already, make sure to comment every line of code, even including the ulx parameters, so that Wolviller111 can learn/understand what they are doing.
(Bonus for links to ULib docs and Gmod lua wiki docs for commands/setups being used)
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline iViscosity

  • Hero Member
  • *****
  • Posts: 691
  • Karma: 37
    • View Profile
    • iViscosity Gaming
Re: [Help] Gamemode in TTT using excisting commands
« Reply #6 on: November 15, 2017, 03:52:57 PM »
Yeah I don't plan to just write something and give it to someone without giving them the chance to learn. In fact, I wasn't planning to 100% write it for them, but give them the pseudo-code that will allow them to write it and make it their own.

I'm iViscosity. I like gaming and programming. Need some help? Shoot me a PM or Join my Discord!.
--==[ Links ]==--
Steam
YouTube
Steam Group (feel free to join!)
Forums
Public Discord
Teamspeak

Quote from: Steve Jobs
Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle. As with all matters of the heart, you'll know when you find it. And, like any great relationship, it just gets better and better as the years roll on. So keep looking until you find it. Don't settle.