[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.
Post Reply
User avatar
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

Re: ζetaBots: The ZScript Bot

Post by Gustavo6046 »

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
JPL
 
 
Posts: 523
Joined: Mon Apr 09, 2012 12:27 pm
Contact:

Re: ζetaBots: The ZScript Bot

Post by JPL »

Just tried 0.3.1 with GZDoom latest and got the same error I described on 5 March 2019.
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: ζetaBots: The ZScript Bot

Post by TDRR »

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
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: ζetaBots: The ZScript Bot

Post by Nash »

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
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

Re: ζetaBots: The ZScript Bot

Post by Gustavo6046 »

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
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

Re: ZetaBots: The ZScript Bot

Post by Gustavo6046 »

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 all

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
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

Re: ζetaBots: The ZScript Bot

Post by TDRR »

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
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

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

Post by Gustavo6046 »

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
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

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

Post by Gustavo6046 »

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

User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

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

Post by TDRR »

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
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

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

Post by Gustavo6046 »

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
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

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

Post by TDRR »

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
Gustavo6046
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

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

Post by Gustavo6046 »

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
Posts: 136
Joined: Sat May 13, 2017 3:11 pm
Location: Brazil
Contact:

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

Post by Gustavo6046 »

This new update is hot!

I also added screenshots to the first post, finally. Hurray! (:
User avatar
TDRR
Posts: 815
Joined: Sun Mar 11, 2018 4:15 pm
Operating System Version (Optional): Manjaro/Win 8.1
Graphics Processor: Intel (Modern GZDoom)
Location: Venezuela

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

Post by TDRR »

Just in case anyone is wondering, there's a changelog for all public ZetaBot releases: https://github.com/Gustavo6046/ZetaBot/releases
Post Reply

Return to “Gameplay Mods”