Fortress Forever

Go Back   Fortress Forever > Editing > Modding

Reply
 
Thread Tools Display Modes
Old 02-13-2009, 01:33 AM   #1
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
[SM Plugin] Flag Assist Points

Another plugin for SourceMod.
You can download it HERE:

Copy and pasted from the AM forums:
Quote:
ALERT: After installing this plugin your server may need a restart.

+description+
- This plugin gives fortress points to players that helped assist a flag capture.

- The points are given in a percentage depending on how long a player held the flag compared to other assistants.

- The flag capturer receives the default capture points, but no assist points.

- This plugin only works on CTF maps as long as they contain correct logging data.

+server cvars+
- sv_assistpool <Number of points>
+ Sets the amount of points in the flag cap assist pool.

- sv_defendpoints <Number of points>
+ Sets the amount of points a player gets for defending the flag.

+client commands+
- flagstatus
+ Shows the player the status of their teams flag and the enemy teams flag.

+logging actions+
- flag_defend_carrier: The logged player killed the enemy team flag carrier.
- flag_defend: The logged player killed an enemy player near the flag.
- flag_assist: The logged player helped assist teammates for a flag capture.

+installation+
- Place the FlagAssists.smx file inside of the addons/sourcemod/plugins/ folder.

+credits+
- [Rawh]: Providing a Linux box to test on, testing plugin, and finding bugs.
- [psychonic]: Pointing out exploits and ideas.
- [Tyrant]: Helped test plugin.
- [PartialSchism]: Helped test plugin.
- [TonyCip]: Helped test plugin.
- [Bully]: Helped test plugin.

+changelog+
Version 1.0 ( 02-12-2009 )
-- Initial release.

Version 1.1 ( 02-13-2009 )
-- Added logging of the flag assists for stats programs.
-- Added hooks for say_team and say2 to remove exploiting (thanks psychonic).

Version 1.2 ( 02-24-2009 )
-- Added flaginfo command for players to view the status of the flags.
-- Added points for players that help defend the flag.
-- Added logging for defending the flag (logs as flag_defend).
-- Added cvar sv_assistpool to set the amount of points in the flag capture pool.
-- Added cvar sv_defendpoints to set the amount of points a player gets from defending the flag.
-- Fixed some problems plugin was having on Linux machines.

Version 1.3 ( 02-25-2009 )
-- Fixed variables that needed reset on map change.
-- Added the flags location to the flaginfo command.
-- Colorized the flaginfo command.

Version 1.4 ( 02-28-2009 )
-- Added check to see if the map is CTF. If not a CTF map the plugin will 'unload'.
-- Added flag defend points for killing players within a certain distance of the flag.
-- Added a new logging feature for killing the flag carrier: 'flag_defend_carrier'.
-- Changed 'flag_defend' logging. This now represents that you killed someone near your flag.
-- Changed 'flaginfo' command to 'flagstatus' due to flaginfo already existing in FF.
-- Added message to inform connected players about the flagstatus command.
-- Fixed bug where player carrying a flag would disconnect; which would cause wrong flag status.

Version 1.5 ( 03-02-2009 )
-- Fixed bugs in the location message hook.
-- Fixed a bug in the client disconnect hook.
-- Fixed bug where plugin tried to give non-player entities Fortress-Points.

Version 1.6 ( 03-05-2009 )
-- Fixed showing the dead players flagstatus.
-- Optimized the SayText function so it no longer needs the extra name checks.

Last edited by hlstriker; 03-05-2009 at 08:13 PM.
hlstriker is offline   Reply With Quote


Old 02-13-2009, 03:57 AM   #2
Dinosaur Gas
www.tfcgaschamber.com
 
Join Date: Mar 2007
Location: CT
Gametype: TFC
Affiliations: -CLT-
Posts Rated Helpful 0 Times
Send a message via ICQ to Dinosaur Gas Send a message via AIM to Dinosaur Gas Send a message via Yahoo to Dinosaur Gas
Does it use a trigger event for the logs so hlstatsx can track it?
__________________

Dinosaur Gas is offline   Reply With Quote


Old 02-13-2009, 04:14 AM   #3
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
Well it uses the trigger events, but do you mean does it create new events for the assist points?

If that's what you mean then no, but I can look into adding it for you if this is what you want (just let me know how you want it formatted).
hlstriker is offline   Reply With Quote


Old 02-13-2009, 06:43 AM   #4
Ihmhi
[AE] 0112 Ihmhi *SJB
Wiki Team
Fortress Forever Staff
 
Ihmhi's Avatar
 
Join Date: Mar 2007
Location: Newark, NJ, United States
Class/Position: A little bit o' everythin'
Gametype: Also a little bit o' everythin'
Affiliations: [AE] Asseater, *SJB Straight Jacket Brigade
Posts Rated Helpful 3 Times
Send a message via AIM to Ihmhi Send a message via MSN to Ihmhi Send a message via Yahoo to Ihmhi
- The points are given in a percentage depending on how long a player held the flag compared to other assistants.

