[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: [v0.6.0] ZetaBots: The ZScript Bot

Postby Gustavo6046 » Sat May 04, 2019 11:02 pm

There's also a commits list, but I think the Releases section is better presented, although maybe a bit incomplete with the changelogs. I should write a CHANGELOG file.
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: ZetaBots: The ZScript Bot

Postby JPL » Mon May 06, 2019 8:19 pm

Gustavo6046 wrote: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.


I hate to say it, but I'm still seeing this Assertion Failed with the latest release (0.6.0) with the latest GZDoom git master ("4.2 pre") in Linux. Tried it with a fresh config and doom2.wad, no change.
User avatar
JPL
 
 
 
Joined: 09 Apr 2012

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

Postby Gustavo6046 » Tue May 07, 2019 12:59 pm

Maybe the error returned in later versions. If it does, then it's most likely GZDoom's fault. I do not yet understand what causes it exactly, though it seems to be related to increment/decrement operators. Fiddles and refactors within the source code sometimes fixes it.
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.7.1] ZetaBot: The ZScript Bot

Postby Gustavo6046 » Thu May 09, 2019 4:19 pm

I have released v0.7.1, which adds Heretic support! Yee-haw!

I haven't yet addressed the issue JPL brought to the whiteboard. I fear that is an issue with more recent versions of GZDoom.
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.7.2] ZetaBot: The ZScript Bot

Postby Gustavo6046 » Sat May 11, 2019 11:51 am

Once Hexen support is done, the ZetaBots will be in the Release Candidate stage!

I realized we digressed a little bit from the original path of having the mapper plop nodes for the map manually, as the bots node the map themselves as they wander on it, by default. But then again, nodes are seldom used for wandering, being instead used for hunting enemies and following the "commander" (which 99.9% of the time means getting stuck somewhere).

Bots also seem to be able to get stuck into walls when they respawn into a node that was plopped too close to a wall. I don't know how to fix that, sadly. Maybe I should somehow fix how they plop nodes, in a way those aren't plopped into the wall?
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.7.2] ZetaBot: The ZScript Bot

Postby TDRR » Sat May 11, 2019 12:19 pm

Gustavo6046 wrote:Maybe I should somehow fix how they plop nodes, in a way those aren't plopped into the wall?


Just give them the radius of a player and spawn them via the ACS special Spawn, which won't spawn anything if the actor in question doesn't fit in that space.
User avatar
TDRR
iDeas from the deep (pit of hacks)
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: [v0.7.2] ZetaBot: The ZScript Bot

Postby Nash » Sat May 11, 2019 3:21 pm

This is a ZScript bot, why would Gustavo use ACS when they could do the exact same functionality natively with ZScript? :?
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [v0.7.2] ZetaBot: The ZScript Bot

Postby Gustavo6046 » Sat May 11, 2019 3:26 pm

TDRR wrote:Just give them the radius of a player and spawn them via the ACS special Spawn, which won't spawn anything if the actor in question doesn't fit in that space.


ZScript does have that. Nonetheless, the radius idea is nice! Though they already (seem to) spawn at the center of the bot's position, even though they're smaller in radius, so maybe I should adjust it in some other way instead? Or maybe the bots are somehow going far into the walls themselves (though that wouldn't make much sense).

I'll try verifying it on respawn instead.
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.7.2] ZetaBot: The ZScript Bot

Postby Gustavo6046 » Tue May 14, 2019 10:50 am

In v0.7.3 you will be able to see the paths between nodes! Yay!

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

Re: [v0.7.2] ZetaBot: The ZScript Bot

Postby TDRR » Tue May 14, 2019 12:20 pm

Nash wrote:This is a ZScript bot, why would Gustavo use ACS when they could do the exact same functionality natively with ZScript? :?

I meant using Spawn() as a special on ZScript, doesn't ZScript have access to all ACS specials?
User avatar
TDRR
iDeas from the deep (pit of hacks)
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: [v0.7.2] ZetaBot: The ZScript Bot

Postby Gustavo6046 » Tue May 14, 2019 5:55 pm

TDRR wrote:doesn't ZScript have access to all ACS specials?


ZScript has all access to DECORATE functions on actors, and many, many extra goodies.
ACS is a different kind of script.
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.7.2] ZetaBot: The ZScript Bot

Postby TDRR » Tue May 14, 2019 6:36 pm

Gustavo6046 wrote:ZScript has all access to DECORATE functions on actors, and many, many extra goodies.
ACS is a different kind of script.


That's kinda obvious, and i already know that, but i read somewhere ZScript could use the same actions ACS could, apparently that's either not true or outdated.
User avatar
TDRR
iDeas from the deep (pit of hacks)
 
Joined: 11 Mar 2018
Location: Venezuela
Operating System: Windows Vista/7 64-bit
Graphics Processor: Intel (Modern GZDoom)

Re: [v0.7.3] ZetaBot: The ZScript Bot

Postby Nash » Wed May 15, 2019 3:49 am

Again, this mod is fully written in ZScript, taking advantage of everything working with ZScript has to offer, why would you suggest the author call the ACS variant of Spawn when they can directly call the Actor.Spawn() method in ZScript?

Anyway, it is clear Gustavo knows what they're doing and has apparently already solved the problem, so no need to suggest ghetto solutions to them when they have far better ways of doing things. :P
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: [v0.7.3] ZetaBot: The ZScript Bot

Postby Gustavo6046 » Thu May 16, 2019 3:24 am

Um, it's a minor issue. I haven't fixed it yet. But I already know how to fix it. I'll probably change it in the respawning routine. Maybe there is a way to check for encroaching with walls (non-sector space) in the call to Spawn, so I can do something like a "max 5 tries" counter, and have the bot wait 40 tics if all tries fail before trying again...

EDIT: I fixed it! =D
User avatar
Gustavo6046
 
Joined: 13 May 2017
Location: In an urban area in Brazil.
Discord: Gustavo6046#9009

Re: [v0.8.0] ZetaBot: The ZScript Bot

Postby Nash » Thu May 16, 2019 4:31 am

Gustavo, I know you said you fixed it, but in case you weren't aware - have a look at Actor's TestMobjLocation() - it returns false if something is obstructing the actor. You can also have a look inside GZDoom's ZScript sources for example usage.
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

PreviousNext

Return to Gameplay Mods

Who is online

Users browsing this forum: MrVT, Rowsol, undeadmonk354 and 15 guests