Raised This Month: $32 Target: $400
 8% 

[TF2] Nightfire: Assassination (v1.1.2.48, 20/10/11)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
x6herbius
Senior Member
Join Date: May 2011
Location: West Sussex, UK
Plugin ID:
2490
Plugin Version:
1.1.2.48
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Team deathmatch; the assassin must eliminate the target to gain points for his team.
    Old 08-12-2011 , 18:27   [TF2] Nightfire: Assassination (v1.1.2.48, 20/10/11)
    Reply With Quote #1





    Note: I now have a Tumblr detailing mods/maps/projects and development updates on this plugin will be posted there. Go check it out if that's your thing.

    If you put the mod on your server, let me know and I'll update this post with the server IP.

    Download newest version at the bottom of this post. Full changelog is also located at the bottom.

    Latest changes:

    Code:
    - Changed verbose debug to be enabled via nfas_debug (default 0) rather than requiring a plugin recompile.
    - - Different debug messages will be output to the server console depending on the value of nfas_debug. The ConVar value is taken as a bitflag value: simply add together the values of the debug flags you wish to log information for and put the total value into the ConVar. To see the different possible flag values in the console, use the nfas_debugflags command.
    - Added admin commands nfas_assassin and nfas_target for changing the assassin or target. They can be used in the following ways:
    - - Typing nfas_assassin/target in the console (or preceded by ! or / in chat), followed by either a user ID or a player name, will attempt to assign the assassin/target as that player. If specifying a player name, enclose it in speech marks: "Player Name". Passing no argument will bring up a menu from which a player can be chosen.
    - - If the player who will become the assassin is on the same team as the current target then the target will be chosen as a new random player, or vice-versa. Points are not awarded to any team when the assassin or target is forcibly changed.
    Older versions:

    v1.1.1.46: http://www.mediafire.com/?k70g47k8fkktqc4
    v1.1.0.45: http://www.mediafire.com/?mpdi6m9rbgr4o8h
    v0.1.1.43: http://www.mediafire.com/?zs8ptram7knvxqo
    v0.1.0.40: http://www.mediafire.com/?2ot9a62y4x91s85

    Scoring

    As the original Assassination mode was free-for-all, this team-based version has slightly different scoring rules. If the assassin kills the target, his team gains at base 10 points (by default), and this score value is then modified by other factors: which weapon was used, headshot/backstab bonuses, etc. The target gains at base 7 points for his team when he kills the assassin, and this is modified in the same way. Every time an ordinary player on the assassin's team kills an enemy, they gain the team one point. When one team reaches the maximum point limit, the game is won.

    Installation instructions

    If you have an older version where the first version number is 0 (eg. v0.1.1.43), YOU WILL NEED TO DELETE Assassination.smx from the addons/sourcemod/plugins directory, as the newer version has a renamed plugin file and this older file will not be overwritten. It is also recommended that you delete the "assassination" folder's contents from the materials folder and delete the old files "nfas_rockslide.bsp" and "nfas_rockslide.nav" from the maps folder before updating to this version, as these files are no longer needed.

    Download the plugin files from the attachment section at the bottom of this post and extract to orangebox/tf, keeping the file structure intact. The plugin currently has no external dependencies. You can also download Rockslide, a small map I built to test the plugin, from http://www.mediafire.com/?k4781uzu7e14g7k.

    I have also written a plugin that will manage deathmatch-style random spawns on maps. Certain smaller maps such as koth_nucleus work well with the Assassination mode and eliminate the need for players to download a custom map.

    Notes
    • A temporary Ubercharge is applied when players spawn, but this can be disabled if a different spawn protection plugin is desired.
    • The assassin player is granted mini-crits; the target player takes half damage, by default, from ordinary players.
    • If the assassin is a Medic, points will be awarded if the assassin assists in killing the target. Heal targets will also be granted mini-crits.

    Future plans
    • Flesh out the help system and have it display to a client when they connect.
    • Display the client's point modifiers for their weapons when they spawn.
    • Add natives and forwards for further functionality extension.
    • Code exceptions for Spies (eg. not change the Assassin if the Spy's death is fake, disable the assassin buff when the Spy is cloaked, etc.).

    If you find any bugs, give me any errors that are thrown up along with what was happening when the bug occurred and I'll get to work on it.

    Console variables
    • nfas_version - Plugin version.
    • nfas_debug (default 0) - Holds the bitflag value for debug messages that should be output to the server console. See nfas_debugflags for more information.
    • nfas_enabled (default 1) - Enables or disables the plugin. Changing this while in-game will restart the map.
    • nfas_target_damage_modifier (default 0.5) - If the target is hurt by an ordinary player, they will only take this fraction of the damage (between 0.1 and 1).
    • nfas_spawn_protection_length (default 3.0) - How long, in seconds, a player is protected from damage after they spawn.
    • nfas_kill_target_score (default 10) - The base amount of points the assassin gets for killing the target.
    • nfas_kill_assassin_score (default 7) - The base amount of points the target gets for killing the assassin.
    • nfas_headshot_multiplier (default 2.0) - Score multiplier for headshots. Applied on top of the weapon modifier.
    • nfas_backstab_multiplier (default 3.0) - Score multiplier for backstabs. Applied on top of the weapon modifier.
    • nfas_reflect_multiplier (default 2.0) - Score multiplier for reflected projectiles. Applied on top of the weapon modifier.
    • nfas_sentry_level1_multiplier (default 2.0) - Score multiplier for level 1 sentries.
    • nfas_sentry_level2_multiplier (default 1.0) - Score multiplier for level 2 sentries.
    • nfas_sentry_level3_multiplier (default 0.5) - Score multiplier for level 3 sentries.
    • nfas_telefrag_multiplier (default 4.0) - Score multiplier for telefrags.
    • nfas_score_max (default 100) - When this score is reached, the round will end.
    • nfas_medic_assist_score_modifier (default 0.5) - If a Medic gains points from an assist on a target kill, the points awarded will be multiplied by this value.
    • nfas_colours_custom (default 0) - If 1, the assassin and target will be coloured according to custom ConVars instead of using their team's colour.
    • nfas_colour_assassin_red (default 255) - Red value of the colour to tint the assassin.
    • nfas_colour_assassin_green (default 0) - Green value of the colour to tint the assassin.
    • nfas_colour_assassin_blue (default 0) - Blue value of the colour to tint the assassin.
    • nfas_colour_target_red (default 0) - Red value of the colour to tint the target.
    • nfas_colour_target_green (default 0) - Green value of the colour to tint the target.
    • nfas_colour_target_blue (default 255) - Blue value of the colour to tint the target.

    Configuration
    In the scripts folder of the plugin zip file, there is a file called weaponmodifiers.txt. This file contains the item definition indices and modifier values of the weapons you want to modify scores. The comments inside the file are self-explanatory.

    Thanks to FlaminSarge for giving me a bit of code that fixed the round mistakenly ending in a stalemate.

    Changelog
    Code:
    v1.1.2.48 - 20/10/11
    - Changed verbose debug to be enabled via nfas_debug (default 0) rather than requiring a plugin recompile.
    - - Different debug messages will be output to the server console depending on the value of nfas_debug. The ConVar value is taken as a bitflag value: simply add together the values of the debug flags you wish to log information for and put the total value into the ConVar. To see the different possible flag values in the console, use the nfas_debugflags command.
    - Added admin commands nfas_assassin and nfas_target for changing the assassin or target. They can be used in the following ways:
    - - Typing nfas_assassin/target in the console (or preceded by ! or / in chat), followed by either a user ID or a player name, will attempt to assign the assassin/target as that player. If specifying a player name, enclose it in speech marks: "Player Name". Passing no argument will bring up a menu from which a player can be chosen.
    - - If the player who will become the assassin is on the same team as the current target then the target will be chosen as a new random player, or vice-versa. Points are not awarded to any team when the assassin or target is forcibly changed.
    
    v1.1.1.46 - 05/09/11
    - Fixed a bug where the assassin or target would not re-assign properly if a player was connecting to the server but had not yet entered the game.
    - - Safeguarded code a little more from future bugs of the same nature.
    - Added the functionality again that, if the Medic is the assassin and they assist a target kill, points are granted.
    - - Added the ConVar nfas_medic_assist_score_modifier (default 0.5) to control what percentage of points are awarded.
    - Added the functionality for the assassin and target to be tinted user-defined colours.
    - - ConVar nfas_colours_custom enables user-defined colours if set to 1.
    - - ConVars nfas_colour_assassin_red, nfas_colour_assassin_green, nfas_colour_assassin_blue, nfas_colour_target_red, nfas_colour_target_green and nfas_colour_target_blue hold the RGB values to tint for each player.
    
    v1.1.0.45 - 04/09/11
    - Re-structured the plugin to help fix assassin and target assignment issues.
    - Assassin and target sprites have now been replaced by the assassin and target being coloured the same colour as their team.
    - The following ConVars have been removed:
    - - nfas_target_los_priority (Didn't provide much useful functionality.)
    - - nfas_target_colour (Colour now applied automatically.)
    - - nfas_sprites_always_visible (No longer needed.)
    - - nfas_target_kill_penalty (Over-complicated gameplay.)
    - - nfas_assassin_damage_modifier (Unsure whether the damage modifier function works as desired.)
    - The plugin now disables any objective entities on the map, to be used in conjunction with the Deathmatch spawn plugin at https://forums.alliedmods.net/showthread.php?p=1535887
    
    v0.1.1.43 Beta - 14/08/11
    - Removed the redundant "nfas_sprite_alpha" ConVar.
    - Relocated all sprite management to OnGameFrame; hopefully this should be more robust now.
    - Stopped sprites from attaching themselves to the assassin or target if that player is a spectator.
    - Fixed the round always ending in a stalemate.
    - - Currently toggles sv_cheats; I'm looking into how to manipulate the flags on the mp_forcewin command.
    - Fixed the buffed conditions flashing occasionally.
    - Modified the "too few players" chat notification slightly.
    - Edited the code that handles when players join and leave teams to be more robust.
    
    In the works:
    - An admin command to allow the assassin or target to be changed by an admin.
    - Switching the current env_sprite_oriented system to one that uses particle effects instead, so the indicator is not visible to the player it is attached to.
    
    v0.1.0.40 Beta - 12/08/11
    - Initial release.
    Get the nfas_rockslide_2 map file here: http://www.mediafire.com/?k4781uzu7e14g7k
    Source VMF for the map (NOT the playable file) is in the attachments section of this post. The compiled map file was too big to be uploaded directly to the forum.
    Attached Files
    File Type: zip nfas_rockslide_2.zip (130.8 KB, 342 views)
    File Type: zip NightfireAssassination_v1.1.2.48.zip (178.6 KB, 481 views)
    File Type: sp Get Plugin or Get Source (NightfireAssassination.sp - 1052 views - 114.0 KB)

    Last edited by x6herbius; 11-18-2011 at 05:45. Reason: Added link to development blog.
    x6herbius is offline
    Send a message via Skype™ to x6herbius
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 08-12-2011 , 18:46   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #2

    This looks pretty interesting, i'll surely try it. :]
    Drixevel is offline
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 08-12-2011 , 21:45   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #3

    We have a test server up and people seem to like it. I'm gonna switch out my old gamemode for this mode and see how the server does.

    To connect to it: 173.234.60.50:27017

    A few bugs have been found, the signs above peoples heads are very annoying to some players, sometimes the signs stick on some players that aren't announced as the assassin or target and sometimes they have both signs but aren't on the list and at other times, nobody is chosen for like a number of kills for either one so it's a bit scattered everywhere. Not too sure if that's how the gamemode works but eh, those are some bugs.

    Also:
    Code:
    L 08/12/2011 - 21:03:52: [SM] Native "ShowSyncHudText" reported: Client 4 is not in-game
    L 08/12/2011 - 21:03:52: [SM] Displaying call stack trace for plugin "Assassination.smx":
    L 08/12/2011 - 21:03:52: [SM]   [0]  Line 1853, C:\Users\Jonathan\Documents\SourceMod Scripts\Assassination\Assassination.sp::UpdateHUDMessages()
    L 08/12/2011 - 21:03:52: [SM]   [1]  Line 1944, C:\Users\Jonathan\Documents\SourceMod Scripts\Assassination\Assassination.sp::TimerHUDRefresh()
    L 08/12/2011 - 21:03:52: [SM] Native "ShowSyncHudText" reported: Client 4 is not in-game
    L 08/12/2011 - 21:03:52: [SM] Displaying call stack trace for plugin "Assassination.smx":
    L 08/12/2011 - 21:03:52: [SM]   [0]  Line 1853, C:\Users\Jonathan\Documents\SourceMod Scripts\Assassination\Assassination.sp::UpdateHUDMessages()
    L 08/12/2011 - 21:03:52: [SM]   [1]  Line 1944, C:\Users\Jonathan\Documents\SourceMod Scripts\Assassination\Assassination.sp::TimerHUDRefresh()
    L 08/12/2011 - 21:03:52: [SM] Native "ShowSyncHudText" reported: Client 4 is not in-game
    L 08/12/2011 - 21:03:52: [SM] Displaying call stack trace for plugin "Assassination.smx":
    L 08/12/2011 - 21:03:52: [SM]   [0]  Line 1853, C:\Users\Jonathan\Documents\SourceMod Scripts\Assassination\Assassination.sp::UpdateHUDMessages()
    L 08/12/2011 - 21:03:52: [SM]   [1]  Line 1944, C:\Users\Jonathan\Documents\SourceMod Scripts\Assassination\Assassination.sp::TimerHUDRefresh()

    Last edited by Drixevel; 08-12-2011 at 22:05.
    Drixevel is offline
    sejin513
    AlliedModders Donor
    Join Date: Dec 2008
    Location: ._.
    Old 08-13-2011 , 03:59   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #4

    Quote:
    [*]When one team wins the match, the game automatically ends in a stalemate. This is some strange bug to do with ending the round with a game_round_win (despite me using the correct settings). This does not affect the plugin gameplay.
    you should try 'mp_forcewin' command for ending round
    sejin513 is offline
    x6herbius
    Senior Member
    Join Date: May 2011
    Location: West Sussex, UK
    Old 08-13-2011 , 04:46   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #5

    Quote:
    Originally Posted by r3dw3r3w0lf View Post
    the signs above peoples heads are very annoying to some players, sometimes the signs stick on some players that aren't announced as the assassin or target and sometimes they have both signs but aren't on the list and at other times, nobody is chosen for like a number of kills for either one so it's a bit scattered everywhere. Not too sure if that's how the gamemode works but eh, those are some bugs.
    Seems like there might still be a few problems with the logic then. I have a feeling it's probably due to connections/disconnections not being handled as they should. Unfortunately it's something that's quite difficult to test with bots, but I'll have a look around.

    Do you know what it is specifically that's annoying about the icons? The ones in use now are pretty new (I was using a different design before) and I know they're not as easy to distinguish by a long shot as the old ones were. My friend who made them has sent me updated ones, so I'll stick them in with the next update. I'll give the mp_forcewin thing a shot too.

    Oh, and if anyone's interested in helping translate the language files that's always appreciated.
    x6herbius is offline
    Send a message via Skype™ to x6herbius
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 08-13-2011 , 06:15   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #6

    Take your time, the mod works fine a fair bit and players seem to enjoy it. :]

    As for what's annoying about the icons, specifically not involving the bugs where they appear on random players when they are neither the assassin or target, they get in your face when you move backwards and they just hang above your head plus they are a bit big but i guess they need to be big to be seen. :] That's the reports i've gotten from other users.
    Drixevel is offline
    x6herbius
    Senior Member
    Join Date: May 2011
    Location: West Sussex, UK
    Old 08-13-2011 , 06:40   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #7

    I'm thinking that it might be a better idea to use particle systems instead of sprites as they'd be more flexible. There may even be the option for a particle system not to display to a certain player (the wearer), but I'll look into it.

    This morning I've re-written the sprite code so that it's all handled in OnGameFrame, hopefully making it more robust. I'll have a knock about this afternoon and also check on the connections/disconnections as much as I can.
    x6herbius is offline
    Send a message via Skype™ to x6herbius
    Drixevel
    AlliedModders Donor
    Join Date: Sep 2009
    Location: Somewhere headbangin'
    Old 08-13-2011 , 06:57   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #8

    ok, sounds good. Thanks. :]
    Drixevel is offline
    pheadxdll
    AlliedModders Donor
    Join Date: Jun 2008
    Old 08-13-2011 , 08:38   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #9

    You otta use the particle effects that dueling players have above their head. You can parent them so you won't have to deal with "terribad" method of teleporting them on every frame.

    Also, upload that .zip, if you can, and attach it to your post.
    __________________
    pheadxdll is offline
    x6herbius
    Senior Member
    Join Date: May 2011
    Location: West Sussex, UK
    Old 08-13-2011 , 09:12   Re: [TF2] Nightfire: Assassination (BETA v0.1.0.40, 12/08/11)
    Reply With Quote #10

    Zip uploaded.

    The sprite code that I looked at (credited in the top post) does actually parent the sprites, but then teleports them anyway. I thought this might have been because the parenting didn't work correctly. In any case, I'll look at the properties of the dueling particles and see if I can work something out.

    In other news, the OnGameFrame method of managing the sprites seems to be spamming the console with precache errors. I'm currently looking into it.

    EDIT: Never mind, somehow the materials had got corrupted on my client computer. It's fixed again.

    EDIT2: Just realised the sprites in the version on this page are still attached to spectators, explaining why they hover in the air sometimes.

    Last edited by x6herbius; 08-13-2011 at 13:36.
    x6herbius is offline
    Send a message via Skype™ to x6herbius
    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 00:13.


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