1. These forums are still being retired! Please use GitHub discussions or Discord. You cannot create new threads or new accounts now. If you need to contact some user of the forums, you should do it sooner, rather than later. This notice was last updated on May 30th, 2021.

CTG Plugin

Discussion in 'Plugin Suggestions' started by Butt, Nov 22, 2014.

  1. Butt

    Butt Level 0

    Joined:
    Jan 31, 2012
    Messages:
    2
    Hello everyone. I feel like this is a fairly generic and relatively simple idea, but so far I have not been able to find such a plugin: A plugin that automates CTG. What I imagine is a plugin that creates a config file where you can define how long the preparation phase of the match lasts, and whether or not the plugin kills npcs automatically. The only commands are ones that begin the preparation phase, extend the time of it, define the spawns for both red and blue team, and define the line between the two teams. By default when the server is started, all players except those logged in as superadmin (who would typically be referees) are stuck at the spawnpoint of the corresponding team, and once the command that starts the preparation phase is executed, they are allowed to move. During the preparation phase, the server automatically locks each player into their team and kills anyone that crosses the previously defined border between the two teams. Once the prep phase is up, pvp is locked on all players except superadmins, and all players are allowed to cross between borders.

    Example Config File:
    {
    "PrepPhase": 900, //15 minutes
    "KillNpcs": true, //So that the merchant and arms dealer don't cause game imbalance
    }

    Commands:
    /beginmatch - Begins the match, and assigns any players on teams other than red and blue, or those who are simply not on a team, onto one of those two teams, automatically putting players one at a time onto the team with less people

    /addtime "amount in seconds" - Adds time to prep phase IF the game is in prep phase; otherwise it does nothing

    /redspawn - Sets your current location to the spawn of the red team, and returns any players on that team to that location upon death

    /bluespawn - Sets your current location to the spawn of the blue team, and returns any players on that team to that location upon death

    /teamdivide - Sets the divider between the two teams which, if crossed during the prep phase by any non-admin players, will kill that person

    I doubt a plugin could ever be successfully made that monitors all aspects of CTG. Refs will be needed to monitor certain rules, but a plugin like this would definitely make it easier by enforcing simple but important rules. And, of course, I would love some feedback on this idea. If there happens to already by a plugin similar to this, please inform me. Thanks!
     
  2. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    644
    There have been a few CTG/CTF plugins, some public, some private.

    I think you may need to look around a little bit before finding anything that might suit your tastes. I don't have anything to link you to off the top of my head.

    For the record, however, this section of the forums is for suggestions for TShock itself. TShock is the administration and hack prevention plugin that the forums revolve around.

    I'm going to move this thread into the plugin suggestions area.
     
  3. Butt

    Butt Level 0

    Joined:
    Jan 31, 2012
    Messages:
    2
    Oh, my apologies for posting in the wrong section. I could have sworn I was posting in the plugin suggestions section... Apparently not. Anyways, it seems like it would be a simple plugin to make. I have very minor experience with editing and rebuilding source code of other plugins, so perhaps I could give a shot at making this idea a reality.
     
  4. Enerdy

    Enerdy Satellite Admin
    TShock Mod Plugin Developer Zero Day Plugin Author

    Joined:
    Nov 14, 2012
    Messages:
    506
    This has been done previously in C3Mod, but it's now outdated.
    A modification started by another member can be found here.

    It might help if you can look at the source code of these to get some ideas. C3Mod is a gamemode plugin which manages multiple gamemodes (or "minigames") such as FFA and CTF.
     
  5. Ijwu

    Ijwu Level 11

    Joined:
    Apr 4, 2012
    Messages:
    644

    If you decide to do so, the best course of action is to ensure you understand basic programming fundamentals. Get onto an online education platform and give learning programming a shot!
     
    • Like Like x 1