level name, warp and such (stand alone)

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
Hipshot
Posts: 55
Joined: Wed Feb 03, 2016 1:45 pm
Location: Sweden

level name, warp and such (stand alone)

Post by Hipshot »

I'm not sure where to ask this, so I'll put it here, and I also feel a bit stupid that I can't find the solution to this, even if I feel it might be pretty simple.

So, I work on a stand alone thing here, I have my maps, so that's all good. But when I do the warp command, lets say -warp 01 or whatever, I get an error that the game wants to find e1me1 (my map is named map01).
I understand that this is because it uses the Doom settings to load the level, now, there's no Doom game here at all (no wad is present), there's no was or anything, so the info comes from zdoom.pk3 or the game itself.

It can be solved by renaming the levels, e1m1 etc, that worked, but I rather not do that. I rather name my maps floor1, floor2 etc.

The solution I'm looking for, is there a load level command that specifies just the map with a name? Or is there a way to get the warp command to accept my floor1 as the first level?

I have looked into clearing and creating episodes and all that, maybe I do something wrong here?
User avatar
Player701
 
 
Posts: 1697
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support

Re: level name, warp and such (stand alone)

Post by Player701 »

From the source code it appears that you need to add a MAP01 so that "-warp x" works properly. If you have a WAD file, then an empty MAP01 lump will do. If it's a PK3, then you need either maps/map01.wad or maps/map01.map; again, they can be empty.

Note that I haven't actually tested this.

Upd: No, looks like it won't work. The map name calculation is hardcoded to only produce MAPxx or ExMy :(
User avatar
Hipshot
Posts: 55
Joined: Wed Feb 03, 2016 1:45 pm
Location: Sweden

Re: level name, warp and such (stand alone)

Post by Hipshot »

So what you are telling me is that the game/engine, using the -warp command, only works with mapXX or EXMX whatever my mapinfo and such say, just to clarify? Whatever the mapinfo or other setting say about level names etc?

But ok, one can just use +map like in quake... (I'm comming from that scene so =D).
User avatar
Player701
 
 
Posts: 1697
Joined: Wed May 13, 2009 3:15 am
Graphics Processor: nVidia with Vulkan support

Re: level name, warp and such (stand alone)

Post by Player701 »

Hipshot wrote: Fri Jan 17, 2025 3:39 am So what you are telling me is that the game/engine, using the -warp command, only works with mapXX or EXMX whatever my mapinfo and such say, just to clarify? Whatever the mapinfo or other setting say about level names etc?
Yes, exactly.

(Sorry about the delay - forgot to subscribe to this thread while posting the first reply.)
User avatar
Enjay
 
 
Posts: 26697
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: level name, warp and such (stand alone)

Post by Enjay »

It's my understanding that -warp basically behaves just like the same command line parameter did in the original DOS executable. That expected the parameter to be entered in a certain way to reflect the only kind of map numbering that was possible at the time (ExMx or MAPxx so -warp 1 1 or -warp 01 for example). So, it's really a hang over from the early/mid 1990s.

Using +map, as you probably know, is essentially adding the console command (which the original Doom did not have) to the command line. It is much more flexible and can take any map name.

Return to “Scripting”