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

[HL2DM] Speshial Weapons Mod


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Monkeys
Veteran Member
Join Date: Jan 2010
Plugin ID:
1575
Plugin Version:
1.3
Plugin Category:
Gameplay
Plugin Game:
Half-Life 2 Deathmatch
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Weapons get additional effects other than damage
    Old 03-30-2010 , 22:16   [HL2DM] Speshial Weapons Mod
    Reply With Quote #1

    I noticed how little plugins actually change gameplay on HL2DM other than RP servers, so I decided to make one.

    All the plugin does is add additional effects to your weaponry.

    The plugin has only one cvar, sm_swm_version, to follow up on it.
    Right now, it's version 1.3

    Put the plugin in the normal folder and add the swm_effects.txt in a folder named /data/ in that same position (if it doesn't exist, make one).

    This file gets updated automaticly by sm_swm_seteffect, but if you'd change it manually on an active server (o_O') the changes would take effect after map change.

    Commands and ConVars:

    sm_swm_seteffect <weapon name> <effect name>
    Sets the effect for that certain weapon and saves it to the config file.
    sm_swm_enabled <bool:1/0>
    Enables/Disables the plugin's effects. Map change is required for the effects to stop/start.
    Currently supported effects:

    Normal
    Removes all effects.
    Blind
    Blinds the player.
    Stop
    Disables movement.
    Slow
    Slows the player to 30~% of his normal speed (60.0).
    Daze
    Confuses the player by blurring his sight.
    Disoriëntation
    Disoriëntates the player. Changes his sight randomly.
    Speed
    Speeds the player up to 2x normal speed (380.0).
    Bump
    Launches the player into the air.
    Disarm
    Removes all weapons from the player.
    GGSwitch
    Switches the player's weapon to gravity gun.
    Fly
    Allows the player to fly. (No no-clip, he's still affected by gravity, but can defy it ;p)
    Drain
    Deals and extra 3 damage, which gets healed on the person attacking


    The plugin starts off with no effects set in the config. I suggest adding the positive buffs to the strong weapons and the negative buffs to the weaker ones.

    You can use sm_swm_seteffect to set the weapons.
    Some examples could be:
    Code:
    sm_swm_seteffect "weapon_crossbow" "speed"
    sm_swm_seteffect "weapon_crowbar" "slow"
    sm_swm_seteffect "weapon_357" "fly"
    sm_swm_seteffect "weapon_pistol" "daze"
    sm_swm_seteffect "weapon_ar2" "bump"
    sm_swm_seteffect "weapon_physcannon" "normal"
    If you have suggestions for effects, feel free to spout them!

    Change log
    v1.0
    Original release.
    v1.1
    *It now saves and loads from a file which effects it should use.
    *Giving a wrong weapon or effect will default to crowbar and 0 (normal) now. This also means that mods with different weapon names will cause the effect of crowbar to be applied when hurt by it.
    *Convar for enabling/disabling. The actual change will take place on map change.
    v1.2
    *Changed the swm_effects file to show actual names rather than numbers.
    v1.3
    *Rewrote the plugin to be a bit cleaner, hopefully removing some bugs.
    *Added the Drain effect.


    (I am aware it's spelled special. I'm just a bit speshial.)


    I also attached a SDKHooks version. Use this version to add effects to weapons that do no damage, like weapon_annabelle.
    This does require the extension to be installed aswell, though.
    Attached Files
    File Type: txt swm_effects.txt (310 Bytes, 763 views)
    File Type: sp Get Plugin or Get Source (Speshial_Weapons.sp - 2069 views - 7.1 KB)
    File Type: smx Speshial_Weapons_SDKHooks.smx (8.0 KB, 792 views)
    File Type: sp Get Plugin or Get Source (Speshial_Weapons_SDKHooks.sp - 543 views - 7.0 KB)

    Last edited by Monkeys; 02-21-2011 at 17:46.
    Monkeys is offline
    GrossKopf
    Senior Member
    Join Date: Jun 2007
    Old 05-16-2010 , 21:53   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #2

    I added this to my server.cfg:

    sm_swm_toggleeffects
    sm_swm_seteffect weapon_physcannon slow

    but it didn't seem to do anything. Am I missing something?
    GrossKopf is offline
    noodleboy347
    AlliedModders Donor
    Join Date: Mar 2009
    Old 05-17-2010 , 01:16   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #3

    It's 'special' not 'speshial', unless that's a pun
    noodleboy347 is offline
    StrikerMan780
    AlliedModders Donor
    Join Date: Jul 2009
    Location: Canada
    Old 05-24-2010 , 21:21   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #4

    Quote:
    Originally Posted by GrossKopf View Post
    I added this to my server.cfg:

    sm_swm_toggleeffects
    sm_swm_seteffect weapon_physcannon slow

    but it didn't seem to do anything. Am I missing something?
    Not sure, but perhaps specifying your effects first, then toggling them after might work.
    StrikerMan780 is offline
    Monkeys
    Veteran Member
    Join Date: Jan 2010
    Old 06-04-2010 , 17:52   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #5

    Might be that physcannon won't be triggered properly, seeing as the prop kills the person.
    Sorry for the very late response, but I didn't sub to my own thread :/ Shame on me.
    Monkeys is offline
    azgag
    Junior Member
    Join Date: Jun 2009
    Old 07-22-2010 , 23:54   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #6

    your cvars don't work...

    Code:
    sm_swm_seteffect weapon_<name> <effect>
    sm_swm_toggleeffects
    More like this:
    Code:
    sm_seteffect weapon_<name> <effect>
    sm_toggleeffects 0/1
    =====================================

    Code:
    sm_swm_seteffect weapon_357 speed
    sm_swm_seteffect weapon_crossbow fly
    sm_swm_seteffect weapon_shotgun normal
    sm_swm_seteffect weapon_ar2 bump
    sm_swm_seteffect weapon_rpg speed
    sm_swm_seteffect weapon_smg1 daze
    sm_swm_seteffect weapon_pistol disorient
    sm_swm_seteffect weapon_slam disarm
    sm_swm_seteffect weapon_physcannon slow
    sm_swm_seteffect weapon_stunstick blind
    sm_swm_seteffect weapon_crowbar blind
    More like this:
    Code:
    sm_seteffect weapon_357 speed
    sm_seteffect weapon_crossbow fly
    sm_seteffect weapon_shotgun normal
    sm_seteffect weapon_ar2 bump
    sm_seteffect weapon_rpg speed
    sm_seteffect weapon_smg1 daze
    sm_seteffect weapon_pistol disorient
    sm_seteffect weapon_slam disarm
    sm_seteffect weapon_physcannon slow
    sm_seteffect weapon_stunstick blind
    sm_seteffect weapon_crowbar blind
    azgag is offline
    Monkeys
    Veteran Member
    Join Date: Jan 2010
    Old 07-23-2010 , 10:49   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #7

    Quote:
    Originally Posted by azgag View Post
    your cvars don't work...

    Code:
    sm_swm_seteffect weapon_<name> <effect>
    sm_swm_toggleeffects
    More like this:
    Code:
    sm_seteffect weapon_<name> <effect>
    sm_toggleeffects 0/1
    =====================================

    Code:
    sm_swm_seteffect weapon_357 speed
    sm_swm_seteffect weapon_crossbow fly
    sm_swm_seteffect weapon_shotgun normal
    sm_swm_seteffect weapon_ar2 bump
    sm_swm_seteffect weapon_rpg speed
    sm_swm_seteffect weapon_smg1 daze
    sm_swm_seteffect weapon_pistol disorient
    sm_swm_seteffect weapon_slam disarm
    sm_swm_seteffect weapon_physcannon slow
    sm_swm_seteffect weapon_stunstick blind
    sm_swm_seteffect weapon_crowbar blind
    More like this:
    Code:
    sm_seteffect weapon_357 speed
    sm_seteffect weapon_crossbow fly
    sm_seteffect weapon_shotgun normal
    sm_seteffect weapon_ar2 bump
    sm_seteffect weapon_rpg speed
    sm_seteffect weapon_smg1 daze
    sm_seteffect weapon_pistol disorient
    sm_seteffect weapon_slam disarm
    sm_seteffect weapon_physcannon slow
    sm_seteffect weapon_stunstick blind
    sm_seteffect weapon_crowbar blind
    I just noticed I wrote sm_seteffect for when you write a wrong amount of arguements, but I did register it as sm_swm_seteffect, though.
    But in retrospect, I should take this down, never got around to fixing the gravity gun bug and it's fairly poorly coded.
    I'll release a new one. I'll post here when I do.
    __________________
    Get a lid on that zombie,
    he's never gonna be alri-i-ight.
    Oooh get a lid on that zombie,
    or he's gonna feed all night.
    Monkeys is offline
    azgag
    Junior Member
    Join Date: Jun 2009
    Old 07-23-2010 , 11:06   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #8

    I noticed that this doesn't work on everymaps
    on dm_overwatch it doesn't work and on dm_lockdown, it does...
    But this plugin is pretty nice, if you need testing pm me.

    What gravity gun are u talking about? when i set the physcanon to "slow" it does work.
    azgag is offline
    Monkeys
    Veteran Member
    Join Date: Jan 2010
    Old 07-23-2010 , 11:08   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #9

    Quote:
    Originally Posted by azgag View Post
    I noticed that this doesn't work on everymaps
    on dm_overwatch it doesn't work and on dm_lockdown, it does...
    But this plugin is pretty nice, if you need testing pm me
    Thanks, this working on some maps could explain some of the errors.
    You'll be the first to know if I need testing ;) (My test server is down :'( )
    __________________
    Get a lid on that zombie,
    he's never gonna be alri-i-ight.
    Oooh get a lid on that zombie,
    or he's gonna feed all night.
    Monkeys is offline
    Monkeys
    Veteran Member
    Join Date: Jan 2010
    Old 07-23-2010 , 14:10   Re: [HL2DM] Speshial Weapons Mod
    Reply With Quote #10

    Alright, uploaded a changed version.
    Default the plugin will be on. All changeable variables will be set on map start.
    Only sm_swm_seteffects updates during gameplay.

    Some notes: You need to save the swm_effects file in the correct location, or plugin will start a failstate.
    No need to set the effects anymore when the plugin has started. It now saves them.
    Unidentified weapons (for example, kills using a custom point_hurt) will default to the crowbar weapon.

    Effects can stack, but will also overwrite on certain parts.
    A slow effect followed by a stop effect will completely remove the slow effect.
    Vice versa aswell.
    But a slow effect and a fly effect won't allow you to go fly at normal speed. You'll have the flying ability, but the speed of slow will still be applied. Your color will be of the latest applied effect. As will your screen effect.
    I made it this way to allow some interesting tactics to sprout.

    One bug I foresee right now is quickswitching.
    Weapons with a delayed effect (slams, grenades) will have the effects of the weapons equipped at the time of damage, not of the weapon used.
    This is due to player_hurt not having the weapon event variable.
    And I didn't want to have a SdkHooks dependency on such a small plugin.


    Edit: I know it has one warning: Attacker never used, but I left this variable in for future compatibility/expanding. At one point, I might've added an effect on the shooter rather than the hurtee
    __________________
    Get a lid on that zombie,
    he's never gonna be alri-i-ight.
    Oooh get a lid on that zombie,
    or he's gonna feed all night.

    Last edited by Monkeys; 07-23-2010 at 14:15.
    Monkeys is offline
    Reply



    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 19:13.


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