"The end of DECORATE?" or "My fear of ZScript"

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Ravick » Sun Feb 26, 2017 3:19 pm

Look, my two fears (and of a few other modders I've talked to) with this new ZScrit thing was/are that we who have DECORATE based mods could get the same problem of RTC-3057's pistol, simply destroyed when the "old DECORATE format" got deprecated, and the possibility of need to update hundreds (literally, for me and a few others) of actors to this new code format.

It took me some time to believe that this was the reason for RTC-3057 to got so unbalanced without a pistol. I mean, "omg, it can rly happens, our mods can get broken by the Zdoom's evolution!"

And after seeing me and others got mods broken with the new parser (that I've seem some calling "Nazi Parser"), I was rly afraid seeing this ZScript thing emerging. It was one more thing to broken our mods that, before it, were working just fine.

But, if, as said in this thread, DECORATE will remain there, and our inheritance based actors can actually remain even with the stock actors being in ZScript, I welcome it. Modding power is always good. And, even I still not knowing how to use it, ZScrit seems to be an ultimate power for that to me.
User avatar
Ravick
Do what thou wilt, since you don't bug the hell out of me!
 
Joined: 23 Aug 2010
Location: Tubarão, Brasil

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Rachael » Sun Feb 26, 2017 3:28 pm

The mods that break should not be too hard to update with the "nazi parser" - the real problem is when authors release stuff with a restrictive copyright that prevents second-hand modification and then completely disappear from the community forever.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Graf Zahl » Sun Feb 26, 2017 6:46 pm

RTC-3057 didn't get broken by the deprecation of old DECORATE but by making actor names case insensitive. The makers were so smart to name their Pistol replacement 'pistol'. A lot of good it did to them. In retrospect I should have addressed the issue back then like I did now - by synthesizing a new name for such actors, not by allowing the duplicate to pass.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby ZZYZX » Mon Feb 27, 2017 3:52 am

https://mantis.zdoom.org/view.php?id=325#c730
Why do we destroy DECORATE duplicates now?
User avatar
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine
Discord: ZZYZX#1394
Github ID: jewalky

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Graf Zahl » Mon Feb 27, 2017 4:39 am

This was a mistake from approx, 8-9 years ago I always regretted doing back then because I didn't see the serious problem it caused (i.e. it has become impossible to retrieve the states of the shadowed class from a savegame, even if other classes inherited from it) So essentially there were 3 options:

1. outright prohibit duplicates (bad)
2. keep the broken behavior in (also bad)
3. try to synthesize a new name for the duplicate (only bad in some special cases)

It's the classic case of a problem with no good solution, I had to pick one the keeps future damage to the minimum.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Agentbromsnor » Tue Feb 28, 2017 8:11 am

I just wanted to say that I completely relate to this post. As a fellow script-kiddie, I too got quite nervous when I saw all those really complex looking ZScript examples popping up.

However, I do think that at this stage it's still very daunting because of how little "real" documentation there is of ZScript (though this is expanded all the time, of course). I'd say give it another year or so, and there should be a lot more documentation about all the different ZScript functions and how to properly put your scripts together. I think that at the end of the day ZScript is very promising, and I can't think of any other Doom port that allows for this level of scripting without just outright rewriting the source.
User avatar
Agentbromsnor
 
Joined: 28 Mar 2012

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Rachael » Tue Feb 28, 2017 8:28 am

I think what will help ZScript more than anything else in the world at all right now is if project HOERS kicks off, but there's still several things that need to happen before that goes into full swing. Inevitably as people make submissions, some will try and document it, and others will also benefit from being able to make use of the code inside DECORATE.
User avatar
Rachael
Webmaster
 
Joined: 13 Jan 2004
Discord: Rachael#3767
Twitch ID: madamerachelle
Github ID: madame-rachelle
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Matt » Tue Mar 14, 2017 3:41 pm

Just a passing thought: the fact that the VM overhead is so big compared to relying on a native equivalent should help ~even the playing field~ a bit. There isn't really any reason to type up a bunch of trig and have a thorough breakdown of every piece of what you're doing when most of the assumptions in A_SpawnItemEx/ChangeVelocity/SpawnProjectile already handle what you need.

Most of the more efficiently written code by people who really know what they're doing may well look like DECORATE+anon functions but with more parentheses and semicolons, which (except for the occasional really complex thing here and there that you know that modder would've had an even crazier-looking hack version of in DECORATE anyway) looks more or less like what newer users will be producing, with a small shifting population of those in the learning curve trying out the obviously weird stuff.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Graf Zahl » Tue Mar 14, 2017 7:04 pm

You are thinking too much about VM overhead. Surely it's a lot more than native code, but it's still in the realm of microseconds, not milliseconds what we are talking about.

I had to use D4D (one of the most extreme mods when it comes to script use) on one of the most extreme maps I know (the final map of Neodoom) to get the whole system to the point where the VM use per frame reached one millisecond - and even then it got outclassed 10:1 by the native part of the AI code.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby DeathIncarnate » Mon Sep 24, 2018 2:39 pm

Would ZScript make certain functions "easier" (less messy)?
E.g: Simply looking at DECORATE functions such as reloading, zooming, kicking and other custom weapon states - let alone actually implementing it - is rather painful.
Looking at the amount of "TNT1 AAAAAAAAAAAAAA 0" and unbelievable amount of Jump functions in DECORATE on certain mods is enough to make one dizzy.
User avatar
DeathIncarnate
Rip and Tear, until it is done.
 
Joined: 16 Oct 2014
Location: Phobos

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Matt » Mon Sep 24, 2018 4:50 pm

The "TNT1 AAAAAAAAAAAAAA 0" stuff I still find myself using sometimes, but there's nothing preventing you from using a proper C++ style "for" loop instead.

Where ZScript really shines is when you have to work with the relationship between multiple thinkers (actors, linedefs, sectors, etc.). For instance, if you wanted an AI decision tree that factored in all of the following at once (as a bit of an extreme example):

- an imp
- the nearest fellow imp
- the player
- the wall nearest to the player
- the first shootable actor between the imp and the player
- the fellow imp's own target
- the first solid line, if any, between the imp and either the player or the fellow imp
- the player's current weapon
- whether the player is facing either imp
- whether each of the above actors is standing on lava
- whether the nearest imp fireball would hit the player, if one were to assume that both continued on their current respective trajectories until collision

that can all be obtained in ZS fairly cleanly but could require an unmaintainable megabyte-long glob of spaghetti in Decorate (and even then it would be a very rough approximation of the relevant data).
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Arctangent » Mon Sep 24, 2018 11:15 pm

Let's not forget the sheer amount of potential provided by overriding various internal functions on a per-actor basis. Stuff like ripping projectiles that only damage individual enemies once, spinning blade actors that damage whatever they touch, and custom power up effects are all various things that are either really difficult in DECORATE, or outright impossible in it, but aren't all that complex to do in ZScript.

There's a lot that ZScript has opened up. It's no exaggeration that it's outright revolutionary.
User avatar
Arctangent
squawky
 
Joined: 06 Nov 2014
Discord: SquawkyAtan#2371

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby R4L » Fri Sep 28, 2018 8:06 am

I'm itching to jump onto the ZScript bandwagon myself, but I believe I need more practice in programming first. Even with DECORATE and ACS, I rely heavily on the wiki, and ZScript just isn't documented well enough yet. All in due time of course. :)
User avatar
R4L
Ordinary Vanity
 
