Add CVAR to disable ZCajun bot AI

Moderator: GZDoom Developers

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

Add CVAR to disable ZCajun bot AI

Post by TDRR »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Add CVAR to disable ZCajun bot AI

Post by Graf Zahl »

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?
User avatar
TDRR
Posts: 826
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: Add CVAR to disable ZCajun bot AI

Post by TDRR »

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?
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?)

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).
User avatar
Rachael
Posts: 13923
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Rachael »

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).
User avatar
Enjay
 
 
Posts: 26976
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Enjay »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49226
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Add CVAR to disable ZCajun bot AI

Post by Graf Zahl »

TDRR wrote:
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?
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?)

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.
User avatar
Rachael
Posts: 13923
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Rachael »

Enjay wrote:and, of course, the TDRR bots require the base Cajun bots to function.
I would still allow for "bots" to be spawned. ;)

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.
User avatar
TDRR
Posts: 826
Joined: Sun Mar 11, 2018 4:15 pm
Location: Venezuela

Re: Add CVAR to disable ZCajun bot AI

Post by TDRR »

Rachael wrote:
Enjay wrote:and, of course, the TDRR bots require the base Cajun bots to function.
I would still allow for "bots" to be spawned. ;)

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.
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.
User avatar
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

Post by Redneckerz »

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. :P (If you want a ''static'' version, you would be better of with ZDoom 2.81 as your base, either way). Kidding ofcourse.
User avatar
Enjay
 
 
Posts: 26976
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Enjay »

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.
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.
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.

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.
User avatar
Rachael
Posts: 13923
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Rachael »

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.
User avatar
Enjay
 
 
Posts: 26976
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Enjay »

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.
User avatar
Enjay
 
 
Posts: 26976
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Enjay »

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.
User avatar
Rachael
Posts: 13923
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Rachael »

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.
User avatar
Enjay
 
 
Posts: 26976
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Add CVAR to disable ZCajun bot AI

Post by Enjay »

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.
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”