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

[TF2] Rebalanced Fortress 2 (v1.8.2 - 2019-22-01)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
JugadorXEI
AlliedModders Donor
Join Date: Jul 2017
Location: Spain
Plugin ID:
6217
Plugin Version:
1.8.2
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Change the balance of (almost) every weapon in TF2
    Old 08-03-2018 , 21:20   [TF2] Rebalanced Fortress 2 (v1.8.2 - 2019-22-01)
    Reply With Quote #1

    What's this?
    Rebalanced Fortress 2 is a simple yet powerful plugin that allows any server owner to modify the attributes of (almost) every item (and class) in Team Fortress 2 that's given to the player, including weapons, shields or even hats! If you think an item deserves more of the spotlight, or if you think a weapon is horribly broken, you will be able to change the attributes of such weapon to your heart's content. In addition, it's possible to add information related to those changes to let everyone know about what was changed.

    This is the public version of the plugin used by the Custom TF2 Weapons group for their Official Weapon Changes servers (which is why the release version is v1.43, as it was private before) and gives different sets of attributes to the official weapons of the game. In addition, it's also the successor of Balance Fortress 2, a plugin I also made myself.

    How does it work?
    A file, tf2rebalance_attributes.txt contained within the data folder, is the one that contains the changes you wish to add to the classes or weapons, which you can modify to your heart's content in case you wish to modify anything. When a player spawns, their weapon will be automatically replaced by the same one but with the attributes that were specified in the file. If a class was modified, then the attributes, if specified, will be added to such class as well and attributes given to classes will not stack or mesh with other classes' given attributes.

    Installation:
    The plugin's GitHub page can be seen here.
    The releases page can be seen here. (Latest version: 1.8.2)

    1. Please install TF2Items (and optionally TF2Attributes to add attributes into classes and make "sm_tfrebalance_changetimer" work better) and follow their respective installation instructions.
      • Optionally, if you wish to compile your own version of the plugin, you might want to have morecolors.inc as well.
    2. Get the latest release from the plugin's GitHub by clicking here and then clicking on the .zip file download (or, if you're upgrading, grab the plugin file (.smx) directly).
    3. Drop the "addons" folder from the .zip file into where your server's tf/ folder is.
    4. Change the map or load it manually by writing "sm plugins load tf2rebalance_jug" in the server's console.
      • If you wish to learn how to change a weapon's attributes and/or add attributes into a class, read the example file here.
    5. Done!

    Cvars and commands
    • Console variables:
      • sm_tfrebalance_enable (Default: "1"): Enables (1) or disables (0) the plugin.
      • sm_tfrebalance_logdependencies (Default: "1"): Should the lack of TF2Attributes be logged? 1 enables this, whereas 0 disables it instead.
      • sm_tfrebalance_firsttimeinfo (Default: "1"): Should the players, on their first spawn, be notified of the possibility of modified weapons and the commands to see such information? 1 enables this, whereas 0 disables it instead.
      • sm_tfrebalance_preserveattribsbydefault (Default: "0"): On file parsing, should the lack of a "keepattribs" key default to preserve (1) or not preserve (0) the attributes of the item?
      • sm_tfrebalance_changetimer (Default: "0"): If higher than zero, the weapon changes will apply after the time specified on the ConVar (example: "0.2"). This can be used to increase compatibility between plugins.
        • Warning: Due to certain HUDs, setting sm_tfrebalance_changetimer to be higher than zero can crash clients after a weapon is given. You are suggested to use sm_tfrebalance_changetimer alongside sm_tfrebalance_timer_onlybots being set to 1. Enable at your own risk.
      • sm_tfrebalance_timer_onlybots (Default: "0"): Indicates if sm_tfrebalance_changetimer should only affect bots.
      • sm_tfrebalance_bots_giveweapons (Default: "1"): Indicates if bots should be given changes to their weapons.
      • sm_tfrebalance_bots_applyclassattribs (Default: "1"): Should class changes apply to Bots?
      • sm_tfrebalance_botsmvm_giveweapons (Default: "0"): Indicates if MvM bots should have their weapons changed.
      • sm_tfrebalance_botsmvm_applyclassattribs (Default: "0"): Should class changes apply to MvM Bots?
      • sm_tfrebalance_debug_giveweapons (Default: "0"): Verbose debug mode that throws messages on the server console about what function is being used to give weapons, whose weapon is being parsed, if attributes are being kept, the index ID of the weapon, the ID of the attribute and the value of the attribute given.
      • sm_tfrebalance_debug_configfile (Default: "0"): Very verbose debug mode that displays on the server console what class or weapon is having attributes stored to for later usage for when a player spawns with such weapon or as such class.
    • Commands:
      • /tfrebalance_refresh (Root admin only): Parses tf2rebalance_attributes.txt again in case an item is in need of a hotfix, or for testing purposes.
      • /refreshweapon (Cheat flag): Can target players. Turns their currently-equipped weapons into the ones defined on the tf2rebalance_attributes.txt file (so if a player holds a Brass Beast without changes somehow, the command will give them the version that the plugin would give them by default).
        ---
      • /official (or /changes, or /change): Displays a menu that allows the player to see the information about their changed items and their class, if any.

    If you like this plugin and wish to see more like them, be sure to donate through my Ko-Fi page here. It's not required, but any amount helps and it's really appreciated.

    Thanks for reading and enjoy!
    __________________
    My github - Support me!
    Discord: JugadorXEI#8724 - Steam

    Last edited by JugadorXEI; 02-13-2019 at 10:31.
    JugadorXEI is offline
    heavyisgps
    Member
    Join Date: Aug 2018
    Old 08-23-2018 , 10:20   Re: [TF2] Rebalanced Fortress 2 (v1.43 - 2018-03-08)
    Reply With Quote #2

    Great plugin. I've been able to test my balance changes that I have worked on since 2011 and pitched to valve a few times when I visited them.

    As for testing purposes, I tried your mod along this one https://forums.alliedmods.net/showthread.php?t=287668 however this mod seems to give the bots the default unlock weapons and it ignores the attributes you set on the mod, however this does not apply to players ofcourse, only bots.

    Is this something you are able to fix or do I have to tinker with the other plugin?

    Or is this a limitation of the TF2Items dependency?

    Last edited by heavyisgps; 08-23-2018 at 10:27.
    heavyisgps is offline
    JugadorXEI
    AlliedModders Donor
    Join Date: Jul 2017
    Location: Spain
    Old 08-23-2018 , 10:55   Re: [TF2] Rebalanced Fortress 2 (v1.43 - 2018-03-08)
    Reply With Quote #3

    Thanks for mentioning this issue. What the plugin you posted does, based on the source code, is change the item definition index of the currently-equipped bot weapon/wearable (shields, boots...) and then equip a weapon afterwards. This means that the weapon doesn't reinitialize, which means that it's not catched by TF2Items (which my plugin uses) and doesn't change any attributes, only the weapon that the bots initially spawn with.

    I will look into coding a solution for this, so the weapons can be changed after a set timer, which should increase the compatibility with that plugin and others that use similar solutions.
    __________________
    My github - Support me!
    Discord: JugadorXEI#8724 - Steam
    JugadorXEI is offline
    JugadorXEI
    AlliedModders Donor
    Join Date: Jul 2017
    Location: Spain
    Old 08-23-2018 , 14:29   Re: [TF2] Rebalanced Fortress 2 (v1.50 - 2018-23-08)
    Reply With Quote #4

    Rebalanced Fortress 1.50 has been released, changes include:
    • Added sm_tfrebalance_changetimer ConVar (default: 0) | If higher than zero, the plugin will apply changes to weapons after the time set on the ConVar (which can be a float value, like 0.2). This can be used to increase the compatibility with other plugins.
    The OP has been modified to resemble the latest changes. This version can be downloaded here: https://github.com/JugadorXEI/tf2rebalance_jug/releases

    heavyisgps: I tested both my plugin with sm_tfrebalance_changetimer set to 0.2 and with Give Bots Weapons installed and both worked quite well. Hopefully this update will be useful to you.
    __________________
    My github - Support me!
    Discord: JugadorXEI#8724 - Steam

    Last edited by JugadorXEI; 08-23-2018 at 14:33.
    JugadorXEI is offline
    heavyisgps
    Member
    Join Date: Aug 2018
    Old 08-24-2018 , 09:01   Re: [TF2] Rebalanced Fortress 2 (v1.50 - 2018-23-08)
    Reply With Quote #5

    Hi, I tested it and it works! sort of.

    However on certain weapons with more attributes, the stats doesn't load. It gives me this output in the server.

    L 08/24/2018 - 14:59:15: [SM] Exception reported: Cowardly refusing to add invalid attribute index "0" to an item.
    L 08/24/2018 - 14:59:15: [SM] Blaming: tf2rebalance_jug.smx
    L 08/24/2018 - 14:59:15: [SM] Call stack trace:
    L 08/24/2018 - 14:59:15: [SM] [0] TF2Items_SetAttribute
    L 08/24/2018 - 14:59:15: [SM] [1] Line 371, E:\tf2\tf\addons\sourcemod\scripting\tf2rebal ance_jug.sp::Timer_ChangeWeapons
    L 08/24/2018 - 14:59:15: [SM] Exception reported: Cowardly refusing to add invalid attribute index "0" to an item.
    L 08/24/2018 - 14:59:15: [SM] Blaming: tf2rebalance_jug.smx
    L 08/24/2018 - 14:59:15: [SM] Call stack trace:
    L 08/24/2018 - 14:59:15: [SM] [0] TF2Items_SetAttribute
    L 08/24/2018 - 14:59:15: [SM] [1] Line 371, E:\tf2\tf\addons\sourcemod\scripting\tf2rebal ance_jug.sp::Timer_ChangeWeapons
    L 08/24/2018 - 14:59:16: [SM] Exception reported: Cowardly refusing to add invalid attribute index "0" to an item.
    L 08/24/2018 - 14:59:16: [SM] Blaming: tf2rebalance_jug.smx
    L 08/24/2018 - 14:59:16: [SM] Call stack trace:
    L 08/24/2018 - 14:59:16: [SM] [0] TF2Items_SetAttribute
    L 08/24/2018 - 14:59:16: [SM] [1] Line 371, E:\tf2\tf\addons\sourcemod\scripting\tf2rebal ance_jug.sp::Timer_ChangeWeapons
    L 08/24/2018 - 14:59:16: [SM] Exception reported: Cowardly refusing to add invalid attribute index "0" to an item.
    L 08/24/2018 - 14:59:16: [SM] Blaming: tf2rebalance_jug.smx
    L 08/24/2018 - 14:59:16: [SM] Call stack trace:
    L 08/24/2018 - 14:59:16: [SM] [0] TF2Items_SetAttribute
    L 08/24/2018 - 14:59:16: [SM] [1] Line 371, E:\tf2\tf\addons\sourcemod\scripting\tf2rebal ance_jug.sp::Timer_ChangeWeapons

    It doesn't happen on all weapons, only some. I've attached my balance file. And 2 items I know that doesn't load are the bison and sydney sleeper stats.

    This does not happen if the cvar is set to 0 instead of 0.2
    Attached Files
    File Type: txt tf2rebalance_attributes.txt (7.5 KB, 379 views)
    heavyisgps is offline
    JugadorXEI
    AlliedModders Donor
    Join Date: Jul 2017
    Location: Spain
    Old 08-24-2018 , 09:59   Re: [TF2] Rebalanced Fortress 2 (v1.50 - 2018-23-08)
    Reply With Quote #6

    I took a look at the file you attached. On the bison section, there was a "static_attribs" section, probably as a result of copying data from the item schema, which caused the plugin to hang on there. I couldn't see what was the problem with the Sydney Sleeper section, but it failing might've been a result of how strangely-formatted the file was.

    I strongly recommend you to use Notepad++ to edit config files like this one, and use tabs to separate sections. I attached a fixed and reformatted version of the config file you sent, hopefully it's of use to you.
    Attached Files
    File Type: txt tf2rebalance_attributes.txt (7.7 KB, 321 views)
    __________________
    My github - Support me!
    Discord: JugadorXEI#8724 - Steam
    JugadorXEI is offline
    Chdata
    Veteran Member
    Join Date: Aug 2012
    Location: Computer Chair, Illinois
    Old 08-24-2018 , 15:35   Re: [TF2] Rebalanced Fortress 2 (v1.50 - 2018-23-08)
    Reply With Quote #7

    So this plugin is just tf2items, but done through tf2attributes?
    __________________

    Last edited by Chdata; 08-24-2018 at 15:36.
    Chdata is offline
    JugadorXEI
    AlliedModders Donor
    Join Date: Jul 2017
    Location: Spain
    Old 08-24-2018 , 16:05   Re: [TF2] Rebalanced Fortress 2 (v1.50 - 2018-23-08)
    Reply With Quote #8

    In simple terms, my plugin is a simpler tf2items_manager with extra compatibility with other plugins, with the chance of also adding attributes onto classes right as they spawn if tf2attributes is installed. It's also possible to give players info about the changes done to the classes or weapons if the server owner wishes so.

    The general purpose of this plugin is to provide custom balance on both weapons and classes on servers that wish to have it and give information as/if needed, so it works as an all-in-one suit for server owners who wish not to have 3 different plugins for different purposes and would like to have everything in one.
    __________________
    My github - Support me!
    Discord: JugadorXEI#8724 - Steam

    Last edited by JugadorXEI; 08-24-2018 at 17:52.
    JugadorXEI is offline
    heavyisgps
    Member
    Join Date: Aug 2018
    Old 08-24-2018 , 17:53   Re: [TF2] Rebalanced Fortress 2 (v1.50 - 2018-23-08)
    Reply With Quote #9

    I've been tinkering with this for many hours, I've completely reformatted my code so it's nice and viewable, used Notepad++ with some code plugins to make it all nice and tidy.

    However the server can crash if things are done in this order:Server crashes.

    Steps to reproduce.

    1. Start server
    2. Set sm_tfrebalance_changetimer 0.2 in server console
    3. Join server
    4. Go in spectator
    5. Add bots with tf_bot_add
    6. Server crashes and closes

    The server also crashes if I load up an MVM map with changetimer active after changing classes.

    To not get the server to crash but still give the trace error, and make some weapons not load in.

    Also if I join, set the changetimer and another player joins, it crashes the server.

    1. Start server (not mvm map)
    2. Join server
    3. Go in spectator
    4. Set sm_tfrebalance_changetimer 0.2 in server console
    5. Add bots with tf_bot_add
    6. Switch class to some of the weapons changed
    7. Gives error in console

    L 08/24/2018 - 23:26:41: [SM] Exception reported: Cowardly refusing to add invalid attribute index "0" to an item.
    L 08/24/2018 - 23:26:41: [SM] Blaming: tf2rebalance_jug.smx
    L 08/24/2018 - 23:26:42: [SM] Call stack trace:
    L 08/24/2018 - 23:26:42: [SM] [0] TF2Items_SetAttribute
    L 08/24/2018 - 23:26:42: [SM] [1] Line 371, E:\tf2\tf\addons\sourcemod\scripting\tf2rebal ance_jug.sp::Timer_ChangeWeap

    I haven't been able to figure out what causes this, as some weapons are loaded and others aren't. You can clearly see which weapons it is by switching to the class that has the weapon equipped as the server throws the error then.

    I've attached the current file I'm using, and there should be no problem with the values I've set. I've gone over it for hours.

    I've found that only the items that use the "keepattribs" "1" gives this error, and causes the crash in MvM.
    Attached Files
    File Type: txt tf2rebalance_attributes.txt (6.8 KB, 304 views)
    heavyisgps is offline
    JugadorXEI
    AlliedModders Donor
    Join Date: Jul 2017
    Location: Spain
    Old 08-24-2018 , 18:00   Re: [TF2] Rebalanced Fortress 2 (v1.50 - 2018-23-08)
    Reply With Quote #10

    Thanks for your throughout testing.

    Originally the plugin wasn't meant for MvM, so there's ought to be some issues on a gamemode that I haven't tested, I will look into what I can do to fix it. As for the "cowardly refusing" error, I'll look into what's causing it again.
    __________________
    My github - Support me!
    Discord: JugadorXEI#8724 - Steam

    Last edited by JugadorXEI; 08-24-2018 at 18:01.
    JugadorXEI is offline
    Reply


    Thread Tools
    Display Modes

    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 12:49.


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