Flesh Creeper Bot AI #152
Replies: 4 comments
-
|
That's really awesome and well done. I haven't tested it, but from watching the video and looking through the code it's obvious that a lot of thought went into it. It also makes total sense that you added stuff like a more intelligent class selection.
The bot is currently in "maintenance mode", which means i'll fix bugs if necessary or merge small scoped pull requests. That's just because i haven't really played GMod in a while, and i have other stuff that i need/want to work on. Therefore i can't make any promises for this being a native part of the bot anytime soon. Fortunately your work seems easy to patch/install, and it's mostly orthogonal/non intrusive to the existing code which makes it likely to also work with variants and customized versions of D3bot. I mean, theoretically i could just pop in the files into my repo and call it a day. But from experience this will likely cause a bunch of bug reports of people because of some incompatibility with one of the many other ZS versions out there. Not because your code is bad, but because each ZS version works a little bit different. Alone the fact that older ZS gamemode don't have sigils. Just some notes and ideas when getting this into the master branch. Either for me in the future, or for anyone else that's interested in doing so:
Well that's everything that came into mind when i did a glance over the code and thought about how to incorporate the patch into master. It's not a request for you to work on, and more a list of things that need to be done before this can be added natively without causing much overhead and more complex code. But the patch like code you have provided is already a good way for everyone to try/install the new functionality. So i don't see any immdiate need to merge the code. Anyways, thanks a lot for sharing this. It's really helpful for a lot of people. |
Beta Was this translation helpful? Give feedback.
-
|
No problem at all if the code is in maintenance. I'm very open to what you felt is better. Truly to help and share this for everyone. As Flesh Creeper bot was such a high request even myself. If you do feel like changing and tweaking whatever it is needed I do not mind. ###################################################################################################### I totally agree with this on other ZS versions out there. Therefore, this is a good idea for me to add another thought to the Flesh Creeper. Like below. if there is no sigil, find human and build nest. Then repeat like the sigil logic (just no sigil) Forgot to keep my code dry. Thanks for the reminder. I will look into this and refactor it. Hmm, that probably explains it. Thanks for sharing this. I will look into this also. I do, believe most are in there. I'll look into all the file and go from there. If you do see any, feel free to share and I will correct it whenever you felt to help of course. No rush or anything. Interesting, this is new to me. I'll look into it further more. |
Beta Was this translation helpful? Give feedback.
-
|
Update, I looked into the Coroutine and comparing it to State Machine. There is so much pros and cons. Still, I'm going to implement it. As due to Zombie Bosses and more maintainable/readable. Like you have mention it. The only cons is Overall Im working on a new update for the below features to be implemented. It will take some time.
Once Im done with this, as Im currently into ZS at the moment. Thinking about I might create a Human Team Cader Bot. |
Beta Was this translation helpful? Give feedback.
-
|
Re-Update, Added above and edit post to V2 version. There are still bugs. But it fulfilled most for PVE core functionality. Especially compatible with or without sigil zombie survival. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I did some coding for the Flesh Creeper bot. As I decided to look into it more. But its a challenge, so its still buggy. Still does the job for now. Feel free to fix or update the bug.
#6 #145 #127 #149(maybe zombie boss? not sure if it helps based on my ulx at the bottom of the page)
Here is a video of the demo of the Flesh Creeper Bot AI in action.
Download the file below and extract somewhere and do the below installation to your ZS server. I kept Version 1 in case anyone wants to go back to it.
I decided to add my ulx I have below. Even created a auto-generate Nav-mesh for AI pathing. I was hoping this will help save mapping navmesh easier but likely not the case. Feel free to look around. Hoping it works as not tested with anyone yet.
Truly want to say thanks to @Dadido3 for his work and Jetboom for his ZS gamemode. As well as everyone.
Feel free to add this in to your code if you want to @Dadido3.
####################################################################################
D3bot ZS Bot Handler - Flesh Creeper AI & Smart Spawn System
Advanced Flesh Creeper AI with intelligent nest building, coroutine-based behavior, smart zombie spawn selection, and ULX integration for Garry's Mod Zombie Survival.
Version: 2.0.0
Table of Contents
Installation
Requirements
File Structure
Copy files from the
Flesh Creeper v2.0folder to yourgarrysmod/addons/d3bot/folder:Source Files
Source files are organized in
Flesh Creeper v2.0/:Verify Installation
Check server console for:
Use
!bot viewmeshin-game to verify navmesh is working.Flesh Creeper Bot Features
Intelligent Nest Building
Leader/Follower Coordination
Post-Build Behavior
After 2 nests are built globally:
Coroutine Behavior System
The Flesh Creeper uses a fully coroutine-based behavior system with 5 phases:
Bot States
The states are used by the coroutine but are not the coroutine itself. They serve as communication between the coroutine (decision making) and
UpdateBotCmdFunction(movement/input handling).STATE_FINDING_SIGILSTATE_MOVING_TO_BUILDSTATE_BUILDINGSTATE_ATTACKINGSTATE_DESTROYING_NESTSTATE_BACKING_OFFSTATE_FOLLOWING_LEADERSummary:
ZS ULX Commands
Player Commands (All Players)
!humanSelf-Redeem System (
!human)Admin Commands
!killnests!waveduration100h!botmod <num>Superadmin Commands (Navmesh Editing)
!bot viewmesh!bot editmesh!bot viewmeshspec!bot editmeshspec!bot hidemesh!bot savemesh!bot reloadmesh!bot generatemesh!bot refreshmeshview!bot setparam <id> <name> <value>!bot setmapparam <name> <value>!bot viewpath <start> <end>!bot debugpathConfiguration
Flesh Creeper Handler Options
Edit
lua/d3bot/sv_zs_bot_handler/handlers/undead_fleshcreeper.lua:Post-Build Class Selection
Weighted priority tables determine which class to switch to:
Barricade Destroyers (when barricades present):
Fast Attackers (when humans unreachable):
Smart Zombie Spawn Selection
Overview
D3bot uses an intelligent spawn selection system that mimics vanilla Zombie Survival behavior while adding strategic decision-making for bot zombies.
Regular Zombie Spawns
Regular zombies use a 90/10 probability distribution:
Boss Zombie Spawns
Boss zombies use random selection with priority fallback:
Spawn Point Types
prop_creepernestinfo_player_zombieinfo_player_zombie_bossprop_zombiegasprop_deployableemitter_gasstatus_poisonzombieConfiguration
Located in
sv_zs_utilities.lua:Console Commands
d3bot_smartspawn_testd3bot_smartspawn_listd3bot_smartspawn_debug 1/0Shared Utility Functions
Located in
sv_zs_utilities.lua:D3bot.ZS.GetCorruptedSigil()D3bot.ZS.HasUncorruptedSigil()D3bot.ZS.AreHumansNearSigil(sigil, dist)D3bot.ZS.AreHumansNearAnyBlueSigil()D3bot.ZS.IsTooCloseToNest(pos, dist)D3bot.ZS.HasClearFloor(pos)D3bot.ZS.GetNestNearCorruptedSigil(sigil)D3bot.ZS.GetAnyBuiltNest()D3bot.ZS.FindHumanNotCoveredByNest(dist)D3bot.ZS.GetPathDistance(start, end)D3bot.ZS.GetActiveNests()D3bot.ZS.GetZombieSpawnEntities()info_player_zombiespawnsD3bot.ZS.GetZombieGasSpawners()D3bot.ZS.GetBossSpawnPoints()info_player_zombie_bossspawnsD3bot.ZS.IsBossClass(className)D3bot.ZS.SelectSmartSpawn(class, isBoss)D3bot.ZS.GetGasSpawnerPositions()D3bot.ZS.IsWithinGasCoverage(pos, gasPositions)D3bot.ZS.CalculateGasCoverageScore(pos, gas, humans)D3bot.ZS.FindBarricadesNearPosition(pos, maxDist)D3bot.ZS.FindNearestBarricade(pos, maxDist)D3bot.ZS.IsPathBlockedByBarricade(startPos, endPos)D3bot.ZS.IsNearBarricade(pos, distance)Fallback Bot Features
Barricade Ambush Behavior
The fallback handler (used for all non-Flesh Creeper zombies) includes intelligent ambush tactics during wave countdown.
When It Activates
How It Works
Hiding Spot Selection
MASK_SOLID_BRUSHONLYto ensure hiding behind actual walls, not propsConfiguration
Located in
undead_fallback.lua:Debug Output
Enable detailed logging:
Console messages show:
[D3bot Behavior]Ambush triggered, movement, attacks, timeoutsEnhanced Barricade Detection
Comprehensive barricade detection system for tactical decision-making.
Detection Functions (in
sv_zs_utilities.lua):Detects:
prop_nailentities attached)prop_barricadeentities)Usage:
Map Compatibility
Sigil Maps
Non-Sigil Maps
Troubleshooting
Flesh Creepers not building nests
HANDLER.MaxFleshCreeperBotslimit (default: 2)!bot viewmesh)Flesh Creepers building more than 2 nests
HANDLER.NestsRequired = 2Flesh Creepers suicide looping
PostBuildBehaviorAppliedflag now properly transitions to attack mode!human command not working
Navmesh not loading
data/d3bot/navmesh/map/<mapname>.txt!bot reloadmesh!bot generatemeshBug Fixes in v2.0.0
Critical: Flesh Creeper Building More Than 2 Nests
HANDLER.NestsRequired)Flesh Creeper Suicide Loop Fix
PostBuildBehaviorAppliedflag now properly transitions to attack modeRecentSpawnProtectionTimeto prevent stuck-detection killsTechnical Details
EmmyLua Annotations
@class,@field,@param,@returndefinitionsBehaviorCoroutine,InterruptFlagmem.Volatile Pattern
Auto-reset state that clears on spawn/death:
Version History
v2.0.0 (February 7, 2026)
New Features
Barricade Ambush Behavior System
MASK_SOLID_BRUSHONLYSmart Zombie Spawn Selection System
info_player_zombie_boss(never at nests)d3bot_smartspawn_test,list,debugBarricade Priority & Fast Attacker Systems
Gas-Aware Nest Placement Enhancement
Enhanced Barricade Detection
Fully coroutine-based Flesh Creeper AI
Sigil/non-sigil map compatibility
ULX commands integration
Bug Fixes
HANDLER.NestsRequired)Beta Was this translation helpful? Give feedback.
All reactions