-
Notifications
You must be signed in to change notification settings - Fork 552
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mid-level cutscenes (both ACS and ZScript methods) #2725
base: master
Are you sure you want to change the base?
Conversation
… ACS and zscript methods. Cutscene definitions are stored in levellocals array from MAPINFO lump. They can be referred using string names and can be used in Strife-style dialogue pages.
Dumb question: What part of level.StartIntermission does not work for you that you needed to add a completely new feature instead? |
Also isn't there a strife item you can use to do this with? |
The part where doing something the wrong way and submitting a PR has become my identity? I don't know. I couldn't figure out how to use anything existing to make a cutscene play in the middle of a level if I cross or use a line or actor. How do you do it? |
Screen jobs in general are very poorly documented, if there is already a way to do this in ZScript, not one person in the GZDoom community has figured this out yet because the code is much too cryptic to decipher and there are no ready-made examples in gzdoom.pk3 to use as a starting point to figure it out. If there is a way to do it, then explaining it to us would indeed negate the need for a PR like this. |
I know this is a hobby project and worked on during your spare time, Graf, as well as other people's spare time. That said, it does frustrate me how when people actually try to PR to fix perceived issues due to lack of documentation and momentum, they're shot down. If they want to add something that doesn't align to some arbitrary vision, it gets shot down. If you want us to actually use the screenjob API, you have to throw us a bone and give us something to work with. The built in intermissions are cryptic at best to read, and I've been using this engine ZScript and DECORATE/ACS-wise as long as I can remember. Apologies for my bluntness, but this is extremely frustrating. |
To play devil's advocate though, the work has been submitted without any clear indication around whether questions were asked in light of lacking documentation prior to submission. I'd never submit a large-ish PR to any project without some level of confidence that it's desirable as it just sets one up for failure. Graf's time for any non-work projects is limited to say the least. It's not ideal in any way whatsoever, but I'd reference the ZScript files in Raze to try and get an understanding as to how they work as they're the most prominent real world examples I could lead you to. |
Oh dear. I didn't realize this would cause a stir. I don't mind the PR being closed. I enjoyed the process of getting this demo to work, and all I want is for the engine to have the ability. Let there be no pressures. |
Also, even if this can already be done with the ScreenJob black box. It would still be nice to have a relatively quick and easy way to define mid-game cutscenes, so this PR would still be useful. Instead of having to write long winded ZScript-only (And maybe ACS too, but only through ScriptCall()) code for every project that might want to have a cutscene in the middle of a map. While this PR just allows for defining new cutscene{} blocks in MAPINFO, and playing them by name using either a ZScript function or a line special. This PR is still way more user friendly. |
If the ScreenJobs API can already do this it might ultimately be better to look into setting up a wrapper API for it that's easier to understand. In the meantime, it's something I've been meaning to document for a while now so I might start looking into it now that some of my own projects are cooling down |
Thing is, a wrapper ZScript API still makes it barely any easier for a mapper in particular to just add a mid level cutscene. It could be done with ScriptCall() and a static function in the API. But it's still easier to have a line special that just, plays a cutscene. Certainly a lot more user friendly and easy than every map or mapset needing to make an ACS script that just calls ScriptCall() with a string argument (Actually, can you even do that in ACS? With scripts that is, not functions. If not, that makes things even more convoluted.). Than setting each line up with Script_Execute. If a ZScript API for mid level cutscenes could be done with a ScreenJob that'd be fine, but I think it'd still be a good idea to preserve the PlayCutscene special somehow. TL;DR the PlayCutscene line special is still very useful and super easy to use, and AFAIK couldn't have a substitute with a pure ZScript API alone. |
I agree, but I think the issue is that this PR does much more than just add line specials which is where Graf's main concern comes in. Frankly, I'd agree with him that we shouldn't be adding duplicate ways to do things in the engine as it'll just cause confusion for maintainers down the line should they need to fix/clean up this area. Given that this feature is meant for Build, it might actually be best to take a peek at Raze to see how it handles things. It's another feature that got backported over to GZDoom which is why it's hard to find documentation on it even with the pk3 itself. |
There are no build engine games with mid-level cutscenes, are there? They all play between levels. |
Added ability to run cutscenes mid-level in single player. Playsim tics halt until video ends or is interrupted.
Showcase: https://youtu.be/SQSybYJCdsU
WAD: https://www.mediafire.com/file/qygv45pbdcrbhhz/midlevel_fmv.pk3/file
Added both ACS and zscript methods.
Cutscene definitions are stored in
levellocals
array fromMAPINFO
lump. They can be referred using string names and can be used in Strife-style dialogue pages.A menu-controlled CVar disables all in-game cutscenes.
Issue: I couldn't make music resume from where it is paused. So I just restarted it. I also don't know how to disable the wipe effect or make the fmv unskippable.
No multiplayer because I didn't want to add
DEM_
net packets to indicate that an fmv was triggered, which fmv was triggered, etc.