AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [L4D1/2] Randomize Tank Witch HP and Speed 1.2 (https://forums.alliedmods.net/showthread.php?t=117600)

Thraka 02-02-2010 22:24

[L4D1/2] Randomize Tank Witch HP and Speed 1.2
 
3 Attachment(s)
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


M249-M4A1 02-03-2010 00:19

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
 
This code is SO much less of an eyesore!

dirka_dirka 02-03-2010 01:56

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
 
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.

Thraka 02-03-2010 09:14

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
 
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.

kiwi87 02-03-2010 15:36

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
 
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.

Thraka 02-03-2010 22:08

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
 
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.

dirka_dirka 02-04-2010 01:13

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.0
 
its *1.5 for versus difficulty.

theres no hp_easy, hp_expert cvars, so all other difficulties just multiply that value.

Thraka 02-04-2010 02:13

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.1
 
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 02-05-2010 20:10

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.2
 
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.

SkaP 02-07-2010 00:57

Re: [L4D1/2] Randomize Tank Witch HP and Speed 1.2
 
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.


All times are GMT -4. The time now is 10:35.

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