zscript vs decorate?

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
Enjay
 
 
Posts: 26533
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: zscript vs decorate?

Post by Enjay »

If you're learning from scratch, and only doing simple stuff (to begin with at least) my guess is that it wouldn't be much harder to learn ZScript than it would be to learn DECORATE. The basic structure and syntax are very similar and a basic enemy with nothing particularly fancy going on will look much as it does in DECORATE, just with a bit more punctuation dotted around the place.

For example, if you look at the DECORATE definition for the DoomImp on the Wiki versus the ZScript one in gzdoom.pk3, they are very similar. The only additional stuff in there is that the A_TroopAttack code pointer is also defined at the bottom of the file. A section like that wouldn't be needed by anyone coding their own simple monster using generalised attack functions etc.

The thing is, once you've mastered the simple ZScript stuff, you can move on to the more complicated stuff. If you start with DECORATE, you'd have to go through the process of learning how things are done in ZScript that you already know how to do in DECORATE (often frustrating to "unlearn" things) before you could meaningfully access the more complicated stuff.

I think that the strongest argument in favour of starting with DECORATE would be the cross-port compatibility already mentioned. I think that the perceived difficulty differences are perhaps a function of most of us (myself included) being for more familiar with DECORATE than ZScript and so DECORATE seems easier. When learning from a point of knowing neither, I suspect that the difficulty is not dramatically different.
Post Reply

Return to “Scripting”