- Install this addon: Place the Custom Gmod Bot folder (Unzipped) in your gmod addons folder OR install the addon with Steam.
- Create an (at least) 2-player gmod server. This addon creates a "player" bot so you must have an open player spot because gmod will consider the bot a real player.
- Create a bot using the TRizzleCreateBot Command. (See below)
This addon is on Steam, you can download it there instead: https://steamcommunity.com/sharedfiles/filedetails/?id=2969405101
This mod is in Beta, there will be bugs, but constant updates with new features and fixes.
Although you can just clone the repository. (I will put updates into a secondary branch before releasing it) I would suggest downloading the latest release, Thank You!
Special thanks to Zenlenafelex [PSF] for helping me with the pathfinding code for the bot.
I made this because I usually have to play Gmod alone and I also wanted to see what I could do with the nextbot system. This is also a base bot addon, I will use this addon to make bots for other gamemodes.
CommandName, CommandParameters, Example
TRizzleCreateBotbotnamefollowdistdangerdistmeleedistpistoldistshotgundistrifledisthealthresholdcombathealthresholdplayermodelspawnwithpreferredweapons- TRizzleCreateBot Bot 200 300 80 1300 300 900 100 25 alyx 1
TBotSetFollowDisttargetbotfollowdist- TBotSetFollowDist Bot 200
TBotSetDangerDisttargetbotdangerdist- TBotSetDangerDist Bot 300
TBotRegisterWeaponweaponweaponTypehasScopehasSecondaryAttackSecondaryAttackCooldownmaxStoredAmmoignoreAutomaticRangeReloadsSingly- TBotRegisterWeapon weapon_crossbow Sniper true false 30.0 12 false false
TBotAddPreferredWeapontargetbotweapon- TBotAddPreferredWeapon Bot weapon_crossbow
TBotRemovePreferredWeapontargetbotweapon- TBotRemovePreferredWeapon Bot weapon_crossbow
TBotClearPreferredWeaponListtargetbot- TBotAddPreferredWeapon Bot
TBotSetMeleeDisttargetbotmeleedist- TBotSetMeleeDist Bot 80
TBotSetPistolDisttargetbotpistoldist- TBotSetPistolDist Bot 1300
TBotSetShotgunDisttargetbotshotgundist- TBotSetShotgunDist Bot 300
TBotSetRifleDisttargetbotrifledist- TBotSetRifleDist Bot 900
TBotSetHealThresholdtargetbothealthreshold- TBotSetHealThreshold Bot 100
TBotSetCombatHealThresholdtargetbotcombathealthreshold- TBotSetCombatHealThreshold Bot 25
TBotSetPlayerModeltargetbotplayermodel- TBotSetPlayerModel Bot alyx
TBotSpawnWithPreferredWeaponstargetbot1 or 0- TBotSpawnWithPreferredWeapons Bot 1
TBotSetModelSkintargetbotdesiredskin- TBotSetModelSkin Bot 0
TBotSetModelBodyGrouptargetbotrownumber- TBotSetModelBodyGroup Bot 0 0
TBotSetDefaulttargetbot- TBotSetDefault Bot
- The bot is a player bot
- The bot can use ladders
- The bot has "smooth aiming" (Won't instantly aim at enemies)
- The bot can open doors
- The bot has a LOS, "Line of Sight," and can't see behind itself
- The bot remembers enemies it has seen recently
- The bot can "hear" noises created by enemies
- The bot will use its flashlight when in a dark area
- The bot will attack any NPC that is hostile to them and its "owner" (The player that created it)
- The bot, if it has a medkit, will heal itself and any players nearby it, prioritizing its owner.
- The bot can enter the vehicle the bot's owner is in. This includes most modded vehicles and chairs. See "Issues"
- Support for most custom/modded weapons.
I know what you are thinking, but these are needed to make the bot fun and easy to use.
- The bot will slowly regenerate ammo for its weapons when not in combat. This prevents the player from having to "give" the bot ammo or it having to be programmed to "find" ammo. (Collect it from dead enemies)
- The bot doesn't know if a Nextbot is hostile or friendly.
- The bot has very basic driving support.
- The bot can't tell the difference between projectile and tracer, "bullet," weapons.