Raised This Month: $ Target: $400
 0% 

[TF2] Amp Node


Post New Thread Reply   
 
Thread Tools Display Modes
Author
naris
AlliedModders Donor
Join Date: Dec 2006
Plugin ID:
2062
Plugin Version:
3.5
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    2 
    Plugin Description:
    Combines The Amplifier and the Repair Node into 1 plugin with the ability to specify which to use when building a dispenser
    Old 11-09-2010 , 21:39   [TF2] Amp Node
    Reply With Quote #1

    This plugin is based on Eggman's Amplifier and Geel9 & Benjamuffin's Repair Node plugins.

    It will also, optionally, present a menu when building a dispenser to allow the engineer to pick if he wants a Dispenser, an Amplifier or a Repair Node. For those that don't want to be bothered with menus, you can also specify which to build ahead of time.

    This plugin can also be used in conjunction with my Remote Control/Build Plugin to build Amplifiers and Dispensers.

    This plugin also has an extensive native interface that allows it to be called from other plugins.

    The following convars are available to customize the plugin:

    ampnode_spawn_menu (1/0, default 0)
    Display selection menu when engineers spawn?

    ampnode_regeneration (default 10)
    Amount of metal amplifiers and repair nodes regenerate per second.

    ampnode_max (default 400)
    Maximum amount of metal an amplifier or repair node can hold.

    amplifier_enable (1/0, default 1)
    Enable or disable Amplifiers.

    amplifier_upgradable (1/0, default 0)
    Allow the amplifier to be upgraded? (1=yes,0=no)

    amplifier_metal (default 5)
    Amount of metal to use to apply a condition to a player (per second).

    amplifier_percent (default 100)
    Percent chance of the amplifier applying the condition.

    amplifier_condition (default 16)
    Condition that The amplifier dispenses (11=full crits, 16=mini crits, etc...).

    amplifier_particle (1/0, default 1)
    Enable the Buffed Particle? (1=yes,0=no)

    amplifier_wallblock (1/0, default 1)
    Teammates can (0) or can not (1) get crits through walls, players, props etc.

    amplifier_sg_wrangler_mini_crit (1/0, default 1)
    Controlled (by Wrangler) SentryGun will get mini-crits, if engineer near AMP

    amplifier_range_1 (default 100.0)
    Distance the amplifier works at level 1.

    amplifier_range_2 (default 200.0)
    Distance the amplifier works at level 2.

    amplifier_range_3 (default 300.0)
    Distance the amplifier works at level 3.

    repair_node_enable (1/0, default 1)
    Enable or disable Repair Nodes.

    repair_node_metal (1/0, default 1)
    Repair nodes use metal? (1=yes,0=no)

    repair_node_percent (default 100)
    Percent chance of the repair node repairing something.

    repair_node_team (1/0, default 1)
    Allow repair nodes to teammate's buildings? (1=yes,0=no)

    repair_node_mini (1/0, default 0)
    Allow repair nodes to repair mini sentries? (1=yes,0=no)

    repair_node_range_1 (default 300.0)
    How far away the Repair Node will heal a building at level 1.

    repair_node_range_2 (default 400.0)
    How far away the Repair Node will heal a building at level 2.

    repair_node_range_3 (default 500.0)
    How far away the Repair Node will heal a building at level 3.

    repair_node_regen_1 (default 15)
    How much the Repair Node will heal a building, per 2 seconds, at level 1.

    repair_node_regen_2 (default 20)
    How much the Repair Node will heal a building, per 2 seconds, at level 2.

    repair_node_regen_3 (default 30)
    How much the Repair Node will heal a building, per 2 seconds, at level 3.

    repair_node_ammo_1 (default 0)
    How much ammo the Repair Node will replenish, per 2 seconds, at level 1.

    repair_node_ammo_2 (default 5)
    How much ammo the Repair Node will replenish, per 2 seconds, at level 2.

    repair_node_ammo_3 (default 10)
    How much ammo the Repair Node will replenish, per 2 seconds, at level 3.

    repair_node_rockets_1 (default 0)
    How many rockets the Repair Node will replenish, per 2 seconds, at level 1.

    repair_node_rockets_2 (default 0)
    How many rockets the Repair Node will replenish, per 2 seconds, at level 2.

    repair_node_rockets_3 (default 2)
    How many rockets the Repair Node will replenish, per 2 seconds, at level 3.


    The following commands are available:

    sel,
    amp,
    amplifier: Select whether to build a Dispenser, Amplifier or Repair Nodes, can also specify to prompt each time a dispenser is built.

    amp_help: Displays help on how to use the plugin.

    This is the native interface, callable from other plugins:

    PHP Code:
    /**
     * Assume control of the Amplifier plugin
     *
     * @param plugin_only     Set to 1 to assume complete control of Amplifier.
     * @return                none
     */
    native ControlAmpNode(bool:plugin_only=true);

    /**
     * Set the Building Type flag to Repair Node
     *
     * @param client     Client index
     * @param type      Type of building to use when client builds Dispensers.
     * @return            none
     */
    native SetBuildingType(clientTFExtObjectType:type);

    /**
     * Set the Building Type flag to Amplifier
     *
     * @param client     Client index
     * @param range     Range of the amplifier (-1.0=use convar)
     * @param condition Condition to set players within range of the amplifier (-1=use convar)
     * @param percent   Percent (0-100) chance of applying the condition (-1=use convar)
     * @param enable    Set true to enable the player to build Amplifiers.
     * @param select    Set true to set player's BuildingType to Amplifier
     * @return            none
     */
    native SetAmplifier(clientTFCond:condition=TFCond:-1,
                        const 
    Float:range[4]={-1.0,-1.0,-1.0,-1.0},
                        
    percent=-1bool:enable=truebool:select=false);

    /**
     * Set the Building Type flag to Repair Node
     *
     * @param client     Client index
     * @param range     Range of the repair node for each level (-1.0=use convar).
     * @param regen     Regen rate of the repair node for each level (-1=use convar).
     * @param shells    Rate the repair node replenishes sentry shells for each level (-1=use convar).
     * @param rockets   Rate the repair node replenishes sentry rockets for each level (-1=use convar).
     * @param team      Flag to allow the repair node to repair team mates buildings. (0=no,1=yes,-1=use convar).
     * @param mini      Flag to allow the repair node to repair mini buildings. (0=no,1=yes,-1=use convar).
     * @param percent   Percent (0-100) chance of repairing the building (-1=use convar)
     * @param enable    Set true to enable the client to build Repair Nodes
     * @param select    Set true to set player's BuildingType to Repair Node
     * @return            none
     */
    native SetRepairNode(client, const Float:range[4]={-1.0,-1.0,-1.0,-1.0},
                         const 
    regen[4]={-1,-1,-1,-1},  const shells[4]={-1,-1,-1,-1},
                         const 
    rockets[4]={-1,-1,-1,-1}, team=-1mini=-1,
                         
    percent=-1bool:enable=truebool:select=false);

    /**
     * Count how many Buildings of a given type the client has constructed.
     *
     * @param index     Client index
     * @param type      Type of building to count.
     * @return            The number of buildings of the given type the client has constructed.
     */
    native CountConvertedBuildings(clientTFExtObjectType:type);

    /**
     * Converts a dispenser into an Amplifier
     *
     * @param entity    Dispenser Entity to convert.
     * @param client     Client index of the owner.
     * @param range     Range of the amplifier (-1.0=use convar)
     * @param condition Condition to set players within range of the amplifier (-1=use convar)
     * @param percent   Percent (0-100) chance of applying the condition (-1=use convar)
     * @return            none
     */
    native ConvertToAmplifier(entityclientTFCond:condition=TFCond:-1,
                              const 
    Float:range[4]={-1.0,-1.0,-1.0,-1.0},
                              
    percent=-1);

    /**
     * Converts a dispenser into a Repair Node
     *
     * @param entity    Dispenser Entity to convert.
     * @param client     Client index of the owner.
     * @param range     Range of the repair node for each level (-1.0=use convar).
     * @param regen     Regen rate of the repair node for each level (-1=use convar).
     * @param shells    Rate the repair node replenishes sentry shells for each level (-1=use convar).
     * @param rockets   Rate the repair node replenishes sentry rockets for each level (-1=use convar).
     * @param team      Flag to allow the repair node to repair team mates buildings. (0=no,1=yes,-1=use convar).
     * @param mini      Flag to allow the repair node to repair mini buildings. (0=no,1=yes,-1=use convar).
     * @param percent   Percent (0-100) chance of repairing the building (-1=use convar)
     * @return            none
     */
    native ConvertToRepairNode(entityclient, const Float:range[4]={-1.0,-1.0,-1.0,-1.0},
                               const 
    regen[4]={-1,-1,-1,-1}, const shells[4]={-1,-1,-1,-1},
                               const 
    rockets[4]={-1,-1,-1,-1}, team=-1mini=-1percent=-1);

    /**
     * Gets called when the amplifier applys a condition to someone
     *
     * @param builder:  The index of the client that built the amplifier.
     * @param client:   The index of the player that is being afected.
     * @param condition The condition beign applied to the client.
     * @return            Plugin_Stop will prevent the client from being affected.
     */
    forward Action:OnAmplify(builder,client,TFCond:condition); 
    Change log
    11/9/2010 - v3.0
    • Initial public release.

    11/10/2010 - v3.1
    • Added amplifier_upgradable convar to amp_node to prevent amplifiers from being upgraded.
    • Changed amp_node so that Repair nodes can also replenish the sentries ammo (shells and rockets).
    • Fixed some bugs.

    11/15/2010 - v3.2
    • Fixed amp_node requiring ztf2grab.
    • Changed ammo regeneration to cap replenishment at the amount of metal instead of not allowing replenishment if there is insufficient metal..
    • Fixed ConvertToRepairNode() setting RepairNodeRegen[] for rockets and shells.

    11/16/2010 - v3.3
    • Changed to use NoColor translations (without color codes) when compiled without colors.inc
    • Ensure dispenser model doesn't become visible for repair nodes after upgrading.

    11/26/2010 - v3.4
    • Changed the Convert primitives to use the DispCheckStage1 timer handler instead of DispCheckStage2
    • Fixed amplifiers and repair nodes not working when using the Convert natives without calling the Set native first.
    • Initialize the Native* variables to -1 (so convars are used) in OnClientAuthorized()

    12/10/2010 - v3.5
    • Changed amp_node to have working slow, zoom (slower) and bonked (loser slow) amplifiers
    • Changed amp_node to have working bleed and stun amplifiers

    2/23/2012 - v4.0
    • Changed SetRepairNode() and ConvertToRepairNode() to specify 1 value for rockets instead of an array
    • Fixed invalid client index errors
    • Added RegenBuffed and MarkedForDeath Amplifiers
    • Changed to use the ResourceManager (if available)
    • Updated for changes to TF2/SourceMod

    6/26/2012 - v4.1
    • Changed to use INVALID_ENT_REFERENCE for invalid refs instead of 0
    • Replace RemoveEdict(ent) with AcceptEntityInput(ent, "kill")
    • Added AutoExecConfig() to create a config file

    6/26/2012 - v4.2
    • Added ampnode_announce convar to disable announcements

    8/25/2012 - v4.3
    • Added Announce cvar to amp_node
    • Fixed repair nodes sometimes reverting to (or merging with) dispenser models
    • Fixed sappers permanently breaking amplifiers and repair nodes
    • Revert amplifiers and repair nodes to use the dispenser model while sapped so the sapper is visible
    Attached Files
    File Type: zip Amplifier.zip (1.44 MB, 1655 views)
    File Type: zip repair_node_textures.zip (1.44 MB, 1386 views)
    File Type: txt amp_node.txt (3.1 KB, 10967 views)
    File Type: zip amp_node.zip (2.79 MB, 1350 views)
    File Type: sp Get Plugin or Get Source (amp_node.sp - 7788 views - 82.8 KB)
    File Type: inc amp_node.inc (5.5 KB, 7624 views)
    File Type: inc ResourceManager.inc (8.6 KB, 9932 views)
    File Type: sp Get Plugin or Get Source (ResourceManager.sp - 6059 views - 18.4 KB)
    File Type: inc tf2_objects.inc (3.1 KB, 6447 views)
    File Type: smx amp_node.smx (48.9 KB, 1040 views)

    Last edited by naris; 08-25-2012 at 23:11.
    naris is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 11-09-2010 , 22:33   Re: [TF2] Amp Node
    Reply With Quote #2

    Nice job giving this an official release. Sorry to see the original authors weren't as supportive when you initially tried to help.
    psychonic is offline
    FoxMulder
    Senior Member
    Join Date: Jan 2009
    Location: Orlando, FL
    Old 11-09-2010 , 22:44   Re: [TF2] Amp Node
    Reply With Quote #3

    Source?
    __________________
    FoxMulder is offline
    naris
    AlliedModders Donor
    Join Date: Dec 2006
    Old 11-09-2010 , 22:58   Re: [TF2] Amp Node
    Reply With Quote #4

    Quote:
    Originally Posted by FoxMulder View Post
    Source?
    Doh! I though I posted it then I had ro run off to pick my kid up from class
    naris is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 11-09-2010 , 23:01   Re: [TF2] Amp Node
    Reply With Quote #5

    Can these be picked up and redeployed?
    Thraka is offline
    naris
    AlliedModders Donor
    Join Date: Dec 2006
    Old 11-09-2010 , 23:09   Re: [TF2] Amp Node
    Reply With Quote #6

    Yes, they can be picked up and re-deployed.
    naris is offline
    Eggman
    Senior Member
    Join Date: Jan 2010
    Old 11-10-2010 , 06:46   Re: [TF2] Amp Node
    Reply With Quote #7

    Is this really needed? You can install both plugins without conflict. If say it easy - he stolen our plugins. We saw it on Amplifier topic and that failed. What if I'm or Geel9 will update original plugins?

    One is a help with plugin and other is release as other plugin. And he's brake Amplifier constant: it CAN NOT BE UPGRADABLE. It's his featureю

    Last edited by Eggman; 11-10-2010 at 07:10.
    Eggman is offline
    naris
    AlliedModders Donor
    Join Date: Dec 2006
    Old 11-10-2010 , 12:43   Re: [TF2] Amp Node
    Reply With Quote #8

    Quote:
    Originally Posted by Eggman View Post
    Is this really needed? You can install both plugins without conflict. If say it easy - he stolen our plugins. We saw it on Amplifier topic and that failed.
    I did NOT steal your plugins. I provide FULL credit to both you and Geel9 in both this post AND the plugin itself.

    In point of fact, this is indeed needed for many reasons:
    1) The Repair Node plugin is broken and no longer functions.
    2) The Repair Node plugin does NOT allow for more than 1 Dispenser and Sentry (and 2 Teleporters) per player.
    3) The Repair Node plugin does not allow for the use of metal.
    4) The Repair Node doesn't have a native interface.
    5) The Amplifier plugin does not allow amplifiers to be upgraded.
    6) The Amplifier and Repair Nodes plugins won't work in conjunction with the Remote Control/Build plugin.
    7) This plugin combines both the Amplifier and Repair Nodes into 1 menu that can be used to choose which to build.
    8 ) This plugin allows the choice of which Dispenser variant to be deferred until you build one, without having to choose beforehand.
    9) Using the Repair Node plugin, there is no menu, you have to use the !nodeon and !nodeoff commands, yet the amplifier is chosen using a menu.
    10) Having 1 combined plugin to modify dispensers with a consistent interface that includes both modifications is much easier for the players to use instead of 2 separate, inconsistent plugins.

    Quote:
    Originally Posted by Eggman View Post
    One is a help with plugin and other is release as other plugin.
    I had submitted this in your thread several months ago and you dismissed it without any consideration as to why it is needed, which it is. Also, I did NOT release this plugin until quite some time AFTER Geel9's Repair Node plugin got unapproved, which is the primary reason why I released it.

    Quote:
    Originally Posted by Eggman View Post
    And he's brake Amplifier constant: it CAN NOT BE UPGRADABLE. It's his featureю
    There were requests in your thread to make the Amplifiers upgradeable and I also thought they should be upgradeable. I'm sorry you don't agree. I will add an additional convar to make them unupgradeable.

    Quote:
    Originally Posted by Eggman View Post
    What if I'm or Geel9 will update original plugins?
    Geel9's plugin has been unapproved because he isn't maintaining it, and it is no longer functioning. I am also capable of merging any future modifications should they be needed.

    Last edited by naris; 11-10-2010 at 12:51.
    naris is offline
    Eggman
    Senior Member
    Join Date: Jan 2010
    Old 11-10-2010 , 14:51   Re: [TF2] Amp Node
    Reply With Quote #9

    Oh right, now Amplifier is stable... And i think it will not updated.
    Quote:
    I will add an additional convar to make them unupgradeable.
    And will make default is "unupgradeable".
    Eggman is offline
    naris
    AlliedModders Donor
    Join Date: Dec 2006
    Old 11-10-2010 , 15:10   Re: [TF2] Amp Node
    Reply With Quote #10

    Quote:
    Originally Posted by Eggman View Post
    And will make default is "unupgradeable".
    Of course.
    naris 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:25.


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