Raised This Month: $ Target: $400
 0% 

[L4D2] Random SI Model [v1.0.6 | 20-October-2024]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Plugin ID:
7400
Plugin Version:
1.0.6
Plugin Category:
Gameplay
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
    91 
    Plugin Description:
    Turn the special infected models more random
    Old 12-01-2020 , 17:53   [L4D2] Random SI Model [v1.0.6 | 20-October-2024]
    Reply With Quote #1

    L4D2 ONLY

    Description

    This plugin turns the Special Infected models more random.

    Currently support the vanilla models from:
    • Smoker (L4D2 and L4D1 models)
    • Boomer (L4D2, Boomette and L4D1 models)
    • Hunter (L4D2 and L4D1 models)
    • Spitter (L4D2 model)
    • Jockey (L4D2 model)
    • Charger (L4D2 model)
    • Witch (Witch and Witch Bride models)
    • Tank (L4D2, DLC and L4D1 models)

    Features
    • Allow configuring which models should each SI spawn.
    • Allow maintaining custom SI models from map variants.

    Cvars

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

    PHP Code:
    // Random model for Boomer.
    // 0 = Disable. 1 = Enable L4D2 model. 2 = Enable Boomette model. 4 = Enable L4D1 model.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables L4D2 and Boomette model.
    // -
    // Default: "7"
    // Minimum: "0.000000"
    // Maximum: "7.000000"
    l4d2_random_si_model_boomer "7"

    // Chance to apply a random model for Boomer.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_boomer_chance "100"

    // Random model for Charger.
    // 0 = Disable. 1 = Enable L4D2 model.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_random_si_model_charger "1"

    // Chance to apply a random model for Charger.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_charger_chance "100"

    // Which type of client (human/bot) should apply the random model.
    // 0 = NONE, 1 = HUMAN, 2 = BOT, 3 = BOTH.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables for Humans and Bots.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d2_random_si_model_client_type "3"

    // Chance to keep the custom model (map variant).
    // 0 = OFF.
    // -
    // Default: "50"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_custom_chance "50"

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

    // Random model for Hunter.
    // 0 = Disable. 1 = Enable L4D2 model. 2 = Enable L4D1 model.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables L4D2 and L4D1 model.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d2_random_si_model_hunter "3"

    // Chance to apply a random model for Hunter.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_hunter_chance "100"

    // Random model for Jockey.
    // 0 = Disable. 1 = Enable L4D2 model.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_random_si_model_jockey "1"

    // Chance to apply a random model for Jockey.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_jockey_chance "100"

    // Random model for Smoker.
    // 0 = Disable. 1 = Enable L4D2 model. 2 = Enable L4D1 model.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables L4D2 and L4D1 model.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d2_random_si_model_smoker "3"

    // Chance to apply a random model for Smoker.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_smoker_chance "100"

    // Random model for Spitter.
    // 0 = Disable. 1 = Enable L4D2 model.
    // -
    // Default: "1"
    // Minimum: "0.000000"
    // Maximum: "1.000000"
    l4d2_random_si_model_spitter "1"

    // Chance to apply a random model for Spitter.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_spitter_chance "100"

    // Random model for Tank.
    // 0 = Disable. 1 = Enable L4D2 model. 2 = Enable L4D2 DLC model. 4 = Enable L4D1 model.
    // Add numbers greater than 0 for multiple options.
    // Example: "5", enables L4D2 and L4D1 model.
    // -
    // Default: "7"
    // Minimum: "0.000000"
    // Maximum: "7.000000"
    l4d2_random_si_model_tank "7"

    // Chance to apply a random model for Tank.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_tank_chance "100"

    // Random model for Witch.
    // 0 = Disable. 1 = Enable Witch model. 2 = Enable Witch Bride model.
    // Add numbers greater than 0 for multiple options.
    // Example: "3", enables the Witch and Witch Bride model.
    // -
    // Default: "3"
    // Minimum: "0.000000"
    // Maximum: "3.000000"
    l4d2_random_si_model_witch "3"

    // Chance to apply a random model for Witch.
    // 0 = OFF.
    // -
    // Default: "100"
    // Minimum: "0.000000"
    // Maximum: "100.000000"
    l4d2_random_si_model_witch_chance "100" 
    Admin Commands
    • sm_print_cvars_l4d2_random_si_model => Print the plugin related cvars and their respective values to the console. (z flag required)

    Change Log

    Spoiler


    Notes
    • This plugin precache some models.
    • Example of custom tank model on a custom map: White Forest (2nd Map) has a luminous tank.

    To Do
    • Add the relative first person arms model.

    Thank you!
    • Lux - for his random Tank/Witch plugins.
    • Tonblader - for requesting chance cvars.
    • TrevorSoldier - for requesting custom model variant support.
    • Mr. Man - for reporting a missing model precache crashing the server when a Boomete dies.
    • yabi - for reporting plugin breaking Suicide Blitz 2 finale when the Tank model changes.

    Related Plugins


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

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

    Last edited by Marttt; 10-20-2024 at 21:23.
    Marttt is offline
    Sev
    Veteran Member
    Join Date: May 2010
    Old 12-01-2020 , 19:12   Re: [L4D2] Random SI Models [v1.0.0 | 01-December-2020]
    Reply With Quote #2

    Very neat.

    Gonna have a look.
    Sev is offline
    HarryPotter
    Veteran Member
    Join Date: Sep 2017
    Location: Taiwan, Asia
    Old 12-02-2020 , 10:09   Re: [L4D2] Random SI Models [v1.0.0 | 01-December-2020]
    Reply With Quote #3

    wow, more funs
    __________________
    HarryPotter is offline
    Edison1318
    Senior Member
    Join Date: Nov 2015
    Location: Peaceful place of the in
    Old 12-21-2020 , 03:15   Re: [L4D2] Random SI Models [v1.0.1 | 02-December-2020]
    Reply With Quote #4

    You could also try to apply special infected's first person arms into the special infected model you apply on so it'll kinda match the playermodel well on versus or if spectator spectates SIs on first person.
    __________________
    EdisonGar

    Last edited by Edison1318; 12-21-2020 at 03:16.
    Edison1318 is offline
    Send a message via Skype™ to Edison1318
    TrevorSoldier
    New Member
    Join Date: Aug 2018
    Old 02-26-2022 , 12:32   Re: [L4D2] Random SI Model [v1.0.3 | 18-January-2020]
    Reply With Quote #5

    suggestion: add the charger jockey and spitter so they can randomize on custom maps that have custom models for those infected
    TrevorSoldier is offline
    TrevorSoldier
    New Member
    Join Date: Aug 2018
    Old 02-26-2022 , 17:48   Re: [L4D2] Random SI Model [v1.0.3 | 18-January-2020]
    Reply With Quote #6

    i have addons that patch over custom campaigns and they add custom models for the jockey charger and spitter

    here are some examples

    https://steamcommunity.com/sharedfil...?id=2750619524

    https://steamcommunity.com/sharedfil...t=concept+spec
    TrevorSoldier is offline
    Mr. Man
    Veteran Member
    Join Date: Mar 2011
    Location: Huh?
    Old 03-10-2022 , 02:36   Re: [L4D2] Random SI Model [v1.0.4 | 28-February-2022]
    Reply With Quote #7

    Hey, not sure if this is related to your plugin but I am getting the following crash related to the boomette model from this crash report: https://crash.limetech.org/5aay6ngsqtbm

    Code:
    10/ - player: UTIL_SetModel: not precached: models/infected/limbs/exploded_boomette.mdl
    Let me know.
    __________________
    Mr. Man is offline
    Toranks
    Senior Member
    Join Date: Dec 2021
    Location: Spain
    Old 04-24-2022 , 21:30   Re: [L4D2] Random SI Model [v1.0.5 | 10-March-2022]
    Reply With Quote #8

    What is the difference or interaction between l4d2_random_si_model_charger_chance and l4d2_random_si_model_custom_chance. Same question to jockey and spitter which only has one variant.
    For example, if I set l4d2_random_si_model_charger_chance to 50 and l4d2_random_si_model_custom_chance 50 on a map with custom Charger, what is the chance to obtain L4D2 original Charger and custom map Charger? 25-75% or 50%? If I set to 0 one of the two but not the other, what happens?
    Toranks is offline
    Marttt
    Veteran Member
    Join Date: Jan 2019
    Location: Brazil
    Old 04-24-2022 , 22:39   Re: [L4D2] Random SI Model [v1.0.5 | 10-March-2022]
    Reply With Quote #9

    The plugin checks first if is an unknown model (not vanilla) to roll the l4d2_random_si_model_custom_chance, then later rolls a check based on the SI class chance.

    I recommend using the default configs for these SI.

    I remember testing it in TrevorSoldier example and was working.

    Jockey, Charger, and Spitter were added just to be ready to support future "new skins" if Valve or TLS team implements it someday.

    So since there is no "additional model" for them, just set it to 100% and let the custom model chance roll.
    __________________

    Last edited by Marttt; 04-24-2022 at 22:43.
    Marttt is offline
    Toranks
    Senior Member
    Join Date: Dec 2021
    Location: Spain
    Old 04-24-2022 , 23:30   Re: [L4D2] Random SI Model [v1.0.5 | 10-March-2022]
    Reply With Quote #10

    Quote:
    Originally Posted by Marttt View Post
    Jockey, Charger, and Spitter were added just to be ready to support future "new skins" if Valve or TLS team implements it someday.

    So since there is no "additional model" for them, just set it to 100% and let the custom model chance roll.
    Thanks, that info is enough to understand it. However, I have been using this plugin since you updated it to take advantage of the unique models of custom campaigns, localhost server, alone or online with friends, and work perfectly so far to all players, getting up to 4 different random models on the same map. It also works with Charger, Spitter and Jockey, but I wasn't getting the percentages right if I used something other than 100, so I'll keep using 100 and set the custom model value by changing the default 50 to whatever I want.

    Last edited by Toranks; 04-24-2022 at 23:35.
    Toranks 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 02:02.


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