Joined: 03 Mar 2017
Discord: R4L#4655
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Mikk- » Fri Sep 28, 2018 8:50 am

I've found that waiting for proper documentation to be rather fruitless - reading up on how things are done either on the gzdoom github / .pk3 or other mods is a good way to learn and get the general feel of things. There's also the ZDoom discord where people are always willing to help, and as well as the forums.
User avatar
Mikk-
yooooooooooo
 
Joined: 30 Jun 2009
Location: Somewhere off Kanagawa
Discord: Mikk0451#3922

Re: "The end of DECORATE?" or "My fear of ZScript"

Postby Matt » Sat Sep 29, 2018 1:27 pm

One more thing that you can do in ZScript with relative ease that would have you weeping blood in Decorate: Button combos in weapons.

ZScript: write a function that checks your input, then goes to the appropriate state, sets a variable, shoots something, etc. depending on any arbitrary combination you want (altfire but not fire, altfire and reload but nothing else, zoom and altfire but only if fire is not being pressed and the player is on the ground, etc.).

Decorate: mess with an exponentially increasing number of separate state labels and A_WeaponReady calls that have to be matched up to appropriate A_(Clear)Refire calls each going to a unique state, all while trying to keep the branching binary tree of possibilities straight in your head.
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Previous

Return to General

Who is online

Users browsing this forum: chronoteeth, Zeberpal and 6 guests