[TF2] Force start round in mp_tournament

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
Zeus
Member
Posts: 52
Joined: Sat Mar 24, 2018 5:25 pm
Location: Chicago
Contact:

[TF2] Force start round in mp_tournament

Postby Zeus » Thu Mar 21, 2019 6:33 pm

Hello!

I'm trying to work on some plugins for competitive TF2, one thing that would be really nice is having a bit more control over the mp_tournament stuff. Basically TF2 has a mode than can be enabled called "mp tournament" which allows community organized competitive matches to occur. It has a butt load of options, but does feel like it's only half finished.

I would like to be able to force start the round with an admin command. There is no built-in command to allow this. My working hypothesis is that I need to find a specific server entity and send inputs to it. Unfortuneatly Valve doesn't have thorough documentation on their server entities, so I'm guessing I would need to do a lot of digging / trial and error. Heres all the TF entities: https://developer.valvesoftware.com/wik ... 2_Entities

There is a SourceMod plugin I know does simliar things: https://github.com/fwdcp/CompCtrl/blob/ ... matches.sp
But I'm unsure how it actually accomplishes it (i don't know a lot about the internals of the engine, and this code is a bit spaghetti-esque)

I have little to no idea how to actually go about doing this, so anything someone can send me to point me in the right direction would be helpful!

Thanks!
Zeus
User avatar
Kami
Global Moderator
Posts: 263
Joined: Wed Aug 15, 2012 1:24 am
Location: Germany

Re: [TF2] Force start round in mp_tournament

Postby Kami » Sun Mar 24, 2019 12:38 pm

Hey,
have you tried if those options even work? I did some tests and while the class limits work, most of the other things do not.


Also, if you want to force the round to start, you can simply use mp_restartgame.
Judging from the fact, that this command even triggers the same countdown as both teams beeing ready, I guess that is what the engine uses to start the tournament anyways.
User avatar
Zeus
Member
Posts: 52
Joined: Sat Mar 24, 2018 5:25 pm
Location: Chicago
Contact:

Re: [TF2] Force start round in mp_tournament

Postby Zeus » Mon Dec 30, 2019 10:47 pm

I know this is a very late response; but this is the only thing I could get to work:
https://github.com/servers-tf/sourcepyt ... #L111-L120

If I remember correctly; there were entities i could send inputs to but they just ignored it. The behavior of the mp_tournament stuff is very bizzare.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 27 guests