Console command that lists all available maps

Moderator: Raze Developers

Esrael
Posts: 42
Joined: Sun Apr 14, 2019 1:11 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Finland

Console command that lists all available maps

Post by Esrael »

Would it be possible to add a console command that lists all available maps at some point, please? :) The omission of such a command is really not a problem with Duke and Blood, where the level names are easy (E1L1 for example), but trying to warp between SW maps is difficult with map names such as $bullet and $dozer.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49200
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Console command that lists all available maps

Post by Graf Zahl »

That's why there's a second set of level change commands which only take the episode and level number, they are called "levelstart" (like "map") and "levelwarp" (like changemap)
Most of the time these should be easier to use.

And yes, SW's names are not that well chosen... RR's Route66 add-on has the same problem.
User avatar
sinisterseed
Posts: 1349
Joined: Tue Nov 05, 2019 6:48 am
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support

Re: Console command that lists all available maps

Post by sinisterseed »

Poorly selected would be an understatement for SW, the file names for the maps make no sense at all, and more often than not, are wholly different from the map's "proper" name.
Last edited by sinisterseed on Sun Oct 11, 2020 12:09 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49200
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Console command that lists all available maps

Post by Graf Zahl »

These are typical development names that stuck because they were not exposed to the user.
User avatar
Phredreeke
Posts: 310
Joined: Tue Apr 10, 2018 8:14 am

Re: Console command that lists all available maps

Post by Phredreeke »

What's worse is they are hardcoded in the EXE. So $BOAT is not only the name for Hara-Kiri Harbor but also WD's Trolley Yard and TD's Emergency Room.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49200
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Console command that lists all available maps

Post by Graf Zahl »

Fortunately that's no longer an issue in modern ports. That hard coded table doesn't even exist anymore in Raze. At least that was taken care of right away as one of the very first things in port development so all ports have the same option here - unlike Doom where early ports did nothing with externalizing the map names so there never was a standard - and it has remained an issue that'll never be solved.
User avatar
mjr4077au
Posts: 830
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Console command that lists all available maps

Post by mjr4077au »

I just added CCMD `listmaps` to list maps as requested in case you still want them. I think it could be handy and was only a few lines.

Code: Select all

]listmaps
$bullet.map
$dozer.map
$shrine.map
$woods.map
$whirl.map
$tank.map
$boat.map
$garden.map
$outpost.map
$hidtemp.map
$plax1.map
$bath.map
$airport.map
$refiner.map
$newmine.map
$subbase.map
$rock.map
$yamato.map
$seabase.map
$volcano.map
$shore.map
$auto.map
$tank.map
$dmwoods.map
$dmshrin.map
$rush.map
$shotgun.map
$dmdrop.map
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49200
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Console command that lists all available maps

Post by Graf Zahl »

It should list what resource they come from, like GZDoom, although in Build that's probably a lot less likely to apply... :mrgreen:
User avatar
mjr4077au
Posts: 830
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Console command that lists all available maps

Post by mjr4077au »

Do you mean they should list what grp file they come from, or has the addition of the DisplayName resolved that? Happy to work on it further after work, will also check what GZDoom is doing here as well :)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49200
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Console command that lists all available maps

Post by Graf Zahl »

In GZDoom this is also listed, yes, bzt with Doom it is far more important to see where a map comes from.
User avatar
mjr4077au
Posts: 830
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Console command that lists all available maps

Post by mjr4077au »

The best way to achieve that from what I can tell would be to add another var to the MapRecord struct and when each game does its `AllocateMap()` loop, it records the origin of the file.

The problem is each game does everything very differently. Take Duke for instance, the CON interpreter generates the map records. I can probably get the CON file name fairly easily but would have to spend more time to see how I get the underlying grp file info.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49200
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Console command that lists all available maps

Post by Graf Zahl »

No, all the info is in the file system. All it needs to do is check what it has to say about the reported map file name. Have a look at my last commit. ;)
User avatar
mjr4077au
Posts: 830
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia

Re: Console command that lists all available maps

Post by mjr4077au »

Oh, giddy up! That's awesome 😁😁

Return to “Closed Feature Suggestions [Raze]”