This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

[L4D2] Survivor Bot AI Improver


Post New Thread Reply   
 
Thread Tools Display Modes
Binhz109
Junior Member
Join Date: May 2022
Old 08-19-2023 , 03:36   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #81

i don't see bot carry gas can, i have enabled l4d2_improvedbots_alwayscarryprop "1"
Binhz109 is offline
Kerouha
Member
Join Date: Jul 2015
Location: Russian Federation
Old 08-21-2023 , 06:21   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #82

Quote:
Originally Posted by Binhz109 View Post
i don't see bot carry gas can, i have enabled l4d2_improvedbots_alwayscarryprop "1"
AFAIK bots will not just pick up and carry gas cans by themselves (not through this plugin anyway). The cvar only dictates how desperately a bot is going to hold on to the object they're carrying.
Kerouha is offline
Mystik Spiral
Senior Member
Join Date: Oct 2020
Location: Orlando, FL
Old 08-21-2023 , 21:58   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #83

Right, I believe it was intended for gnome, cola, and similar.
__________________
Mystik Spiral is offline
kooper990
Member
Join Date: Jan 2021
Old 08-22-2023 , 20:14   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #84

Game received the latest patch today. Update or nah?
kooper990 is offline
Kerouha
Member
Join Date: Jul 2015
Location: Russian Federation
Old 08-23-2023 , 19:10   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #85

Quote:
Originally Posted by kooper990 View Post
Game received the latest patch today. Update or nah?
Have you considered booting the game/server by yourself, and checking whether anything breaks?

Edit: Ran a couple of games and observed no crashes/errors/missed gamedata. Business as usual.

Last edited by Kerouha; 08-24-2023 at 08:50. Reason: update
Kerouha is offline
z282846139
Member
Join Date: Aug 2018
Old 09-01-2023 , 02:18   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #86

Quote:
Originally Posted by Kerouha View Post
Did some tinkering with the code, and I think the reason for massive lag spikes is the way how this plugin calculates distance to stuff

In a lot of places, there is a code that looks like this:
PHP Code:
    for (; LBI_GetNavAreaParent(iArea); iArea LBI_GetNavAreaParent(iArea))
    {
        
LBI_GetClosestPointOnNavArea(LBI_GetNavAreaParent(iArea), fGoalPosfParentCenter);
        
LBI_GetClosestPointOnNavArea(iAreafGoalPosfClosePoint);
        
fDistance += GetVectorDistance(fClosePointfParentCenterbSquared);
    } 
I'm not sure how one can calculate distance just by picking a "parent" navigation area over and over. Maybe it's just me; after all, Source SDK has the similar code. Point is, sometimes it goes runaway, and gives irrelevant high value.

Using L4D2_NavAreaBuildPath() without distance limit seems to cause lag too; especially if target is unreachable or nav_blocked.

Code (algorithm?) needs to be changed: whenever (wherever) you calculate distance to an entity, and result is a failure, mark the entity as un-pathable and don't try to calculate path to or from it ever again, at least for a duration of this frame. Don't kill the server by trying to reach the same stuck/out of bounds zombie for each survivor bot etc.

I attempted to do something like this in a fork of mine, but there is just too many places in code where "distance to object" is called/measured ever so slightly different, and i'm not finding and fixing all this sh

Feel free to check out the fork on github. Compile the sp file.

Fixed that behavior as well.

It'd be great if someone knowledgeable (@silvers?) looked into changes and gave advice where possible. Kinda new to this plugin thing.
Thank you for your great work, I'll try your version, I tried to compile your version but came with errrs and I quit, I would try it again today. I've stars on your version.
z282846139 is offline
Kerouha
Member
Join Date: Jul 2015
Location: Russian Federation
Old 09-01-2023 , 04:46   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #87

Quote:
Originally Posted by z282846139 View Post
...
I've compiled most recent edits. You'll need to update L4DHooks Direct to 1.135 for it to work. Plugin config file must be recreated too probably.

If you want to compile yourself: comment/remove the section of dhooks' .inc file that the complainer compiler complains about. It's fieldtype-something, and not used in this plugin.

Last edited by Kerouha; 09-01-2023 at 04:49. Reason: link added
Kerouha is offline
Kerouha
Member
Join Date: Jul 2015
Location: Russian Federation
Old 09-02-2023 , 21:55   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #88

Quote:
Originally Posted by aiyoaiui View Post
can't complie
Have you even read any past messages? I said not one time that you have to edit the .inc file for it to compile.

scripting/include/left4dhooks.inc
PHP Code:
// These are used for the "L4D2_OnGetScriptValueVoid" forward, and interally for the other "L4D2_OnGetScriptValue*" forwards:
enum fieldtype_t
{
    
FIELD_VOID 0,                // No type or value
    
FIELD_FLOAT 1,            // Any floating point value
    
FIELD_VECTOR 3,            // Any vector, QAngle, or AngularImpulse
    
FIELD_INTEGER 5,            // Any integer or enum
    
FIELD_BOOLEAN 6,            // boolean, implemented as an int, I may use this as a hint for compression
    
FIELD_CHARACTER 8,        // a byte
    
FIELD_CSTRING 31,
    
FIELD_UNSIGNED 38,
    
FIELD_QANGLE 40
};
// ^this needs to be commented
...
forward Action L4D2_OnGetScriptValueVoid(const char[] keyfieldtype_t &typeVariantBuffer retValint hScope);
//^this as well
... 

Last edited by Kerouha; 09-02-2023 at 21:56. Reason: file name
Kerouha is offline
liquidplasma
Junior Member
Join Date: May 2023
Old 09-05-2023 , 18:14   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #89

Quote:
Originally Posted by Kerouha View Post
I've compiled most recent edits. You'll need to update L4DHooks Direct to 1.135 for it to work. Plugin config file must be recreated too probably.

If you want to compile yourself: comment/remove the section of dhooks' .inc file that the complainer compiler complains about. It's fieldtype-something, and not used in this plugin.
Thanks a bunch!
liquidplasma is online now
z282846139
Member
Join Date: Aug 2018
Old 09-06-2023 , 11:56   Re: [L4D2] Survivor Bot AI Improver
Reply With Quote #90

Quote:
Originally Posted by Kerouha View Post
I've compiled most recent edits. You'll need to update L4DHooks Direct to 1.135 for it to work. Plugin config file must be recreated too probably.

If you want to compile yourself: comment/remove the section of dhooks' .inc file that the complainer compiler complains about. It's fieldtype-something, and not used in this plugin.
Report a bug, In zonemod versus game on map c1m1, when team2 are all bots without human player, the bots will press the button of elevator to call the elevator, and when the elevator arrive at this floor, bots can not gei in the elevator easily, they would get into the elevator a little, and get out to press the button of elevator again and again soon, which make the doors can not to close, sometimes the doors would close and one of them will be pushed out of the elevator, so that there are only two of four bots will stay in the upper floor, and the other two would go down to the lower floor which is burned, when the upper two will be stucked.
Attached Thumbnails
Click image for larger version

Name:	nick is left behind.jpg
Views:	116
Size:	93.7 KB
ID:	201503   Click image for larger version

Name:	the other two.jpg
Views:	99
Size:	96.7 KB
ID:	201504  
z282846139 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 12:45.


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