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

[EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown


Post New Thread Reply   
 
Thread Tools Display Modes
wowhd93
Junior Member
Join Date: Sep 2012
Old 07-17-2013 , 00:20   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #531

I applied the one which disawar1 uploaded, (on Windows)

It seems to solve all of the crash that when survivor passes through specific place,

but crash happens when smoker is dead in vs mode...ㅜㅜ

I always appreciate for you, developers' labor and working.

It would be better l4dt2 works fine in windows too

Last edited by wowhd93; 07-17-2013 at 00:20.
wowhd93 is offline
disawar1
AlliedModders Donor
Join Date: Aug 2011
Location: Russian
Old 07-17-2013 , 04:49   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #532

Quote:
Originally Posted by wowhd93 View Post
but crash happens when smoker is dead in vs mode...ㅜㅜ
I checked it out. I'm sure it is not l4dt2 problem.

dcx2 gamedata works fine, also everyone can uncomment "CDirector_GetScriptValueString" signature, since it is stable, I confirm it.

Did anyone test windows playslots version???

EDIT:

playslots version works.
__________________

Last edited by disawar1; 07-17-2013 at 06:26. Reason: arrrr grammar
disawar1 is offline
wowhd93
Junior Member
Join Date: Sep 2012
Old 07-17-2013 , 06:11   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #533

well, without l4dt2, anything does not happens when smoker is down.

I think crashing happens only when l4dt2 is applied to server,

Can you tell me what version of SM/MM you are using?

* edit

crash is fixed when i used latest version of SM

Last edited by wowhd93; 07-17-2013 at 06:24.
wowhd93 is offline
disawar1
AlliedModders Donor
Join Date: Aug 2011
Location: Russian
Old 07-17-2013 , 06:31   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #534

I'm talking about windows l4dt2 and I don't have any 3rd party plugins/extensions except of l4dt2 test plugin.

Metamod:Source version 1.10.0-dev
SourceMod Version: 1.6.0-dev+3935

* edit

__________________

Last edited by disawar1; 07-17-2013 at 09:13.
disawar1 is offline
dcx2
Senior Member
Join Date: Sep 2011
Old 07-17-2013 , 21:34   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #535

After confirmation that my new sigs had resolved the crashing problem, I've pushed the updates out to the Google Code repository. So the first post gamedata is now correct.

Are there any other sigs that need fixed still? Any playerslots stuff?
__________________
dcx2 is offline
V1SoR
Member
Join Date: Jan 2011
Old 07-18-2013 , 05:14   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #536

Quote:
Originally Posted by dcx2 View Post
Are there any other sigs that need fixed still? Any playerslots stuff?
Playerslots aren't actually 'direct' function sigs, they're sigs for some of the code/assembler segments, responsible for limiting slots or reserving the lobby. These are a tad harder to find, and, aside from that, L4DToolz does a much better job than Downtown in this regard, so I suggest you switch to it.
Quote:
Originally Posted by dcx2 View Post
Not sure where the best place to ask this is, but...I would like to add a new forward to Left4Downtown2. I would like to be able to return Plugin_Handled to prevent bots from attempting to use healing items. I've found the signature that I want in both Windows and Linux, but unfortunately I have no idea what to do from here. Can someone teach this man how to fish? Or point me toward some resource on how to modify an extension to support another detour?

PHP Code:
            /* Called by bots to determine whether they should heal, and who
               Look for string "Trying to heal a friend" */
            
"SurvivorBot_UseHealingItems"
            
{
                
"library"    "server"
                "linux"    "@_ZN11SurvivorBot15UseHealingItemsEP6ActionIS_E"
                "windows"  "\x55\x8B\xEC\x83\xEC\x20\x53\x56\x8B\xD9\x57\x8D\x8B"
                
/* 55 8B EC 83 EC 20 53 56 8B D9 57 8D 8B */
            

In regards to this particular case my assumption would be that blocking it would be a disservice for bots. I know where you're coming from trying to block it, but it obviously gets constantly called from a different function. Likely there's a monitor function watching for bot HP to go below a certain limit, from where this one gets invoked. If you just try blocking it, the bots will very likely just keep holding pills or medkit in their hands wihtout actually doing anything due to an infinite loop of fruitless invocations. They may not even move from place or ever switch weapons again. As you can see, shit isn't as easy as just about blocking it. If you really want to force them to not ever use healing items again, you'd need to find the if() condition where the bot's HP is being compared to a value(likely static, but it may be cvar'd as well), and then patch that value to -1 to be sure. That way you will avoid the invocation of said function entirely, so you won't even need to detour and block it.

Hope that helps.

Last edited by V1SoR; 07-18-2013 at 05:20.
V1SoR is offline
Silvers
SourceMod Plugin Approver
Join Date: Aug 2010
Location: SpaceX
Old 07-18-2013 , 05:21   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #537

Quote:
Originally Posted by V1SoR View Post
In regards to this particular case my assumption would be that blocking it would be a disservice for bots. I know where you're coming from trying to block it, but it obviously gets constantly called from a different function. Likely there's a monitor function watching for bot HP to go below a certain limit, from where this one gets invoked. If you just try blocking it, the bots will very likely just keep holding pills or medkit in their hands wihtout actually doing anything due to an infinite loop of fruitless invocations. They may not even move from place or ever switch weapons again. As you can see, shit isn't as easy as just about blocking it. If you really want to force them to not ever use healing items again, you'd need to find the if() condition where the bot's HP is being compared to a value(likely static, but it may be cvar'd as well), and then patch that value to -1 to be sure. That way you will avoid the invocation of said function entirely, so you won't even need to detour and block it.

