Raised This Month: $404 Target: $400
 101% 

[TF2] Friendly Mode (v. 16.0112)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ddhoward
Veteran Member
Join Date: May 2012
Location: California
Plugin ID:
3615
Plugin Version:
16.0112
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Old 04-12-2013 , 01:48   [TF2] Friendly Mode (v. 16.0112)
    Reply With Quote #1

    [TF2] Friendly Mode
    v. 16.0112
    "Why did Valve put guns in this game? So weird."

    Friendly Mode allows users to become invulnerable to damage from other players, while at the same time being unable to damage other players. Useful for certain servers where combat is something that some players don't want to partake in, such as trade servers, achievement servers, hangouts, etc.

    The plugin is very effective at stamping out potential abuse of Friendly Mode; Friendly players can have almost 0 effect on the actual gameplay around them. By default, Friendly players:
    • Cannot damage or be damaged by other players.
    • Cannot even take out weapons that can affect gameplay in non-damaging ways (such as the Short Circuit, Holiday Punch, etc.)
    • Cannot taunt with taunt-stunning weapons (Huntsman, Gunslinger, Ubersaw, etc)
    • Cannot block enemy players; they are non-solid, and can be walked right through.
    • Cannot Goomba Stomp or RTD, provided that your Goomba and RTD plugins are up-to-date.
    • Are practically invisible, so non-Friendly players do not get confused.
    • Are invisible to sentries.
    • Cannot go AFK for too long while Friendly.
    • Cannot pick up Ammo, Health, or MvM cash, nor do they drop ammo pickups upon death.
    • Cannot cap points, push carts, or capture flags.
    • All the appropriate restrictions also apply to Engie buildings as well.
    • Etc.

    This plugin is highly configurable, and features 56 cvars. This can be overwhelming to configure at first. Just remember that the default value is generally the "best" value for that particular cvar. Don't change it unless you feel you need to, based on the needs of your particular server/map.

    This plugin provides several natives and forwards for interacting with other plugins. Please see the .inc file for more information.

    COMMANDS
    Spoiler


    CVARS, shown with default values:
    This plugin loads its cvars from tf/cfg/sourcemod/friendly.cfg, if the file exists. It is recommended that you place this file in that location, renaming it to simply friendly.cfg, commenting out any settings you want to place elsewhere (such as in map-specific settings). Remember, when in doubt, just use the default settings.
    Spoiler


    Changelog
    Spoiler




    Plans, goals, and dreams:
    I am mostly using this plugin as a way to learn this stuff. As such, modifications and updates will come slowly, unless I have assistance. That being said, I hope to one day include:
    • A cvar that, when enabled, will clear the domination/revenge status of a player entering friendly mode.
    • A way to distinguish Friendly players without alpha changing.
    • A way to make Friendly players invisible to bosses.
    • Menu support?
    Notes, Known Issues, Known Bugs, Known Exploits:
    • If a Friendly player/building's invuln cvar is not set to godmode or buddha, it can still be damaged by other players through non-normal means, such as the RTD effects Toxic and Timebomb.
    • Friendly players can still damage non-Friendly players through non-normal means, such as RTD Toxic, RTD Timebomb, etc.
    • Bosses will still attempt to attack Friendly players, regardless of any inability to actually do damage.
    • A Friendly player, when headshotted with the Bazaar Bargain, grants the sniper a "head," regardless of the fact that the victim never dies or even takes damage.
    • Friendly players can still be heard by all nearby players. Footsteps, voice commands, weapon use, etc. This can be confusing to your more attentive players who are taking the combat more seriously than others.
    • If a Friendly player accidentally walks into a non-friendly cloaked enemy spy, he may accidentally reveal the spy's location.

    Installation:
    To install, simply ensure that your Sourcemod installation is up to date (at least v1.5), and place the SMX in your plugins folder. You should also put friendly.txt into your gamedata folder. Optionally, place the cfg in tf/cfg/sourcemod/.

    Please also consider installing Updater. This will let you automatically keep your plugins up-to-date.
    Compiling:
    The plugin source is available here.

    The plugin requires custom includes. As such, it does not compile here on the forums. Includes required to compile the plugin are:Optional includes are:



    If you like what you see here, please consider donating~
    __________________

    Last edited by ddhoward; 01-31-2016 at 16:43.
    ddhoward is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Location: Source SDK
    Old 04-12-2013 , 11:51   Re: [TF2] Friendly Mode
    Reply With Quote #2

    Looks nice. Will it also remove the player's collision to prevent griefing?
    __________________

    Last edited by Sreaper; 04-12-2013 at 11:56.
    Sreaper is offline
    Mr. Man
    Veteran Member
    Join Date: Mar 2011
    Location: Huh?
    Old 04-12-2013 , 14:35   Re: [TF2] Friendly Mode
    Reply With Quote #3

    I just tested the plugin and it appears as if I can still damage people while having !friendly on. The server restart did the trick. Will you extend the buddha mode to immunity from goomba stomps?

    Last edited by Mr. Man; 04-12-2013 at 14:43.
    Mr. Man is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 04-12-2013 , 15:54   Re: [TF2] Friendly Mode
    Reply With Quote #4

    Uploading new version 13.0412 (1249), included in both this post and the first post of this thread. Changes include:
    • Added plugin version cvar: sm_friendly_version
    • Added Debug command sm_debugfriendly, requires ROOT flag by default. Only useful to those who are editing the source code.

    Quote:
    Originally Posted by Sreaper View Post
    Looks nice. Will it also remove the player's collision to prevent griefing?
    Didn't even think of that. Added to the to-do list.

    Quote:
    Originally Posted by Mr. Man View Post
    Will you extend the buddha mode to immunity from goomba stomps?
    Currently, Friendly players are immune to recieving the goomba stomp damage, but can DEAL the same damage to other players. The same issue applies to the RTD effects Timebomb and Toxic; a Friendly player who happens to roll these effects becomes an unstoppable killing machine. Hoping to eliminate this issue in the future, as I learn more about SourcePawn and SDKHooks.
    Attached Files
    File Type: sp Get Plugin or Get Source (friendly.sp - 754 views - 8.1 KB)
    File Type: smx friendly.smx (6.0 KB, 356 views)

    Last edited by ddhoward; 04-13-2013 at 03:44.
    ddhoward is offline
    salsav91
    Senior Member
    Join Date: Aug 2012
    Location: Where Lollichops sleep
    Old 04-12-2013 , 17:16   Re: [TF2] Friendly Mode
    Reply With Quote #5

    Love this plugin, some suggestions though.

    Quote:
    A way to make Friendly players visibly distinguishable from non-friendly players.
    Remove all there weapons so they become "citizens"? http://forums.alliedmods.net/showthread.php?t=97342
    Maybe combine some code from the Colors mod http://forums.alliedmods.net/showthread.php?p=577144 and force them to be a certain color, like pink?

    Just some idea for that problem....

    AS a side note. Some of my players can still use passive things. Like throwing sandviches to heal other players. Again maybe just removing their ability to use weapons would be best.
    __________________


    Check out my pony animations. http://www.youtube.com/salsav91
    salsav91 is offline
    Mr. Man
    Veteran Member
    Join Date: Mar 2011
    Location: Huh?
    Old 04-12-2013 , 17:30   Re: [TF2] Friendly Mode
    Reply With Quote #6

    Quote:
    Originally Posted by salsav91 View Post
    Love this plugin, some suggestions though.



    Remove all there weapons so they become "citizens"? http://forums.alliedmods.net/showthread.php?t=97342
    Maybe combine some code from the Colors mod http://forums.alliedmods.net/showthread.php?p=577144 and force them to be a certain color, like pink?

    Just some idea for that problem....

    AS a side note. Some of my players can still use passive things. Like throwing sandviches to heal other players. Again maybe just removing their ability to use weapons would be best.
    That might be self-defeating in that friendly people like to interact with others using taunts or something equal.
    Mr. Man is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 04-12-2013 , 17:44   Re: [TF2] Friendly Mode
    Reply With Quote #7

    Quote:
    Originally Posted by salsav91 View Post
    AS a side note. Some of my players can still use passive things. Like throwing sandviches to heal other players. Again maybe just removing their ability to use weapons would be best.
    If sm_friendly_blockweps 1, Friendly players shouldn't even be able to even take out their sandviches. Is this not functioning for you? If the cvar is set to 1, and only some players have the ability to take out these weapons, perhaps you did not perform a map change or server restart after installing the plugin?

    As for the indication of friendly-ness, I'm thinking some sort of particle effect floating above the player's head, or perhaps something similar to the glow provided by sm_spyvision. I want to avoid conflicts with other commands like sm_color and sm_render as much as possible.

    Last edited by ddhoward; 04-12-2013 at 17:59.
    ddhoward is offline
    Scipizoa
    Senior Member
    Join Date: Aug 2012
    Location: ask me
    Old 04-12-2013 , 20:13   Re: [TF2] Friendly Mode
    Reply With Quote #8

    hey is it possible that an identifyer or particle effect can be placed on the freidnly enabled person so other players can see who is friendly and who aint?

    as for rtd couldn't you have this plugin filter out !rtd from ever hitting the chat??/console
    __________________

    ZaBaGaBe Gaming Community: http://steamcommunity.com/groups/ZBGB

    Last edited by Scipizoa; 04-12-2013 at 20:17.
    Scipizoa is offline
    ddhoward
    Veteran Member
    Join Date: May 2012
    Location: California
    Old 04-12-2013 , 20:38   Re: [TF2] Friendly Mode
    Reply With Quote #9

    Quote:
    Originally Posted by Scipizoa View Post
    hey is it possible that an identifyer or particle effect can be placed on the freidnly enabled person so other players can see who is friendly and who aint?
    Quote:
    Originally Posted by ddhoward View Post
    As for the indication of friendly-ness, I'm thinking some sort of particle effect floating above the player's head, or perhaps something similar to the glow provided by sm_spyvision.



    Quote:
    Originally Posted by Scipizoa View Post
    as for rtd couldn't you have this plugin filter out !rtd from ever hitting the chat??/console
    Maybe, I don't know how to do that though. As I said, I'm VERY VERY EXTREMELY new to Pawn.
    ddhoward is offline
    Scipizoa
    Senior Member
    Join Date: Aug 2012
    Location: ask me
    Old 04-12-2013 , 20:41   Re: [TF2] Friendly Mode
    Reply With Quote #10

    Take A look at tidychats source code it stops a lot of chat stuff ;p
    __________________

    ZaBaGaBe Gaming Community: http://steamcommunity.com/groups/ZBGB
    Scipizoa 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 02:09.


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