Raised This Month: $32 Target: $400
 8% 

[L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 04-03-2019 , 05:16   [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #1

For the past few years I kept on wondering how to damage the L4D1 survivor bots on Team (m_iTeamNum) 4. What I really know is that actual players in L4D1 Survivor Team is not invincible but except the bots. Try adding bots like sb_add Bill/Zoey/Francis/Louis. The bots won't get damaged. I also tried using SDKHooks TakeDamage on them. No effects. I even tried m_Flags godmode disable on them. Nothing happens. I found something about this m_iFlags is that when I set myself to Fakeclient when I'm in L4D1 Team, I get no damage like the l4d1 bots. It's really interesting. However, I could not remove the FakeClient flags from the survivorbots cause I think the game is forcing the survivorbots to be fakeclient. I can only could kill the l4d1 bots just using slay command. So far that's how I experiencing on l4d1 survivor bots. They just take no damage, and go by their own if the cvar sb_l4d1_survivor_behavior is set to 0.

Maybe there's some sort like a code, an extension or a signature to remove invincibility from l4d1 survivor bots but this is just an optional request. Feel free to comment if you had anything to say.
__________________
EdisonGar

Last edited by Edison1318; 04-16-2019 at 00:18.
Edison1318 is offline
Send a message via Skype™ to Edison1318
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 04-03-2019 , 06:06   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #2

You try "SDKHook_OnTakeDamageAlive" i think it has something to do with CBaseCombatCharacter instead of CTerrorPlayer i remember seeing it in sourcemod git.

I just noticed there is a clone of OnTakeDamage for CTerrorPlayer
PHP Code:
CTerrorPlayer::OnTakeDamage(CTakeDamageInfo const&)    .text    0000000000962430    000010E5    0000010C    00000008    R    .    .    .    B    T    .
CTerrorPlayer::OnTakeDamageInternal(CTakeDamageInfo &) [clone]    .text    0000000000973220    00001ED9    000000DC    00000000    R    .    .    .    B    .    .
CTerrorPlayer::OnTakeDamageInternal(CTakeDamageInfo &)    .text    0000000000975100    00000022    00000004    00000004    R    .    .    .    .    T    .
CTerrorPlayer::OnTakeDamage_Alive(CTakeDamageInfo const&)    .text    0000000000975130    000012B5    000000DC    00000008    R    .    .    .    B    T    
This is just a guess but i think the survivor bots are being pushed to this function below not the sm typical hooked function and filtered out by the team checks in the OnTakeDamage function.

PHP Code:
This points to some other damage function not the typical one i think
CTerrorPlayer::OnTakeDamageInternal(CTerrorPlayer *__hidden thisCTakeDamageInfo *)
_ZN13CTerrorPlayer20OnTakeDamageInternalER15CTakeDamageInfo

CTerrorPlayer
::OnTakeDamageInternal(CTakeDamageInfo &) [clone]
_ZN13CTerrorPlayer20OnTakeDamageInternalER15CTakeDamageInfo_part_996 
And still guessing i'm too lazy to look if sourcemod hooks these functions
PHP Code:
CTerrorPlayer::OnTakeDamage_Alive(CTerrorPlayer *this, const CTakeDamageInfo *)
_ZN13CTerrorPlayer18OnTakeDamage_AliveERK15CTakeDamageInfo

CTerrorPlayer
::OnTakeDamage(CTerrorPlayer *this, const CTakeDamageInfo *)
_ZN13CTerrorPlayer12OnTakeDamageERK15CTakeDamageInfo 
This is all guessing just trying to give an idea why maybe.

So you can try using DHooks if you on linux anyway and hook that function see if it gets called with damage to l4d1 survivors on team 4 using that signiture below, i can't really help for windows for sigs.

PHP Code:
@_ZN13CTerrorPlayer20OnTakeDamageInternalER15CTakeDamageInfo_part_996 
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 04-14-2019 , 09:41   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #3

I had been experimenting with adding more to The Passing CSM fix with the l4d1 survivors in the 2nd team being kicked/teleported around, to not modify the other survivors in the 4th team.

But when I randomly used incap on one of the passing survivors spawned from my testing plugin it worked. They weren't limping, but actually incapacitated.

After further testing, they were able to be damaged by survivors, infected and environmental hazards just like the normal survivor team although it doesn't show when I shoot them. I figured it was because CreateFakeClient didn't really create a fake client, but a real one with no working AI since they didn't do anything. That, or something went wrong with the process.

I'm still a newbie in Sourcemod, so I figured you may be able to make sense of this.
EDIT: I don't think IsFakeClient is affected, as I used a modified kick plugin that does something different if 'IsFakeClient' is true, and that something different does happen.

Last edited by Shadowysn; 04-14-2019 at 09:58.
Shadowysn is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-14-2019 , 11:58   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #4

CreateFakeClient and kick them 1 second later for AI to takeover.
__________________
Silvers is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 04-15-2019 , 02:08   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #5

Quote:
Originally Posted by Silvers View Post
CreateFakeClient and kick them 1 second later for AI to takeover.
After testing, that only works for the normal survivor team.

When I do that with the passing team, they appear a second (kick delay) before just disappearing. No bots of them anywhere.
EDIT: Wait, do you mean adding them to the normal team and then switch to the other team?

Last edited by Shadowysn; 04-15-2019 at 02:09.
Shadowysn is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-15-2019 , 15:14   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #6

Quote:
Originally Posted by Shadowysn View Post
After testing, that only works for the normal survivor team.

When I do that with the passing team, they appear a second (kick delay) before just disappearing. No bots of them anywhere.
EDIT: Wait, do you mean adding them to the normal team and then switch to the other team?
I meant for survivors, I don't know what you're doing or want sorry.
__________________
Silvers is offline
Edison1318
Senior Member
Join Date: Nov 2015
Location: Peaceful place of the in
Old 04-16-2019 , 00:10   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #7

Quote:
Originally Posted by Shadowysn View Post
I had been experimenting with adding more to The Passing CSM fix with the l4d1 survivors in the 2nd team being kicked/teleported around, to not modify the other survivors in the 4th team.

But when I randomly used incap on one of the passing survivors spawned from my testing plugin it worked. They weren't limping, but actually incapacitated.

After further testing, they were able to be damaged by survivors, infected and environmental hazards just like the normal survivor team although it doesn't show when I shoot them. I figured it was because CreateFakeClient didn't really create a fake client, but a real one with no working AI since they didn't do anything. That, or something went wrong with the process.

I'm still a newbie in Sourcemod, so I figured you may be able to make sense of this.
EDIT: I don't think IsFakeClient is affected, as I used a modified kick plugin that does something different if 'IsFakeClient' is true, and that something different does happen.
Oh that one, yea creating fake client is like an actual player but it's not a "SurvivorBot". I tested it before that you can actually incap or damage them friendly fire. If you create a fake client on survivor team, the survivorbots will identify the fake client as a player and follow it.

Quote:
Originally Posted by Shadowysn View Post
After testing, that only works for the normal survivor team.

When I do that with the passing team, they appear a second (kick delay) before just disappearing. No bots of them anywhere.
EDIT: Wait, do you mean adding them to the normal team and then switch to the other team?
It doesn't create the l4d1 survivor bot team when you kick the fake client one same goes to player. You have to manually add them typing sb_add "l4d1 survivor" to add them. Maybe if you want to create more l4d1 survivor bots, just type sb_add francis then you change his character netprop then sb_add francis again then you can create a clone.
__________________
EdisonGar

Last edited by Edison1318; 04-16-2019 at 00:15.
Edison1318 is offline
Send a message via Skype™ to Edison1318
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 04-16-2019 , 07:37   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #8

Quote:
Originally Posted by Edison1318 View Post
Oh that one, yea creating fake client is like an actual player but it's not a "SurvivorBot". I tested it before that you can actually incap or damage them friendly fire. If you create a fake client on survivor team, the survivorbots will identify the fake client as a player and follow it.

It doesn't create the l4d1 survivor bot team when you kick the fake client one same goes to player. You have to manually add them typing sb_add "l4d1 survivor" to add them. Maybe if you want to create more l4d1 survivor bots, just type sb_add francis then you change his character netprop then sb_add francis again then you can create a clone.
I know about sb_add. The thing is, it doesn't spawn a clone when there's already another Francis or a survivor of the type you're trying to spawn. There's a potential situation with a survivor changer and 4 players, in which all 4 slots of l4d1 characters are filled and we can't spawn any Passing bots.

I get that it can be remedied by changing any conflicting survivor's character netprop to something different, then change it back when it's done. But I'd prefer a surefire way of spawning a passing-team bot without tampering with other survivor's netprops or making use of a command that refuses to spawn clones.
Quote:
Originally Posted by Silvers View Post
I meant for survivors, I don't know what you're doing or want sorry.
The thing Edison and me were talking about is the group of uncontrollable survivors in The Passing.
I'm going to assume you know the quirks of them so...

Edison here wants to make those bots susceptible to damage. They're normally invincible, but if they are player-controlled they're not.

Me here wants to find a way to spawn the bots without use of sb_add, info_l4d1_survivor_spawn, or any tampering with other survivor's character netprops.

Last edited by Shadowysn; 04-16-2019 at 07:57.
Shadowysn is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 04-16-2019 , 10:40   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #9

Checkout the deathmatch plugins, probably does what you want. Think I've seen another but here are two: https://forums.alliedmods.net/showthread.php?p=1292337 and https://forums.alliedmods.net/showthread.php?t=136615
__________________
Silvers is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 11-21-2019 , 07:18   Re: [L4D2] Is it possible to make L4D1 Survivor Bots Not Invincible?
Reply With Quote #10

Here's a hacky plugin I made.

It calculates and manually sets both the health and temporary health of the bots whenever they receive damage from OnTakeDamagePost, as well as other stuff like forcing them to suicide on the killing blow.




Tel me if your gong to shot zoe farncis and lois
__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.
no plugin requests, sorry


My Plugins:
-search list-
Modified Plugins:
1 | 2 | 3 | 4

Last edited by Shadowysn; 08-04-2022 at 11:46.
Shadowysn 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 14:56.


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