SLADE icon indicating copy to clipboard operation
SLADE copied to clipboard

Tutti-Frutti and Medusa Effect Fixer

Open OpenRift412 opened this issue 2 months ago • 0 comments

Editor

Resource editor

Description of your feature request

There are methods of fixing the tutti-frutti and medusa effects in WADs using SLADE, but the problem is that this would require checking every nook and cranny of each level to see where these texture bugs are present. Given the existing functionality within SLADE, it seems to me like this could be made into an automated process.

The main appeal of having a maintenance script that fixes these problems would be for playing WADs on legacy executables, such as the vanilla DOS EXE and executable hacks like Doom-plus and its derivatives (which allows for playing more limit-removing WADs, where these issues become a lot more apparent).

These scripts could use roughly the following processes, more or less.

Medusa Fix When this script is run, check the middle textures for all maps. If a middle texture is made up of multiple patches, merge all the patches into a single texture under a new name (akin to the Export to Archive function, plus), add the new texture to TEXTUREx and PNAMES, then replace any middle texture using the old texture with the new one in each map's SIDEDEFS lump.

Tutti-frutti fix When this script is run, it will check for any textures less than 128 pixels tall that have a height shorter than the linedef they are placed on. If the texture height is equal to the linedef height, then check if the vertical alignment on the linedef is a multiple of the texture height. Lastly, check if the texture height can be cleanly multiplied to 128.

If a texture is found to be shorter than the linedef it's mapped to AND has a height that can be cleanly multiplied to 128, do the following*:

  1. make a copy of the texture,
  2. tile it vertically to be 128 pixels tall
  3. export it as a new patch under a new name (using a different naming scheme than the medusa fix as to avoid conflicts)
  4. add the patch to TEXTUREx and PNAMES
  5. replace any instance of the old texture found as upper and lower textures in all SIDEDEFS lumps.

*This process should also apply to textures that have an alignment height that isn't a multiple of the texture height AND can be multiplied to 128.

If a texture is found to NOT be multipliable to 128 BUT meets the other requirements, display a list of linedefs, their respective map, and the name of the texture after the script is finished. These textures cannot be tiled to above 128 because they will not tile correctly in-game.

Would such features be something that works within the scope of SLADE's development?

OpenRift412 avatar Apr 14 '24 23:04 OpenRift412