Emulate an "EndMap" using ZScript?

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

Emulate an "EndMap" using ZScript?

Post by Enjay »

Probably a bit of a stretch but...

A while ago, I made a feature suggestion for an EndMap feature (and apparently "a while" is over twelve years :shock: ). That is, the ability to define a map that behaves like a TITLEMAP (i.e. it is a purely decorative map where scripted events can take place) but have it used at the end of the game instead of during program startup - an alternative to more traditional ending intermission scripts such as the various inbuilt EndGame endings.

Further suggestions were made with the goal of making the idea a cutscene map (so that the ability to skip the cutscene and progress to a new map could be included if wanted).

The suggestion received a [No]. That's fair enough and I wasn't particularly surprised. However, I wonder if there might be some way to emulate this, or get close to it, using ZScript?

For me, most important would be the ability to prevent the player seeing the autosave confirmation message (and any others, I guess), or not have the game autosave at all during such a map and prevent tabbing to see the automap. Pretty much everything else, I think, can be handled with normal mapping and ACS techniques.

So, is this an area where ZScript might provide a solution or is that not really within its scope?

I am aware that something like this could be used by annoying mod authors to mask the automap (or whatever) during regular gameplay maps but, to be fair, that can already be done by other means, or to prevent autosaving entirely and my solution to such mods is just to bin them and never play them beyond the point that I discover the annoyance.
SanyaWaffles
Posts: 779
Joined: Thu Apr 25, 2013 12:21 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Windows 11 for the Motorola Powerstack II
Graphics Processor: nVidia with Vulkan support
Location: The Corn Fields

Re: Emulate an "EndMap" using ZScript?

Post by SanyaWaffles »

I did something similar for Scoot Hard DX where I froze the player's inputs except the use key (you had to hold it down to skip it) and hid the HUD and just did some graphics overlays like the TITLEMAP.

I forget the exact code I did to do that, but it's perfectly doable... except the autosave thing was something I never was able to completely figure that out.

I think if you could intercept the autosave message on that level alone. I remember that being perfectly doable.

I'm hoping more elaborate cutscene/slideshow stuff from Raze gets backported soon.
User avatar
Nash
 
 
Posts: 17368
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia

Re: Emulate an "EndMap" using ZScript?

Post by Nash »

Enjay, this is something I have also personally wanted. It should be trivial to make a map an "Endmap" - the code is already there for the TITLEMAP, after all. :)

I have 2 plans - expose it to the modder through MAPINFO, and also a way in ZScript to enable and disable the Endmap mode at runtime via scripting - useful for scripted cutscenes and such.

(oh and inb4 hurr durr abuse - this hypothetical "endmap mode" will also disable inputs; regular gameplay is effectively halted, so this can't be "abused", not any more than a TITLEMAP, at least)

I'll have a look at making a PR of this after my chinese new year vacation

EDIT: oh and just for transparency - what Enjay was actually asking in the OP - of whether it's possible to settle with a homebrew solution with current ZScript features - yes, it is technically possible (I have a working implementation in my Quake clone that uses only stock GZDoom 4.7.1 features), but I am not happy with how I achieved them and would rather the engine expose it gracefully to the user in the least amount of steps.

Return to “Scripting”