[v0.9.0] 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 YOUR 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.

Re: ζetaBots: The ZScript Bot

Postby Gustavo6046 » Sat Apr 27, 2019 4:54 pm

Back!

Hm, the error is completely reasonable, but for some reason passed silently through testing (I think I used an earlier version of GZDoom). It might have been some discrepancy among versions, since ZScript itself isn't quite matured yet. Apparently they removed autocasting from Spawn.

Nonetheless, I'm releasing a fixed 0.3.1 to GitHub right now. Sorry for the delay, must have been TCP lag (^_^')
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: ζetaBots: The ZScript Bot

Postby JPL » Sun Apr 28, 2019 11:31 pm

Just tried 0.3.1 with GZDoom latest and got the same error I described on 5 March 2019.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

Re: ζetaBots: The ZScript Bot

Postby TDRR » Mon Apr 29, 2019 12:44 am

Hm, got a question, what exactly is stopping you from directly manipulating a playerclass or bot to make it do what you want? I'm definitely going to do this way to allow easier support for mods and stuff, but if you didn't use that method then i suppose it's because it wasn't as flexible as you wanted, right?
User avatar
TDRR
Now in glorious HD
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: ζetaBots: The ZScript Bot

Postby Nash » Mon Apr 29, 2019 7:17 am

I still think this is better developed in cooperation with the devs to get implemented engine-side, rather than be a user-side mod... IMO of course.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: ζetaBots: The ZScript Bot

Postby Gustavo6046 » Mon Apr 29, 2019 4:59 pm

JPL wrote:Just tried 0.3.1 with GZDoom latest and got the same error I described on 5 March 2019.


The assertion error is probably an issue with GZDoom. The mod works in GZDoom g3.7.2 and I don't see why it wouldn't elsewhere. I was mentioning a separate issue, which was a ZScript compilation error that resulted from rushing 0.3.0.

TDRR wrote:Hm, got a question, what exactly is stopping you from directly manipulating a playerclass or bot to make it do what you want? I'm definitely going to do this way to allow easier support for mods and stuff, but if you didn't use that method then i suppose it's because it wasn't as flexible as you wanted, right?


Trust me, I have attempted that. You can't manipulate a PlayerPawn's movement in ZScript (at least yet), apparently.

Nash wrote:I still think this is better developed in cooperation with the devs to get implemented engine-side, rather than be a user-side mod... IMO of course.


I agree. I'll try compiling GZDoom eventually, then I'll see where in this hall of pointers shall I lay my attempt.
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: ZetaBots: The ZScript Bot

Postby Gustavo6046 » Tue Apr 30, 2019 10:56 am

Two flies, one rock. I just compiled GZDoom from GitHub, and it really does have that damn assertion error. It's probably a ZScript error that wasn't caught before being compiled into internal code (and that thus ended up being caught only by assertions). Thing is, I don't know where the error is!