Hope that helps.
Ages ago I made a "Block Bots" plugin to prevent bots from picking up pills/first aid/healing self/healing others. It worked fine and even got new sigs for this latest update, I past on the info to dcx2 who has added it to l4dt2 afaik and it works, no issues the bots play as if they don't want pills/heal. ;)
__________________
Silvers is offline
dcx2
Senior Member
Join Date: Sep 2011
Old 07-18-2013 , 08:48   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #538

As for playerslots stuff, I just wanted to make sure all the stuff in the gamedata is up to date. L4DToolz may be better, but it's still counter-productive to have broken things lying around in gamedata.

As for UseHealingItems, I can understand your fear. Silvers and I (separately) have previously blocked bots from trying to grab things with the SDKHook WeaponCanUse (e.g. if bot has a magnum, block them from grabbing pistols). And you're right, in this case, the bots still run over to the pistol, and then just fail to grab it. But I went and taught myself how to fish ( with http://wiki.alliedmods.net/Compiling_SourceMod and http://wiki.alliedmods.net/Writing_Extensions in case anyone else wants to learn how to fish), added it to L4DT2, made a plugin (actually, added it to the existing plugin), and it is exactly what I have wanted all along and solves several problems we've been having with my old stopbot plugin.

None of your fears have come true, because I think this function is what decides whether bots should heal, before dispatching any Actions. It does things like check how much health the bot has against temp health consider factor and toughness buffer, how far away they are from allies, are they or their allies on a ladder, etc. If everything goes well, the game constructs a new object, like SurvivorHealSelf, and returns it to the caller. I'm assuming the caller of UseHealingItems then invokes this new object, because SurvivorHealSelf has methods of its own like Update(). Update() looks like it has the code that makes bots switch to their kit and heal themselves - for instance if they get attacked they stop healing. So by blocking UseHealingItems - or rather, returning a null pointer, which is what UseHealingItems does if the bot isn't supposed to use any healing items - the bots never get to decide whether they want to use any healing items. They just go about their business like usual.

Now that I've been given commit privilege, I plan on updating L4DT2 to include a UseHealingItems forward, and a few others that Silvers found that are useful for blocking behavior. In fact, now that I have some amount of control over their AI, I'm probably going to start looking for all kinds of routines to make into forwards for the purpose of controlling AI. EDIT: I remember you made a post a while back with a few new forwards you had made to your own copy of L4DT2. If you would like, I could commit those changes for you.
__________________

Last edited by dcx2; 07-18-2013 at 08:51.
dcx2 is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 07-18-2013 , 09:50   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #539

Quote:
Originally Posted by V1SoR View Post
[...]In regards to this particular case my assumption would be that blocking it would be a disservice for bots. I know where you're coming from trying to block it, but it obviously gets constantly called from a different function. Likely there's a monitor function watching for bot HP to go below a certain limit, from where this one gets invoked. If you just try blocking it, the bots will very likely just keep holding pills or medkit in their hands wihtout actually doing anything due to an infinite loop of fruitless invocations. They may not even move from place or ever switch weapons again. As you can see, shit isn't as easy as just about blocking it. If you really want to force them to not ever use healing items again, you'd need to find the if() condition where the bot's HP is being compared to a value(likely static, but it may be cvar'd as well), and then patch that value to -1 to be sure. That way you will avoid the invocation of said function entirely, so you won't even need to detour and block it.

Hope that helps.
In fact there exist cvars for that based on the percentage of health the bots have to be below to use the items.
Dr. Greg House is offline
crasx
Member
Join Date: May 2011
Location: Lakewood, CO
Old 07-20-2013 , 20:47   Re: [EXTENSION] Left 4 Downtown 2 (0.5.4.2) - L4D2 Only, Updated Left4Downtown
Reply With Quote #540

can we make sure humanplayerlimit is up to date on git? I accidentally erased my gamedata and the git one doesn't allow 8+
crasx 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 11:35.


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