AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Enhanced Item Notifications (https://forums.alliedmods.net/showthread.php?t=250916)

Dr. McKay 11-02-2014 03:53

[TF2] Enhanced Item Notifications
 
[TF2] Enhanced Item Notifications

v1.1.0

Description:
Combines multiple item notifications for the same item into one. Anyone who runs or has been on a trade server knows the pain:

https://www.doctormckay.com/screensh...11-02_0352.png

With this plugin, this becomes:

https://www.doctormckay.com/screensh...11-02_0351.png

Parses and uses the game's localization files, so it's fully localized and future-proof (barring any big Valve changes such as a new acquisition method, which will simply display as "has found" until an update is released) and there aren't any translation files to keep track of.

Cvars:
enhanced_items_version - plugin version
enhanced_items_auto_update (default 1) - enables automatic updating (has no effect if Updater is not installed)

Installation:
Put enhanced_items.smx into /addons/sourcemod/plugins and reboot your server or type "sm plugins load enhanced_items" into your console or rcon. Drag, drop, and forget. There's nothing to configure.

Auto Update:
Install Updater. The plugin will be auto-updated according to your Updater settings. It'll work without Updater.

Changelog:
  • v1.1.0 (7/26/15)
    • Fixed unicode issues in names with special characters
    • Painted weapons are now ignored and use the default game messages
    • Plugin now only intercepts and rewrites methods which can contain multiple items of the same type
  • v1.0.0 (11/2/14)
    • Initial release

Download Plugin (enhanced_items.smx)
View Source (enhanced_items.sp)

King Cnut 11-02-2014 06:56

Re: [TF2] Enhanced Item Notifications
 
That's pretty slick. Good work!

Chdata 11-02-2014 07:14

Re: [TF2] Enhanced Item Notifications
 
That is

should be part of tf2

Mike4Told 11-02-2014 08:16

Re: [TF2] Enhanced Item Notifications
 
This is awesome! Thank you Doctor!

Wliu 11-02-2014 09:01

Re: [TF2] Enhanced Item Notifications
 
Wow, really nice.

Sreaper 11-02-2014 11:14

Re: [TF2] Enhanced Item Notifications
 
Good plugin. I wonder why it's not already implemented into the game.

Skyrider 11-02-2014 11:23

Re: [TF2] Enhanced Item Notifications
 
Awesome! Installed :D

ClassicGuzzi 11-02-2014 12:30

Re: [TF2] Enhanced Item Notifications
 
I love this kind of plugins, this is simple, awesome and future-proof. It's one of those plugins that will never leave my servers, thanks!

ddhoward 11-03-2014 15:13

Re: [TF2] Enhanced Item Notifications
 
Would it be possible to include the crate series # in the notification?

http://i.imgur.com/gHmmzPf.png

Dr. McKay 11-03-2014 23:47

Re: [TF2] Enhanced Item Notifications
 
Quote:

Originally Posted by ddhoward (Post 2219757)
Would it be possible to include the crate series # in the notification?

http://i.imgur.com/gHmmzPf.png

No, the item_found event only gives a defindex. It doesn't give any attributes.

ddhoward 11-04-2014 01:45

Re: [TF2] Enhanced Item Notifications
 
Gah, I assumed that the plugin was able to distinguish between crates of differing series, as the guy in my screencap happened to be traded 2 munition crates of one series, 2 of another, 1 of another, and 1 of another. I guess he was just spamming J or something, and the numbers just happened to match what he was traded as if they were being grouped by series. http://i.imgur.com/5eGQgnt.png

ddhoward 11-13-2014 18:28

Re: [TF2] Enhanced Item Notifications
 
Without this plugin:
http://i.imgur.com/mLoumaS.png

With this plugin:
http://i.imgur.com/yHJZZ5D.png

Any chance of a fix? :3

404UserNotFound 11-13-2014 19:11

Re: [TF2] Enhanced Item Notifications
 
Dr. McKay, I love your plugins. Every time I see something new from you, it's amazing. Keep it up!

pyroprotectme 11-14-2014 08:02

Re: [TF2] Enhanced Item Notifications
 
Nice idea. Thank you.

Fearts 11-16-2014 18:29

Re: [TF2] Enhanced Item Notifications
 
Instead of replacing all the chat messages would it be better to only replace the ones that could possibly stack?

Traded
Found
Received a gift

Dr. McKay 11-16-2014 23:50

Re: [TF2] Enhanced Item Notifications
 
Quote:

Originally Posted by Fearts (Post 2225154)
Instead of replacing all the chat messages would it be better to only replace the ones that could possibly stack?

Traded
Found
Received a gift

Not sure what that would accomplish.

Fearts 11-17-2014 17:58

Re: [TF2] Enhanced Item Notifications
 
Quote:

Originally Posted by Dr. McKay (Post 2225215)
Not sure what that would accomplish.

I might be wrong but I'm pretty sure your method doesn't display as much info as it could via the games.

For example unboxing kill streak kits. Last night I saw someone unboxing on my server with this on and it would only show: <Player> has unboxed: Kit instead of: <Player> has unboxed: Killstreak Shotgun Kit. And I just tested this myself with the plugin on/off and got a very strange result.

I unboxed 3 crate #83s. One with the plugin off and two with it on.

With it off I got: http://gyazo.com/e98ac80d023535c190d685b70723f05b

And with it on I unboxed 2 kill streak kits (shotgun and scatter gun) and it displayed no unbox message at all.

404UserNotFound 11-17-2014 18:39

Re: [TF2] Enhanced Item Notifications
 
I noticed that too. Some messages appear to be missing such as earning/crafting.

Fearts 11-21-2014 00:00

Re: [TF2] Enhanced Item Notifications
 
Would be nice if you don't want to remove stuff completely just adding a cvar for each case so we can turn on/off the ones we want. Something like this:

sm_enhanced_items_cases "0,1,2,3,4" //Case numbers here will print new enhanced messages for that case type.

sm_valve_message_cases "5,6,7,8,9" //Case numbers here will use Valve's default messages.

Code:

       
        case 0: strcopy(token, maxlen, "Item_Found");
        case 1: strcopy(token, maxlen, "Item_Crafted");
        case 2: strcopy(token, maxlen, "Item_Traded");
        case 3: strcopy(token, maxlen, "Item_Purchased"); // This event isn't triggered anymore
        case 4: strcopy(token, maxlen, "Item_FoundInCrate");
        case 5: strcopy(token, maxlen, "Item_Gifted");
        // 6 and 7 appear to be unused - they print nothing (unprinted acquisition method?)
        case 8: strcopy(token, maxlen, "Item_Earned");
        case 9: strcopy(token, maxlen, "Item_Refunded");
        case 10: strcopy(token, maxlen, "Item_GiftWrapped");
        // 11 through 14 appear to be unused - they print (null) on the client
        case 15: strcopy(token, maxlen, "Item_PeriodicScoreReward");
        case 16: strcopy(token, maxlen, "Item_MvMBadgeCompletionReward");
        case 17: strcopy(token, maxlen, "Item_MvMSquadSurplusReward");
        case 18: strcopy(token, maxlen, "Item_HolidayGift");
        // 19 is "received from the community market", but there's no translation token for it
        // If we wanted we could maybe use Item_Purchased but this also covers items that the player listed and has just removed the listing for
        case 20: strcopy(token, maxlen, "Item_RecipeOutput");
        default: strcopy(token, maxlen, "Item_Found"); // The game defaults to "found"

I don't think it would be that hard to do. Really my main issue at the moment is the unbox messages. Showing part of a item name or not showing a unbox message at all for some items is really unacceptable.

Dr. McKay 11-21-2014 00:43

Re: [TF2] Enhanced Item Notifications
 
Did you get any errors when you unboxed your stuff?

Fearts 11-21-2014 19:15

Re: [TF2] Enhanced Item Notifications
 
Quote:

Originally Posted by Dr. McKay (Post 2226570)
Did you get any errors when you unboxed your stuff?

I did check that and I got no errors. If you like I will unbox again on your server to show you.

Chdata 01-21-2015 00:50

Re: [TF2] Enhanced Item Notifications
 
Yeah, I also get situations where stuff like the Claidheam shows up broken ascii characters. No errors.

SM9 06-24-2015 19:54

Re: [TF2] Enhanced Item Notifications
 
Would this work in CSGO too?

Dr. McKay 06-24-2015 21:21

Re: [TF2] Enhanced Item Notifications
 
Quote:

Originally Posted by xCoderx (Post 2311687)
Would this work in CSGO too?

Probably not.

Dr. McKay 07-26-2015 02:13

Re: [TF2] Enhanced Item Notifications
 
Updated to 1.1.0.
  • Fixed unicode issues in names with special characters
  • Painted weapons are now ignored and use the default game messages
  • Plugin now only intercepts and rewrites methods which can contain multiple items of the same type

404UserNotFound 07-26-2015 12:10

Re: [TF2] Enhanced Item Notifications
 
Quote:

Originally Posted by Dr. McKay (Post 2324505)
Updated to 1.1.0.
  • Fixed unicode issues in names with special characters
  • Painted weapons are now ignored and use the default game messages
  • Plugin now only intercepts and rewrites methods which can contain multiple items of the same type

So this won't screw up the name of Killstreak Kits (replacing it with just "Killstreak Kit", causing everyone on the server to ask "What kind of KS kit?") and most other items anymore?

Dr. McKay 07-27-2015 14:27

Re: [TF2] Enhanced Item Notifications
 
Quote:

Originally Posted by abrandnewday (Post 2324663)
So this won't screw up the name of Killstreak Kits (replacing it with just "Killstreak Kit", causing everyone on the server to ask "What kind of KS kit?") and most other items anymore?

That can still happen if they traded for it.

404UserNotFound 07-27-2015 20:09

Re: [TF2] Enhanced Item Notifications
 
Quote:

Originally Posted by Dr. McKay (Post 2325141)
That can still happen if they traded for it.

Aww, crap in a hat.


All times are GMT -4. The time now is 22:55.

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