Raised This Month: $1944 Target: $400
 486% 

[TF2] Improved CTF (b3.2, 4/29/20)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Ribbon
New Member
Join Date: Apr 2020
Plugin ID:
7074
Plugin Version:
b3.2
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Improved Capture The Flag and Special Delivery by turning flags into miniature capture-points
    Old 04-30-2020 , 13:59   [TF2] Improved CTF (b3.2, 4/29/20)
    Reply With Quote #1

    One issue that I and many others have had with TF2's default CTF gamemode over the years is that most maps have the flag timer at a whopping 60 seconds that cannot be reduced. This problem leads to your flag being slowly inched out of your base by enemies needing only a touch to reset the whole process over.
    Improved CTF aims to fix this by giving server ops the ability to change the map-defined flag timer and by allowing you, the player, to return the flag faster by standing near it.
    Capture rate is even influenced by scout's natural 2x capture rate or soldier and demoman's The Pain Train, finally giving it some use in CTF.

    Screenshots
    When the flag is dropped, two circles appear around the flag. Outer circle indicates the capture radius, inner circle shrinks as the timer decreases.

    If you enter the flag's range, the inner circle will light up with your team's color to show that you are now returning the flag.


    Installation/Customization
    No plugin dependencies. Should print "Improved CTF enabled" on startup.
    Included Cvars:
    sm_ictf_version - Prints the installed version of Improved CTF to the server console
    sm_ictf_enable <1/0> - Enables/Disables Improved CTF
    sm_ictf_flag_time <default: 30> - The base time, in seconds, until the flag is returned
    sm_ictf_cap_multiplier <default: 0.6> - The amount of time each capper reduces the flag's timer (i.e. 0.6 means the flag's timer will be decreased by 0.6 seconds more, per second)
    sm_ictf_cap_radius <default: 100.0> - The maximum distance, in hammer units, player can be at to still return the flag faster
    sm_ictf_hud_text <1/0> - Enables/disables on-screen text for a flag's capture rate

    Changelog
    Code:
    Version b3.3 (5/13/20)
    - Added custom HUD text to show the flag's current capture rate. Shown only when a flag is down and on the screen at the bottom next to the flag status
    - Added cvar "sm_ictf_hud_text" to give the option to disable HUD text for all players
    - Fixed The Pain Train not giving the 2x capture rate on flags
    - Fixed beam ring not being representative of the flag's true capture radius
    - Adjusted default beam ring size to compensate being bigger than intended
    Version b3.2 (4/30/20)
    - Fixed players being able to return the flag while cloaked, ubercharged, bonked, ect.
    - Improved code readability
    Version b3.1
    - Improved code readability
    - Privated unnecessarily public functions
    - Flag timer can now be a decimal
    Version b3.0
    - First public version
    - Changed the flag capture indicator from a jank hexagon to a circle
    - Capture area will now disappear instantly when the flag is returned
    Planned features
    • Support for more gamemodes
    • Custom weapon capture rate modifier support
    • Custom round and overtime timers
    Feel free to post issues and suggestions in this thread.
    You may also at my github: https://github.com/RibbonHeartU/TF2-Improved-ctf
    Also, If you're going to be using it on your server, let me know. I'd love to see it be used by more communities.
    Attached Files
    File Type: smx improvedctf.smx (9.3 KB, 26 views)
    File Type: sp Get Plugin or Get Source (improvedctf.sp - 37 views - 10.6 KB)

    Last edited by Ribbon; 07-29-2020 at 14:38. Reason: Forum compiler for 1.10 now works
    Ribbon is offline
    enderandrew
    Senior Member
    Join Date: Jun 2020
    Old 07-05-2020 , 15:10   Re: [TF2] Improved CTF (b3.2, 4/29/20)
    Reply With Quote #2

    I tried updating this to the newer syntax. I also put in a quick check to see if it is a CTF map, otherwise the plugin does nothing.

    Code:
    //is this an CTF map?
    bool IsCTFMap() 
    {
    	char curMap[32];
    	GetCurrentMap(curMap, sizeof(curMap));
    	return strncmp("ctf_", curMap, 4, false) == 0;
    }
    
    void InitiateICTF(Handle convar, const char[] oldValue, const char[] newValue)
    {
    	//Check to see if ICTF is enabled and that the game is, in fact, TF2
    	char gamename[3];
    	GetGameFolderName(gamename, sizeof(gamename));
    	if(StrEqual(gamename,"tf") && cvar_enabled.BoolValue && IsCTFMap())
    But both the original and my modified version spam the logs on CTF maps with this error:

    Code:
    L 07/05/2020 - 00:00:00: [SM] Exception reported: Property "m_vecOrigin" not found (entity 1637/tf_ragdoll)
    L 07/05/2020 - 00:00:00: [SM] Blaming: improvedctf.smx
    L 07/05/2020 - 00:00:00: [SM] Call stack trace:
    L 07/05/2020 - 00:00:00: [SM]   [0] GetEntPropVector
    L 07/05/2020 - 00:00:00: [SM]   [1] Line 248, improvedctf.sp::TimeTick
    Attached Files
    File Type: sp Get Plugin or Get Source (improvedctf.sp - 13 views - 10.9 KB)

    Last edited by enderandrew; 07-05-2020 at 18:05.
    enderandrew is offline
    Ribbon
    New Member
    Join Date: Apr 2020
    Old 07-07-2020 , 01:08   Re: [TF2] Improved CTF (b3.2, 4/29/20)
    Reply With Quote #3

    Quote:
    Originally Posted by enderandrew View Post
    I tried updating this to the newer syntax. I also put in a quick check to see if it is a CTF map, otherwise the plugin does nothing.

    Code:
    snip
    But both the original and my modified version spam the logs on CTF maps with this error:

    Code:
    snip
    I had decided to leave out a check for CTF map specifically because I added support for sd_doomsday and possible unintended support for other maps with flags on them.

    The bug is new to me. I seems that the plugin on your server is indexing ragdolls where it should index flags, which I have never run into during my testing and use on servers with players. I tested it again recently, making sure to enable ragdolls on my client and was still unable to replicate this error. Are you running any plugins that add new ragdolls or change ragdoll behavior?

    Last edited by Ribbon; 07-07-2020 at 01:12.
    Ribbon is offline
    enderandrew
    Senior Member
    Join Date: Jun 2020
    Old 07-07-2020 , 03:46   Re: [TF2] Improved CTF (b3.2, 4/29/20)
    Reply With Quote #4

    Just this (which disables itself on non-MvM maps

    https://forums.alliedmods.net/showthread.php?p=2212895

    And this:

    https://github.com/nosoop/SM-TFCusto...teStarterPack/

    However I noticed I was having problems with a few plugins that no one else seemed to be having, and I am starting to chalk that up to the fact that I was testing on a dev build of SM 1.11.

    I'm running on SM 1.10 now and I'm not seeing the errors.
    enderandrew is offline
    venter25
    Member
    Join Date: Jul 2019
    Old 07-13-2020 , 19:19   Re: [TF2] Improved CTF (b3.2, 4/29/20)
    Reply With Quote #5

    Added this to my server. Thank you!
    venter25 is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 10:23.


    Powered by vBulletin®
    Copyright ©2000 - 2020, vBulletin Solutions, Inc.
    Theme made by Freecode