[v0.11.1-rc2] ZetaBot: The ZScript Bot

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

Re: [REPLAN] ζetaBots: The ZScript Bot

Post by Rachael »

If the bots are programmed properly, using player structures rather than being actual actors, themselves, yes.
User avatar
scalliano
Posts: 2848
Joined: Tue Jun 21, 2005 1:16 pm
Location: Ireland

Re: [REPLAN] ζetaBots: The ZScript Bot

Post by scalliano »

Does this mean that bots could potentially be used as enemies/allies in SP/co-op?
User avatar
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

Re: [REPLAN] ζetaBots: The ZScript Bot

Post by Gustavo6046 »

I figured it was answer/update time. Okay, here we go:
Rachael wrote:You should probably know that GZDoom currently has plans to ditch its internal bot system completely and use ZScript for its bots, sometime in the future. This is one of the projects I was thinking about when that hit the planning phase, but I don't know if you are interested.
Well, I am interested in helping with the pathing and with relating the bot movement with how a human would act in a certain circumstance.
Dark-Assassin wrote:Any chance that a system like A* could be used instead? This would have to account for line actions and such too.
It currently uses a sort of A* in the pathing algorithm. Line actions are counted via path nodes (no navigation mesh pls).
scalliano wrote:Does this mean that bots could potentially be used as enemies/allies in SP/co-op?
Probably, but it has to be simple maps. Doors will be trouble (I'm still trying to figure out how to get a non-player pawn actor to Use a door or a lift!)
User avatar
TheRailgunner
Posts: 1555
Joined: Mon Jul 08, 2013 10:08 pm

Re: [70%] ζetaBots: The ZScript Bot

Post by TheRailgunner »

I take it it's prohibitively difficult to devise some way to essentially trick GZD into thinking the bot is providing genuine player inputs to a controlled playerpawn? Is it even possible?

Zetabots interests me because of the potential for far superior monster AI - things like cover, limited pursuit, drawing fire, evasive actions, smarter pathfinding, etc., mostly because Doom's basic monster behavior (rush directly in the direction of the player, even if totally obstructed or blocked despite the clear presence of an open path to the player because they cannot draw or remember a path to their targets) is trash and not immersive after 25 years.
User avatar
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

Re: [70%] ζetaBots: The ZScript Bot

Post by Gustavo6046 »

Maybe with some engine modification, which, given GZDoom's complexity, might be a bit difficult to do. I'd have to
  1. draw a line from Actor to UseRange units at its front,
  2. find all linedefs that intersect with this line,
  3. if this linedef is an Use line, has an action, and can be used by the actor (perform common Use line checks), then perform that action.
That might also be doable with ACS: an array of line actions. Since ZScript can access DECORATE functions, it can access ACS_Execute, and therefore execute a specifically-numbered script. The problem would be finding the linedefs that are in front of the actor, and getting their special - I fear that might not be doable without C++ work (intensive russian labor 24/7 for 5 years).
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: [70%] ζetaBots: The ZScript Bot

Post by Marisa the Magician »

Alternatively I can just export P_ActivateLine to the ZScript side and it would allow bots to "press use" on them. Finding the line in front of an actor is as simple as running a trace (cool new thing in 3.3 btw) and checking for usable lines (while aborting if a "block use" line is found).
User avatar
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

Re: [70%] ζetaBots: The ZScript Bot

Post by Gustavo6046 »

Exactly, Marisa. That would be something really easy if a line (with index, not tag!) could be activated separately. The map should be more exposed to the ZScript modders (the BSP tree would then be discarded?) so that I can also work futurely in a pseudo-roguelike project.

I also have a simple, rough, and very coarse roadmap:
Image
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: [70%] ζetaBots: The ZScript Bot

Post by Nash »

The devs have already mentioned the intention to scriptify the internal bots... why not work together with them to perhaps phase out ZCajun in favour for your completely re-written bots? You'll get better tools to work with due to the project being engine-side too...
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: [70%] ζetaBots: The ZScript Bot

Post by Rachael »

My idea was to make the implementation work a lot like the ZCajun ones do but better. Using player inputs so they can be recorded in demos. Gustavo and Marisa both mentioned making the bots follow pathing nodes - I personally think they should talk to one another and see if their goals align well enough that they can work together.

That being said though, if their goals are far enough apart we'll just have to settle for "bot classes" so to speak - i.e. one set of bots following one bot class, and one bot set following another, etc. If done right, both could easily become official... Either way, anyone who uses bots would probably love to see the dated ZCajun implementation gone.
User avatar
TheRailgunner
Posts: 1555
Joined: Mon Jul 08, 2013 10:08 pm

Re: [70%] ζetaBots: The ZScript Bot

Post by TheRailgunner »

Rachael wrote:My idea was to make the implementation work a lot like the ZCajun ones do but better. Using player inputs so they can be recorded in demos. Gustavo and Marisa both mentioned making the bots follow pathing nodes - I personally think they should talk to one another and see if their goals align well enough that they can work together.

That being said though, if their goals are far enough apart we'll just have to settle for "bot classes" so to speak - i.e. one set of bots following one bot class, and one bot set following another, etc. If done right, both could easily become official... Either way, anyone who uses bots would probably love to see the dated ZCajun implementation gone.
Is it possible to effectively replace a monster with such a bot? Apart from the need to essentially turn them into player actors so they can use the ZetaBot system, it doesn't seem unrealistic, and I certainly hope it's a realistic possibility (you mentioned having the bots talking to each other and cooperating based off of their objectives - actually a decent step beyond my initial hopes). At least, I hope so - I'm not going to pretend I understand much of how this works or why, but Zeta seems very, very promising.
User avatar
Marisa the Magician
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: [70%] ζetaBots: The ZScript Bot

Post by Marisa the Magician »

By the way, if we're to integrate this officially, I think a more proper way to have bots understand how and when to use weapons and items would be to add rating/desirability virtual functions to them like Unreal/UT does.
User avatar
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

Re: [70%] ζetaBots: The ZScript Bot

Post by Gustavo6046 »

What a coincidence!

I had UT99's bots and weapon system in mind when I designed this, since I wrapped the Doom weapons in a Zeta Weapon module (which means they can be fired and rated from any actor shooter to any actor target), and that includes RateSelf and AltRateSelf.

I have no plans to add Heretic support right out - I want to first make the bot avoid walls and obstacles (which is being a task slightly harder than I expected). Hexen will be a little difficult, since it involves multiple classes, but that should already work (since I support multiple player classes). Another difficulty will be adapting the available modules to the current IWADs and maybe even loaded mods - since currently these are stored in a CVar, that should not be an issue, since CVars are specific to a game; the problem is to set them in CVARINFO for these IWADs).

Either way, welcome to Alpha!
Melodica
Posts: 75
Joined: Sun Feb 14, 2016 10:35 am
Preferred Pronouns: She/Her
Location: Chile

Re: [ALPHA 0.1.0a] ζetaBots: The ZScript Bot

Post by Melodica »

I tried downloading through the provided link and it gives me "Error 403, denied". Could you provide a mirror link?
User avatar
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

Re: [ALPHA 0.1.0a] ζetaBots: The ZScript Bot

Post by Gustavo6046 »

Melodica wrote:I tried downloading through the provided link and it gives me "Error 403, denied". Could you provide a mirror link?
I think I updated it now, do you think it works now?
Melodica
Posts: 75
Joined: Sun Feb 14, 2016 10:35 am
Preferred Pronouns: She/Her
Location: Chile

Re: [ALPHA 0.1.0a] ζetaBots: The ZScript Bot

Post by Melodica »

Gustavo6046 wrote:
Melodica wrote:I tried downloading through the provided link and it gives me "Error 403, denied". Could you provide a mirror link?
I think I updated it now, do you think it works now?
Still gives the same error. Maybe try to upload it to a different site?
Post Reply

Return to “Gameplay Mods”