Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

TDBots: The fast-performing bots v13 (6/6/2019)

Recommended Posts

Posted (edited)

TDBots are another bot mod that puts a computer-controlled opponent/friend into ZDoom, GZDoom, QZDoom and Zandronum.
As it's licensed under the MIT license, you can use it in your own projects too!


Remember to bind a key to the TDBots menu on the customize controls menu so you can easily configure them!


DOWNLOAD! (ZDoom, GZDoom and QZDoom version)

DOWNLOAD! (Zandronum version)

(Note: the Zandronum version can't seek items yet, due to the unimplemented A_CheckProximity codepointer)



Make your own waypoints easily with node studio. Featuring point and click controls, you can make waypoints for most maps in just a matter of 2 to 15 minutes!
NOTE: To save waypoints, remember to use Notepad++ or something else, but not Windows' Notepad! Remember to disable line wrap too.


Bot config file (REQUIRED): UNZIP DIRECTLY INTO YOUR (G)ZDOOM DIRECTORY (Not needed for Zandronum) (UPDATED: 6/6/2019)


But, why? ZetaBots already exist, and ZDoom has it's own bots!
Well, this bot is actually quite different and is useful in it's own way compared to them, check out the features list!




-They can chat! (Don't worry, it can be toggled via tdbots_chat 0)
-Are about as skillful and machine-like as the ZDoomBots
-Difficulty can be customized for new or expert players
-Can play Doom, Heretic, Hexen, Strife and Chex Quest!
-They search the map for any helpful pickups they can find (Y'know, like the ZCajun bots did before they broke)
-Has a Waypointing system! (Ahh, the Quake flashbacks!)
-Waypoints can easily be stored into separate text files
-Isn't a modified monster, but really a player!
-All of the behavior is identical to a real player (Except for movement, aiming and some input handling)
-Can open doors, hit switches, action lifts, exit levels, activate walkover lines and get teleported by player-activated lines! Except in Zandronum :(
-Picks up any item, even weapons (But weapons need a minimal bit of editing to work)
-Extremely easy to make compatible with any mod
-Easily scriptable mod-side
-Compatible out-of-the-box with all playerclasses
-Can use skins and custom colors
-Can play Cooperative, Deathmatch and Team Deathmatch (And any gamemode but not as well)
-Roams around maps better than the ZCajun bots
-Doesn't shoot at walls (Unless the weapon fires very slowly, in which case it could possibly shoot at a wall)
-Is freaking fast! (Way faster in performance than the Zandronum bots, and a little faster than the ZetaBots)


Bad stuff


-Isn't affected by the frozen player properties (Because they are always activated on them)
-Has a shaky camera view (Only really matters when spectating them)
-Oftentimes falls in the frustrating inescapable slime pits™ (Zandronum only issue)


Other versions


This version was made to showcase that the TDBots could have been possible back in the Skulltag era. Type "tdbots_help" in the console for help with CVARs.
Requires Skulltag 0.98d




Date format is DD/MM/YYYY

v17 (26/8/2019) THE MODDER'S UPDATE
-Added support for custom class speeds, using the Accuracy property.
    Base running Doom/Heretic/Hexen/Strife speed is 24 for reference.
-Added custom action support, more info in TO_MODDERS.txt of the .pk3.
    Quite useful, as you can place altfires, reloading, item uses, special
    weapon handling and other things easily.
-Changed bot strafing motion, now they do something closer to circle strafing.
-Bot speed is now consistent throughout all movements, meaning that strafing
    isn't faster than moving forward.
-TDBOTSMAIN.acs is now shared between ZDoom and Zandronum. Basically there won't
    be any more randomly missing features from the Zandronum version.
-Added the Node Studio. You can now make nodes directly from the game and save
    them into your .ini (very limited space thanks to ZDoom's limitations)
    or into an autoexec file (practially unlimited thankfully).
    NOTE: This is on a separate .pk3 due to ACS string mix-up issues.


v16b (18/8/2019) THE RESPAWNING UPDATE (Zandronum-only)
-Bots should now respawn offline and online correctly.
-"DMFLAGS changed to" should only appear once or twice when playing online, instead of being spammed various times.


-Added options menu. Bind a key to it in the "customize controls" menu.
-Added difficulty presets.
-Added a new CVAR: tdbots_lessfov. If enabled, the bots will have a 120 degree field of view instead of 360 degrees.


v15 (21/7/2019) THE SPIT N' POLISH UPDATE
-Improved bot following, should not get stuck as much anymore.
-Fixed melee weapon handling, bots should no longer move extremely fast while melee-ing. (About time i fixed this one!)
-Fixed Strife compatibility, now fully works with no crashes and normal weapon switching.
-Fixed a Hexen bug where the Cleric's fire weapon would flicker.
-Fixed a Heretic bug with some of the powered up weapons.
-tdbots_weaponize now works with all supported IWADs.


v14b (24/6/2019) THE PERFORMANCE UPDATE (Zandronum-only)
-Bots now perform about 4-16x faster. On a Celeron 1.4GHz i can have 40 bots running around at about 50fps+ instead of less than 0fps with native Zandro bots.
-Bots now have the same names and colors as in the ZDoom bot config.


-Added tdbots_weaponize CVAR, the higher the value, the better
a weapon the bot will spawn with. It's random chance so even if you set it to 6 the bot won't have a BFG 100% of the time, but ocassionally
-Added tdbots_follow CVAR, if enabled, it makes the bots in co-op follow you (sometimes) around the map so you can more easily finish a map with a bot.
-Added QCDE compatibility patch

-Updated Bot config with many new names (32 now!) and changed many other names (specifically, the ones that weren't real names)
-Added a CVAR: tdbots_reactiontime, changes the bot's reaction time in tics. minimum is 0 tics, max is 70 tics (2 seconds)
-Bots now display a walking animation correctly
-Zandronum version is updated again


-Bots can now follow nodes/waypoints/whatever you wanna call them
-Added 2 types of nodes: Normal (walk) nodes (DoomED Number 2401) can be spawned via ACS Spawn, classname: TDBots_PathNode
-Second type of node: Jumping node (DoomED Number 2402) can be spawned via ACS Spawn, classname: TDBots_JumpNode
-Added CVAR: tdbots_usenodes which needs to be enabled so the bots correctly follow waypoints


-Bots now strafe like the DecoBots do (code by Gustavo, but adapted to this) allowing WAY better coop and invasion play, and better dodging of projectiles overall
-Fixed bot targeting issues in Coop (almost completely)
-Reverted bot aiming changes (Yeah they caused problems again)
-Zandronum bot chat is disabled and replaced by the TDBots chat
-Bots now retain their previous speed while firing
-Bots now finally back out correctly while using an explosive weapon


-Easy mode is way easier now
-Added Chex Quest support
-Added completely untested Strife support (I don't have the game and don't plan to get it so if anyone can provide some feedback it would be appreciated)
-Removed all Zandronum-exclusive hacks to fix a couple thousand bugs that thankfully no one noticed/reported
-Bot aiming is very slightly less precise (this is completely intentional)


-Added easy mode, which worsens the bot's aim a bit (CVAR: tdbots_easymode)
-Re-enabled tdbots_buff CVAR, which now works in Doom, Heretic and Hexen (This is forced on for Zandronum)
-Fixed a crashing issue related to multiple targets (Mostly a Zandronum crash, but it sometimes happened in ZDoom)
-Finally an update for Zandronum too!


v8 (9/5/2019) THE RAVEN UPDATE
-Now compatible with Heretic and Hexen
-Bots will only search for health pickups if they are under 70% health
-Reordered bot item priorities, which goes like this: Weapons, Ammo, Misc. Items, Armor
-Bots will now wait 6 seconds after picking up an item to pick another one again
-CVAR tdbots_enable now works properly, for quick switching between the TDBots and ZCajun bots without restarting ZDoom.


-Bots have MUCH, MUCH better reaction time
-Bots now have a cooldown period before they can look for items again
-Bots will now strafe while firing in a less stupid way
-Bots will not avoid firing explosive weapons anymore and just back out always
-Added a 100% chance of getting your ass kicked
-Officially dropped Zandronum support (sorry, but i'm not going to hold back the possibilities just for Zandronum)


-Bots will now actively search for health, weapons and ammo (may not work with very old/hacky mods)
-Bots orient themselves better on big maps but may prefer item stashes on smaller ones
-Bots are less hesitant to fire rocket launchers on close quarters and will now back out 100% of the time
-Fixed melee weapon handling
HOTFIX: fixes the bot's twitchy aim introduced in this update


-Reverted code changes from v4
-Bots now have better aim and reaction time
-Bots will now navigate corridors much more consistently
-Bugfix related to animation that i honestly can't remember


-Shortened main bot think loop
-Bots won't stop firing until their target is dead or out of their field of view
-Fixed a couple bugs
-A regression that i can't seem to fix or find the reason to has been introduced.
    Basically, the bot will occasionally aim off-target and for some reason all LOS checks still are on target
    But the bullets and camera view definitely are off target and shaking.
    You will know when this happens because the bot quickly flickers between two angles and misses most of it's bullets/projectiles
-Bots are more forgetful about their target, which actually doubles as an advantage as they will get out of
    their range faster, increasing chances of survival. (Only like 70% of the time though)


v3 (2/5/2019) THE FRIENDS UPDATE
-Bots no longer shoot their friends in co-op or Team DM
-Owing to this change, Bots on the same team occasionally attack cooperatively
-Also owing to this change, Bots will no longer push their friends into danger
-Bots now handle dangerous situations with explosive weapons better
-Code is better commented now, for easier understanding
-Started very preliminary work on waypoints, disabled due to problems
-Bots can now drop down from ledges up to 1024 units high, so as to be able to follow you through Plutonia MAP02.

v2 (2/5/2019) THE SMART UPDATE
-Now licensed under the MIT license
-Bots now have much better navigation that is a bit less RNG-based
-Bots now mix up their dodging while attacking a lot more
-Bots can now drop down from any height (Still falls into inescapable pits but at least it doesn't get stuck on a ledge)
-Bots have better aim
-Bots have less shaky camera view
-Bots now have their view re-centered after killing an enemy, for easier spectating
-Updated the bot config, now Crash and Illucia aren't erroneously mentioned as male
-Added a few more chat lines, suggestions welcome!
-Added flag: BotExplosiveWeapon (Makes bot back out of explosion range while firing)
-Added flag: BotMeleeWeapon (Makes bot aggressively close in to it's target while firing)
-Fixed the bots displaying the walk animation while dead very rarely
-Added CVAR: tdbots_enable (Let's you choose between ZCajun bots, when set to zero/false, and TDBots when set to one/true)
-Added CVAR: tdbots_buff (Gives bots ammunition and armor every 5 seconds, but they are better off without it anyways)
-Added CVAR: tdbots_playerbot (Makes the viewing player also a bot, useful for 8-bot matches in ZDoom)
-Added command: tdbots_oldschooldm (Sets up all gameplay and compatibility options to behave close to doom2.exe in Deathmatch, except for item respawns?)


Waypoint guide (Doesn't work in Zandronum!)


Not even i have yet mastered waypointing for these bots, but i can give you a set of rules that the bots follow when following waypoints:
-Bots can only see nodes 384 units ahead of them, try not to make a single path have 2 nodes farther than this distance.
-Bots prioritize closer nodes, so if there are two close paths that should not merge, place more very close to each other waypoints in each path.
-Jump nodes aren't as straightforward as you might think, they do not take the angle you give them into acccount, instead, they make the bot jump in the direction it was already traveling. So you need to place a regular walking node right behind the jump node, so the bot touches it first, and then runs into the jump node and that should get it jumping over some pit. This bot has about as much jumping power as a slightly slower player, so be careful about what you make it jump!


Waypoints (Doesn't work in Zandronum!)


NOTE: This is not the final version of each noding list. I'm planning on doing the entirety of Doom 1 and 2, some of Heretic and all of duel2015.wad
To load these, type into your console "exec filename.nod" and then just start a deathmatch on the desired map.


Doom 1 (E1M1)

Doom 2 (MAP01 and MAP16)

Heretic (E1M1)

duel2015.wad (First 4 maps, not counting MAP00)

"How do i make my mod compatible with this?"


NOTE: There's a better guide on the TO_MODDERS.txt file on the main TDBots pk3.

It's so easy, even a caveman could do it! All you got to do is:
Put the following DECORATE line in every weapon's ready state, right after or before the A_WeaponReady call:

TNT1 A 0 A_JumpIfInventory("BotAttack", 1, "Fire")

Also put it right before any A_Refire calls (Remember to change the "Fire" part to the state A_Refire was set to!)
For example: just A_Refire means there's nothing to change, but if it's something like A_Refire("KeepFiring")
you would change "BotAttack", 1, "Fire") to "BotAttack", 1, "KeepFiring")


In weapons that are explosive (And can harm the user with the explosion), use the following in their select state:

TNT1 A 0 A_GiveInventory("BotExplosiveWeapon")

And the following in it's deselect state:

TNT1 A 0 A_TakeInventory("BotExplosiveWeapon")


In melee weapons (Chainsaws, Fists, etc.), use the following in their select state:

TNT1 A 0 A_GiveInventory("BotMeleeWeapon")

And the following in their deselect state:

TNT1 A 0 A_TakeInventory("BotMeleeWeapon")

And that's it, yes it's really that easy!

Mod compatibility patches


You can request a mod to make a patch for, and i will do it ONLY IF THE MOD ISN'T RECIEVING UPDATES ANYMORE.
Make sure to load TDBots first, then the mod, then the compatiblity patch for best results. (Use a launcher or a command line to specify an order)


Skulltag Content / Skulltag Emulation

Complex Doom v26a2

Death Foretold / D4T

Quake Champions: Doom Edition

NOTE: The QCDE patch is 2 parts. TDBots-QCDE-P1.pk3 needs to be loaded BEFORE QCDE, and the TDBots-QCDE-P2.pk3 is loaded AFTER QCDE. TDBots still has to be loaded before any of these.

This is due to ACS not being overwritable, once a script is registered, you can't change it so you need to register the TDBots replacement scripts (TDBots-QCDE-P1.pk3) first so that QCDE can't write over them. The second part is just weapon compatibility patches, as always. The scripts are just to remove some of QCDE's bot modifications, since the patch already provides better alternatives.


Edited by -TDRR-

Share this post

Link to post

Do the bots use alt-fire? If so, it'd be a much better for DM testing than the ZCajun bots i've been using; which neither aims up/down nor uses the alt-fire.

Share this post

Link to post
4 hours ago, Amuscaria said:

Do the bots use alt-fire? If so, it'd be a much better for DM testing than the ZCajun bots i've been using; which neither aims up/down nor uses the alt-fire.

I have considered adding such abilities, but there are certain weapons that with alt-fire would then require the player to do something fairly specific, like when the weapon needs you to hold the alt-fire button and then press the fire button, but unfortunately i can't make the bot know when it has to do something like this, because the bot is not aware of what it's weapon is doing (Except for the BotMeleeWeapon and BotExplosiveWeapon flags, but that's something else entirely)


For some reason though, in certain mods like D4T the bot will indeed use alt-fire despite me not having added this feature yet. Don't know how this works.


In the end i will probably add them, but anyone wanting to make the bot compatible with their mod should be aware of this:

Bots choose to use the alt-fire randomly, instead of using it because of what it does.

Bots have no idea when the weapon tells them to press a certain button, which may make them get stuck in, say, a Minigun rev-up alt-fire.


Althrough this is all to keep the code simple and easy to adapt to any mod, so if anyone ever makes a fork of these specific to their own mod, it should be possible to fix the above mentioned issues.


Even then, the bots are still better for Deathmatch testing because they can actually fight back, instead of just running into walls without paying attention to their surroundings like the ZCajun bots do.

Share this post

Link to post

Updated! The mod actually never stopped development but i keep forgetting to update the Doomworld thread.

Read the changelog for a full list of changes from v2.

Share this post

Link to post
Posted (edited)

Updated! This update has a bunch of new names to the bot config (There's 32 bots now!) so redownload that. It also adds tdbots_reactiontime, which sets the bot's reaction time in tics. And bots now have a walking animation!


I might add more names from the DecoBots in the next update, just so we don't see bots repeated too much.


Again, the mod still continued development at the ZDoom and Zandronum forums, but since Doomworld has it's own way of adding styles and such (bold letters, spoilers and other things) i don't like updating it here much, as it takes quite a bit of a conversion for it to look the same.


Download link in the OP!

Share this post

Link to post

Updated! This update is fairly big. Including custom actions and custom class speeds both editable directly from the mod-side itself, Node Studio, support for saving waypoints into .nod files, and updates to the bot movement system.


I have added more waypoints to the first post, so make sure you try them out. I also added information about loading, saving and making nodes on the usage guide, so give that a read too.


Just a friendly reminder: If you want to contribute anything to the mod, be it bug reports, feature suggestions, waypoint files, code submissions, bot chat lines, Youtube videos, or whatever, just go ahead and post them here and i'll gladly put them in the mod or the first post.


Download link in the first post, as always.


There have been more updates, but again, they are over at the ZDoom and Zandronum forums, so if you don't want to miss anything, please follow the TDBots there.


Oh and the TDBots might be coming to a new game that's not on the Doom engine. Let's just say that when they get there they will be the only one of their kind  B-)

Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now