[Added] Console command that lists all available maps

Moderator: Raze Developers

Console command that lists all available maps

Postby Esrael » Sun Oct 11, 2020 11:38 am

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.
Esrael
 
Joined: 14 Apr 2019
Location: Finland
Operating System: Windows 10/8.1/8/201x 64-bit
Graphics Processor: ATI/AMD with Vulkan Support

Re: Console command that lists all available maps

Postby Graf Zahl » Sun Oct 11, 2020 12:01 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Console command that lists all available maps

Postby sinisterseed » Sun Oct 11, 2020 12:06 pm

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
sinisterseed
Raze/GZDoom RO Translator & Raze Tester
 
Joined: 05 Nov 2019
Twitch ID: nixchievousfox
Github ID: sinisterseed
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Console command that lists all available maps

Postby Graf Zahl » Sun Oct 11, 2020 12:07 pm

These are typical development names that stuck because they were not exposed to the user.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Console command that lists all available maps

Postby Phredreeke » Sun Oct 11, 2020 1:06 pm

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
Phredreeke
 
Joined: 10 Apr 2018
Discord: phredreeke#6500

Re: Console command that lists all available maps

Postby Graf Zahl » Sun Oct 11, 2020 1:16 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Console command that lists all available maps

Postby mjr4077au » Tue Oct 13, 2020 4:39 pm

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 allExpand view
]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
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Console command that lists all available maps

Postby Graf Zahl » Tue Oct 13, 2020 4:46 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Console command that lists all available maps

Postby mjr4077au » Tue Oct 13, 2020 5:23 pm

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
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Console command that lists all available maps

Postby Graf Zahl » Tue Oct 13, 2020 11:29 pm

In GZDoom this is also listed, yes, bzt with Doom it is far more important to see where a map comes from.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Console command that lists all available maps

Postby mjr4077au » Tue Oct 13, 2020 11:53 pm

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
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: Console command that lists all available maps

Postby Graf Zahl » Wed Oct 14, 2020 12:13 am

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Console command that lists all available maps

Postby mjr4077au » Wed Oct 14, 2020 12:26 am

Oh, giddy up! That's awesome 😁😁
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests