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

[L4D2] Special Infected Warnings Vocalize Fix (NO LONGER NEEDED)


Post New Thread Reply   
 
Thread Tools Display Modes
id5473
Member
Join Date: Mar 2012
Old 09-18-2014 , 16:01   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #51

So I've used this for the last couple of weeks and noticed that it's mostly nick who's announcing stuff. Why i wonder? i looked at the source.. expecting him to be the first to be checked.. but no he's even the 3rd. yet he is almost always the one saying the line.
Does it go through all "if" statements for one infected? because on rare occasion i have 2 survivors say their line at the same time. (for the same infected - but that could also be that the director just spawns 2 of the same type)
Another possible cause i could come up with: nick is 'special' with his ability to mute coach and ellis.. if either of them would vocalize but nicks "if" also returns true he might just flat out interrupt them before they even start.
So i wonder if it would make sense to just add another (maybe random?) timer that prevents the same survivor to vocalize again?

Last edited by id5473; 09-18-2014 at 16:06.
id5473 is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 09-18-2014 , 16:15   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #52

Quote:
Originally Posted by id5473 View Post
So I've used this for the last couple of weeks and noticed that it's mostly nick who's announcing stuff. Why i wonder? i looked at the source.. expecting him to be the first to be checked.. but no he's even the 3rd. yet he is almost always the one saying the line.
Does it go through all "if" statements for one infected? because on rare occasion i have 2 survivors say their line at the same time. (for the same infected - but that could also be that the director just spawns 2 of the same type)
Another possible cause i could come up with: nick is 'special' with his ability to mute coach and ellis.. if either of them would vocalize but nicks "if" also returns true he might just flat out interrupt them before they even start.
So i wonder if it would make sense to just add another (maybe random?) timer that prevents the same survivor to vocalize again?
Yes, it cycles through ALL survivors and based on the percentage chance, they vocalize.

The chance is calculated individually for every survivor, I haven't really noticed this oddity as I have it set to 75% chance myself.

It is also possible to just set the chance to 100% and the cooldowns to 0 seconds and every survivor should vocalize the warnings.

Also, did you update to the newest version?

The way the plugin works, is it forces a survivor to vocalize, and after such, the cooldown comes in.

However, the older versions didn't check if a survivor was vocalizing, meaning, if they were, the warning would fail to be vocalize, but the cooldown was still being applied.

In the latest version, the plugin first checks to see if a survivor is not already vocalizing to prevent this from happening
__________________
DeathChaos25 is offline
id5473
Member
Join Date: Mar 2012
Old 09-18-2014 , 16:22   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #53

apparently i wasn't using the latest version. sorry
Updated now. But i have my doubts it's gone. But i'll keep an EAR on it ;)
id5473 is offline
id5473
Member
Join Date: Mar 2012
Old 09-26-2014 , 17:16   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #54

i still think it's only one survivor announcing everything during an entire campaign.. hasn't anyone using this observed the same effect? While it doesn't seem to be nick all the time.
In the last campaign I played just now for instance (dark carnival) coach announced all the "bugged infected" in all 5 maps.

Spoiler

Last edited by id5473; 09-26-2014 at 17:17.
id5473 is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 09-26-2014 , 19:03   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #55

Quote:
Originally Posted by id5473 View Post
i still think it's only one survivor announcing everything during an entire campaign.. hasn't anyone using this observed the same effect? While it doesn't seem to be nick all the time.
In the last campaign I played just now for instance (dark carnival) coach announced all the "bugged infected" in all 5 maps.

Spoiler
If it helps, I've set vocalize_chance to 75 myself, and I rarely get 2 survivors vocalizing at the same time, and I get variations amongst who does the vocalizing.

The thing is, after an SI spawns, there is a full 2 second delay before warnings are issued.

However, since the warnings are coming out of scene processor, as opposed to being a scripted scene, the warnings are low priority and can easily get cancelled out before being initialized.

Even with me setting the chance to 75%, they're not as common as you'd think they'd be.
__________________
DeathChaos25 is offline
id5473
Member
Join Date: Mar 2012
Old 09-28-2014 , 16:19   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #56

Here's an altered version of the plugin that doesn't call the vcd files but rather the concept and then allows the response system of l4d2 based on the talker files do the timer delay and stuff. (concepts and rules for the survivors included)

I haven't done super extensive testing but it works from what i can tell.

so using this smx without adapting the talker files is pointless.

id
Attached Files
File Type: zip si_fix.zip (8.0 KB, 155 views)

Last edited by id5473; 09-28-2014 at 16:23.
id5473 is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 09-28-2014 , 20:27   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #57

Quote:
Originally Posted by id5473 View Post
Here's an altered version of the plugin that doesn't call the vcd files but rather the concept and then allows the response system of l4d2 based on the talker files do the timer delay and stuff. (concepts and rules for the survivors included)

I haven't done super extensive testing but it works from what i can tell.

so using this smx without adapting the talker files is pointless.

id
I actually thought about this at first, but because the concepts themselves never actually fired, I just completely discarded the idea without even trying.

But now I see that they indeed work when forced to fire, but since they don't exist in Vanilla talker files, plugin users would need to either modify their talker files or get Modified Talker, which IMO, there's no reason why anyone shouldn't at least be using MT in some shape or form.

I won't have access to my client PC for a few days, but could you try doing a small change within your Nick talker files and tell me if it works?

Change this;
Spoiler


with;

Spoiler


And test if they work?

As for the edit you posted, I see a few things that could be done better, I'll get to it and tidy it up a bit.

A few examples being no code for checking if client index belongs to a survivor, if said player is actually alive, etc...

Note that with the vcd files method, Zoey modelled Rochelles would at least have SOME lines with Zoey's voice, now Zoey models won't ever warn because the concept doesn't exist, so she'll still talk as Rochelle, etc...

Also, why did you keep the model check?

It's not as if the concept is Survivor specific, so we can entirely remove that section.

Before I keep on Rambling, I'll just tidy up your version and post it alongside the Main Version in the main post for Now, although I suspect I'll keep your version as the code will be more optimal, short and sweet.

Edit : Well, here it is.

Spoiler


Haven't really tested it but it should work no problems, so please test it out to see if it indeed does work before I edit the main post.

Edit #2 : Made the changes mentioned in post #59
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_si_warnings_vocalize_fix.sp - 187 views - 4.4 KB)
File Type: smx l4d2_si_warnings_vocalize_fix.smx (3.8 KB, 191 views)
__________________

Last edited by DeathChaos25; 09-29-2014 at 06:07.
DeathChaos25 is offline
id5473
Member
Join Date: Mar 2012
Old 09-29-2014 , 04:31   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #58

Quote:
Originally Posted by DeathChaos25 View Post
A few examples being no code for checking if client index belongs to a survivor, if said player is actually alive, etc...

...

Also, why did you keep the model check?

It's not as if the concept is Survivor specific, so we can entirely remove that section.
I compare the index with the model.. if the player with index X has model Y it must be a survivor. I'm not sure what the response here is if the player is dead. does he still have a survivor model assigned? or is he in spectator team?

I need the model check to figure out what playerindex has the survivor i picked earlier so i can make him vocalize. if he can't be found i pick a new survivor and try again.
I think your solution will most likely pick the same survivors over and over as i don't think the playerindexes change too much and if .. lets say ellis has playerindex 1 he'll be the one announcing most of the time as the loops reaches his index fist all the time.. no?

I'll try your talker adjustment when i'm home from work.

Last edited by id5473; 09-29-2014 at 04:35.
id5473 is offline
DeathChaos25
Senior Member
Join Date: Jan 2014
Location: Puerto Rico
Old 09-29-2014 , 06:00   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #59

Quote:
Originally Posted by id5473 View Post
I compare the index with the model.. if the player with index X has model Y it must be a survivor. I'm not sure what the response here is if the player is dead. does he still have a survivor model assigned? or is he in spectator team?

I need the model check to figure out what playerindex has the survivor i picked earlier so i can make him vocalize. if he can't be found i pick a new survivor and try again.
I think your solution will most likely pick the same survivors over and over as i don't think the playerindexes change too much and if .. lets say ellis has playerindex 1 he'll be the one announcing most of the time as the loops reaches his index fist all the time.. no?

I'll try your talker adjustment when i'm home from work.
It depends, you don't really need to check models, just checking to see if they're a survivor (Team #2) is enough, because let's say for some reason, I am an Infected, and I have a Zoey model, with a model only based check, this would result in a positive, and we can't have that.

As for the check, you are almost completely correct.

In the check I coded, there are 3 Different conditions.
a) Player must be a survivor
b) they must be alive
c) they must not currently be vocalizing

Maybe I should once again add a percentage chance so that we can possibly skip a few indexes every time instead of having the first index possibly result in a positive every single time, I'll edit the code in the previous post.

If any of these return a false positive, the loop moves on into the next client index, and so on until a client index who meets all 3 conditions is found, and then that survivor is made to vocalize the warning.

Also note that client indexes are "recycled" in the sense that the same index can belong to 2 different people at different times, but userid is unique to every user.
Let's say I join a versus server, and my client index is 3, and I am survivor Nick.
After some time, I leave the server, client index 3 is now assigned to someone else, maybe an Infected Bot.

A Different person now joins the same server, but as a Spectator this time, client index 3 is now assigned to this person, all of this could have happened in the span of a single minute, maybe less time, or more time.

Meaning storing client indexes over time is not advisable.
__________________

Last edited by DeathChaos25; 09-29-2014 at 06:08.
DeathChaos25 is offline
id5473
Member
Join Date: Mar 2012
Old 09-29-2014 , 16:58   Re: [L4D2] Special Infected Warnings Vocalize Fix
Reply With Quote #60

The scenes don't work i'm afraid.
I suppose it's maybe because the models aren't actually there yet (only that looping orange animation outline) so the facial animations stored in these scenes would be useless anyway. I played around with the conditions a bit but to no avail.

"for some reason, I am an Infected, and I have a Zoey model," - this event is too unlikely to actually check for it imho. just like checking for buckshot dmg type when writing a plugin around punching survivors as a tank. ;)

Also I think the check "they must not currently be vocalizing"is optional as the response system will determine if he's busy or not and will either start the line or not. (unless you are going to re-roll who's vocalizing... otherwise it's superfluous, no?)

Granted I know little about client indexes.. but i've observed it takes a fair 10-50 secs for people to click on (join game) till they have actually joined the game.
(if you run l4d2 with the console parameter -dev you can easily see (even as a client yourself) when someone connects (some DLC1/DLC2 installed = 0 messages appear) and when he finally joins the game a message #Cstrike_TitlesTXT_Game_connected appears.

Bottomline is: clientindex changing the owner during one of the loops is highly unlikely i think. (my assumption being: clientindex is distributed as soon as he starts connecting)
esp. if you run a normal realism/coop server with 4 slots. even if it's 8 slot server.
id5473 is offline
Reply



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 01:45.


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