Raised This Month: $ Target: $400
 0% 

[TF2] Balance Fortress 2 (v1.01)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
JugadorXEI
AlliedModders Donor
Join Date: Jul 2017
Location: Spain
Plugin ID:
5820
Plugin Version:
1.01
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Changes TF2 weapons based on the "Balance Changes" blog post's suggested changes
    Unapprover:
    Reason for Unapproving:
    Unapproved due to author request
    Old 09-09-2017 , 13:23   [TF2] Balance Fortress 2 (v1.01)
    Reply With Quote #1

    Balance Fortress 2
    A few fixes, v1.01
    • What does this plugin do?
      • It modifies weapons' stats and functionality to resemble those from the TF2 Blog's "Balance Changes" blog post, minus for some changes that couldn't be coded in (read below). I am aware that, as of the creation of this thread, the Pyro/Jungle Update could hit at any moment, but I thought it would be fun if servers ran most of the suggested changes beforehand so players could get a headstart. In addition, it has some extra features:
        • Players who just joined will get a message after spawning that the server is running weapon modifications based on the aforementioned blog post.
        • Players who use weapons with changes will have a menu displayed for them describing such changes.
        • Players can toggle on and off if they want to see the menu mentioning such changes with /infotoggle, or see the changes done to their loadout at any time using /info.
      • It's also worth noting that dropped weapons disappear, in order to prevent players from picking "outdated" weapons.

    Weapon changes that couldn't be done

    • Server commands:
      • sm_tfbalance_enable (Default: 1) - Enables/Disables the plugin.
      • sm_tfbalance_infoonspawn (Default: 1) - Displays weapons' information on spawn.
      • sm_tfbalance_firsttimeinfo (Default: 1) - Displays on the first player's spawn information about the modifications done to the weapons.
    • Console commands (for players):
      • /info | /information | /changes - Displays info for the updated weapons. This displays once for every spawn/resupply and only if the player has a weapon with changes.
      • /infotoggle | /informationtoggle | sm_changestoggle - Toggles info for the updated weapons whenever you spawn. This preference also persists between map changes and rejoins.
    • Installation:
      1. Get the following dependencies and follow their respective install instructions: TF2Items and TF2Attributes (You will also need MoreColors to compile your own version).
      2. Get the plugin by clicking here or get the compiled version (balancemod.smx) from the thread attachments (or if you want to compile the plugin yourself, click "Get Source" of balancemod.sp below)
      3. Drag'n'drop the sourcemod folder from the zip file you downloaded to your server's addons folder.
      4. Done!
    Quote:
    Changelog:
    v1.01 (A few things, September 10th 2017)
    - Fixed being able to held the Darwin's Danger Shield.
    - Added sm_tfbalance_firsttimeinfo, which controls the visibility of the message when the player spawns into the server for the first time.
    - Done various optimization changes based on Headline's post. Thanks!

    v1.00 (Initial Release, September 9th 2017)
    - Initial Release
    Have fun!
    Attached Files
    File Type: smx balancemod.smx (31.4 KB, 171 views)
    File Type: sp Get Plugin or Get Source (balancemod.sp - 383 views - 56.5 KB)

    Last edited by JugadorXEI; 09-09-2017 at 20:18.
    JugadorXEI is offline
    headline
    SourceMod Moderator
    Join Date: Mar 2015
    Old 09-09-2017 , 18:39   Re: [TF2] Balance Fortress 2 (v1.00, Initial Release)
    Reply With Quote #2

    Nice release.

    Comments:
    Remove the TF2 include and the sdktools include. They're both unused.

    In CreateBalanceMenu() you use Format a LOT for string concatination. Consider using StrCat. Format is expensive. Also, I see you using Format to initialize a string on line 1335. Just do
    PHP Code:
    char cChanges[2000] = "Here are the changes done to your weapons:\n(You can display this menu with /info or toggle its appareance with /infotoggle)\n"
    Also. if you're using the new syntax you don't have to hook plugin changes. Just use the .BoolValue, .IntValue, or .FloatValue methods on the ConVar handle.

    Last edited by headline; 09-09-2017 at 18:46.
    headline is offline
    JugadorXEI
    AlliedModders Donor
    Join Date: Jul 2017
    Location: Spain
    Old 09-09-2017 , 20:20   Re: [TF2] Balance Fortress 2 (v1.01)
    Reply With Quote #3

    Quote:
    Originally Posted by Headline View Post
    Comments:
    Remove the TF2 include and the sdktools include. They're both unused.

    In CreateBalanceMenu() you use Format a LOT for string concatination. Consider using StrCat. Format is expensive. Also, I see you using Format to initialize a string on line 1335. Just do
    PHP Code:
    char cChanges[2000] = "Here are the changes done to your weapons:\n(You can display this menu with /info or toggle its appareance with /infotoggle)\n"
    Also. if you're using the new syntax you don't have to hook plugin changes. Just use the .BoolValue, .IntValue, or .FloatValue methods on the ConVar handle.
    I've modified the code based on your suggestions and I also added and fixed a few things for v1.01. Thanks for the insight and tips!
    JugadorXEI 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 16:13.


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