Code: Select allExpand view
gzdoom: /home/gustavo6046/Projects/gzdoom_build/gzdoom/src/scripting/backend/codegen.cpp:2319: virtual ExpEmit FxPostIncrDecr::Emit(VMFunctionBuilder *): Assertion `ValueType == Base->ValueType && IsNumeric()' failed.


"FxPostIncrDecr" seems to suggest it's an issue with incrementing or decrementing. But it takes a FunctionBuilder pointer as argument, so it's probably part of a ZScript function. That isn't specific enough, so I'll just focus into checking increments and decrements are all applied to proper variables.

I wonder whether the issue is that the variable has an unmatching type (to whatever Base's ValueType member is), or if it's just not a numeric value. I will look for it, nonetheless.

Fortunately I have that source code file, so I can read it myself. (:

-------

BREAKING NEWS EDIT: I somehow fixed the mysterious assertion error, by fiddling with Standard.zsc. I'll perform test runs and tell once 0.3.20.4.0 is out.

EDIT 2: 0.4.0 is now out! Check the first post for more.
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: ζetaBots: The ZScript Bot

Postby TDRR » Thu May 02, 2019 1:07 am

Gustavo6046 wrote:
TDRR wrote:Hm, got a question, what exactly is stopping you from directly manipulating a playerclass or bot to make it do what you want? I'm definitely going to do this way to allow easier support for mods and stuff, but if you didn't use that method then i suppose it's because it wasn't as flexible as you wanted, right?


Trust me, I have attempted that. You can't manipulate a PlayerPawn's movement in ZScript (at least yet), apparently.


I think you misunderstood what i meant, i was talking something like this: viewtopic.php?f=43&t=64527
User avatar
TDRR
Now in glorious HD
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: [v0.4.2] ZetaBots: The ZScript Bot

Postby Gustavo6046 » Thu May 02, 2019 12:35 pm

Oh, neat! I see.

Yes. Player classes are PlayerPawns. Last time I tried, I couldn't manipulate stuff like inputs. But now that I think about it. I'm pretty sure I could just move some ZetaBotPawn code over to the bot controller, and make any PlayerPawn usable.

Though I don't think there is a better workaround to weapons than just supplying a module for each, unfortunately. And Zandronum support with the ZetaBots is obviously going to be an afterthought, at best.

Additionally, to support walk animations, I would still need to use an Actor instead of a PlayerPawn. I don't think that's bad. The only issue, once again, would be porting mods to ZetaBot (but then again, people will still need to port weapons as modules).



Anyways.

I realized I have to verify the bots actually path correctly. They seem to hit obstacles too often, and not follow nodes very well. This will change. I also have to have them take damage from damaging floors, somehow. (maybe verify the sector type in A_BotTick?)
And I have to smoothen the change of angle, because right now, if you spawn a ZetaSpirit, you'll effectively end up spasming out of yourself. :P

----

As for weapon compatibility, I'm inclined to agree that, without a player class to make weapon states a thing, we're doomed. And my attempts at making a player class resulted in bots going through doors and even finding unfair secrets. So, yeah, modules (I should make a way to make them in DECORATE!)
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.5.0] ZetaBots: The ZScript Bot

Postby Gustavo6046 » Fri May 03, 2019 12:34 pm

ZetaBot 0.5.0 has been released. Now we can see dumb things like this:

User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.5.0] ZetaBots: The ZScript Bot

Postby TDRR » Fri May 03, 2019 1:13 pm

Don't know if you already fixed the issue where bots ran way faster than the player, but the way i fixed it was just using A_ChangeVelocity(0, 0, momz, CVF_REPLACE) before thrusting, so bots keep a constant speed.

Bots also don't seem to attack monsters much, and monsters also don't have much interest in the bots either, i suppose that part is still W.I.P?
User avatar
TDRR
Now in glorious HD
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: [v0.5.0] ZetaBots: The ZScript Bot

Postby Gustavo6046 » Fri May 03, 2019 1:32 pm

TDRR wrote:Don't know if you already fixed the issue where bots ran way faster than the player, but the way i fixed it was just using A_ChangeVelocity(0, 0, momz, CVF_REPLACE) before thrusting, so bots keep a constant speed.


I (mostly) have :)

Bots also don't seem to attack monsters much, and monsters also don't have much interest in the bots either, i suppose that part is still W.I.P?


The former is an occasional issue, and I'm not very sure why it happens. The latter is being investigated (I'm trying to have monsters attack bots they see if they don't have a target. There is a function that sets a monster's target and wakes it up.)
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.5.0] ZetaBots: The ZScript Bot

Postby TDRR » Fri May 03, 2019 1:41 pm

Also, they jump like kangaroos!

One thing i would like to see here, is a bot-spawnspot that can be saved in the nodelist, that would make bots spawn in those locations in Deathmatch, and when killed, respawn at that location.

The nodes also seem to be ignored almost always there's an alive actor in the close proximity to the ZetaBots, be it friendly or not.
User avatar
TDRR
Now in glorious HD
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: [v0.5.0] ZetaBots: The ZScript Bot

Postby Gustavo6046 » Fri May 03, 2019 1:53 pm

TDRR wrote:One thing i would like to see here, is a bot-spawnspot that can be saved in the nodelist, that would make bots spawn in those locations in Deathmatch, and when killed, respawn at that location.


NT_Respawn? Good idea! We could have a CVar "zb_cooprespawn" too!

kangaroos!


Oh, fixable! gasp don't tell anyone

The nodes also seem to be ignored almost always there's an alive actor in the close proximity to the ZetaBots, be it friendly or not.


Weird. I think they usually follow the player. If the player is too far, they traverse the nodes via A*, otherwise they just back the player, helping and shooting monsters and all.
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.6.0] ZetaBots: The ZScript Bot

Postby Gustavo6046 » Sat May 04, 2019 12:01 pm

This new update is hot!

I also added screenshots to the first post, finally. Hurray! (:
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.6.0] ZetaBots: The ZScript Bot

Postby TDRR » Sat May 04, 2019 5:00 pm

Just in case anyone is wondering, there's a changelog for all public ZetaBot releases: https://github.com/Gustavo6046/ZetaBot/releases
User avatar
TDRR
Now in glorious HD
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

PreviousNext

Return to Gameplay Mods

Who is online

Users browsing this forum: 4page, AvzinElkein, monkeybtm6, Toberone and 11 guests