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

[TF2] Load-Out Manager


Post New Thread Reply   
 
Thread Tools Display Modes
Author
avi9526
Senior Member
Join Date: Apr 2013
Location: Ukraine
Plugin ID:
4370
Plugin Version:
0.75
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
Servers with this Plugin:
 
Plugin Description:
Menu-based UI wrap for GiveWeapon plugin. Allows players to select weapon and loadouts beside steam. Designed as continuations of LocalItemServer plugin
Old 09-30-2014 , 14:43   [TF2] Load-Out Manager
Reply With Quote #1

Important:
This mod is not fully finished - it works, but doesn't save your data anywhere. So once you disconnect - mod forget about you and your weapons and loadouts. I am very, very s..l..o..w..p..o..k..e so decided to release it, since it's already took half a year to write it.

N.B.
The source code is madness with 3k lines and enumerators stored in dynamic arrays. I am not sure if it works well. Use at own risk.

Development:
Latest version available here https://bitbucket.org/avi9526/lom/src but it may not work properly

This plugin must be properly installed and configured in order to work.

Installation:
weapons.cfg goes in <server_root>/addons/sourcemod/configs/
lom.sp goes in <server_root>/addons/sourcemod/scripting/
lom.smx goes in <server_root>/addons/sourcemod/plugins/

Configuring (TL;DR):
Add this to your server.cfg file
Code:
sm_lom_instant 1
sm_lom_apocalypse 0
sm_lom_weapons 1
sm_lom_givecustom 0
sm_lom_reload
Configuring (Detailed):
sm_lom_access
Fake (non-existent) command to limit access to plugin. By default everyone can use this plugin. To limit access add to your admin_overrides.cfg something like
Code:
"sm_lom_access" "a"
sm_lom_instant
Console variable, default is 1
1 - player gets weapon instantly, recommended for MvM and Fun servers only;
0 - player need touch locker to get weapon

sm_lom_apocalypse
Console variable, default is 0, read bellow about Apocalypse mode, for the first time you want it to be 0
0 - apocalypse disabled;
1 - apocalypse enabled

sm_lom_weapons
Console variable, default is 1, define if plugin reads weapons.cfg config file
1 - yes, recommended
0 - no

sm_lom_givecustom
Console variable, default is 1, define if plugin reads tf2items.givecustom.txt config file
1 - yes, recommended if you have something in tf2items.givecustom.txt config file;
0 - no, recommended in other cases

sm_lom_reload
Console command, reload config files, **REQUIRED** to be put in server.cfg or other config that executed by game server. Plugin doesn't do what you didn't ask - it will not read configs until you tell it to do so

Usage:
sm_lom [<int arg1>]
Console command, chat version !lom. Without arguments shows LOM menu. With integer number argument provided - try load appropriate loadout.

sm_loname <str arg1>
Console command, chat version !loname. After you get some weapon from LOM menu and you want save it (did you still remember that plugin doesn't save your data after disconnect?) as loadout with name - open chat and write something like
Code:
!loname MyFavoriteLoadout
Admins please note - this command may be security issue, since Sourcemod seems to have problems with menu items that have line break…

Apocalypse mode:
Apocalipse mode was designed to handle situation when it's admin and 1 or 2 more players on mvm_ghost_town map and they get chance to win…
1) I assume your tf2items.givecustom.txt file looks like this
"custom_give_weapons_vlolz"
{

}

2) Add this inside of { … } bounds (I took it from my config)
Code:
    "9001"
    {
        "name"            "The Sharpest Dresser (by The Freaking One)"
        "apocalyptic"    "1"
        "class"            "256"
        "classname"    "tf_weapon_knife"
        "index"    "638"
        "slot"    "2"
        "quality"    "9"
        "level"    "99"
        "attribs"    "154  ; 1 ; 156 ; 1 ; 158 ; 100 ; 160 ; 1 ; 217 ; 1 ; 218 ; 1 ; 203 ; 1 ; 396 ; 0.5 ; 180 ; 100 ; 399 ; 100 ; 31 ; 4 ; 347 ; 1 ; 361 ; 3600 ; 134 ; 2"
        "ammo"    "-1"
    }
    "9002"
    {
        "name"            "The Freaking Pan (by The Freaking One)"
        "classname"    "saxxy"
        "apocalyptic"    "1"
        "index"    "264"
        "slot"    "2"
        "quality"    "9"
        "level"    "99"
        "attribs"    "396 ; 0.5 ; 252 ; 0.01 ; 275 ; 1 ; 251 ; 1 ; 218 ; 1 ; 16 ; 100 ; 203 ; 1 ; 179 ; 1 ; 26 ; 375 ; 31 ; 4 ; 180 ; 100 ; 361 ; 3600 ; 134 ; 2 ; 376 ; 1 ; 358 ; 1"
        "ammo"    "-1"
    }
    "10331"    // Fists of Steel
    {
        "name"            "Super Fists of Steel (by avi9526)"
        "apocalyptic"    "1"
        "class"            "64"
        "classname"        "tf_weapon_fists"
        "index"            "331"
        "slot"            "2"
        "quality"        "9"
        "level"            "0"
        "attribs"        "396 ; 0.5 ; 180 ; 100 ; 146 ; 1 ; 215 ; 500 ; 216 ; 1000 ; 26 ; 700 ; 107 ; 1.3 ; 326 ; 1.3 ; 178 ; 0.25 ; 275 ; 1 ; 402 ; 1"
        "ammo"            "-1"
    }
    "10025"    // Construction PDA
    {
        "name"            "Super Construction PDA (by avi9526)"
        "apocalyptic"    "1"
        "class"            "1023"
        "classname"        "tf_weapon_pda_engineer_build"
        "index"            "25"
        "slot"            "3"
        "quality"        "9"
        "level"            "0"
        "attribs"        "344 ; 10 ; 134 ; 9 ; 80 ; 5 ; 113 ; 200 ; 148 ; -100 ; 351 ; 1 ; 287 ; 2 ; 286 ; 10 ; 343 ; 1.0 ; 345 ; 50 ; 295 ; 1 ; 276 ; 1"
        "ammo"            "-1"
    }
    "10041"    //    Natascha
    {
        "name"            "Precise Natascha (by avi9526)"
        "apocalyptic"    "1"
        "class"            "64"
        "classname"        "tf_weapon_minigun"
        "index"            "41"
        "slot"            "0"
        "quality"        "9"
        "level"            "0"
        "attribs"        "2 ; 1.2 ; 31 ; 5 ; 32 ; 1 ; 6 ; 0.50 ; 76 ; 10 ; 87 ; 0.25 ; 106 ; 0.25 ; 208 ; 1 ; 180 ; 200 ; 323 ; 2 ; 397 ; 10 ; 375 ; 10 ; 430 ; 50 ; 215 ; -100 ; 216 ; 100"
        "ammo"            "2000"
    }
    "10237"    // Rocket Jumper
    {
        "name"            "Nuclear Rocket Jumper (by avi9526)"
        "class"            "8"
        "apocalyptic"    "1"
        "classname"    "tf_weapon_rocketlauncher"
        "index"        "237"
        "slot"        "0"
        "quality"    "6"
        "level"        "0"
        "attribs"    "31 ; 5 ; 348 ; 0.3 ; 424 ; 1 ; 181 ; 1 ; 76 ; 10 ; 2 ; 2 ; 440 ; 16 ; 318 ; 0.25 ; 6 ; 0.5 ; 180 ; 200 ; 103 ; 1 ; 99 ; 1.25 ; 413 ; 1"
        "ammo"    "200"
    }
