Raised This Month: $51 Target: $400
 12% 

[TF2] Improved CTF (b3.3, 5/13/20)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Ribbon
New Member
Join Date: Apr 2020
Plugin ID:
7074
Plugin Version:
b3.3.1
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.3, 5/13/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.1 (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
    - Updated syntax
    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: sp Get Plugin or Get Source (improvedctf.sp - 313 views - 10.6 KB)

    Last edited by Ribbon; 02-23-2021 at 20:26. Reason: Updated plugin
    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 - 292 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
    Ah_Roon
    Junior Member
    Join Date: Apr 2019
    Old 02-09-2021 , 08:54   Re: [TF2] Improved CTF (b3.2, 4/29/20)
    Reply With Quote #6

    Code:
    L 02/09/2021 - 00:00:00: [SM] Exception reported: Entity 900 (900) is invalid
    L 02/09/2021 - 00:00:00: [SM] Blaming: improvedctf.smx
    L 02/09/2021 - 00:00:00: [SM] Call stack trace:
    L 02/09/2021 - 00:00:00: [SM]   [0] GetEntPropVector
    L 02/09/2021 - 00:00:00: [SM]   [1] Line 248, E:\Development\tf2_ds\tf\addons\sourcemod\plugins\TF2-Improved-ctf\improvedctf.sp::TimeTick
    This spams the console, can you fix the issue? This happens when the bots are on the game.
    __________________
    Call me Roon for now (Formerly Ah_Roon)

    Currently in development: Starlight Paradise
    Ah_Roon is offline
    Teamkiller324
    Senior Member
    Join Date: Feb 2014
    Location: Earth
    Old 02-10-2021 , 08:03   Re: [TF2] Improved CTF (b3.2, 4/29/20)
    Reply With Quote #7

    Updated to new syntax.

    Hopefully fixed the invalid prop vector problem, untested.
    Attached Files
    File Type: sp Get Plugin or Get Source (improvedctf.sp - 205 views - 10.5 KB)
    __________________

    Last edited by Teamkiller324; 02-10-2021 at 08:06.
    Teamkiller324 is offline
    Ribbon
    New Member
    Join Date: Apr 2020
    Old 02-23-2021 , 20:21   Re: [TF2] Improved CTF (b3.2, 4/29/20)
    Reply With Quote #8

    Quote:
    Originally Posted by Teamkiller324 View Post
    Updated to new syntax.

    Hopefully fixed the invalid prop vector problem, untested.
    Tested. OP and Github updated. Thank you!!
    Ribbon is offline
    wllpwr
    New Member
    Join Date: Oct 2021
    Old 10-25-2021 , 18:41   Re: [TF2] Improved CTF (b3.3, 5/13/20)
    Reply With Quote #9

    Hey, plugin seems to be broken again. Capping isn't working on my servers...

    Last edited by wllpwr; 10-25-2021 at 18:42.
    wllpwr is offline
    SashaNight
    Junior Member
    Join Date: Aug 2018
    Old 05-14-2022 , 16:21   Re: [TF2] Improved CTF (b3.3, 5/13/20)
    Reply With Quote #10

    Amazing mod! Thank you for making it. Is there any way to change the interval the circle updates visually?
    SashaNight is offline
    Reply



    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 19:51.


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