Emulate an "EndMap" using ZScript?

Mon Jan 24, 2022 2:49 pm

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.

Re: Emulate an "EndMap" using ZScript?

Mon Jan 24, 2022 2:55 pm

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.

Re: Emulate an "EndMap" using ZScript?

Mon Jan 24, 2022 10:31 pm

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.