How can one use music lumps from an IWAD for a custom mapinfo lump?

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, 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.
Post Reply
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

How can one use music lumps from an IWAD for a custom mapinfo lump?

Post by sacarias »

Basing on this guy's initiative:
viewtopic.php?p=1106966#p1106966
I started playing with his suggested pk3 for learning purposes.

Loading it as just any PWAD as suggested there, it "works", but not with the correct music for the level -among other things-. I'm loading it as PWAD, but always with "-iwad DOOM2.WAD"
I learned that the "$MUSIC_XXX" variables are referencing the language.def core lump, so in the custom mapinfo.txt lump I changed, for example,
music = "$MUSIC_DDTBLU"
for
music = "ddtblu"
Still no luck, console says "Music ddtblu not found".

What am I missing? Could someone help?
Thanks.
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

Re: How can one use music lumps from an IWAD for a custom mapinfo lump?

Post by sacarias »

Nevermind, I think the actual problem was how I was packing everything into PK3...

If packing like this: mapinfo.txt graphics/titlepic.png NERVE.WAD, everything works (even all GZDoom core lumps seem to be inherited or the like).
But if packing like: mapinfo/mapinfoNerve.txt graphics/titlepic.png maps/NERVE.WAD (in order to prevent RAM leaking according to the docs), this is totally broken.

Why does second way break things?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49225
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: How can one use music lumps from an IWAD for a custom mapinfo lump?

Post by Graf Zahl »

You have to remember one thing about Doom.exe:

Doom.exe adds a 'd_' prefix to all music it plays, the strings do not have the full file name. As this is what Dehacked modifies, the names in the externalized string table also come without the 'd_' prefix which gets prepended when the string is substituted. This is necessary for Dehacked string substitution logic to work as intended.
GZDoom does not do any special treatment for the 'd_' prefix outside of Dehacked, so when directly using that music, it's called 'd_ddtblu', not just 'ddtblu'.
sacarias
Posts: 50
Joined: Wed Oct 02, 2019 9:39 am

Re: How can one use music lumps from an IWAD for a custom mapinfo lump?

Post by sacarias »

Thanks for explanation.

Now, for last, could you help with the PK3 packing other issue?
Post Reply

Return to “Mapping”