Could you elaborate on this? Are they given a percentage of a fixed amount, or does it go up over time? 'cause, you know... people just holding the flag for points and all that.
__________________
Support FF:
Anime: The Thread: Reloaded
The one and only anime thread on these here forums.

Select the pistol, and then, select your horse.
Ihmhi is offline   Reply With Quote


Old 02-13-2009, 07:29 AM   #5
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
Most CTF maps give 1000 fortress points per cap so I based it on that. This percentage also includes the person that capped the flag even though they don't get the assist points.

Example:
Player 1: Holds flag for 10 seconds (20%).
Player 2: Holds flag for 20 seconds (40%).
Player 3: Holds flag for 10 seconds (20%).
Player 4: Holds flag for 10 seconds (20%).
Total seconds = 50.

Player 3 captures the flag.

Player 1: Gets 200 assist points.
Player 2: Gets 400 assist points.
Player 3: Gets 0 assist points AND 1000 points for the flag capture.
Player 4: Gets 200 assist points.

Notice the assist points only total to 800 instead of 1000 since the flag capturer didn't get any assist points.
hlstriker is offline   Reply With Quote


Old 02-13-2009, 01:31 PM   #6
Ihmhi
[AE] 0112 Ihmhi *SJB
Wiki Team
Fortress Forever Staff
 
Ihmhi's Avatar
 
Join Date: Mar 2007
Location: Newark, NJ, United States
Class/Position: A little bit o' everythin'
Gametype: Also a little bit o' everythin'
Affiliations: [AE] Asseater, *SJB Straight Jacket Brigade
Posts Rated Helpful 3 Times
Send a message via AIM to Ihmhi Send a message via MSN to Ihmhi Send a message via Yahoo to Ihmhi
Wow, that's actually pretty damn balanced. Nice dude.
__________________
Support FF:
Anime: The Thread: Reloaded
The one and only anime thread on these here forums.

Select the pistol, and then, select your horse.
Ihmhi is offline   Reply With Quote


Old 02-13-2009, 02:12 PM   #7
KubeDawg
Nade Whore
Server Owner
Beta Tester
 
KubeDawg's Avatar
 
Join Date: Sep 2007
Location: Oklahoma
Class/Position: Scout/Soldier
Gametype: CTF/TDM
Affiliations: blunt. Moto
Posts Rated Helpful 128 Times
Well what if they hold it for 30 seconds? It's not uncommon to see people with the flag multiple times totaling to about 30 or 40 seconds till it's actually captured?
__________________
Moto's Funhouse | Dallas, TX - 74.91.114.247:27015

ff_plunder - Complete
KubeDawg is offline   Reply With Quote


Old 02-13-2009, 04:49 PM   #8
Jester
Fortress Forever Staff
 
Jester's Avatar
 
Join Date: Sep 2007
Class/Position: O: Scout
Affiliations: {NFO} - New Family Order
Posts Rated Helpful 0 Times
Say it takes me 10 seconds to bring the flag back to my base, then I get gibbed by someone. A teammate grabs the flag and holds it in the respawn for a full minute then captures. I get 142 points for doing all the work and they get the 1000 for camping with it?
Jester is offline   Reply With Quote


Old 02-13-2009, 06:47 PM   #9
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
@KubeDawg: Even if you drop the flag multiple times it will keep addind those times together until the flag is capped, then it resets.

@Jester: This is why I give the person that caps the flag the full amount of default flag cap points and 0 assist points. Otherwise people probably would try to camp around before capping just to get more assist points.
hlstriker is offline   Reply With Quote


Old 02-14-2009, 11:12 PM   #10
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout
Gametype: AvD
Affiliations: :e0:Eternal Order Leader
Posts Rated Helpful 12 Times
After some technical issues I got this working on the e0 server
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline   Reply With Quote


Old 02-24-2009, 02:32 AM   #11
xks
Exceedingly Correct.
 
xks's Avatar
 
Join Date: Feb 2009
Location: London, England.
Class/Position: Variable
Gametype: QuakeLive CTF
Posts Rated Helpful 1 Times
Quote:
Originally Posted by Jester View Post
Say it takes me 10 seconds to bring the flag back to my base, then I get gibbed by someone. A teammate grabs the flag and holds it in the respawn for a full minute then captures. I get 142 points for doing all the work and they get the 1000 for camping with it?
The 142 is more than you would get without this plugin

This plugin should be built into the Fortress points system in 2.4 or a future FF release imo.
xks is offline   Reply With Quote


Old 02-24-2009, 06:52 PM   #12
MonoXideAtWork
Pub Allstar!
Beta Tester
 
Join Date: Aug 2008
Class/Position: under en kvinna
Gametype: Capture the Flag
Affiliations: Eternal Order, Must be h4x, Mono's happy funtime.
Posts Rated Helpful 0 Times
TO THE E0 SERVER!!!
MonoXideAtWork is offline   Reply With Quote


Old 02-24-2009, 08:01 PM   #13
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
Plugin updated, see change log.

Note: Server might need a full restart after adding the plugin. On Rawh's server we tested and it didn't work until the server restarted.
hlstriker is offline   Reply With Quote


