View Single Post
Author Message
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 09-25-2010 , 21:06   [TF2Items] Randomizer (v1.591, 08/11/2013)
Reply With Quote #1


(Image Credit: KelpPlankton)


Gamedata link: https://gist.github.com/FlaminSarge/...cd964848446fef


You will need the latest TF2Items: https://builds.limetech.io/?p=tf2items

This is [TF2] Randomizer (http://forums.alliedmods.net/showthread.php?t=98127) remade using asherkin's TF2Items extension.
When enabled, players are set as a random class with random weapons, which re-roll upon being killed.
This randomizer, however, is able to give all the weapons, not just the few ones that have unique weapon classnames.


CVARS - default values in parentheses
Spoiler

COMMANDS (Admin only)
Spoiler


COMMANDS (For everyone, not just admins)
  • tf2items_rnd_loadout - Displays your current items again, prints them to chat, and opens a menu showing the stats of any custom weapons you have.
  • sm_myloadout - same as tf2items_rnd_loadout
  • sm_myweps - same as tf2items_rnd_loadout, so tell your users to use /myweps or !myweps in chat.
Installation (SM1.5+)
1) Install TF2Items and TF2Attributes (links are elsewhere in this post, it might do some good to take the time to find them).
1b) Optionally install SteamTools (search for it!) to automatically change the game description (in the server browser) when Randomizer is enabled (as per the cvar).
2) Place tf2items_randomizer.smx in tf/addons/sourcemod/plugins/
3) Place tf2items.randomizer.txt from here in tf/addons/sourcemod/gamedata/
4) Restart the server if you want to be absolutely sure things load properly.

Download the .smx file rather than clicking 'Get Plugin'.
Compile requirements: tf2items.inc file from TF2Items' download package, as well as tf2attributes.inc from TF2Attributes. If you want the SteamTools Game Description feature, compile with steamtools.inc too.

Voting:
If you have the "Custom Votes" plugin installed on your server, you can use the tf2randomizer.vote.cfg with it (put in addons/sourcemod/configs/customvotes folder) to add a vote for it (chat trigger is /voterandomizer).

If you want visible weapons, and you have SDKHooks and Attachables installed, https://forums.alliedmods.net/showthread.php?p=1374048

Models for the Rebel's Curse and Khopesh Climber:
https://forums.alliedmods.net/showpost.php?p=1338489&postcount=2

Crashes?
If your server crashes due to a UTIL_SetModel issue, try installing https://github.com/FlaminSarge/tf_sa...elfix/releases

Notes
Spoiler


Changelog
Spoiler

Known Bugs
*Ammo is set correctly when the weapon is given, but when players pick up ammo boxes, the ammo sets to what the class normally would get from the pack. Sorta-fixed, actually, for the most part, though you might see some strangeness occasionally.

*Not really a bug, but I left in a lot of the old randomizer code including the ammo fixes (they're commented out).

*Blutsauger health loss is not a glitch, it is it's normal nerf. It needs the -2 hp per second for balance. Get moving!

*Be wary of using plugins that force player class, such as Zombie Fortress. While this plugin defers class changes to other plugins, and should not crash, please let me know if it does.

Credits
Spoiler


Where can I try this out before I install it?
These servers are running with this mode enabled, though some may be modified versions.

...
This was my first public plugin. Things are bound to be turrible.
Attached Files
File Type: cfg tf2randomizer.vote.cfg (370 Bytes, 9288 views)
File Type: smx tf2items_randomizer.smx (96.5 KB, 11114 views)
File Type: sp Get Plugin or Get Source (tf2items_randomizer.sp - 4431 views - 333.2 KB)
File Type: zip rndmodelcrashfix.zip (2.2 KB, 1095 views)
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 12-24-2017 at 02:33.
FlaminSarge is offline