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

[L4D2] ScavengeBotsDS


Post New Thread Reply   
 
Thread Tools Display Modes
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 08-10-2021 , 01:42   Re: [L4D2] ScavengeBotsDS
Reply With Quote #61

Quote:
Originally Posted by Iizuka07 View Post
Does anyone have coordinates to the map Buried Deep? It has scavenge in the final chapter.
bdp_bunker05a

Quote:
{
"targetname" "pour_target"
"spawnflags" "1"
"origin" "-5516 -2632 -628"
"nozzle" "gas_nozzle"
"classname" "point_prop_use_target"
"hammerid" "275766"
}

Last edited by Tonblader; 08-10-2021 at 01:43.
Tonblader is offline
Iizuka07
Senior Member
Join Date: Aug 2018
Location: Underground
Old 11-21-2021 , 05:29   Re: [L4D2] ScavengeBotsDS
Reply With Quote #62

Quote:
Originally Posted by Tonblader View Post
Well this worked well in the previous map update back in May 2021 but the map is updated to a new version in October 2021 with lots of changes. Can you update the coordinates please?
__________________
死が待っている
Iizuka07 is offline
Tonblader
Senior Member
Join Date: Jul 2011
Location: Peru
Old 11-29-2021 , 13:26   Re: [L4D2] ScavengeBotsDS
Reply With Quote #63

Quote:
Originally Posted by Iizuka07 View Post
Well this worked well in the previous map update back in May 2021 but the map is updated to a new version in October 2021 with lots of changes. Can you update the coordinates please?
I checked the map again and the entity is still in place.
Tonblader is offline
plug344
Member
Join Date: Dec 2021
Old 03-01-2022 , 21:43   Re: [L4D2] ScavengeBotsDS
Reply With Quote #64

Is there a way to get all the bots together and collect only one or two gas cans at a time? After the bots dispersed, they gave great convenience to the infected, so they were killed one by one by zombies, each time leading to a very rapid death of all the team, even if there are other non bot players on the team who want to lead the bots, they still can't do anything

Edit: I modified the source code to make only one bot collect gas cans, but other bots just linger at the position of the machine that needs refueling and don't follow and protect the bot who is collecting gas cans, so that lonely guy was quickly killed by zombies. It seems that bots will only follow non bot players. Is there a way for bots to follow a bot? (just like they follow a non bot player)

Last edited by plug344; 03-02-2022 at 03:31.
plug344 is offline
LoneBat
Senior Member
Join Date: Dec 2013
Location: China
Old 10-27-2022 , 13:03   Re: [L4D2] ScavengeBotsDS
Reply With Quote #65

Quote:
Originally Posted by Tonblader View Post
How do I use it?
LoneBat is offline
ArcticCerebrate
New Member
Join Date: Jul 2023
Old 07-18-2023 , 05:11   Re: [L4D2] ScavengeBotsDS
Reply With Quote #66

I have made a modified version of ScavengeBotsDS designed to work alongside the "Survivor Bot AI Improver" plugin:
https://forums.alliedmods.net/showthread.php?t=342872

This additional plugin is not required for the modified ScavengeBotsDS to function, but the mod will benefit from the plugin or any equivalent plugin that improves the Bot AI during battle.

Modified Changes:

- Fixed an issue where if a special infected manages to kill a bot carrying gas before another survivor can help, the bots will not touch that particular gas can even if it is the last one because they believe their dead teammate can still bring it home.

- Fixed an issue where a bot that is on thirdstrike/black&white still maintains their claim on a gas can but will not fetch it due to thirdstrike/black&white status. This issue resulted in healthier bots ignoring that particular gas can forever if no teammate has any health items to heal the injured bot. The modified version will take any thirdstrike/black&white bot off scavenge duty and unassign their gas cans.

- Fixed a rare issue where a bot carrying a gas can thinks they need to fetch a new one.

- Bots are more cautious and will engage/defend against any special infected they encounter. The "Survivor Bot AI Improver" plugin is recommended to enhance this aspect of the mod.

- Bots will assist pinned/downed teammates at any stage of the gas collection process. In the original ScavengeBotsDS, bots would only assist if they were on the return trip with a gas can, while bots that don't have a gas can would continue journeying to one.

- Bots with low hp will be taken off scavenge duty to allow them to heal. The original ScavengeBotsDS typically will not let bots heal until they are on thirdstrike/black&white.

- Bots will attempt to assign gas cans in clusters. Whenever a bot is searching for a new gas can, they will check which gas cans their teammates are pursuing and find a gas can in that vicinity. This improves the chances of creating a zone on the map with high survivor foot traffic, thus increasing the odds that a teammate is nearby if any bot gets pinned by the special infected. The original ScavengeBotsDS assigns gas cans based on whichever is closest to the bot.

- Bots can optionally use a buddy-pair strategy when collecting gas cans.
This feature can be enabled/disabled with a new cvar: scavengebotsds_buddy (0/1)
This cvar is disabled by default: 0
When enabled, bots will pair up with each other and attempt to collect gas cans together, thus improving their survivability at the cost of collection speed.
This strategy generally underperforms the original solo strategy (at least when bots do it) and should be reserved for non-finale custom campaigns where time/tanks are not an issue or if there are enough humans on the team to pick up the slack.

