Jump to content

Zscript or Decorate?


Sonikkumania

Recommended Posts

I'm aware that this subject has been discussed before but as I'm just starting to learn very basics of Zscript I want to have some talk.

 

I've been using Decorate on custom stuff to this day like many others so it's kind of odd the change especially since Decorate is very compatible with Zscript. They're actually not very different from what I've understood.

 

So logically one would move to Zscript as it's the method which is being worked on all the time while Decorate is being left behind.

 

However it occurs to me that some source ports, for example Zandronum, does not support Zscript. In this case using Decorate would be a bulletproof way.

 

So which do you think is the more ideal way? Obviously depends on project: customisation that won't be very complex can be very well made in Decorate, and more advanced in Zscript.

 

Either way it kinda feels obsolete to use Decorate nowadays..

Share this post


Link to post

Decorate is indeed obsolete -- only use it if you're working on an old mod that already has it ('cause porting everything is tedious), or are targeting Zandronum or some ancient version of (G)ZDoom (and even then, the downsides really aren't worth it unless you're explicitly making a Zandro multiplayer thing). For new GZDoom stuff, use ZScript.

 

This is one of those rare times when I'll go all out and say: do not listen to anyone who says otherwise on this. There's a lot of bad advice on this topic floating around, unfortunately.

Share this post


Link to post

100% agree with @Xaser

The only "annoying" thing is that, for now, Slade doesn't have a real support when writing in a zscript format.

Edited by Kan3

Share this post


Link to post
4 hours ago, Xaser said:

Decorate is indeed obsolete -- only use it if you're working on an old mod that already has it ('cause porting everything is tedious), or are targeting Zandronum or some ancient version of (G)ZDoom

Rather than old versions of GZDoom, I'd point out k8vavoom and the quite incredible ACE Engine instead.

 

But otherwise, yes, if you're only targeting GZDoom, it's much better to go with ZScript to start with. For the simple stuff you could do with DECORATE, it's not more complex than DECORATE. And for the complex stuff you can't do with DECORATE, well, you can't do with DECORATE.

Share this post


Link to post

So, all the stuff I’ve made in the past 10 months is now subject to “Everything you’re doing is bad, I want you to know this”? What are the disadvantages to DECORATE, anyway, because anything that I’ve wanted to make with it, I’ve accomplished most of the time (barring the stuff that blatantly requires ACS, but that’s more global level stuff rather than monsters or levels)

I want to know if I need to relearn 90% of my GZDoom coding knowledge over things that matter to me.

Share this post


Link to post
14 minutes ago, Fraston said:

So, all the stuff I’ve made in the past 10 months is now subject to “Everything you’re doing is bad, I want you to know this”? What are the disadvantages to DECORATE, anyway, because anything that I’ve wanted to make with it, I’ve accomplished most of the time (barring the stuff that blatantly requires ACS, but that’s more global level stuff rather than monsters or levels)

I want to know if I need to relearn 90% of my GZDoom coding knowledge over things that matter to me.

I wouldn't say it's bad, since if you've actually learned Decorate you pretty much know ZScript, as it is quite similar.

 

Disadvantages to Decorate, according to ZDoom wiki:

DECORATE is currently deprecated in GZDoom: while it's still supported, it has been completely replaced by ZScript. All DECORATE features, such as actor properties, flags and functions are available in ZScript. Using DECORATE is still possible but is not recommended since it doesn't offer any advantages over ZScript, and all DECORATE methods can still be applied in ZScript.

Share this post


Link to post
21 minutes ago, Fraston said:

So, all the stuff I’ve made in the past 10 months is now subject to “Everything you’re doing is bad, I want you to know this”?

Nah, it's not bad. It's still perfectly serviceable.

 

21 minutes ago, Fraston said:

What are the disadvantages to DECORATE

Basically, that it doesn't allow to do advanced stuff without jumping through hoops. If all you do is relatively simple stuff, code-wise, then the feature set of DECORATE can be largely sufficient.

 

However, when you do want to make some more complex stuff, that's when DECORATE stops being sufficient, and you start to need workarounds. Basically if your DECORATE code is filled with giant lists of A_JumpIfInventory with token items, if you keep calling ACS scripts to perform certain actions that you can't do in DECORATE otherwise, and so on, then you should really take some time to learn ZScript because it'll allow you do do all this in a much more elegant fashion.

Edited by Gez

Share this post


Link to post
57 minutes ago, Fraston said:

So, all the stuff I’ve made in the past 10 months is now subject to “Everything you’re doing is bad, I want you to know this”?

If you're referring to my post, then no, I'm not calling you out for "doing it wrong", but rather calling out whomever (or whatever) steered you in the wrong direction 10 months ago. This sort of thing is exactly why I'm so blunt about it: now you're in a situation where you've got a ton of features out of reach unless you go through a tedious conversion process, and that sucks.

 

Good point from Gez re: ACE Engine -- basically if you're targeting some other port than GZDoom, this doesn't apply -- though then there's a whole "will the features available let you achieve your project vision" question, which is a topic for another thread. :P

Share this post


Link to post
12 minutes ago, Xaser said:

Good point from Gez re: ACE Engine -- basically if you're targeting some other port than GZDoom, this doesn't apply -- though then there's a whole "will the features available let you achieve your project vision" question, which is a topic for another thread. :P

This is important for everyone to consider. I literally HAD to move out of Doom Builder 2 because it lacks support for modern scripting. When I get those things I desire to work after a tedious struggling with scripts, I really feel like a winner :D

 

I mean things just change with time even in Doom, even if the core mechanism remains.

Share this post


Link to post

It's also important to note that ZScript goes beyond just doing actors. It can do menus, has event handlers, and can actually access (and modify!) all the map data. Something like this simply couldn't be done without ZScript:

 

 

 

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...