AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] Custom Backpack Viewer (https://forums.alliedmods.net/showthread.php?t=250700)

Dr. McKay 10-29-2014 00:41

[TF2] Custom Backpack Viewer
 
[TF2] Custom Backpack Viewer

v1.1.3

Description:
Implements the !bp (and !backpack) command which is ubiquitous across TF2 trade servers, but allows players to customize their viewer preference with the !settings menu. By default it supports Backpack.tf, Bazaar.tf, Steam, TF2B, and TF2Items.

You can add your own viewers if your preference isn't already implemented. The backpack_viewer.txt file (which goes under /addons/sourcemod/data) defines the available viewers. If you wish to customize it, copy it to /addons/sourcemod/configs first or else it may be overwritten when you update the plugin. Each viewer is defined in a section like this:

Code:

"internalname" // The internal name of the viewer, used in the backpack_viewer_default cvar and the client's cookie
{
    "name"    "Viewer Name" // The displayed name of the viewer
    "url"    "http://example.com/backpack/{ID}" // The URL to open. {ID} will be replaced with the target's Steam ID, {NAME} will be replaced with the target's name, and {SERVER_IP} will be replaced with the server's IP (or anonymous if backpack_viewer_allow_tracking is off)
    "idtype"  "3" // The type of Steam ID to replace {ID} with
}

Valid values for idtype are 0 (the format shown in the status command), 1 (STEAM_0:0:23071901 format), 2 ([U:1:46143802] format), and 3 (76561198006409530 format).

This plugin requires SourceMod version 1.6.3 or later.

Commands:
sm_backpack - View the backpack of the player named in the command arguments, or the player you're aiming at. Opens a menu if no match.
sm_bp - Same as above

Cvars:
backpack_viewer_version - plugin version
backpack_viewer_auto_update (default 1) - enables automatic updating (has no effect if Updater is not installed)
backpack_viewer_default (default "backpacktf") - the default viewer to use for clients who haven't customized their preference (value should be the internal name of one of the available viewers)
backpack_viewer_allow_tracking (default 1) - if enabled, your server's IP will be sent to backpack viewer sites if the site being used is configured to receive it. No built-in viewers are configured to receive your server IP, so this is mainly for a custom viewer you might have for your community.

The internal names of the built-in viewers are backpacktf, bazaar, steam, tf2b, and tf2items.

Installation:
Extract backpack_viewer.zip, upload its contents to your /addons/sourcemod directory, and reboot your server or type "sm plugins load backpack_viewer" into your console or rcon.

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

Changelog:
  • v1.0.0 (10/29/12)
    • Initial release

Download Plugin (backpack_viewer.zip)

ddhoward 10-29-2014 00:41

Re: [TF2] Custom Backpack Viewer
 
Completely awesome.

EDIT: I'm not sure that any exist, but are there plans to support sites that may modify the steam ID's in such a way? For example, a site that replaces STEAM_0:0:23071901 with STEAM_0_0_23071901, or a site that may change [U:1:46143802] to something like U_1_46143802 ?

Dr. McKay 10-29-2014 00:47

Re: [TF2] Custom Backpack Viewer
 
Quote:

Originally Posted by ddhoward (Post 2217222)
Completely awesome.

EDIT: I'm not sure that any exist, but are there plans to support sites that may modify the steam ID's in such a way? For example, a site that replaces STEAM_0:0:23071901 with STEAM_0_0_23071901, or a site that may change [U:1:46143802] to something like "U_1_46143802".

Forgive me if this makes no sense at all, as I have no idea how regular expressions work, but such a thing seems like it would be a good job for regex?

I see no reason to support sites that don't exist.

Dr. McKay 10-29-2014 11:44

Re: [TF2] Custom Backpack Viewer
 
I released version 1.1.0. The only change is that the built-in TradeRep viewer (which is owned by myself) receives your server's IP for use in analytics. You can disable this feature by turning off backpack_viewer_allow_tracking.


All times are GMT -4. The time now is 18:26.

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