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

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


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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:
    19 
    Plugin Description:
    Spawns a tombstone on player death
    Old 05-06-2013 , 03: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, 1408 views)
    __________________
    Profile - Plugins
    Add me on steam if you are seeking sp/map/model commissions.

    Last edited by friagram; 05-01-2014 at 01:00. Reason: Streaper likes spawmings
    friagram is offline
     


    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 18:34.


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