Monthly Target: $400 Donations: $140
 35% 

[ND] Resource Management


Post New Thread Reply   
 
Thread Tools Display Modes
Author
databomb
Veteran Member
Join Date: Jun 2009
Location: Boston, MA
Plugin ID:
2803
Plugin Version:
1.0.4
Plugin Category:
General Purpose
Plugin Game:
Nuclear Dawn
Plugin Dependencies:
    Servers with this Plugin:
    1 
    Plugin Description:
    Allows (non-cheat) cvar to set starting resources along with admin commands to manage resources during the game.
    Old 02-12-2012 , 21:34   [ND] Resource Management
    Reply With Quote #1

    This plugin allows you to change the starting resources given to each team (Nuclear Dawn provides a cvar for this but it's flagged as a game cheat.) It also provides admin commands to manage the resources.

    Cvars:

    sm_starting_resources_consort <amount> [10K default]
    sm_starting_resources_empire <amount> [8K default]

    Admin Commands:

    sm_checkresources
    Returns team resources for Empire and Consortium

    sm_setresources <team name> <amount>
    Allows admins to change resources mid-game

    Changes:
    v 1.0.0 Initial release
    v 1.0.1 Added separate cvars for each team for balance; Moved to round_start (thanks Player1)
    v 1.0.2 Bumping version for re-release of 1.0.1
    v 1.0.3 Added server tag "resources" to align with new update. Changed admin commands from (nd_) to (sm_)
    v 1.0.4 Fixed problem with adding "resources" tag
    Attached Files
    File Type: sp Get Plugin or Get Source (resources.sp - 266 views - 3.6 KB)
    __________________
    Public Plugins | Please: No new private requests.

    Last edited by databomb; 06-22-2012 at 15:00. Reason: v 1.0.4
    databomb is offline
    Peace-Maker
    SourceMod Plugin Approver
    Join Date: Aug 2008
    Location: Germany
    Old 03-04-2012 , 14:17   Re: [ND] Resource Management
    Reply With Quote #2

    Thank you, that's really useful when testing stuff ingame
    __________________
    Peace-Maker is offline
    Player 1
    Member
    Join Date: Apr 2012
    Old 05-06-2012 , 21:47   Re: [ND] Resource Management
    Reply With Quote #3

    PHP Code:
    SetEntProp(g_iConsortProp_Send"m_iResourcePoints"iResources);
    SetEntProp(g_iEmpireProp_Send"m_iResourcePoints"iResources); 
    This should be moved from OnMapStart to a "round_start" hook so the starting resources are set on all new rounds, not just the first one.
    Player 1 is offline
    databomb
    Veteran Member
    Join Date: Jun 2009
    Location: Boston, MA
    Old 05-07-2012 , 00:16   Re: [ND] Resource Management
    Reply With Quote #4

    Quote:
    Originally Posted by Player 1 View Post
    PHP Code:
    SetEntProp(g_iConsortProp_Send"m_iResourcePoints"iResources);
    SetEntProp(g_iEmpireProp_Send"m_iResourcePoints"iResources); 
    This should be moved from OnMapStart to a "round_start" hook so the starting resources are set on all new rounds, not just the first one.
    Yeah, I suppose you're right; this was made for servers which only play 1 round.
    __________________
    Public Plugins | Please: No new private requests.
    databomb is offline
    databomb
    Veteran Member
    Join Date: Jun 2009
    Location: Boston, MA
    Old 06-17-2012 , 22:53   Re: [ND] Resource Management
    Reply With Quote #5

    Version 1.0.1 Posted

    Moved OnMapStart stuff to Round Start (thanks Player1)

    Added cvars for each team's starting resources - some people commented that 10K to each team strongly favored the Empire at the beginning due to the length their relay towers can go versus the wireless repeaters. Default is 8K empire and 10K consortium but each server can make up their mind where the right balance lies with these cvars.
    __________________
    Public Plugins | Please: No new private requests.
    databomb is offline
    Calystos
    Member
    Join Date: Jan 2011
    Location: Terra
    Old 06-17-2012 , 22:57   Re: [ND] Resource Management
    Reply With Quote #6

    Just a quick query, but wouldn't the "sm_starting_resources" need to be "sm_ct_starting_resources" and "sm_emp_starting_resources" rather than both the same "sm_starting_resources"?

    Code:
    	gH_Cvar_ConsortResources = CreateConVar("sm_starting_resources", "10000", "Starting resources to give Consortium team", FCVAR_PLUGIN, true, 0.0, true, 250000.0);
    	gH_Cvar_EmpireResources = CreateConVar("sm_starting_resources", "8000", "Starting resources to give Empire team", FCVAR_PLUGIN, true, 0.0, true, 250000.0);

    Last edited by Calystos; 06-17-2012 at 22:57.
    Calystos is offline
    Send a message via ICQ to Calystos Send a message via AIM to Calystos Send a message via MSN to Calystos Send a message via Yahoo to Calystos Send a message via Skype™ to Calystos
    databomb
    Veteran Member
    Join Date: Jun 2009
    Location: Boston, MA
    Old 06-17-2012 , 23:04   Re: [ND] Resource Management
    Reply With Quote #7

    Quote:
    Originally Posted by Calystos View Post
    Just a quick query, but wouldn't the "sm_starting_resources" need to be "sm_ct_starting_resources" and "sm_emp_starting_resources" rather than both the same "sm_starting_resources"?

    Code:
        gH_Cvar_ConsortResources = CreateConVar("sm_starting_resources", "10000", "Starting resources to give Consortium team", FCVAR_PLUGIN, true, 0.0, true, 250000.0);
        gH_Cvar_EmpireResources = CreateConVar("sm_starting_resources", "8000", "Starting resources to give Empire team", FCVAR_PLUGIN, true, 0.0, true, 250000.0);
    Good catch.. just realized I forgot to save before uploading.
    __________________
    Public Plugins | Please: No new private requests.
    databomb is offline
    Calystos
    Member
    Join Date: Jan 2011
    Location: Terra
    Old 06-17-2012 , 23:07   Re: [ND] Resource Management
    Reply With Quote #8

    Quote:
    Originally Posted by databomb View Post
    Good catch.. just realized I forgot to save before uploading.
    Yeah, I was just lucky. I took a quick look an thought "hold on, that looks odd..." lol, ;)
    Calystos is offline
    Send a message via ICQ to Calystos Send a message via AIM to Calystos Send a message via MSN to Calystos Send a message via Yahoo to Calystos Send a message via Skype™ to Calystos
    databomb
    Veteran Member
    Join Date: Jun 2009
    Location: Boston, MA
    Old 06-22-2012 , 10:51   Re: [ND] Resource Management
    Reply With Quote #9

    Version 1.0.3
    Added server tag "resources" to align with the new ND update.
    Changed admin commands to use sm_ prefix instead of nd_
    __________________
    Public Plugins | Please: No new private requests.
    databomb is offline
    databomb
    Veteran Member
    Join Date: Jun 2009
    Location: Boston, MA
    Old 06-22-2012 , 15:00   Re: [ND] Resource Management
    Reply With Quote #10

    Version 1.0.4
    Fixed problem where "resources" tag was not being added
    __________________
    Public Plugins | Please: No new private requests.
    databomb 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 23:37.


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