HELP WANTED: ZScript
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: HELP WANTED: ZScript
It's not the old stuff that's a concern. It's the new.
What you need is D4D which uses the latest and greatest in DECORATE innovations, or ARGENT for that matter.
What you need is D4D which uses the latest and greatest in DECORATE innovations, or ARGENT for that matter.
- Kinsie
- Posts: 7401
- Joined: Fri Oct 22, 2004 9:22 am
- Graphics Processor: nVidia with Vulkan support
- Location: MAP33
- Contact:
Re: HELP WANTED: ZScript
MetaDoom is new enough to have had engine features it's using get stripped out mid-development. I figured it was at least worth kicking around to see if you hadn't managed an encore performance. And Samsara's code, to put it politely, is crimes. If anything was going to break due to under-the-hood changes, it'd be the horrifying Duke weapon code.Major Cooke wrote:It's not the old stuff that's a concern. It's the new.
Do you want testers, or a medal?Major Cooke wrote:What you need is D4D which uses the latest and greatest in DECORATE innovations
Last edited by Kinsie on Thu Nov 10, 2016 7:32 am, edited 1 time in total.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: HELP WANTED: ZScript
Can the crap. I mentioned Argent, did I not?Kinsie wrote:Do you want testers, or a medal?
- InsanityBringer
- Posts: 3386
- Joined: Thu Jul 05, 2007 4:53 pm
- Location: opening the forbidden box
Re: HELP WANTED: ZScript
at the same time graf did say this. I'd say this old stuff is a good stress test of whether or not that a good sample of "DECORATE code still compiles and works"Graf Zahl wrote:You do not need to dive in. What's most important right now is to ensure that DECORATE code still compiles and works. And if people just 'wait' they'll be struck with it when it's too late.
getting a massive project using the old game logic like DRLA working in the zscript branch without actually porting the project (since that would probably be a massive bitch and a half at the moment) would be a good way to ensure that the legacy stuff hasn't been broken in any way
- Ryan Cordell
- Posts: 4349
- Joined: Sun Feb 06, 2005 6:39 am
- Preferred Pronouns: No Preference
- Operating System Version (Optional): Windows 10
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Capital of Explodistan
Re: HELP WANTED: ZScript
yeah, there is a fuckton of checking and nightmare logic going on just about every which where which would require a joint effort between me and Yholl for that, just for conversion.InsanityBringer wrote:getting a massive project using the old game logic like DRLA working in the zscript branch without actually porting the project (since that would probably be a massive bitch and a half at the moment) would be a good way to ensure that the legacy stuff hasn't been broken in any way
on that note though, trying it with the latest build that has zscript active and so far DRLA seems to be working fine, without any alterations
Re: HELP WANTED: ZScript
re: lack of adoption, have some durn patience D:. It's been four days since this announcement, and folks aren't going to flock to zscript in droves until there's some "killer app" out there which shows off its capabilities well. That's still in the works at present.
Still though, waiting before converting everything over is wise unless you have a good way of doing parallel development (e.g. branches with git; this works great for doom mods, not even kidding), since zscript itself is in flux and may make breaking changes before release.
This wiki article is the best resource at present. It's not quite a spec but is adequate (to me) for describing how it all works. For the most part, it's "DECORATE with semicolons".Kinsie wrote:That, and I still haven't a clue what this is capable of due to the lack of documentation, so I'm gonna wait until this matures a little before diving in head-first.
Still though, waiting before converting everything over is wise unless you have a good way of doing parallel development (e.g. branches with git; this works great for doom mods, not even kidding), since zscript itself is in flux and may make breaking changes before release.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: HELP WANTED: ZScript
I can attest. It took me at least four days to convert D4D. First I started with all the simple things, using notepad++ to find and replace everything that could be. If it's meant to be an actor, itm must inherit from actor or from something that is an actor. Inheriting from things like (custom)inventory haven't changed.Ryan Cordell wrote:yeah, there is a fuckton of checking and nightmare logic going on just about every which where which would require a joint effort between me and Yholl for that, just for conversion.InsanityBringer wrote:getting a massive project using the old game logic like DRLA working in the zscript branch without actually porting the project (since that would probably be a massive bitch and a half at the moment) would be a good way to ensure that the legacy stuff hasn't been broken in any way
on that note though, trying it with the latest build that has zscript active and so far DRLA seems to be working fine, without any alterations
The next big 'gotcha' is: constants and local vars go outside of the Default { } block. For user vars, just do a straight up search for 'var ' (space included) and replace it with nothing. For constants, do a mass search for 'const int' and 'const float' and replace it with just 'const'. AFTER THAT, and ONLY after that, do a search for 'float' and convert it to 'double', unless Graf changed it so flat means double as well.
Everything that doesn't add new properties needs a Default { } block. Everything that has a name (sans constants/names of vars) needs to be encapsulated by "" or '', depending. I've only found one case where '' is used so far but graf changed it, so it's not worth mentioning. I.e. RenderStyle Add -> "Add"
A_ChangeFlag should be replaced with b<NameOfFlagHere> = <boolean>;. A_ChangeLinkFlags must be used for NOBLOCKMAP and NOSECTOR, however. A_ChangeCountFlags needs to be used for COUNT<KILL/ITEM/SECRET>.
Powerup.Type no longer automatically includes the term "Power" prefixed to it. You must supply it yourself from now on which I think is an excellent move.
Access to direct x/y/z is now 'deprecated'. Instead, you get them by using the actor's 'pos' and 'vel' vectors. I.e. pos.x, pos.y, pos.z, etc. (I need to document that...)
See here for more information.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: HELP WANTED: ZScript
Pushed an update to D4D.pk3. This one's actually pretty big, mainly fixing a few bugs for starters.
The monster item dropping system was chucked into a struct, not only cleaning up all the various death states, but also handling them much more easily. See ZScript/D4D/MonsterBase.txt's AbstractMonster for details.
So this will give folks an idea on how structs work within ZScript.
Also, the only reason I have so many for loops is because constant arrays don't work with Class<Actor> (yet, if they're planned).
The monster item dropping system was chucked into a struct, not only cleaning up all the various death states, but also handling them much more easily. See ZScript/D4D/MonsterBase.txt's AbstractMonster for details.
So this will give folks an idea on how structs work within ZScript.
Also, the only reason I have so many for loops is because constant arrays don't work with Class<Actor> (yet, if they're planned).
Re: HELP WANTED: ZScript
Can you add the struct example into the wiki, please? For those who cannot download your project for whatever reason (time, bandwidth, just want a tldr straight clearcut example without having to sift through large projects etc)Major Cooke wrote:So this will give folks an idea on how structs work within ZScript.
- Major Cooke
- Posts: 8176
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: HELP WANTED: ZScript
There already is one.
Re: HELP WANTED: ZScript
New version will be up soon. This one simply has dynamic lights finally converted to ZScript.
Re: HELP WANTED: ZScript
The build with virtual functions that were just put in is now available. Have fun! ~
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49071
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: HELP WANTED: ZScript
Better not. That build may crash on syntax errors. I just pushed the fix which I did after running into the bug when scriptifying the next source file.
Re: HELP WANTED: ZScript
I'll pull it then and make a new build.
-
- Posts: 1774
- Joined: Sat Oct 17, 2009 9:40 am
Re: HELP WANTED: ZScript
... and of course there are new build errors for linux. I'll make a new report ASAP.