Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Load multiple .wad files for PWAD mods #72

Closed
ShadowOne333 opened this issue Feb 18, 2019 · 5 comments
Closed

[Request] Load multiple .wad files for PWAD mods #72

ShadowOne333 opened this issue Feb 18, 2019 · 5 comments

Comments

@ShadowOne333
Copy link

ShadowOne333 commented Feb 18, 2019

Recently, I found out PWAD implementation has been added PrBoom.
With that said, I decided to try a couple mods for Doom 2, and one of which was WolfenDoom, which recreates Wolfenstein 3D assets, maps and sounds into Doom II.

For this example, I will use The Original Missions found in LazRojas' site found here:
http://lazrojas.com/wolfendoom/original_2.html

The Original Missions mod has the following files:

  • original.wad
  • original.deh
  • orig15.wad

As you can see, this mod has an additional .wad used for it, with the name orig15.wad (The Nocturnal Missions also has an additional noct15.wad).

If I try using only original.wad for PWAD, the game does load, and most assets for Wolfenstein 3D are already loaded up. However, the orig15.wad seems to add some bugfixes, and as such that file is also required to completely load WolfenDoom through PrBoom's PWAD implementation.

One workaround was found by user ChiefReginod over at GBATemp:
https://gbatemp.net/threads/retroarch-wiiu-wip.447670/page-550#post-8494747

Where he details a special and unique cfg file so that PrBoom loads the second .wad file correctly.

There is also another problem with this mod, and that is that the songs don't load at all, but that's because the .DEH file renames all of them to something similar to Wolfenstein 3D's original names, but that is another problem on its own.

If there any more detailed instructions or information required, please let me know.

@Ferk
Copy link
Contributor

Ferk commented Feb 19, 2019

After original.wad is opened for the first time, it should create an original/prboom.cfg in your saves folder, the "workaround" you mentioned could in theory be applied to that same file.

But honestly, I find that having to modify configuration files like this is not the nicest thing... specially when the core runs on platforms like consoles and so it might not be as easy to go and edit a config file in the local save folder.

The problem is that so far we don't have a good way to detect which additional wads to load.
Do you have any suggestion on a good way to do this?

I was thinking on perhaps loading any wads that start with the same pattern.
For example, if you load "original.wad" then any other wads that match "original.*.wad" could be loaded. This way you can rename "orig15.wad" to "original.orig15.wad" or something like that, and the core will be able to find it and load it.
We are already doing a similar thing with deh files, any dehacked files that match the same name of the wad are loaded.

There is also another problem with this mod, and that is that the songs don't load at all, but that's because the .DEH file renames all of them to something similar to Wolfenstein 3D's original names, but that is another problem on its own.

Nowadays retroarch does have support for MIDI (although maybe not in every platform), so in theory we could finally have proper Doom music support, but it's yet to be implemented for this core. Here's an example core implementing it.

Another new feature from libretro that we could add and it's loosely related to the file searching is VFS. I haven't tried if this core runs in platforms that make use of the VFS, like the UWP / Xbox port of Retroarch.

@ShadowOne333
Copy link
Author

Given the additional PWADs I've seen, they do match in name to an extent.
I was thinking of the same kind of solution, make it so that the cores searches for another *.wad file with similar starting characters in its name string, and load it alongside the main PWAD.

I'm not sure if what would be easier:

  1. To make a statement that checks if the initial chars of the other .wad file match the name of the main PWAD,
    or
  2. To make it so that the name of the main PWAD is used in the other .wad, and then load it once it checks it shares the same name, like the example you mention here:

For example, if you load "original.wad" then any other wads that match "original.*.wad" could be loaded. This way you can rename "orig15.wad" to "original.orig15.wad" or something like that, and the core will be able to find it and load it.

Both ways could work, but since I'm not that good at coding, I'll leave it to your own criteria.

As for the .DEH file and the MIDI stuff you mention, I think that's another separate issue.
Although, I did find the .mid files inside the .wad file for the mod, so perhaps having MIDI support could make these kind of mods work from the get-go.
The problem with the files not playing was that the DEH was renaming them to Wolf3D names, and since PrBoom has the names of the .mp3 files that it loads hardcoded into the source code, that's why it wouldn't play them.

The workaround for the DEH and the mp3s was to simply remove the renaming lines from the DEH (since it's a text file), export the MIDIs and convert them to mp3s, following the same names as the ones used by PrBoom/Doom II.

@andres-asm
Copy link
Contributor

andres-asm commented Feb 19, 2019 via email

@Ferk
Copy link
Contributor

Ferk commented Apr 21, 2019

@ShadowOne333 Check out #79 and tell me if you think that'd help.
It's not automagically detected, but at least if you always keep the cfg file next to the WAD it'll load fine everywhere, at least you don't have to edit stuff in the save folder which might be volatile.

Considering that Doom is from the ages of 8 character limit in the filename I wouldn't be surprised if there were many many custom wads that start with the same words and that could cause conflict if loaded together, so I don't think it's a good idea to try and automatically detect that.

@ShadowOne333
Copy link
Author

ShadowOne333 commented Jun 1, 2019

Closing issue, as this was referenced in #79 and addressed with commit d7bc8b7.
Just as a suggestion, having an option inside the .cfg to specify what iwad to use would be great to avoid clashing issues between PWADs loading undesired IWADs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants