ericwa / ericw-tools

Quake/Hexen 2 Map compiling tools - branch of http://disenchant.net/utils
http://ericwa.github.io/ericw-tools
GNU General Public License v2.0
328 stars 57 forks source link

[HLBSP] feature parity with original GoldSrc compilers #437

Open SirYodaJedi opened 6 days ago

SirYodaJedi commented 6 days ago

ZHLT/VHLT support would be too messy, but compatibility with maps that are designed for the original 1998 compilers would be feasible, just like how EWT fully supports compiling maps that are designed for stock Q1, Q2, and HX2 compilers.

Things that the original (non-ZHLT) HLBSP compilers do/have which EWT currently does not:

SirYodaJedi commented 6 days ago

Some nonessential related rambling:

Quirks about GoldSrc mapping that aren't handled in any special way the original HLBSP compilers, but are directly related to things that are handled in special ways in EWT (neither are complicated): * Treat any textures starting with `AAA` as trigger textures. The base game only has `AAATRIGGER`, but gearbox.wad and hlbasics.wad have additional variants to help distinguish different types of triggers, using this prefix. * Compared to Quake source ports' usage of `alpha` (normalized float) for translucency, GoldSrc uses `renderamt` (unsigned byte), and only when `rendermode` is set to 1, 2, 3, or 5. It'd be a good idea to convert renderamt to a normalized float so that it could be treated like `alpha` and `_light_alpha` currently are. * Don't splitturb by default, as lightmapped water isn't supported by non-Xash versions of GoldSrc. Wpoly makes a bigger impact in GoldSrc compared to Q1/Q2 source ports due to its ancient renderer, so unnecessary cuts and subdivision should be avoided.
Slightly rambling anecdotes not essential for vanilla compatibility: * VHLT automatically retextures AAATRIGGER with NULL; this is very useful, but not essential. Ideally any trigger texture would be retextured. * Half-Life's compilers and forks only treat specific entities as lighting entities, unlike how Quake's treat any entity that starts with `light` identically. This can cause some undesired behavior if the map contains certain ZHLT+ entities like `light_shadow`, `light_bounce`, or `light_surface`. * QCSG uses the command `-nowadtextures` to revert to the Q1 method of embedding all textures in the BSP. HLCSG adds the option `-wadinclude`, which takes a wildcard as a parameter; I personally use `-wadinclude include` so that any wad which has "include" in the filename or path is embedded. HLCSG also always treats `-wadinclude zhlt.wad` as being present, since that's where the tool textures are. * ZHLT+ treats SKIP as nonsolid nodraw when used on non-hint brushes. * ZHLT adds an unusual shortcut wherein using CLIP as a nodraw texture results in giving the brush collision for all clipping hulls except 0. This probably confuses EWT. * ZHLT+ (or at least VHLT; it's not mentioned in changelog) has a nohull2 parameter, which is useful for conserving clipnodes on maps that don't use hull 2, such as those for Counter-Strike or Day of Defeat. It also has some tool textures for creating clip brushes that only affect one hull. * Xash-fwgs and probably FTE can take advantage of BSP2 with HLBSP hull sizes. BSP2 with 24-bit BSP30-style lightmaps are also valid, although I don't know what supports it besides newbspguy. * Alphatest (`{`) textures are only rendered as transparent if `rendermode` is greater than 0. If used on a world brush or with rendermode 0, then the transparent texels are just rendered as opaque black.