Add CVAR to disable ZCajun bot AI
Moderator: GZDoom Developers
Add CVAR to disable ZCajun bot AI
Title says it all, just disable the ZCajun bot AI with a CVAR like bot_aidisable or something similar. Disable almost all the behavior except for pressing +USE to respawn.
I'm expecting a [NO] given how ancient this code is, but I guess it's worth a try.
I'm expecting a [NO] given how ancient this code is, but I guess it's worth a try.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49226
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Add CVAR to disable ZCajun bot AI
You are getting a 'no' because the entire idea is pointless. To spawn a bot the user needs to take deliberate action so what's the point?
Re: Add CVAR to disable ZCajun bot AI
You're right, this isn't the way I should have suggested to fix my problem. The issue is that the ZCajun bots still aim even with PROP_TOTALLYFROZEN, which I'm going to guess is a bug. Does a fix for that have any more chances of being added, or I'm still doomed there? (And should I make a bug report for it?)Graf Zahl wrote:You are getting a 'no' because the entire idea is pointless. To spawn a bot the user needs to take deliberate action so what's the point?
I wouldn't be asking if there was any other way to work around this, but well, it seems there's not. (All of this I'm asking for these bots, to be clear).
Re: Add CVAR to disable ZCajun bot AI
I'm going to be quite honest - I am thinking of just gutting the ZCajun code completely. I've done it before but never committed it to master. They don't work properly, they were designed for code that is decades old now and no one ever kept them up to date. Ultimately I think any bot system should be done via ZScript, preferably by writing directly to their player input structs (at least that's what I would prefer anyway).
Re: Add CVAR to disable ZCajun bot AI
Better native bots would certainly be welcome - but I would also request that there isn't a period where GZDoom has no bots. I've certainly seen people say that they use the bots for testing and I've got a little collection of DM maps that I sometimes use for mindless fun against the bots with a custom bots.cfg (Mindless being a good way to describe the bots, of course
). So they definitely do still get some use from some people and, of course, the TDRR bots require the base Cajun bots to function.

- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49226
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Add CVAR to disable ZCajun bot AI
TDRR wrote:You're right, this isn't the way I should have suggested to fix my problem. The issue is that the ZCajun bots still aim even with PROP_TOTALLYFROZEN, which I'm going to guess is a bug. Does a fix for that have any more chances of being added, or I'm still doomed there? (And should I make a bug report for it?)Graf Zahl wrote:You are getting a 'no' because the entire idea is pointless. To spawn a bot the user needs to take deliberate action so what's the point?
If you have a problem with A but then suggest B because it encompasses A, chances are likely that you won't get what you want. This sounds like a genuine bug in the bot code. So if you got a problem, report the problem itself.
Re: Add CVAR to disable ZCajun bot AI
I would still allow for "bots" to be spawned.Enjay wrote:and, of course, the TDRR bots require the base Cajun bots to function.

If TDRR is okay with it, I'd like to review his mod and perhaps make a somewhat-native version of it officially, to replace ZCajun. That'll take some work, but I think I could pull it off.
Re: Add CVAR to disable ZCajun bot AI
You have all my support, by all means do it if you want! Of course, you can reach out to me in Discord if there's anything you'd like to ask, but I think the basics are really simple to get working so there should be no issues.Rachael wrote:I would still allow for "bots" to be spawned.Enjay wrote:and, of course, the TDRR bots require the base Cajun bots to function.
If TDRR is okay with it, I'd like to review his mod and perhaps make a somewhat-native version of it officially, to replace ZCajun. That'll take some work, but I think I could pull it off.
- Redneckerz
- Spotlight Team
- Posts: 1120
- Joined: Mon Nov 25, 2019 8:54 am
- Graphics Processor: Intel (Modern GZDoom)
Re: Add CVAR to disable ZCajun bot AI
Would be great if some itigation of TDRR's bots end up in GZDoom - They are substantially better than ZCajun which hails from the ZDoom 1.x era.
@TDRR: If you want to go truly hardcore, release a source mod - A custom build with the bot code patched in.
(If you want a ''static'' version, you would be better of with ZDoom 2.81 as your base, either way). Kidding ofcourse.
@TDRR: If you want to go truly hardcore, release a source mod - A custom build with the bot code patched in.