- Bots will prefer not to lose their current gas can assignments whenever a teammate is pinned/downed. After a teammate is rescued, bots will check if their gas can is still nearby, and if so they will return to it. If it is far away, they will clear their gas can assignment and find a new gas can to scavenge. This change is to reduce the odds that a boomer will send a gas can lying on the ground out of bounds.

- Bots will drop any gas cans they are carrying if the cvar "scavengebotsds_on" is disabled "0". This is only relevant if you wish to turn the plugin off in the middle of a scavenge.

- Bots will drop any gas cans they are carrying if the scavenge section of a campaign ends. This is only relevant in singleplayer where the number of required gas cans collected is fewer than the number of gas cans spawned or in custom maps that always spawn more gas cans than required.

Notes:
Code for special infected detection was borrowed from "Survivor Bot Fix"
https://forums.alliedmods.net/showthread.php?p=2757330

I am still new to SourcePawn so there may be still be unforeseen issues.

++++++++++
Edit: Newer updated version at:
https://forums.alliedmods.net/showpo...7&postcount=70
Attached Files
File Type: sp Get Plugin or Get Source (scavengebotsds.sp - 66 views - 55.2 KB)

Last edited by ArcticCerebrate; 10-08-2023 at 14:32. Reason: Add link to newer version
ArcticCerebrate is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 07-18-2023 , 14:28   Re: [L4D2] ScavengeBotsDS
Reply With Quote #67

Quote:
Originally Posted by LoneBat View Post
How do I use it?
In file scavengefinalebotsds.cfg: add


"bdp_bunker05" // Burried Deeep - Chapter 5
{
"origin" "-5529.617188 -2629.964844 -687.968750"
"angles" "11.267521 -6.651766 0.000000"
}
__________________
Mi.Cura | Modded Servers | L4D2
https://steamcommunity.com/groups/micuramodzombie
Mi.Cura is offline
BioHazardN7
Member
Join Date: Oct 2020
Location: Укр
Old 07-23-2023 , 09:51   Re: [L4D2] ScavengeBotsDS
Reply With Quote #68

Quote:
Originally Posted by ArcticCerebrate View Post
I have made a modified version of ScavengeBotsDS designed to work alongside the "Survivor Bot AI Improver" plugin:
https://forums.alliedmods.net/showthread.php?t=342872

This additional plugin is not required for the modified ScavengeBotsDS to function, but the mod will benefit from the plugin or any equivalent plugin that improves the Bot AI during battle.

Modified Changes:

- Fixed an issue where if a special infected manages to kill a bot carrying gas before another survivor can help, the bots will not touch that particular gas can even if it is the last one because they believe their dead teammate can still bring it home.

- Fixed an issue where a bot that is on thirdstrike/black&white still maintains their claim on a gas can but will not fetch it due to thirdstrike/black&white status. This issue resulted in healthier bots ignoring that particular gas can forever if no teammate has any health items to heal the injured bot. The modified version will take any thirdstrike/black&white bot off scavenge duty and unassign their gas cans.

- Fixed a rare issue where a bot carrying a gas can thinks they need to fetch a new one.

- Bots are more cautious and will engage/defend against any special infected they encounter. The "Survivor Bot AI Improver" plugin is recommended to enhance this aspect of the mod.

- Bots will assist pinned/downed teammates at any stage of the gas collection process. In the original ScavengeBotsDS, bots would only assist if they were on the return trip with a gas can, while bots that don't have a gas can would continue journeying to one.

- Bots with low hp will be taken off scavenge duty to allow them to heal. The original ScavengeBotsDS typically will not let bots heal until they are on thirdstrike/black&white.

- Bots will attempt to assign gas cans in clusters. Whenever a bot is searching for a new gas can, they will check which gas cans their teammates are pursuing and find a gas can in that vicinity. This improves the chances of creating a zone on the map with high survivor foot traffic, thus increasing the odds that a teammate is nearby if any bot gets pinned by the special infected. The original ScavengeBotsDS assigns gas cans based on whichever is closest to the bot.

- Bots can optionally use a buddy-pair strategy when collecting gas cans.
This feature can be enabled/disabled with a new cvar: scavengebotsds_buddy (0/1)
This cvar is disabled by default: 0
When enabled, bots will pair up with each other and attempt to collect gas cans together, thus improving their survivability at the cost of collection speed.
This strategy generally underperforms the original solo strategy (at least when bots do it) and should be reserved for non-finale custom campaigns where time/tanks are not an issue or if there are enough humans on the team to pick up the slack.

- Bots will prefer not to lose their current gas can assignments whenever a teammate is pinned/downed. After a teammate is rescued, bots will check if their gas can is still nearby, and if so they will return to it. If it is far away, they will clear their gas can assignment and find a new gas can to scavenge. This change is to reduce the odds that a boomer will send a gas can lying on the ground out of bounds.

