TDBots Mk2 - v1 (11/05/2022)

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are only for projects. If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.
User avatar
TDRR
Posts: 823
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by TDRR »

sebastianali wrote:Hello, im new in the forums and im impressed with this... Im a very fan of skulltag, and i wanted for a long time the bots... But there´s some problems that makes Skulltag bots (at least in deathmatch) better (Im test Doom 1 for now)
-For example, the bots in coop while first it seems to works fine in maps like Hangar for example the bots gets stuck shooting the enemies too far, and when the enemies died, for some reason it starts to shoot the barrels and suicides a lot of times. Sometimes the bots simply starts running in the same room and doesnt follow you, although this can be fixed if it was like Counter Strike (commands to the bots).
These issues are all limitations, and there's no real way to fix them AFAIK. I can't make them not fire at barrels, and limiting their vision range would probably do more bad than good IMO. It's also completely impossible to make the bots follow orders, it could be done in ZScript, but it's not really possible with DECORATE+ACS (well, technically you can, but the results would be extremely poor and perhaps even worse than no orders at all).
sebastianali wrote:-In deathmatch however, the bots works very good, but for some reason sometimes stays in the same place, waiting for you to coming and has perfect aiming even in the easiest difficult, this Skulltag does a lot better.
If you're setting botskill in the skirmish menu, that does not affect the TDBot's ability at all, you need to bind a key to the TDBots menu where there are proper difficulty options (you can set their reaction time, reduce their cone of vision to 120 degrees instead of 360, reduce their aiming accuracy, etc.). If you're already using that and still losing to them, well, just get good! I really can't believe anyone would die to the TDBots on the easiest difficulty preset, I've never died to them like that and I'm a pretty average DM player.

