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

[L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]


Post New Thread Reply   
 
Thread Tools Display Modes
thewintersoldier97
Senior Member
Join Date: Aug 2021
Location: Vietnam
Old 02-28-2022 , 01:29   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #31

Quote:
Originally Posted by sonic155 View Post
...
Try HarryPotter's updated version.
__________________

Looking for some fun!

Last edited by thewintersoldier97; 02-28-2022 at 01:30.
thewintersoldier97 is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 03-18-2022 , 01:17   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #32

I can't compile HarryPotter version by myself because of this code:

Quote:
stock void ScriptCommand(int client, const char[] command, const char[] arguments, any ...)
{
char vscript[PLATFORM_MAX_PATH];
VFormat(vscript, sizeof(vscript), arguments, 4);

int flags = GetCommandFlags(command);
SetCommandFlags(command, flags & ~FCVAR_CHEAT);
FakeClientCommand(client, "%s %s", command, vscript);
SetCommandFlags(command, flags)
}

stock void L4D2_RunScript(const char[] sCode, any ...)
{
static iScriptLogic = INVALID_ENT_REFERENCE;
if(iScriptLogic == INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic)) {
iScriptLogic = EntIndexToEntRef(CreateEntityByName("logic_sc ript"));
if(iScriptLogic == INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic))
SetFailState("Could not create 'logic_script'");

DispatchSpawn(iScriptLogic);
}

static String:sBuffer[512];
VFormat(sBuffer, sizeof(sBuffer), sCode, 2);

SetVariantString(sBuffer);
AcceptEntityInput(iScriptLogic, "RunScriptCode");
}
I've been research and i think this is the right syntax:

Quote:
stock void ScriptCommand(int client, const char[] command, const char[] arguments, any ...)
{
char vscript[PLATFORM_MAX_PATH];
VFormat(vscript, sizeof(vscript), arguments, 4);

int flags = GetCommandFlags(command);
SetCommandFlags(command, flags & ~FCVAR_CHEAT);
FakeClientCommand(client, "%s %s", command, vscript);
SetCommandFlags(command, flags);
}

stock void L4D2_RunScript(char[] sCode, any ...)
{
static int iScriptLogic = INVALID_ENT_REFERENCE;
if( iScriptLogic == INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic) )
{
iScriptLogic = EntIndexToEntRef(CreateEntityByName("logic_sc ript"));
if( iScriptLogic == INVALID_ENT_REFERENCE || !IsValidEntity(iScriptLogic) )
SetFailState("Could not create 'logic_script'");

DispatchSpawn(iScriptLogic);
}

static char sBuffer[512];
VFormat(sBuffer, sizeof(sBuffer), sCode, 2);

SetVariantString(sBuffer);
AcceptEntityInput(iScriptLogic, "RunScriptCode");
}
I have compiled it to erase the annoying messages in the middle of the screen (Hints), keeping the chat messages code untouched. I have also changed the message "ammo is now zero" with "ammo out", nothing more.
If anyone wants the source code fixed to compile by himself, here it is:
Attached Files
File Type: sp Get Plugin or Get Source (l4d2_sb_fix.sp - 572 views - 77.8 KB)

Last edited by Toranks; 03-18-2022 at 01:20.
Toranks is offline
Hajitek Majitek
Junior Member
Join Date: Oct 2021
Old 06-20-2022 , 08:15   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #33

Quote:
Originally Posted by Toranks View Post
I can't compile HarryPotter version by myself because of this code:

..

I've been research and i think this is the right syntax:

..

I have compiled it to erase the annoying messages in the middle of the screen (Hints), keeping the chat messages code untouched. I have also changed the message "ammo is now zero" with "ammo out", nothing more.
If anyone wants the source code fixed to compile by himself, here it is:
Hello, Toranks. Do you know what value in the source file controls how quickly the bots react and shoot at commons and other things? the plugin is excellent and extremely useful, but it is also far too powerful, and the bots are like terminators, killing everything in their path and making the game far too easy. i'm just wondering if there's any way i can slow them down and make them do less damage. (just a little bit. )
Hajitek Majitek is offline
Toranks
Senior Member
Join Date: Dec 2021
Location: Spain
Old 06-20-2022 , 13:34   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #34

