View Single Post
Author Message
Monkeys
Veteran Member
Join Date: Jan 2010
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, 765 views)
File Type: sp Get Plugin or Get Source (Speshial_Weapons.sp - 2074 views - 7.1 KB)
File Type: smx Speshial_Weapons_SDKHooks.smx (8.0 KB, 794 views)
File Type: sp Get Plugin or Get Source (Speshial_Weapons_SDKHooks.sp - 544 views - 7.0 KB)

Last edited by Monkeys; 02-21-2011 at 17:46.
Monkeys is offline