pwitvoet / wadmaker

Command-line tools for making/extracting Half-Life textures and sprites
31 stars 2 forks source link

Keep folder structure when making a WAD #6

Open StaryMic opened 2 weeks ago

StaryMic commented 2 weeks ago

I'm working on a game in Godot where I'm using J.a.c.k. to make my levels. My textures are in a folder labelled as follows. [Textures] -> [Dev] -> [Orange] -> [texture.png] but when making a wad using this structure it exports as [TEXTURE], ignoring any folders or subdirectories that it was in, making the importer I'm using in Godot confused as to where textures are.

Could we get an option that adds in slashes in the texture name so importers that rely on folder structure don't get confused?

pwitvoet commented 2 weeks ago

I don't think that will be very useful, because wad files have a hard limit of 15 characters for texture names. You'd have to use fairly short directory names to stay below that limit, which likely makes your directory names less descriptive and thus less useful for organizing.

You could try using the 'External' texture format in J.A.C.K. which lets you load textures from directories, but if I remember correctly it's fairly limited in the formats that it accepts. TrenchBroom may be a better choice in that regard.

Depending on how the Godot importing process works, it may also be possible to write a script that rewrites all texture names to relative paths before the Godot importer gets to read the map file. Or you could write a script that copies all textures to a single directory where Godot can find them.