View Single Post
Author Message
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 06-29-2020 , 16:37   [L4D1 & L4D2] SI Burnt Skin [v1.0.5 | 17-March-2021]
Reply With Quote #1

Description

There is a game behavior that applies a skin change to special infected, while on fire, that darkens it's skin from time to time.

TLS brought these changes also to the other special infecteds (before was only available to the Tank).

Features
  • Allows special infecteds spawning with burnt skin. (Configurable chance and percentage burn)
  • Increases the maximum burnt skin value from 85% to 100%. (z_burn_max cvar)
  • Bonus damage to special infected based on the % amount of skin burned. (default: 0-10%)
  • Control how fast the burn effect grows on burning Tanks. (z_burn_rate cvar)
  • Restores the Tank's burn percent when it gets frustrated (pass the control in versus).

Preview



Max SI Burn Percent Table

The min value is always 0.0.

On L4D1 the max value is always 1.0.

For L4D2 the max value depends on the SI:
  • SMOKER => 0.30
  • BOOMER => 0.12
  • HUNTER => 0.35
  • SPITTER => 0.15
  • JOCKEY => 0.40
  • CHARGER => 0.40
  • TANK => 1.00

Cvars

A configuration file named "l4d_si_burnt_skin.cfg" will automatically be created for you upon the first run in the "\cfg\sourcemod\" folder.

PHP Code:
// Increases the hidden cvar "z_burn_max" to its maximum value (from default: 0.85, to: 1.00).
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_si_burnt_skin_burn_max "1"

// How fast the burn effect grows on burning special infected (changes the hidden cvar "z_burn_rate" value).
// -
// Default: "0.01"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_si_burnt_skin_burn_rate "0.01"

// Chance of a special infected spawn with burnt skin.
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_si_burnt_skin_chance "100.0"

// Damage bonus % multiplied by the percentage of the special infected burnt skin.
// Formula: Damage + (Damage * Bonus / 100 * Burn Percentage).
// 0 = OFF.
// -
// Default: "10.0"
// Minimum: "-100.000000"
l4d_si_burnt_skin_dmg_multiplier "10.0"

// Enable/Disable the plugin.
// 0 = Enable, 1 = Disable.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_si_burnt_skin_enable "1"

// Maximum random % of skin burn on special infecteds.
// -
// Default: "100.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_si_burnt_skin_max_percent "100.0"

// Minimal random % of skin burn on special infecteds.
// -
// Default: "0.0"
// Minimum: "0.000000"
// Maximum: "100.000000"
l4d_si_burnt_skin_min_percent "0.0"

// Restores the Tank's burn percent when it gets frustrated (pass the control).
// 0 = OFF, 1 = ON.
// -
// Default: "1"
// Minimum: "0.000000"
// Maximum: "1.000000"
l4d_si_burnt_skin_restore_burn "1"

// Which special infected should have burnt skin.
// 1 = SMOKER, 2 = BOOMER, 4 = HUNTER, 8 = SPITTER, 16 = JOCKEY, 32 = CHARGER, 64 = TANK.
// Add numbers greater than 0 for multiple options.
// Example: "127", enables burnt skin for all SI.
// -
// Default: "127"
// Minimum: "0.000000"
// Maximum: "127.000000"
l4d_si_burnt_skin_si "127" 
Related Game Cvars
  • z_burn_max => Max amount for the burn effect. (default: 0.85)
  • z_burn_rate => How fast the burn effect grows on burning players. (default: 0.01)

Admin Commands
  • sm_getburnpercent => Prints the burnt skin percentage from special infected at crosshair, if none is found, then opens a menu to select an alive special infected and get its the burnt skin percentage. (z flag required)
  • sm_setburnpercent => Sets the burnt skin percentage from special infected at crosshair, if none is found, then opens a menu to select an alive special infected and set its burnt skin percentage. (z flag required)
  • sm_print_cvars_l4d_si_burnt_skin => Print the plugin related cvars and their respective values to the console. (z flag required)

Change Log

Spoiler


Known issues
  • Special infected skin changes might NOT work with custom models.
  • If a player controlling a Tank disconnects or changes team, the burn percent is reset (game behavior).

Notes
  • This effect was achieved by changing the player m_burnPercent netprop value.
  • The player classname has this netprop but it only applies changes to special infected.
  • L4D1 support visual changes only to the Tank.
  • The max m_burnPercent necessary to achieve 100% burnt skin for each special infected on L4D2 has different values. Check the Max SI Burn Percent Table.

Thank you!

Related Plugins

Post Reply
  • Any feedback, bug reports, fixes, improvements, translations or suggestions for the plugin are welcome.

Installation
  • Put the "l4d_si_burnt_skin.smx" file (click Get Plugin) in your "\addons\sourcemod\plugins\" folder.
Attached Files
File Type: sp Get Plugin or Get Source (l4d_si_burnt_skin.sp - 280 views - 34.8 KB)
__________________

Last edited by Marttt; 01-15-2023 at 12:18.
Marttt is offline