AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2Items] Randomizer (v1.591, 08/11/2013) (https://forums.alliedmods.net/showthread.php?t=139069)

FlaminSarge 09-25-2010 21:06

[TF2Items] Randomizer (v1.591, 08/11/2013)
 
75 Attachment(s)
Take a look at https://github.com/FortyTwoFortyTwo/Randomizer for a rewrite of this plugin.

http://web.archive.org/web/201102230...mizerSmall.png
(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.

ummja 09-26-2010 19:40

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
Installed on my server just about 10 mins ago. Not working.

I have the items extension too, it's a no go.

ummja 09-26-2010 19:54

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
Nevermind sir, it works perfectly! I apologise for the confusion...

I'm sadly a complete dumb shit and copy everything but the .smx file. :(

Nice one mate.

FlaminSarge 09-26-2010 21:21

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
Awesome. Also, feel free to request custom items to add, as I can code those in. If anybody can help, I can convert the hardcoded arrays of weapons into a keyvalues file that lets users include their own weapons and choose which they want.

ummja 09-26-2010 22:45

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
Only thing I can POSSIBLY ask of you is to add this to the admin menu (to call a vote for randomizer or not) because often I run a server without it on and if I can set a flag for my admins / donators to call a randomizer vote I will probably kiss the ground you walk upon.

But yeah bud, you did damn good.

EDIT: Sir, I don't think I can stress the importance to me if you could get that vote thing done built into the admin menu...

It'd be preferred if you could work it into the admin menu but a chat trigger would suffice too.

Once again, you did amazing with this mod, but if it is possible I BEG you to do this for me.

FlaminSarge 09-27-2010 01:55

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
I'm not sure how to add vote options into the plugin itself (looking at Melee Only plugin to figure out) but you can use this: http://forums.alliedmods.net/showthread.php?p=633808
to set up a custom vote for Randomizer on or off. Here's what I came up with to put in the "configs/customvotes/tf2itemsrandomizer.vote.cfg" for that plugin (automatically goes into the voting commands section of admin menu):
Code:

"tf2items_randomizer"
{
    "title"        "Turn TF2Items Randomizer {!tf2items_rnd_enabled|onoff}?"
    "type"          "onoff"
    "admin"            "sm_vote"
    "cmd"          "tf2items_rnd_enabled #1"
    "params"
    {
        "1"        "onoff"
    }
}

I highly suggest you read the instructions for the plugin, as I came up with the above config in about two minutes and it might not be right.

EDIT: Also in 0.9 (still testing!) I improved some stuff, added a /tf2items_rnd_enable command to set the tf2items_rnd_enabled cvar to 1 (as well as ..._disable for 0).
If the tf2items_rnd_fix_spy cvar is at 2, you won't undisguise if you attack with sapper or the Disguise kit or Bonk! or Crit a cola or Sandvich or Dalokohs. Please remind me of anything else that doesn't attack to add to this "safe list".
I also tried fixing ubers, but I have not tested that yet, so that's why 0.9 is still in testing :3

ummja 09-27-2010 07:08

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
Okay sir, thanks very much.

Unfortunately, I'm off to work right now. I'll test v0.9 the second I get home.

In case you want to see how your mod runs I'll give you the server IP and you can join me.

Regis 09-27-2010 14:16

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
Did you manage to bypass the invisible weapons?

failhorse 09-27-2010 15:17

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
I'm getting this error, otherwise no problems.
Code:

[SM] Unable to load plugin "tf2items_randomizer.smx": Native "TF2_AddCondition" was not found
Running sourcemod 1.3.2 and mm 1.9.0dev

Tried refreshing, and pure 0 based off search suggestions.

Inflikted 09-27-2010 15:24

Re: [TF2Items] Randomizer (v0.8, 09/25/2010)
 
Quote:

Originally Posted by failhorse (Post 1310075)
I'm getting this error, otherwise no problems.
Code:

[SM] Unable to load plugin "tf2items_randomizer.smx": Native "TF2_AddCondition" was not found
Running sourcemod 1.3.2 and mm 1.9.0dev

Tried refreshing, and pure 0 based off search suggestions.

update your sourcemod to the newest one should fix that.


All times are GMT -4. The time now is 15:23.

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