View Single Post
Author Message
cravenge
Veteran Member
Join Date: Nov 2015
Location: Chocolate Factory
Old 01-09-2022 , 22:41   [L4D/L4D2] Dialogue Criteria Fixes | 1.0 : Soon
Reply With Quote #1

About:
Recommended for servers that spawn all 8 survivors to make the L4D1 crew interact more in L4D2 campaigns instead of them being mute most of the time

Formerly known as L4D1 "DistTo" Criteria Fix, the plug-in has been expanded to cover more of the affected talker criteria and they are the following:
  1. Is<Gambler/Producer/Coach/Mechanic>Alive
    - These are the ones required by several remarks, such as Zoey joking about the stairs being Bill's favorite in Dead Air, to be called.

    They are limited to Survivors team only though which means if they are moved over to the Passing team, the L4D2 survivors will just remain almost silent.
  2. Is<NamVet/TeenGirl/Biker/Manager>Alive
    - Same as above.

    However, these ones are not listed as valid criteria when the campaign in question uses the L4D2 set, meaning the original survivors won't be able to do those responses even in campaigns where they originally spawn in should they be modified.
  3. DistTo<Gambler/Producer/Coach/Mechanic>
    - These are responsible for helping survivors know if their teammates are close or far away.

    Same limitation as the first one.
  4. DistTo<NamVet/TeenGirl/Biker/Manager>
    - Same as above.

    Although, there are a few other responses that check for both this criterion and the second one on the list. An example is Francis saying "Groovy." after picking up T2 shotguns with Zoey or Louis nearby before either mock him and he bites back afterwards.

    Unlike the L4D1 "IsAlive" criteria, they return the correct distances in campaigns where the L4D1 survivors are the only playable characters.
  5. DistToClosestSurvivor
    - This determines how near a teammate is to a survivor.

    The thing about this criterion is it does not account for the L4D1 set. In other words, when walking through campaigns with the L4D2 crew, Bill, Zoey, Francis and/or Louis is/are just... there and the game will not see one of them as the nearest teammate to you or anyone else.
  6. ClosestSurvivor
    - An unused criterion and like the one above, this checks for who the nearest teammate is but with similar issue.

ConVar(s):
  • dialogue_criteria_fixes_version
    → Version of the plug-in


Bug(s):
None

Requirement(s):
✧ SourceMod 1.11+
✧ My fork of the Source Scramble extension

Installation:
💡 Get the precompiled .smx file below and put it in the plugins folder or click "Get Source" if you want to compile it on your end
💡 (Optional) Download the .txt file and put it in the "gamedata" folder

Note(s):
📝 The game doesn't know how to handle clones well when it comes to fetching everyone's distances from each other. Let's say, you're Bill and another player is Zoey but there's someone else who's also Zoey. Whoever joined last would be the player that the game chooses to get the value of the "DistToTeenGirl" criterion and all voice lines that rely on Zoey's proximity will depend on the clone instead of the original.

Thanks:
🎮 Xiraiju Akara, EdisonGar, Xanaguy, Rise, Cuba, Sergi and Steakchelle - For testing

Related Plug-in(s):
[L4D/L4D2] Survivor Character Fixes

FAQ(s):
  1. Why is it not working?
    Please specify in detail. Simply saying so won't get you any answer.
  2. My server starts lagging like hell after I added this. Is there any solution?
    It's because of the maximum amount of players in your server. Wait for the extension version.


Changelog:
Code:
0.65 (03/10/22)
+ Corrected Windows offset for L4D2

0.6 (03/09/22)
* Renamed from "dialogue_criteria_fix-l4d2" to "dialogue_criteria_fix"
+ L4D1 support
+ Code optimization

0.5 (02/12/22)
+ Unlocked all "IsAlive" criteria for the Passing team
+ Squashed a bug regarding spectators
+ Crash protection against "m_survivorCharacter" network property having a negative value

0.4 (01/22/22)
+ Sorted out a possible handle leak
+ Server messages to know if the detours were enabled
+ Changed loop to iterate through every alive survivor all the time
+ Intercepted the appending of the distance related criteria to use the accurate values retrieved from the new method

0.3 (01/16/22)
+ Made the loop in the new method only operational if there are 2 or more survivors present for optimization
+ Upped the character check in a function in order for the L4D1 "IsAlive" criteria to be added

0.2 (01/14/22)
* Renamed from "l4d1_distto_criteria_fix-l4d2" to "dialogue_criteria_fix-l4d2"
+ Removed the unnecessary team restriction for all "DistTo" criteria
+ Reconfigured the game's method of getting the closest teammate of a survivor

0.1 (01/10/22)
* First release
+ Removed the unnecessary survivor set restriction for the L4D1 "DistTo" criteria
Attached Files
File Type: sp Get Plugin or Get Source (dialogue_criteria_fix.sp - 711 views - 28.0 KB)
File Type: smx dialogue_criteria_fix.smx (11.5 KB, 778 views)
File Type: txt dialogue_criteria_fix.txt (7.1 KB, 882 views)

Last edited by cravenge; 06-28-2023 at 08:40.
cravenge is offline