Quote:
Originally Posted by Hajitek Majitek View Post
Hello, Toranks. Do you know what value in the source file controls how quickly the bots react and shoot at commons and other things? the plugin is excellent and extremely useful, but it is also far too powerful, and the bots are like terminators, killing everything in their path and making the game far too easy. i'm just wondering if there's any way i can slow them down and make them do less damage. (just a little bit. )
I've been thinking about that, but the plugin is programmed to execute on a function that runs too fast and so far no one knows or has bothered to change it. The only thing I can think of is to add a timer to the entire plugin. But I don't know how to do it without breaking anything.
However, I adjust the ability of the bots by reducing the range at which they detect enemies. Especially sb_fix_ci_range and sb_fix_si_range. Try 200 or 300, that way they will only attack those who get too close (something the vanilla AI fails a lot), keeping the vanilla AI for long range. Also, this greatly reduces CPU usage.
Toranks is offline
Hajitek Majitek
Junior Member
Join Date: Oct 2021
Old 06-20-2022 , 14:14   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #35

Quote:
Originally Posted by Toranks View Post
I've been thinking about that, but the plugin is programmed to execute on a function that runs too fast and so far no one knows or has bothered to change it. The only thing I can think of is to add a timer to the entire plugin. But I don't know how to do it without breaking anything.
However, I adjust the ability of the bots by reducing the range at which they detect enemies. Especially sb_fix_ci_range and sb_fix_si_range. Try 200 or 300, that way they will only attack those who get too close (something the vanilla AI fails a lot), keeping the vanilla AI for long range. Also, this greatly reduces CPU usage.
That's an excellent suggestion. thanks Toranks! i'll try it! and, yeah, i really hope someone with enough knowledge and time comes along and rebuilds this plugin from the ground up because we desperately need something like it that runs flawlessly and has more features and control options.
Hajitek Majitek is offline
Mr. Man
Veteran Member
Join Date: Mar 2011
Location: Huh?
Old 06-21-2022 , 13:29   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #36

Just tried this on my server and the bots appear to have 100% accuracy vs CI/SI. Maybe create CVARs where we can tweak it?
__________________
Mr. Man is offline
LoneBat
Senior Member
Join Date: Dec 2013
Location: China
Old 10-02-2022 , 13:40   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #37

I have 8 survivors, but how should I set 4 survivors Bots to use melee weapons?
LoneBat is offline
moschinovac
Member
Join Date: Mar 2019
Location: Vietnam
Old 10-02-2022 , 15:59   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #38

Quote:
Originally Posted by LoneBat View Post
I have 8 survivors, but how should I set 4 survivors Bots to use melee weapons?
Theres a Cvar

Code:
sb_max_team_melee_weapons                : 0        : , "sv", "cheat"  : The total number of melee weapons
Bot will count how many melee weapon in team and pick loadout depends on that. EX: 1 human have melee then 3 bots will pick melee (when set to 4)
moschinovac is offline
LoneBat
Senior Member
Join Date: Dec 2013
Location: China
Old 10-03-2022 , 03:05   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #39

Quote:
Originally Posted by moschinovac View Post
Theres a Cvar

Code:
sb_max_team_melee_weapons                : 0        : , "sv", "cheat"  : The total number of melee weapons
Bot will count how many melee weapon in team and pick loadout depends on that. EX: 1 human have melee then 3 bots will pick melee (when set to 4)
Yes, I always use this Cvar, but when I used this plug-in, the Cvar has failed. Only one Bots picks up melee weapons.
LoneBat is offline
moschinovac
Member
Join Date: Mar 2019
Location: Vietnam
Old 10-03-2022 , 06:23   Re: [L4D2] Survivor Bot Fix / Improved (sb_fix) (v1.00) [09-Sep-2021]
Reply With Quote #40

Quote:
Originally Posted by LoneBat View Post
Yes, I always use this Cvar, but when I used this plug-in, the Cvar has failed. Only one Bots picks up melee weapons.
Even with this Plugin, that cvar still work fine for me. And this plugins dont have anything about force bot pickup melee >.>
moschinovac 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 09:30.


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