I'm not going to add an even easier difficulty preset when the easiest one already delays their reaction time by a whole TWO seconds, reduces their aiming accuracy and reduces their cone of vision to only 120 degrees, and they play super poorly like this.
sebastianali wrote:-And another problem, (at least in Zdoom), is when you play coop or deathmatch, the game stays like this and you cannot play normal mode until you exit and restart the game.
ZDoom issue, you can go into the console and type in "deathmatch 0" and "sv_nomonsters 0", and you'll be back in coop mode by next map. I might add an option for this in the next version.
sebastianali wrote:-EDIT*: A new bug that i found is that for some reason a bot in coop start to shoot me, i doesnt damage me, but it ignores the monsters.... what? XD
Im not hating your mod or something like that, im only do you some hints that can make this mod a lot better to make our dreams real ;)
When did this happen? I know that in Zandronum the bots will shoot you sometimes in coop (which can't be fixed because Zandro is missing certain features required) but this should never happen in ZDoom, unless you're using the Zandronum version in ZDoom (which you really shouldn't!). I need more details, otherwise I can't fix it.
User avatar
sebastianali
Posts: 20
Joined: Tue Mar 12, 2019 10:21 pm
Graphics Processor: Not Listed

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by sebastianali »

TDRR wrote:
sebastianali wrote:Hello, im new in the forums and im impressed with this... Im a very fan of skulltag, and i wanted for a long time the bots... But there´s some problems that makes Skulltag bots (at least in deathmatch) better (Im test Doom 1 for now)
-For example, the bots in coop while first it seems to works fine in maps like Hangar for example the bots gets stuck shooting the enemies too far, and when the enemies died, for some reason it starts to shoot the barrels and suicides a lot of times. Sometimes the bots simply starts running in the same room and doesnt follow you, although this can be fixed if it was like Counter Strike (commands to the bots).
These issues are all limitations, and there's no real way to fix them AFAIK. I can't make them not fire at barrels, and limiting their vision range would probably do more bad than good IMO. It's also completely impossible to make the bots follow orders, it could be done in ZScript, but it's not really possible with DECORATE+ACS (well, technically you can, but the results would be extremely poor and perhaps even worse than no orders at all).
sebastianali wrote:-In deathmatch however, the bots works very good, but for some reason sometimes stays in the same place, waiting for you to coming and has perfect aiming even in the easiest difficult, this Skulltag does a lot better.
If you're setting botskill in the skirmish menu, that does not affect the TDBot's ability at all, you need to bind a key to the TDBots menu where there are proper difficulty options (you can set their reaction time, reduce their cone of vision to 120 degrees instead of 360, reduce their aiming accuracy, etc.). If you're already using that and still losing to them, well, just get good! I really can't believe anyone would die to the TDBots on the easiest difficulty preset, I've never died to them like that and I'm a pretty average DM player.

I'm not going to add an even easier difficulty preset when the easiest one already delays their reaction time by a whole TWO seconds, reduces their aiming accuracy and reduces their cone of vision to only 120 degrees, and they play super poorly like this.
sebastianali wrote:-And another problem, (at least in Zdoom), is when you play coop or deathmatch, the game stays like this and you cannot play normal mode until you exit and restart the game.
ZDoom issue, you can go into the console and type in "deathmatch 0" and "sv_nomonsters 0", and you'll be back in coop mode by next map. I might add an option for this in the next version.
sebastianali wrote:-EDIT*: A new bug that i found is that for some reason a bot in coop start to shoot me, i doesnt damage me, but it ignores the monsters.... what? XD
Im not hating your mod or something like that, im only do you some hints that can make this mod a lot better to make our dreams real ;)
When did this happen? I know that in Zandronum the bots will shoot you sometimes in coop (which can't be fixed because Zandro is missing certain features required) but this should never happen in ZDoom, unless you're using the Zandronum version in ZDoom (which you really shouldn't!). I need more details, otherwise I can't fix it.
Did you recommend a specific source port? Maybe Zandronum works better no? It seems that almost all the glitches are for limitations ;(
Ah, and the coop glitch that i found it was casuality so i cant give you more details...
But i have to recognize that the mod works PERFECT on arena coop or DM maps because the bots doesnt need to move between rooms (maybe that´s the cause of the problem).
And finally, do you know what the nodes are? Do they serve to "arm" the path of the bot itself or something like that? Thanks :D
User avatar
TDRR
Posts: 823
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by TDRR »

sebastianali wrote:Did you recommend a specific source port? Maybe Zandronum works better no? It seems that almost all the glitches are for limitations ;(
Zandronum works best for Deathmatch play, yes. GZDoom is better for coop play but only by a bit (and with bot teleport call you can get decent results in Zandronum, anyways), and the less buggy bot behavior in Zandronum FAR outweighs what little extra things the GZDoom version may give you.
sebastianali wrote:But i have to recognize that the mod works PERFECT on arena coop or DM maps because the bots doesnt need to move between rooms (maybe that´s the cause of the problem).
And finally, do you know what the nodes are? Do they serve to "arm" the path of the bot itself or something like that? Thanks :D
If by "move between rooms" involves opening a door, then yes the TDBots indeed can't open doors thanks to engine limitations. The GZDoom version can, but they rarely do so and anyways their poorer behavior (failing to follow nodes correctly, broken aiming and other things) only makes for a worse experience.

Nodes serve to help the bots know where they should go when roaming (so they will bump into walls less often, and fall off pits less often unless threatened, in which case they may panic and strafe off a cliff, and will also help them get weapons much quicker).
These days, using Node Studio to make custom nodes is mostly unnecessary for maps where you don't need to jump, because the bots can now generate nodes based on your exploration of the map, in a similar manner to the Omicron bots available for Quake (but it's a bit simpler here). If no player is present in the match, they'll just walk around the map trying to avoid walls, which doesn't always work well but it's good enough for playerless matches.

Also, in all honesty, I think the improved navigation of these bots is much better than that of the Skulltag/Zandronum bots. Those bots circle around a single place way too often, and a lot of the time they might just stand in place and not do anything at all. Of course, the Skulltag/Zandro bots have the potential to be better, but no one really cares for them these days and their code has been untouched for a long time now.
User avatar
fin4455
Posts: 5
Joined: Thu Jun 18, 2020 9:19 pm
Graphics Processor: Intel (Modern GZDoom)

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by fin4455 »

Hello this is my first time replying to zdoom forums so i am sorry if i did anything wrong. I have been trying to make my own TDBots Mod Compatability Patches and so far i almost finished with my 1st patch but i just dont know what i am doing wrong. also this is my first time modding or making my own patches for doom...
User avatar
TDRR
Posts: 823
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by TDRR »

fin4455 wrote:Hello this is my first time replying to zdoom forums so i am sorry if i did anything wrong. I have been trying to make my own TDBots Mod Compatability Patches and so far i almost finished with my 1st patch but i just dont know what i am doing wrong. also this is my first time modding or making my own patches for doom...
I can't help you if you aren't more specific. What's going wrong? Does ZDoom display an error when starting up with your patch installed? Is something behaving incorrectly in-game? Please be detailed with your answer so I can help you fix it.
User avatar
fin4455
Posts: 5
Joined: Thu Jun 18, 2020 9:19 pm
Graphics Processor: Intel (Modern GZDoom)

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by fin4455 »

I am not sure of how to explain it so i will just put the files in this post

My Patch
https://www.mediafire.com/file/hsf3agf7 ... V.pk3/file

The Mod i am trying to Patch
https://www.mediafire.com/file/9rn7wozn ... a.pk3/file

edit - I also plan on starting small projects like this and working my way up.
User avatar
TDRR
Posts: 823
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by TDRR »

fin4455 wrote:I am not sure of how to explain it so i will just put the files in this post

My Patch
https://www.mediafire.com/file/hsf3agf7 ... V.pk3/file

The Mod i am trying to Patch
https://www.mediafire.com/file/9rn7wozn ... a.pk3/file

edit - I also plan on starting small projects like this and working my way up.
I can't download the 73MB mod myself, I'm on very limited internet ATM, but from looking at the patch alone I can tell what's wrong.
Let's grab the fist code, and it's immediately obvious that something isn't quite right:

Code: Select all

ACTOR TDBOTS_64Fist : Fist REPLACES Fist
{
	Weapon.SlotNumber 1
	+NOALERT
	States
	{
		Ready:
			TNT1 A 0 A_JumpIfInventory("TDBots_IsBot", 1, 1)
			PUNG A 1 A_WeaponReady
			TNT1 A 0 A_JumpIfInventory("BotAttack", 1, "Fire")
			Loop
		Deselect:
		TNT1 A 0 A_JumpIfInventory("TDBots_IsBot", 1, 1)
			PUNG A 0 A_Lower
			PUNG A 1 A_Lower
			Loop
		Select:
		TNT1 A 0 A_JumpIfInventory("TDBots_IsBot", 1, 1)
			PUNG A 0 A_Raise
			PUNG A 1 A_Raise
			Loop
		Fire:
		TNT1 A 0 A_JumpIfInventory("TDBots_IsBot", 1, 1)
			PUNG BCDE 1
			PUNG F 1 A_Punch
			PUNG G 6
			PUNG FEDCB 2
			PUNG A 2 A_ReFire
			TNT1 A 0 A_GiveInventory("BotMeleeWeapon")
			TNT1 A 0 A_TakeInventory("BotMeleeWeapon")
			Goto Ready
	}
}
Most importantly, where did you get the idea that you need to check for "TDBots_IsBot" every state? That's not necessary, in fact, that'll probably break a lot of stuff. Remove all A_JumpIfInventory("TDBots_IsBot",1,1) calls from the weapons, that should fix the state skipping.

Additionally, the Bot weapon flags are given in the wrong place. You should instead put the A_GiveInventory("BotMeleeWeapon") in the "Select:" state, and A_TakeInventory("BotMeleeWeapon") in the "Deselect:" state.

I also noticed you forgot to put the TNT1 A 0 A_JumpIfInventory("BotAttack", 1, "Fire") line right before a A_ReFire call, so you should add that too. Keep the one in the "Ready:" state, that's actually correct and will make the bot fire the weapon as intended.

With all these fixes applied, the new code will look like this (sorry for the weird spacing, but you get the idea):

Code: Select all

ACTOR TDBOTS_64Fist : Fist REPLACES Fist
{
	Weapon.SlotNumber 1
	+NOALERT
	States
	{
		Ready:
			PUNG A 1 A_WeaponReady
			TNT1 A 0 A_JumpIfInventory("BotAttack", 1, "Fire")
			Loop
		Deselect:
                        TNT1 A 0 A_TakeInventory("BotMeleeWeapon")
			PUNG A 0 A_Lower
			PUNG A 1 A_Lower
			Loop
		Select:
                        TNT1 A 0 A_GiveInventory("BotMeleeWeapon")
			PUNG A 0 A_Raise
			PUNG A 1 A_Raise
			Loop
		Fire:
			PUNG BCDE 1
			PUNG F 1 A_Punch
			PUNG G 6
			PUNG FEDCB 2
                        TNT1 A 0 A_JumpIfInventory("BotAttack", 1, "Fire")
			PUNG A 2 A_ReFire
			Goto Ready
	}
}
Last edited by TDRR on Fri Jun 19, 2020 2:42 pm, edited 1 time in total.
User avatar
fin4455
Posts: 5
Joined: Thu Jun 18, 2020 9:19 pm
Graphics Processor: Intel (Modern GZDoom)

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by fin4455 »

ok thank you i will try to edit my patch.
User avatar
fin4455
Posts: 5
Joined: Thu Jun 18, 2020 9:19 pm
Graphics Processor: Intel (Modern GZDoom)

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by fin4455 »

Thanks I figured out the problem

The problem is how I have been using the same fist sprites for all A_WeaponReady states as there isn't one in the original mod

for example:
Pistol

PISG A 0 A_WeaponReady

instead of

PUNG A 0 A_WeaponReady
User avatar
TDRR
Posts: 823
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by TDRR »

fin4455 wrote:Thanks I figured out the problem

The problem is how I have been using the same fist sprites for all A_WeaponReady states as there isn't one in the original mod

for example:
Pistol

PISG A 0 A_WeaponReady

instead of

PUNG A 0 A_WeaponReady
Then you should check the wiki for the definition of these weapons. If they don't have a defined "Ready" state, it's because they inherit it from the parent weapon. Since they all inherit from the equivalent vanilla Doom weapon, then the fist would be PUNG A 1 A_WeaponReady, the pistol would be PISG A 1 A_WeaponReady, the shotgun would be SHTG A 1 A_WeaponReady, and so on and so forth.
baj468
Posts: 16
Joined: Sun Aug 23, 2020 4:13 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Australia

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by baj468 »

Hi,
I'm new to using this bot but so far very impressed by it, i'ts great to finally have a decent bot in (G)ZDoom.

I was wondering if the feature of loading the waypoints file directly saved in a WAD lump could be added.
I create UDMF wad files and would love to be able to save a lump with waypoints into the WAD file so that the bot automatically includes them from the wad lump, something like a "WAYPOINT" lump kinda thing :).

Thanks.
User avatar
TDRR
Posts: 823
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by TDRR »

baj468 wrote:Hi,
I'm new to using this bot but so far very impressed by it, i'ts great to finally have a decent bot in (G)ZDoom.

I was wondering if the feature of loading the waypoints file directly saved in a WAD lump could be added.
I create UDMF wad files and would love to be able to save a lump with waypoints into the WAD file so that the bot automatically includes them from the wad lump, something like a "WAYPOINT" lump kinda thing :).

Thanks.
Actually, this is already a feature. I think I just didn't make it too obvious, but it works like this (this code goes in LANGUAGE):

Code: Select all

[enu default]

MAP01Nodes = "nodedatagoeshere";
MAP01 should be replaced by the name of the map (this name does not need to be of MAP01 or E1M1 format, if the map itself is called DOG_LOL or something like that, then when entering that map the DOG_LOLNodes entry will be read), and nodedatagoeshere is essentially the same that would go in the .nod files but only the actual node data (the one that looks like -480;800;56;-480;704;56 etc.), just note, that the stuff inside the quotes should go in a single continuous line, no line breaks or anything are allowed (this is a ZDoom issue, and I've tried to work around it but wasn't able to find a consistent fix).

You can also add as many entries as you want, so one LANGUAGE lump can suffice for a whole WAD. And I know you asked for it's own "WAYPOINT" lump instead, but I chose LANGUAGE as it's Zandronum compatible too, and I think it probably works about as well as it would in a custom lump anyways.

Here's an example .pk3 with nodes for Doom 2 MAP01:
TDBots-MapNodeExample.zip
You do not have the required permissions to view the files attached to this post.
baj468
Posts: 16
Joined: Sun Aug 23, 2020 4:13 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Australia

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by baj468 »

Hi, Thanks very much for your speedy reply, That's great news the feature is already available it's totally cool it's in LANGUAGE, WAYPOINT was just an idea to help me convey my idea :)

I'm a fan of playing with bots and glad to have found this for (G)Zdoom, now I can add TDNodes to my UDMF maps. I will write a tool to help me place them and save as a LANGUAGE lump I can insert into my WADs. A tool I would be happy to share with forum users.

Is there a brief description on best practices for placing node points like if they should have an ordering or if they can go anywhere and such, also if there are differing types of nodes to be aware of?
Will they run over 3DFloors, do nodes record Z Height?


Anyway, keep up the good work mate, these bot-players are fun to play against.
User avatar
TDRR
Posts: 823
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by TDRR »

baj468 wrote:I'm a fan of playing with bots and glad to have found this for (G)Zdoom, now I can add TDNodes to my UDMF maps. I will write a tool to help me place them and save as a LANGUAGE lump I can insert into my WADs. A tool I would be happy to share with forum users.
That would be nice. The Node Studio is pretty decent but exporting the nodes is really bad because ZDoom doesn't allow creating new files (I understand why, but still!) so an external tool that would just grab them from a map would be extremely useful!
baj468 wrote:Is there a brief description on best practices for placing node points like if they should have an ordering or if they can go anywhere and such, also if there are differing types of nodes to be aware of?
Will they run over 3DFloors, do nodes record Z Height?
The normal waypoints are completely order-independent, since the bots will iterate through the whole list to decide which one is closest, not stopping at the first that's "good enough".
When it comes to mixing them, it's a bit different. Jump nodes should always have a couple normal nodes opposite to the direction you want the bot to jump in, as the jump node only makes them jump in the direction they were already moving in. Precision nodes are just to be used on the places where you want the bot to move with a lot of care and reduce chances of falling down (like a bridge over lava).

Yeah, Z height is saved to the node list, just note that waypoints themselves don't float so it'll only work for 3D floors, but not thing-based bridges (might change in the future with how many deathmatch maps are made for Odamex and ZDaemon that use these types of bridges).
baj468 wrote:Anyway, keep up the good work mate, these bot-players are fun to play against.
Thanks! Glad to hear you like them.

EDIT: Also, if you end up releasing these maps, please tell me, I would love to try them out and add a link to them in the first post!
baj468
Posts: 16
Joined: Sun Aug 23, 2020 4:13 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Australia

Re: TDBots: The fast-performing bots v26c (23/4/2020)

Post by baj468 »

Cool, thanks for the extra info on waypoints, I will begin writing new tool. I have a custom WAD-file class in C++ I wrote for another project so I'll use that to speed things up a bit :)

Return to “Gameplay Mods”