Re: Add CVAR to disable ZCajun bot AI
Rachael wrote:If TDRR is okay with it, I'd like to review his mod and perhaps make a somewhat-native version of it officially, to replace ZCajun. That'll take some work, but I think I could pull it off.
That sounds like a really good solution. The TDRR bots perform noticeably better than the stock Cajuns and presumably a lot of the code work is already done.TDRR wrote:You have all my support, by all means do it if you want! Of course, you can reach out to me in Discord if there's anything you'd like to ask, but I think the basics are really simple to get working so there should be no issues.
Thank you very much Rachael for considering the idea and, of course TDRR for generously allowing his code for consideration. Fingers crossed that it works out.
Re: Add CVAR to disable ZCajun bot AI
I've got a work branch now with them integrated, but they need to be translated to ZScript still before they can be accepted as an official feature.
That being said, I plan to make them modular - if you are ever unhappy with the bots, you should be able to release a modified version of them as a mod, or, rewrite your very own system completely from scratch - without ZCajun code interfering.
https://github.com/madame-rachelle/gzdoom/tree/tdbots
Here's a runnable artifact from the commit: https://github.com/madame-rachelle/gzdo ... s/37378866
There's still a lot of work to be done, and they no longer automatically respawn (mostly due to me gutting the ZCajun code), but they do otherwise seem to work (at the moment), albeit using ACS for now.
That being said, I plan to make them modular - if you are ever unhappy with the bots, you should be able to release a modified version of them as a mod, or, rewrite your very own system completely from scratch - without ZCajun code interfering.
https://github.com/madame-rachelle/gzdoom/tree/tdbots
Here's a runnable artifact from the commit: https://github.com/madame-rachelle/gzdo ... s/37378866
There's still a lot of work to be done, and they no longer automatically respawn (mostly due to me gutting the ZCajun code), but they do otherwise seem to work (at the moment), albeit using ACS for now.
Re: Add CVAR to disable ZCajun bot AI
This is very exciting: bots getting a bit of love after so long. Your plans make perfect sense.
I've grabbed the file but I can't check it right now.
I've grabbed the file but I can't check it right now.
Re: Add CVAR to disable ZCajun bot AI
Sorry that this took a few days. I have tried the runnable version and I can tell that the TDRR bots are integrated in as much as their options are auto-loaded into the menus and so on. However, if I try to add a bot in either single player or deathmatch mode I get: "Couldn't spawn bot; no bot left in bots.cfg".
I have my zcajun folder set up and the bots.cfg that is in it is the same as the one that works with my standard GZDoom install.
I have my zcajun folder set up and the bots.cfg that is in it is the same as the one that works with my standard GZDoom install.
Re: Add CVAR to disable ZCajun bot AI
I removed the zcajun/ folder in the branch. Bots.cfg will work if loaded from the main GZDoom directory.
Bots.cfg is otherwise unchanged, so a default bots.cfg from ZDoom 1.22 will still work.
I might, however, change it into a lump so that it can be put in the tdbots.pk3 file, or even replaced by a mod.
Bots.cfg is otherwise unchanged, so a default bots.cfg from ZDoom 1.22 will still work.
I might, however, change it into a lump so that it can be put in the tdbots.pk3 file, or even replaced by a mod.
Re: Add CVAR to disable ZCajun bot AI
Aha! yes, that was it. I can spawn bots now. Thanks. I think making it a lump makes sense.
I haven't checked the current status of the TDRR stand-alone bots but with this setup bots don't seem to be respawning - either in DM or coop. I'll need to dig a bit deeper to see if it's my setup/parameters or something else.
I haven't checked the current status of the TDRR stand-alone bots but with this setup bots don't seem to be respawning - either in DM or coop. I'll need to dig a bit deeper to see if it's my setup/parameters or something else.