HELP WANTED: ZScript

Archive of the old editing forum
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.
User avatar
Major Cooke
Posts: 8176
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: HELP WANTED: ZScript

Post by Major Cooke »

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.
User avatar
Kinsie
Posts: 7401
Joined: Fri Oct 22, 2004 9:22 am
Graphics Processor: nVidia with Vulkan support
Location: MAP33
Contact:

Re: HELP WANTED: ZScript

Post by Kinsie »

Major Cooke wrote:It's not the old stuff that's a concern. It's the new.
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:What you need is D4D which uses the latest and greatest in DECORATE innovations
Do you want testers, or a medal?
Last edited by Kinsie on Thu Nov 10, 2016 7:32 am, edited 1 time in total.
User avatar
Major Cooke
Posts: 8176
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: HELP WANTED: ZScript

Post by Major Cooke »

Kinsie wrote:Do you want testers, or a medal?
Can the crap. I mentioned Argent, did I not?
User avatar
InsanityBringer
Posts: 3386
Joined: Thu Jul 05, 2007 4:53 pm
Location: opening the forbidden box

Re: HELP WANTED: ZScript

Post by InsanityBringer »

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.
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"

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
User avatar
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

Post by Ryan Cordell »

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
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.

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
User avatar
Xaser
 
 
Posts: 10772
Joined: Sun Jul 20, 2003 12:15 pm
Contact:

Re: HELP WANTED: ZScript

Post by Xaser »

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.
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.
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". :P

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.
User avatar
Major Cooke
Posts: 8176
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: HELP WANTED: ZScript

Post by Major Cooke »

Ryan Cordell wrote:
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
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.

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
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.

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.
User avatar
Major Cooke
Posts: 8176
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: HELP WANTED: ZScript

Post by Major Cooke »

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).
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: HELP WANTED: ZScript

Post by Nash »

Major Cooke wrote:So this will give folks an idea on how structs work within 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)
User avatar
Major Cooke
Posts: 8176
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: HELP WANTED: ZScript

Post by Major Cooke »

There already is one.
User avatar
Rachael
Posts: 13571
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: HELP WANTED: ZScript

Post by Rachael »

New version will be up soon. This one simply has dynamic lights finally converted to ZScript.
User avatar
Rachael
Posts: 13571
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: HELP WANTED: ZScript

Post by Rachael »

The build with virtual functions that were just put in is now available. Have fun! ~
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49071
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: HELP WANTED: ZScript

Post by Graf Zahl »

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.
User avatar
Rachael
Posts: 13571
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: HELP WANTED: ZScript

Post by Rachael »

I'll pull it then and make a new build.
Edward-san
Posts: 1774
Joined: Sat Oct 17, 2009 9:40 am

Re: HELP WANTED: ZScript

Post by Edward-san »

... and of course there are new build errors for linux. I'll make a new report ASAP.
Locked

Return to “Editing (Archive)”