Raised This Month: $51 Target: $400
 12% 

Projectile Replacer


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Plugin ID:
3000
Plugin Version:
1.1
Plugin Category:
Fun Stuff
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    9 
    Plugin Description:
    Replaces the model on a projectile
    Old 06-08-2012 , 22:26   Projectile Replacer
    Reply With Quote #1

    Requirements: SDKHooks

    Why should I use this?
    1. There are many projectile replacers appearing as new plugins recently. Far too many. This plugin can replace any projectile type with any model.
    2. This plugin doesn't use OnGameFrame to check every projectile model every frame. Instead, it sets the projectile model just once when it spawns.

    This plugin reads addons/sourcemod/data/projectile_replacer.cfg on every map change. A sample configuration file is attached to this post. The sample configuration file replaces the standard Soldier rocket with either a toy frog or a cow cutout, chosen randomly.

    Plugin Cvars:
    tpr_version - The plugin version.
    tpr_enabled (def 1) - Set to 0 to disable the plugin.

    Admin Commands
    tpr_reload - Reload the Projectile Replacer configuration file. Requires Config admin access (flag i) by default.

    Due to requiring SDKHooks, the Get Plugin link doesn't work.

    Tested on TF2 with the default configuration file.
    Attached Files
    File Type: cfg projectile_replacer.cfg (149 Bytes, 996 views)
    File Type: sp Get Plugin or Get Source (projectile_replacer.sp - 1089 views - 5.1 KB)
    File Type: smx projectile_replacer.smx (5.1 KB, 783 views)
    File Type: zip projectile_replacer_1.1.zip (8.2 KB, 1008 views)
    __________________
    Not currently working on SourceMod plugin development.

    Last edited by Powerlord; 06-09-2012 at 21:43. Reason: Updated to 1.1 (which removes extra diagnostic messages)
    Powerlord is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 06-08-2012 , 22:30   Re: Projectile Replacer
    Reply With Quote #2

    Examples

    TF2
    Cow Launcher:
    Code:
    	"tf_projectile_rocket"
    	{
    		"1"	"models/props_2fort/cow001_reference.mdl"
    	}
    G-Man Jarate

    Code:
    	"tf_projectile_jar"
    	{
    		"1"	"models/gman.mdl"
    	}
    Bird Launcher
    Code:
    	"tf_projectile_rocket"
    	{
    		"1"	"models/props_forest/bird.mdl"
    	}
    What it can't do:
    Eye Rocket Replace. Projectile Replacer currently replaces all instances of a projectile, and apparently Monoculus's rocket is a standard tf_projectile_rocket. Perhaps a later version will let players opt in/out of this behavior.

    Having said that, you can replace the standard rocket with Monoculous's rocket:

    Code:
    	"tf_projectile_rocket"
    	{
    		"1"	"models/props_halloween/eyeball_projectile.mdl"
    	}
    If you want to use a custom model, you must get players to download it and its other model/material files first. I recommend using SM File/Folder Downloader and Precacher for this purpose. List of valid TF2 projectile classes coming soon.
    __________________
    Not currently working on SourceMod plugin development.

    Last edited by Powerlord; 06-08-2012 at 22:53.
    Powerlord is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: ☠☠☠
    Old 06-08-2012 , 22:32   Re: Projectile Replacer
    Reply With Quote #3

    Um, THANK you.
    ReFlexPoison is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 06-08-2012 , 22:34   Re: Projectile Replacer
    Reply With Quote #4

    Oh, I added a zip file in case you don't want to have to figure out where the .cfg file goes.
    __________________
    Not currently working on SourceMod plugin development.
    Powerlord is offline
    Sreaper
    髪を用心
    Join Date: Nov 2009
    Old 06-08-2012 , 23:53   Re: Projectile Replacer
    Reply With Quote #5

    Nice plugin! Thanks! Can it also be made to alter their sounds like Eye-Rocket Replace? Or are player weapon sounds played client-side?

    Also, how do I get the [thread] tag to work? It's linking to t=1717310 when it should be linking to p=1717310...

    Last edited by Sreaper; 06-09-2012 at 00:06.
    Sreaper is offline
    CuriousG
    Senior Member
    Join Date: Feb 2012
    Old 06-09-2012 , 04:17   Re: Projectile Replacer
    Reply With Quote #6

    Can you use this to replace the Army of One from Randomizer with say the Nuke rocket in Dodgeball?
    CuriousG is offline
    AeroAcrobat
    AlliedModders Donor
    Join Date: Apr 2011
    Location: lives in a circus
    Old 06-09-2012 , 05:17   Re: Projectile Replacer
    Reply With Quote #7

    this is great, thanks!
    suggestion: be able to give only for example players with "flags" "a" the custom projectile.
    __________________
    AeroAcrobat is offline
    ReFlexPoison
    ☠☠☠
    Join Date: Jul 2011
    Location: ☠☠☠
    Old 06-09-2012 , 18:12   Re: Projectile Replacer
    Reply With Quote #8

    Hmm, may want to do something about the constant spamming of "Spawned Model: Model."
    ReFlexPoison is offline
    11530
    Veteran Member
    Join Date: Sep 2011
    Location: Underworld
    Old 06-09-2012 , 18:25   Re: Projectile Replacer
    Reply With Quote #9

    This is pretty great. Along with my Projectile Particles plugin I'll be releasing soon, this'll be good fun!
    __________________
    11530 is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 06-09-2012 , 20:26   Re: Projectile Replacer
    Reply With Quote #10

    Quote:
    Originally Posted by AeroAcrobat View Post
    this is great, thanks!
    suggestion: be able to give only for example players with "flags" "a" the custom projectile.
    +1
    Mitchell 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 15:08.


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