AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Gravestone Markers - Updated 10/29/2013 (https://forums.alliedmods.net/showthread.php?t=215303)

friagram 05-06-2013 03:53

[TF2] Gravestone Markers - Updated 10/29/2013
 
1 Attachment(s)
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

snelvuur 05-06-2013 15:09

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
Would be nice for each kill to have one of those. Can be used in arena for instance to know where everyone died.

friagram 05-06-2013 15:38

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
Quote:

Originally Posted by snelvuur (Post 1947094)
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.

friagram 05-07-2013 00:57

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
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 =/

Dispenz0r 05-07-2013 08:32

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
Quote:

Originally Posted by friagram (Post 1947289)
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

lyric 05-07-2013 12:07

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
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.

friagram 05-07-2013 12:10

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
Dunno how to implement that, but it would be better than hud messages.

Sreaper 05-07-2013 12:21

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
Quote:

Originally Posted by friagram (Post 1947510)
Dunno how to implement that, but it would be better than hud messages.

See: http://forums.alliedmods.net/showthread.php?t=139902

lyric 05-07-2013 12:23

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
Quote:

Originally Posted by Sreaper (Post 1947522)

yes, this is what i was talking about thanks for finding this

friagram 05-07-2013 17:46

Re: [TF2] Gravestone Revenge Markers - 5/6/2013
 
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.


All times are GMT -4. The time now is 22:30.

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