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

[L4D1/2] Randomize Tank Witch HP and Speed 1.2


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Thraka
AlliedModders Donor
Join Date: Aug 2005
Plugin ID:
1448
Plugin Version:
1.2
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    9 
    Plugin Description:
    Randomizes the values of the tank and witch's health and speed before they spawn.
    Old 02-02-2010 , 22:24   [L4D1/2] Randomize Tank Witch HP and Speed 1.2
    Reply With Quote #1

    This should work in l4d2 and 1. I got this idea from gamemann's two plugins. However, the way he coded them, they didn't not work as intended.

    My version has cvars for each the tank and witch's min\max for hp and speed. These default to the values of their respective cvars for health and speed at time of plugin load when it creates the auto config file, l4d_randomize_tw.cfg.

    Todo
    - Need to handle tank frustration and disable the "tank_spawn" logic in that scenario

    1.2
    - Fixed bug with player taking over the tank and it printing\randomizing twice.
    - Fixed display bug that was printing wrong info for tank health to it's team.
    -Added l4d_randomize_tankwitch_print command which will display the randomize settings to the console.

    1.1
    - Added better logging
    - Checks for min being greater than max


    Cvars:
    Code:
    // Notify the infected players of the tank and witch settings.
    // Default: "1"
    l4d_randomize_tankwitch_notify "1"
    
    // Version of the randomize tank and witch settings plugin.
    l4d_randomize_tankwitch_ver "1.0"
    
    // Tanks maximum health when randomizing
    l4d_tank_hp_max
    
    // Tanks minimum health when randomizing
    l4d_tank_hp_min
    
    // Tanks maximum speed when randomizing
    // -
    l4d_tank_speed_max
    
    // Tanks minimum speed when randomizing
    l4d_tank_speed_min
    
    // Witchs maximum health when randomizing
    l4d_witch_hp_max
    
    // Witchs minimum health when randomizing
    l4d_witch_hp_min
    
    // Witchs maximum speed when randomizing
    l4d_witch_speed_max
    
    // Witchs minimum speed when randomizing
    l4d_witch_speed_min
    Attached Files
    File Type: sp Get Plugin or Get Source (l4d_randomize_tank_witch_settings.sp - 7039 views - 10.8 KB)

    Last edited by Thraka; 02-05-2010 at 20:09.
    Thraka is offline
    M249-M4A1
    I <3 Mac
    Join Date: May 2005
    Location: Not interested
    Old 02-03-2010 , 00:19   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
    Reply With Quote #2

    This code is SO much less of an eyesore!
    __________________
    M249-M4A1 is offline
    dirka_dirka
    Veteran Member
    Join Date: Nov 2009
    Old 02-03-2010 , 01:56   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
    Reply With Quote #3

    i was considering doing something similar and expanding upon it.

    anyway ya need to add an enable cvar for those that only want a witch or tank random, and not both:
    l4d_random_witch 0/1
    l4d_random_tank 0/1

    you also dont do any checks: for when min = max or min > max, etc.

    could also add more random options like tanks damage with fist, damage with rock, reload on rock, and various witch sensitivities.

    could also add abilities to randomize stats for all si.

    Last edited by dirka_dirka; 02-03-2010 at 02:02.
    dirka_dirka is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-03-2010 , 09:14   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
    Reply With Quote #4

    True on all those things. I will get to them eventually. I also realized that when a tank spawns, it spawns two of them, the bot, then players tank to take over the bot. So I'll have to do some checking, maybe to see if the player is the tank, if they are the tank, then skip re-randomizing for the next tank.
    Thraka is offline
    kiwi87
    Member
    Join Date: Sep 2009
    Old 02-03-2010 , 15:36   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
    Reply With Quote #5

    cfg
    l4d_tank_hp_min 6000
    l4d_tank_hp_max 10000

    result
    Tank has appeared with 4000 HP and 229 speed.
    Tank has appeared with 4000 HP and 234 speed.

    its not falling between the 6000-10000.
    and its being announced twice in chat.

    Working fine for witch though.

    I have ghost tank lite and superversus running. i have disabled super tank in superversus to prevent complications already.
    kiwi87 is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-03-2010 , 22:08   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
    Reply With Quote #6

    see my post above for the double spawn. As to the HP, I'm unsure about that, I'll do some testing. However, the tank itself is actually spawned with whatever value it says * 1.5. So it's X + (X / 2). I'll make sure the print out is correct in the next version. Unsure why the game does *1.5 on the health setting.
    Thraka is offline
    dirka_dirka
    Veteran Member
    Join Date: Nov 2009
    Old 02-04-2010 , 01:13   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
    Reply With Quote #7

    its *1.5 for versus difficulty.

    theres no hp_easy, hp_expert cvars, so all other difficulties just multiply that value.
    dirka_dirka is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-04-2010 , 02:13   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.1
    Reply With Quote #8

    Ok, I updated the plugin with a little bit more logging in in the sourcemod log. This may track down some problems.

    I'm unsure what to do about the player not being the tank and it respawning...
    Thraka is offline
    Thraka
    AlliedModders Donor
    Join Date: Aug 2005
    Old 02-05-2010 , 20:10   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.2
    Reply With Quote #9

    Updated solving known issues. However, one scenario un-handled is if the tank gets frustrated. While it wont give the tank new HP, it will display the text to the players as if it did.
    Thraka is offline
    SkaP
    Senior Member
    Join Date: Dec 2009
    Old 02-07-2010 , 00:57   Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.2
    Reply With Quote #10

    Is it possible anyone could take the part of this plugin that prints to chat for infected that a Witch has spawned and do only that(without randomizing it)? This way the infected know a witch has spawned and can set up an attack with her.
    SkaP 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 19:07.


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