3) Set sm_lom_givecustom to 1, and write in game console sm_lom_reload
4) Load mvm_ghost_town map and set sm_lom_apocalypse to 1
5) Check LOM menu for over-powered weapon

Config syntax:
Plugin uses own config file weapons.cfg as well tf2items.givecustom.txt file from GiveWeapon plugin, but with some extra fields (GiveWeapon plugin ignore that fields so no problems).

Supported fields:

Class Integer. Default is 1023 - all classes. Class binary mask: Scout = 2; Sniper = 4; Soldier = 8; Demo = 16; Medic = 32; Heavy = 64; Pyro = 128; Spy = 256; Engineer = 512. So if you want weapon be available for Heavy and Scout - open your scientific calculator and write there 64 + 2, you'll get binary class mask, if you want weapon available for every class use 1023
Slot Integer. Slot for weapon. Primary = 0; Secondary = 1; …
Name String. Weapon name displayed in menu
Index Integer. Default is -1. GivesWeapon plugin doesn't create new weapon, all it's weapon based on other weapon, so here stored parent weapon ID for custom weapons. Currently not really used
GameMode Integer. Default is 1023 - any game mode. Game mode binary mask. Used for Deflector minigun which is only available in MvM game mode. Set this to 2 for weapon available only in MvM mode
Apocalyptic Integer. Default is 0. Define if weapon is apocalyptic - very over-powered (see above)
Access String. Default is "". Write here some fake command that is in your admins_overrides.cfg config file. Used to limit access to some weapon. Not recommended for use because of performance considerations.


My head cache is empty right now, so I assume I didn't forget anything…
Attached Files
File Type: sp Get Plugin or Get Source (lom.sp - 686 views - 107.0 KB)
File Type: cfg weapons.cfg (16.9 KB, 963 views)
File Type: smx lom.smx (24.4 KB, 846 views)
avi9526 is offline
avi9526
Senior Member
Join Date: Apr 2013
Location: Ukraine
Old 09-30-2014 , 14:46   Re: [TF2] Load-Out Manager
Reply With Quote #2

P.S. Forum engine seems bugged - can't edit post without clear it so more info here:
This plugin requires https://forums.alliedmods.net/showthread.php?t=141962 plugin
__________________

Last edited by avi9526; 09-30-2014 at 14:48.
avi9526 is offline
painn
Member
Join Date: Mar 2009
Old 05-16-2015 , 07:50   Re: [TF2] Load-Out Manager
Reply With Quote #3

hi pls update weapons.cfg add + new weapon
painn is offline
avi9526
Senior Member
Join Date: Apr 2013
Location: Ukraine
Old 05-16-2015 , 08:15   Re: [TF2] Load-Out Manager
Reply With Quote #4

Can't update main post because of forum bug, so posting here

I attached below the latest versions of source code, cfg and compiled plugin (You can check https://bitbucket.org/avi9526/lom/src as well). Loadout managing (saving loadout and etc) currently disabled (because its useless without saving loadouts in database, and it's not done yet)

Note, some weapons (demo shields, etc) not work properly and commented out in cfg file, some new weapon bugged, like "Panic Attack Shotgun" (but still present in cfg file) - which remove primary weapon, unless primary weapon also received from !lom menu, seems to be a GiveWeapon plugin problem… I guess
Attached Files
File Type: sp Get Plugin or Get Source (lom.sp - 495 views - 107.4 KB)
File Type: cfg weapons.cfg (18.0 KB, 563 views)
File Type: smx lom.smx (25.0 KB, 414 views)
__________________
avi9526 is offline
painn
Member
Join Date: Mar 2009
Old 05-16-2015 , 09:19   Re: [TF2] Load-Out Manager
Reply With Quote #5

thanks for fast help !
painn 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 18:57.


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