ZScript Discussion

Ask about ACS, DECORATE, ZScript, or any other scripting questions here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.

Please bear in mind that the people helping you do not automatically know how much you know. You may be asked to upload your project file to look at. Don't be afraid to ask questions about what things mean, but also please be patient with the people trying to help you. (And helpers, please be patient with the person you're trying to help!)
User avatar
kodi
 
 
Posts: 1355
Joined: Mon May 06, 2013 8:02 am

Re: ZScript Discussion

Post by kodi »

Just starting to teach myself zscript and I was wondering, is there a function to directly set the state of (pointer) actor without ACS calls?
Blue Shadow
Posts: 5032
Joined: Sun Nov 14, 2010 12:59 am

Re: ZScript Discussion

Post by Blue Shadow »

SetStateLabel is what you want, I think.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Discussion

Post by Graf Zahl »

Feature wise I am done for a first version. I checked the VM call interface to see if it can be optimized but I don't think it's possible with the way it all works. I did implement a global VM stack because that was really expensive and very easy to change.

A quick check of the latest version vs. a regular one pre-ZScript on a map with heavy activity showed no measurable performance impact, meaning it's so low that it gets completely drowned in the normal variations here.


The only thing I still want to investigate is some code optimization with comparisons but I'll probably have to create a test branch for that anyway.
So please test this all the way to hell and back, and please, if something does not seem right, post a bug report. Now is the time to fix all those small issues.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: ZScript Discussion

Post by Edward-san »

Just to be sure: are there any demo incompatibility between master and zscript? If not, I guess one way to find inconsistencies is to make demos in master and play it back in zscript...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Discussion

Post by Graf Zahl »

I took some liberties when converting the function code. I looked to make it function-equivanlent but didn't look to make it function identically. So yes, demos may desync.

It'd also make more sense to test the other games more intensively. The Doom AI is overall rather primitive and less likely to be a cause of problems.
User avatar
Rachael
Posts: 13793
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: ZScript Discussion

Post by Rachael »

Graf Zahl wrote:So please test this all the way to hell and back, and please, if something does not seem right, post a bug report. Now is the time to fix all those small issues.
I launched a new GZZScript build for this. :)
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: ZScript Discussion

Post by Nash »

Will get to testing the crap out of this over this weekend! Thank you so much for all your hard work, Graf.
User avatar
Kappes Buur
 
 
Posts: 4149
Joined: Thu Jul 17, 2003 12:19 am
Graphics Processor: nVidia (Legacy GZDoom)
Location: British Columbia, Canada

Re: ZScript Discussion

Post by Kappes Buur »

GZDoom-ZScript-g2.3pre-882-gef52b37-x64.7z

As soon as I fire the pistol this happens

Image
No crash report, just that.

The two versions previous to this one seem to work okay.

edit:
replaced video with image
Last edited by Kappes Buur on Thu Dec 01, 2016 11:36 am, edited 1 time in total.
User avatar
Rachael
Posts: 13793
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her

Re: ZScript Discussion

Post by Rachael »

Add that to the list of builds that got pulled, then. Got the crash here, too.
User avatar
Silentdarkness12
Posts: 1555
Joined: Thu Aug 15, 2013 5:34 pm
Location: Plains of Pride

Re: ZScript Discussion

Post by Silentdarkness12 »

Allow me to drop into this a complete noob.

What exactly is ZScript, again? : P

I know it's what used to be called Doomscript, but that's about all I know. Just a new script language for Doom mods?.....
User avatar
Kinsie
Posts: 7402
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33

Re: ZScript Discussion

Post by Kinsie »

Silentdarkness12 wrote:Allow me to drop into this a complete noob.

What exactly is ZScript, again? : P

I know it's what used to be called Doomscript, but that's about all I know. Just a new script language for Doom mods?.....
But it's explained so well! You just have to pointer the thinker into the method interface.
User avatar
Nash
 
 
Posts: 17465
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: ZScript Discussion

Post by Nash »

ZScript is basically this thing except it actually exists.
Gez
 
 
Posts: 17934
Joined: Fri Jul 06, 2007 3:22 pm

Re: ZScript Discussion

Post by Gez »

It's largely like DECORATE but there are differences in syntax, and you can go to a much lower level. For instance, in DECORATE you use existing [wiki]action functions[/wiki], but in ZScript you can create new functions.



You still can't modify existing actor properties, though; that's still something that only DEHACKED can do.
User avatar
arookas
Posts: 265
Joined: Mon Jan 24, 2011 6:04 pm

Re: ZScript Discussion

Post by arookas »

Kinsie wrote:But it's explained so well! You just have to pointer the thinker into the method interface.
Why are people still mocking the lack of documentation? The people testing it for merge are the people who have kept up with its development, kept in touch with the developers, and know how to use it. The people who don't are testing it to make sure none of their existing mods break. It's a futile effort to write documentation on a scripting language where any feature may change on whim, which is the case here because, you know, it's still in development—the only difference here is that the development is public.

Was this your position when the MAPINFO format got overhauled? I can't figure out what you want: it seems you do not want zscript to succeed DECORATE, and also do not want them to be the same thing. Unless, you're telling the developers to neither extend DECORATE nor add zscript? :| Your example case also won't happen because, at that point, zscript would be more set in stone and there would be actual documentation.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49183
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ZScript Discussion

Post by Graf Zahl »

Hint hint: If I was writing documentation now, while the thing is still in develoment - as I am clearly the only person knowing all the facts - I wouldn't be able to code the goddamn thing - which would mean there's nothing to document. So Kinsie, what do you want? I only can repeat that it makes little sense to document everything before it isn't finished and even less sense to waste my time on docs, because then I wouldn't have time for anything else.

But be it as it may, in the end the docs will have to be written by someone who thinks like a modder, my own perspective on the whole matter is just from a too different point of view as I know ZDoom's source inside out (aside from the software renderer, that is), and wouldn't even recognize the issues a modder might have with it.

Return to “Scripting”