- Bots will drop any gas cans they are carrying if the cvar "scavengebotsds_on" is disabled "0". This is only relevant if you wish to turn the plugin off in the middle of a scavenge.

- Bots will drop any gas cans they are carrying if the scavenge section of a campaign ends. This is only relevant in singleplayer where the number of required gas cans collected is fewer than the number of gas cans spawned or in custom maps that always spawn more gas cans than required.

Notes:
Code for special infected detection was borrowed from "Survivor Bot Fix"
https://forums.alliedmods.net/showthread.php?p=2757330

I am still new to SourcePawn so there may be still be unforeseen issues.
Code:
SourcePawn Compiler 1.11.0.6934
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

ScavengeBotsDS.sp(64) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
ScavengeBotsDS.sp(67) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
ScavengeBotsDS.sp(287) : warning 219: local variable "File" shadows a variable at a preceding level
ScavengeBotsDS.sp(885) : warning 225: unreachable code
Code size:         56288 bytes
Data size:         10704 bytes
Stack/heap size:      16980 bytes
Total requirements:   83972 bytes

4 Warnings.
BioHazardN7 is offline
ArcticCerebrate
New Member
Join Date: Jul 2023
Old 07-23-2023 , 15:16   Re: [L4D2] ScavengeBotsDS
Reply With Quote #69

Quote:
Originally Posted by BioHazardN7 View Post
Code:
SourcePawn Compiler 1.11.0.6934
Copyright (c) 1997-2006 ITB CompuPhase
Copyright (c) 2004-2021 AlliedModders LLC

ScavengeBotsDS.sp(64) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
ScavengeBotsDS.sp(67) : warning 234: symbol "FCVAR_PLUGIN" is marked as deprecated: No logic using this flag ever existed in a released game. It only ever appeared in the first hl2sdk.
ScavengeBotsDS.sp(287) : warning 219: local variable "File" shadows a variable at a preceding level
ScavengeBotsDS.sp(885) : warning 225: unreachable code
Code size:         56288 bytes
Data size:         10704 bytes
Stack/heap size:      16980 bytes
Total requirements:   83972 bytes

4 Warnings.
The FCVAR_PLUGIN flag warning comes from the original code, with the exception of the second identical warning coming from copied code for the newer "scavengebotsds_buddy" cvar. Though I would like to believe the FCVAR_PLUGIN flag isn't needed, I am not 100% sure if there is another aspect of this plugin's original code that relies on it in some manner that I am unaware about.

The "File" variable warning comes from the original config loader code. I haven't touched the original code that handles the config files and data, but if someone encounters issues with the .cfg files, I may try to take a look at it.

The unreachable code is the (mostly unedited) original gas can assignment code which is no longer being called as I have added modified versions of gas can assignment for cluster assignment and buddy gas can assignment. I left the original code intact (but unused) in case a bug is found with the newer assignment code, in which case I would be able to quickly re-attach the original code if needed without worrying about fetching it from the original .sp and accidentally forgetting to re-introduce minor edits.
If the newer gas can assignment code proves to be reliable enough, I will probably permanently remove the original gas can assignment code from future versions of this fork.
ArcticCerebrate is offline
ArcticCerebrate
New Member
Join Date: Jul 2023
Old 07-30-2023 , 18:33   Re: [L4D2] ScavengeBotsDS
Reply With Quote #70

I have updated the AI-focused fork of ScavengeBotsDS posted earlier:
https://forums.alliedmods.net/showpo...9&postcount=66

Changes:
- Added a new CVAR "scavengebotsds_buddyWithHuman": (0/1)
This CVAR is enabled by default and is only effective when the buddy-system CVAR, "scavengebotsds_buddy" is also enabled.
When enabled, bots that do not have another bot partner for scavenging will attempt to partner with a human player and pick up any gas cans the human player finds.
When disabled, bots that do not have another bot partner will attempt to scavenge gas cans alone.
Note: Bots that partner with human players will not pick up gas cans that are already marked for pickup by another bot. Human players can pick up a gas can to clear any marked assignments bots have on that gas can.
Note#2: If the prior version of this fork has already created the "l4d2_scavengebotsds.cfg" for CVARS, you may need to manually add the new CVAR into the .cfg file or delete the .cfg file and let the plugin generate a new one.

- Reduced the number of TR_TraceRayFilterEx() calls needed for nearby infected detection. This should give a slight performance improvement.

- Fixed an issue with the newer infected detection code running even when a scavenge is not active. Infected detection should no longer be active until a scavenge session starts.

- Removed an unnecesssary for-loop from the original IsBot() function.

- Bots will now also consider human players for healing. The previous version only checked if bots needed healing.

- Fixed an issue with the Buddy-Pairing system where pairings would be re-established more often than necessary whenever a bot died then was later revived.
Attached Files
File Type: sp Get Plugin or Get Source (scavengebotsds.sp - 281 views - 55.2 KB)
ArcticCerebrate 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 17:55.


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