ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.65k stars 617 forks source link

[GoldSrc/ALL] Design aspect gets in the way of mods overriding textures (BSP texture lumps have top priority) #1564

Open dimmskii opened 9 years ago

dimmskii commented 9 years ago

I was playing around with "cheap modding" the other day (mods that simply replace certain resources, which is fine), and I seemed to have hit a dead end. Here's why:

Let's say I want to replace textures within halflife.wad. How does one do this? Well, it's important to note that Half-Life's .BSP files actually point to the wads that they need. The only way you can replace a single texture within halflife.wad is to ship your mod with a full replacement of it, complete with all the textures that the original had, and call it with the exact same name (in this case, halflife.wad). Needless to say, it worked!

There's only ONE problem now: when the devs made the campaign maps for HL1, for example, they thought it was a good idea to store the used textures from halflife.wad into SOME of the maps' texture lumps. See, for instance, c1a0a.bsp - that map can run even if halflife.wad is missing altogether!

What is needed: A simple way to override textures (with priority over both the WADs and BSPs) using a 'textures' directory. The textures can be BMPs, PNGs, even more WAD3s or whatever. I have no issues with any format. As long as the guaranteed override can be made by only knowing the texture's name. Also, need I mention the fact that there are no Hi-res Texture Packs for HL1? It's because of this one very reason that stands in the way. Although, for hi-res pack support, I think that something beyond the ancient WAD3 format needs to be explored.

Another (very quick) solution to all this is to simply swap the order of priority so that the WAD files have priority over the BSPs. This, however is a more dangerous solution, as some mods could potentially break (i.e. a regression would occur in mods that had a copy of a texture in a BSP, and an older/different version of it in a WAD).

Thank you for taking the time to read this. I think this feature is both harmless (barely changes anything), and would be highly beneficial to all of the modders out there. Let me know if time permits.

-Dmitri

Litude commented 9 years ago

A good idea, but don't hold your breath that it will ever get implemented. You'd be much better off removing the embedded textures from the affected map files and distributing these changed map files with your mod.

dimmskii commented 9 years ago

There are no tools as of now that can remove a Half-Life BSP's WAD lump... at least none that I am aware of. And again, let's say the mod is a single player gameplay modification: one would have to hard edit the original Half-Life c?a?.bsp maps, which is impractical. Having two different map versions with the same name is also impractical both in Source and GoldSRC; it would create problems.

Litude commented 9 years ago

Yeah it's impractical and tedious, I was merely trying to suggest a workaround to the current limitations.