A "changenextmap" command.

Mon Jul 26, 2021 9:36 am

We all know nextmap, right?

The problem is that it makes you lose your stuff, which ik is intentional, bc it calls map.

Why isn't there a changenextmap command, which acts like nextmap, but calls the changemap command, which doesn't make you lose your stuff.

My request is for the changenextmap command to become a reality and not just a little dream of mine.

TL;DR: changenextmap = nextmap, but calls changemap instead of map.

Re: A "changenextmap" command.

Mon Jul 26, 2021 11:32 am

It's up to GZDoom devs to decide if to include this in the engine, just saying that this is possible mod-side.

Here is the mod. It adds changenextmap and changenextsecret commands.
You do not have the required permissions to view the files attached to this post.

Re: A "changenextmap" command.

Mon Jul 26, 2021 12:33 pm

This is already possible simply by typing special exit_normal 0 and special exit_secret 0 in the console.

If needed you can add this to your autoexec.cfg:
Code:
alias changenextmap "special exit_normal %1 0"
alias changenextsecret "special exit_secret %1 0"


Note however m8f's solution does not require cheats enabled (nor do the map or changemap commands) - however, this solution does. So if you need to use it without cheats, then m8f's mod is better.

Re: A "changenextmap" command.

Wed Jul 28, 2021 3:06 am

m8f wrote:It's up to GZDoom devs to decide if to include this in the engine, just saying that this is possible mod-side.

Here is the mod. It adds changenextmap and changenextsecret commands.



Thank you. Now I don't have to start with a Piss-You-Off-Tol lol.

Re: A "changenextmap" command.

Wed Jul 28, 2021 7:45 am

IMO this didn't make much sense but i've extended the changemap command instead.
PR here: https://github.com/coelckers/gzdoom/pull/1443

Re: A "changenextmap" command.

Wed Jul 28, 2021 8:19 am

I'm gonna wait for Graf to sign off on this one - it isn't likely that a map might actually be named "next" but if there is - this could present a problem.

I'll move it to code submissions anyway.

Re: A "changenextmap" command.

Wed Jul 28, 2021 8:23 am

If there's a map named "next" this will take precedence. The added checks will only be entered if the given map name does not exist.
I see no reason not to add this, it's still better than having to maintain aliases.

Re: A "changenextmap" command.

Wed Jul 28, 2021 8:24 am

Alright. Done and done, then.

Re: A "changenextmap" command.

Wed Jul 28, 2021 1:03 pm

Graf Zahl wrote:If there's a map named "next" this will take precedence. The added checks will only be entered if the given map name does not exist.
I see no reason not to add this, it's still better than having to maintain aliases.


Someone could make a map called "next" with a message saying for example:

"You cheater! Why would you skip my awesome levels! Shame, just shame on you!"



Which would effectively nullify this command.

Re: A "changenextmap" command.

Wed Jul 28, 2021 2:20 pm

yum13241 wrote:
Graf Zahl wrote:If there's a map named "next" this will take precedence. The added checks will only be entered if the given map name does not exist.
I see no reason not to add this, it's still better than having to maintain aliases.


Someone could make a map called "next" with a message saying for example:

"You cheater! Why would you skip my awesome levels! Shame, just shame on you!"



Which would effectively nullify this command.

There's an effective way to deal with said mapsets:
Spoiler:

Re: A "changenextmap" command.

Wed Jul 28, 2021 2:42 pm

Perfect response. I don't know why more people don't just take that line with mods that dick the player around.

Re: A "changenextmap" command.

Wed Jul 28, 2021 3:15 pm

No big deal but i could change it. * warps to the current map so we could use ** for next and *+ for nextsecret or something like that.

Re: A "changenextmap" command.

Wed Jul 28, 2021 3:26 pm

Or just delete the "next" map... :mrgreen:

Re: A "changenextmap" command.

Thu Jul 29, 2021 2:02 am

Yeah but we start to see a lot of "next" maps from now on that wouldn't be nice.
So i've made another PR to use + for next and +$ for nextsecret, besides this way is more consistent and simpler.
https://github.com/coelckers/gzdoom/pull/1445