Monthly Target: $400 Donations: $147
 36% 

[TF2] Gravestone Markers - Updated 10/29/2013


Post New Thread Reply   
 
Thread Tools Display Modes
Author
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Plugin ID:
3642
Plugin Version:
1.0.9
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    141 
    Plugin Description:
    Spawns a tombstone on player death
    Old 05-06-2013 , 04:53   [TF2] Gravestone Markers - Updated 10/29/2013
    Reply With Quote #1

    Spawns a tombstone at the corpse of a player when they die (given set conditions).
    Each player may only have one down at a time.

    [IMG]http://s16.************/5lup4ssz9/gravestones105.png[/IMG]

    Latest: https://drive.google.com/folderview?...nc&usp=sharing

    CVARs:
    Code:
    revengestone_version: version number, for tracking (don't change)
    sm_gravestones_mode (2) Mode of Operation [0-4]*
    sm_gravestones_alert (5) Duration of Notification Popups [0-20]
    sm_gravestones_distance (300) Max distance gravestones will be visible on hud from [50+]
    sm_gravestones_time (600) Max time gravestones will exist for (in seconds) [0+]
    sm_gravestones_bots (1) Allow bots to spawn gravestones [0/1]
    Modes of Operation:
    • Disabled: [0]: Nothing will spawn, hud will not update.
    • Every Death: [Ratio between 0 and 1]: Chance that stone will drop on a death, (0.25) is 25%, (0.5) is 50%, (1.0) is 100%.
    • Revenge: [2]: Stones will drop only on revenge kills.
    • Domination: [3]: Stones will drop only on domination kills.
    • Revenge+Domination: [4]: Stones will drop on both revenge and domination kills.

    When a player dies, an alert with the players name for (sm_gravestones_alert) will be sent to players within viewable range (sm_gravestones_distance) of the marker. When viewing a marker, the line will be displayed for as long as they are looking at it, and are within range (sm_gravestones_distance) of if it.

    The props are not solid, and shouldn't interfere with combat in any way. They will always spawn pointing downward, but will adjust their angle to terrain normals.

    The player's name/epitaph index is stored inside of the gravestone prop itself, so it will persist, even if the player leaves the server, or reconnects.

    Configuration File::
    The configuration file consists of lines of text that will appear on the hud to clients looking at the stones.
    use * to insert the player's name, use | to insert a newline (line break)
    Do not use newlines in the configuration file (blank text lines) it just reads each one into the array for now :S
    The file is read into pre-allocated arrays of fixed size. If you need many more, or want them to be extremely long, you may have to recompile the SP and change the defines at the top.
    Code:
    Here lies *|Who could replace you?|Anyone with a gun
    Translates to:
    Code:
    Here lies Player
    Who could replace you?
    Anyone with a gun
    Commands:
    • sm_gravestones_reload: (Rcon) Reloads the configuration file, changes take effect immediately. Markers will be preserved and updated if content is added or changed, but if lines are removed, all existing markers will be destroyed.
    • sm_gravestones: Toggles automatic display of text for users. When automatic display is enabled, users must press alt-fire while looking at a marker to view the text. Name notifications on spawn are also disabled in this mode.

    Code:
    2013-5-6 (v1.0.0)
    * Initial Release
    
    2013-5-6 (v1.0.1)
    * Fixed bug which would allow a player with semicolon in name to interfere with string deliminator
    
    2013-5-6 (v1.0.2)
    * Fixed array size which could have lead to truncation when really long epitaphs were used
    * Epitaphs are now stored in dynamic arrays
    * Added more error handling to files (it will warn if the file is empty, and populate a dummy item)
    * Added more info when reloading the config file.
    * Reduction in lines when reloading the config file will destroy all placed markers, to prevent invalid array indexes.
    
    2013-5-10(v1.0.4)
    * Added annotations to appear for a short time to players in radius of the stone when dropped.
    * Edited sample config list.
    
    2013-5-11(v1.0.5)
    * Annotations now replace hud text.
    * Added more options to configure when/how markers spawn.
    * Edited sample config list.
    
    2013-5-14(v1.0.6)
    * Added clientprefs support to allow users to disable viewing of annotation messages automatically.
    * Added command for clients to toggle automatic annotation popups.
    * Properly resized the physics model of the gravestones.
    
    2013-5-14(v1.0.7)
    * Added convar to filter bots, by default bots will spawn gravestones.
    * Reformatted/added a few epitaph lines.
    * Minor code/formatting cleanup
    
    2013-10-29(v1.0.9)
    * Added class-set models.
    * Minor changes that shouldn't change functionality.
    Installation:
    • Place the gravestones.txt file in your "addons/sourcemod/configs" directory
    • Place the gravestones.smx file in your "addons/sourcemod/plugins" directory.

    Comments:
    • Some basic prop spawning trace/code was taken from FortWars
    • Some basic trace/hud code was taken from Entcontrol
    • Annotations idea from here: Annotations

    Latest version can be found here: https://drive.google.com/folderview?...VU&usp=sharing
    Attached Files
    File Type: txt gravestones.txt (1.9 KB, 874 views)
    __________________
    Profile - Steam Group - Plugins - Blog - Donate
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 05-01-2014 at 02:00. Reason: Streaper likes spawmings
    friagram is offline
    snelvuur
    Veteran Member
    Join Date: Jun 2008
    Location: Netherlands
    Old 05-06-2013 , 16:09   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #2

    Would be nice for each kill to have one of those. Can be used in arena for instance to know where everyone died.
    __________________
    Arguing with a fool only proves there are two
    snelvuur is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 05-06-2013 , 16:38   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #3

    Quote:
    Originally Posted by snelvuur View Post
    Would be nice for each kill to have one of those. Can be used in arena for instance to know where everyone died.
    ehh you could i guess

    Code:
            if(client && IsClientInGame(client))
            {
                    if (GetEventInt(event, "death_flags") & TF_DEATHFLAG_KILLERREVENGE)
                    {
                            SpawnProp(client);
                    }
            }
    It could be changed to dominating, or assist, or just remove the check to do it every time. It'll still remove the old one.
    __________________
    Profile - Steam Group - Plugins - Blog - Donate
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 05-07-2013 , 01:57   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #4

    Updated to fix some minor issues, and provide a bit better error handling.

    I could also add convars to change how it operates, if you guys would want that sort of thing.

    - any death
    - revenge death
    - assisted revenge death (don't think this is important, since it only spawns one, and the revenge would trigger it anyway)
    - dominated death

    could also make a cvar to change the hud colors =/
    __________________
    Profile - Steam Group - Plugins - Blog - Donate
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 05-07-2013 at 02:04.
    friagram is offline
    Dispenz0r
    Senior Member
    Join Date: May 2011
    Old 05-07-2013 , 09:32   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #5

    Quote:
    Originally Posted by friagram View Post
    Updated to fix some minor issues, and provide a bit better error handling.

    I could also add convars to change how it operates, if you guys would want that sort of thing.

    - any death
    - revenge death
    - assisted revenge death (don't think this is important, since it only spawns one, and the revenge would trigger it anyway)
    - dominated death

    could also make a cvar to change the hud colors =/
    Yes please
    Dispenz0r is offline
    lyric
    Veteran Member
    Join Date: Sep 2012
    Old 05-07-2013 , 13:07   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #6

    this would be much better if you used the little pop up boxes that tf2 uses for what i think are hints? like when you gib a player and it says "Your kidney" and stuff right above your gibs?

    someone did a plugin for that that also had msyql support to it but i dunno where its at anymore.
    __________________
    lyric is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 05-07-2013 , 13:10   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #7

    Dunno how to implement that, but it would be better than hud messages.
    __________________
    Profile - Steam Group - Plugins - Blog - Donate
    Add me on steam if you are seeking sp/map/model commissions.
    friagram is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Location: Source SDK
    Old 05-07-2013 , 13:21   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #8

    Quote:
    Originally Posted by friagram View Post
    Dunno how to implement that, but it would be better than hud messages.
    See: http://forums.alliedmods.net/showthread.php?t=139902
    __________________
    Sreaper is offline
    lyric
    Veteran Member
    Join Date: Sep 2012
    Old 05-07-2013 , 13:23   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #9

    Quote:
    Originally Posted by Sreaper View Post
    yes, this is what i was talking about thanks for finding this
    __________________
    lyric is offline
    friagram
    Veteran Member
    Join Date: Sep 2012
    Location: Silicon Valley
    Old 05-07-2013 , 18:46   Re: [TF2] Gravestone Revenge Markers - 5/6/2013
    Reply With Quote #10

    Yeah, i should be able to use this, i can just make the bubbles pop up above the stones. I assume newlines are supported? It would suck if they arn't

    It looks like the annotations are designed to be temporary. They zoom in and then dissapear. They also don't support newlines.
    This could mabye be useful for just showing the client's name over the stone when it's spawned though.
    __________________
    Profile - Steam Group - Plugins - Blog - Donate
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 05-10-2013 at 09:34.
    friagram 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 09:41.


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