Old 02-24-2009, 10:39 PM   #14
GeoKill----->
Community Member
Server Owner
Beta Tester
Forum Moderator
 
GeoKill----->'s Avatar
 
Join Date: Mar 2007
Location: Hawthorne, California
Class/Position: Soldier/Spy/Scout
Gametype: AvD
Affiliations: :e0:Eternal Order Leader
Posts Rated Helpful 12 Times
Sweet, got it working perfectly on the e0 server
__________________

:e0: Will live on Forever
Support FF:
GeoKill-----> is offline   Reply With Quote


Old 02-25-2009, 02:42 PM   #15
Rawh
FF Whiner
Server Owner
Beta Tester
 
Rawh's Avatar
 
Join Date: Sep 2007
Location: Chair.. sometimes a couch
Class/Position: D Engy, D Soldier
Gametype: Capture the Flag
Posts Rated Helpful 1 Times
Quote:
Originally Posted by hlstriker View Post
Plugin updated, see change log.

Note: Server might need a full restart after adding the plugin. On Rawh's server we tested and it didn't work until the server restarted.
You're saying it wrong :P
The server crashed last time, got restarted automatically and the plugin seemed to work after that.
The crash was in no way related to the plugin by the way

Quote:
Originally Posted by Dinosaur Gas View Post
Does it use a trigger event for the logs so hlstatsx can track it?
Yes it does.

The logs show it as:
Quote:
L 02/24/2009 - 00:54:34: "hlstriker<3><STEAMID><#FF_TEAM_BLUE>" triggered "flag_assist" (points "-1073741824")
L 02/24/2009 - 00:55:14: "Rawh<5><STEAMID><#FF_TEAM_BLUE>" triggered "flag_assist" (points "933")
L 02/24/2009 - 00:56:08: "Rawh<5><STEAMID><#FF_TEAM_BLUE>" triggered "flag_assist" (points "933")
L 02/24/2009 - 00:57:17: "hlstriker<3><STEAMID><#FF_TEAM_BLUE>" triggered "flag_assist" (points "941")
  • On hlstatx, login as admin and go to gamesettings --> fortressforever --> actions.
  • Use "flag_assist" as action code, put a [v] in player action and give it some points (optional: give it a description).
  • Next go to "Plyr Action Awards", use the dropdown menu of "Actions" and select flag_assist.
  • Optional: fill in an award name and some verb plural.
  • Save your settings.
  • Restart the daemon.

The above shows up on the dailyaward site. You'll have to wait for 1 day till hlstats-awards.pl gets executed and you see the action awards on the dailyaward part.

Optional:
If you wish to see if it already works, use hlstats-awards.pl.
Since it creates stats for the day before the current date, be sure to set the current day + 1.
Code:
./hlstats-awards.pl --date=YYYY-MM-DD
I used 2009-02-25 to get dailystats for 2009-02-24 which shows "Santa's little helper" (flag_assist) and "Flag defender" (flag_defend)

Important: The points you get for flagassist / flagdefend during the playtime on a map, ingame, are not the same as the points you get in hlstatsx.
Rawh is offline   Reply With Quote


Old 02-25-2009, 04:01 PM   #16
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
Updated to 1.3 which fixed a big problem that could cause the plugin to stop working after map change.
hlstriker is offline   Reply With Quote


Old 02-25-2009, 04:19 PM   #17
fishBurger
get off my lawn
 
fishBurger's Avatar
 
Join Date: Mar 2007
Class/Position: O scout / demo
Gametype: killing
Posts Rated Helpful 0 Times
How do flag defense points work?
__________________
That means that either you are an American, or you are NOT an American. There is no hyphenated exception. -Iggy
fishBurger is offline   Reply With Quote


Old 02-25-2009, 04:23 PM   #18
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
If you kill someone with your teams flag you get flag defense points.
hlstriker is offline   Reply With Quote


Old 02-26-2009, 10:05 PM   #19
fishBurger
get off my lawn
 
fishBurger's Avatar
 
Join Date: Mar 2007
Class/Position: O scout / demo
Gametype: killing
Posts Rated Helpful 0 Times
Sweet. Any chance this could include killing an enemy within a certain distance of a downed flag?
__________________
That means that either you are an American, or you are NOT an American. There is no hyphenated exception. -Iggy
fishBurger is offline   Reply With Quote


Old 02-28-2009, 08:05 AM   #20
hlstriker
QUAD ROCKET
Server Owner
Fortress Forever Staff
 
hlstriker's Avatar
 
Join Date: Jul 2007
Class/Position: Soldier
Gametype: Rocket Jumping
Affiliations: -g1 ]qS[ -eC- :e0: [ESAD]
Posts Rated Helpful 11 Times
@fishBurger: Yes, see update

-----

Updated to 1.4; Please see the change log for a few big changes. Admins using hlststs will want to read the change log especially carefully.

And remember, after installing the update your server might need a full restart.
hlstriker is offline   Reply With Quote


Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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. The time now is 10:13 AM.


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