Batch file issues Created 8 years ago2016-08-07 10:51:28 UTC by 23-down 23-down

Created 8 years ago2016-08-07 10:51:28 UTC by 23-down 23-down

Posted 8 years ago2016-08-07 10:53:29 UTC Post #331102
Hey folks.

I'm compiling my maps per batch file and just recently I decided to implement my textures directly into the maps itself in order to safe up on space for the download later on.

Now when I compile with Hammer directly it works as intended textures get implemented just fine.

For my Batch. file it still asks for the wad. files though. Please have a look at my batch. file and tell me what I'm missing here:
hlcsg.exe mil_duty10 -cliptype precise -estimate -chart -wadinclude d:\wads
hlbsp.exe mil_duty10 -estimate -chart
hlvis.exe mil_duty10 -texdata 9355443 -estimate -chart -estimate -high -full
hlrad_x64.exe mil_duty10 -estimate -chart -sparse -nopaque -bounce 9 -threads 4 -notexscale -extra -dscale 1 -fade 2 -minlight 10 -scale 1.20 -smooth 90 -gamma 0.550 -low -texchop 192 -chop 96 -dlight 10.000
pause
Judging by the logfile itself the textures were included so I don't understand why the wads are still required:

[quote]Logfile:

added 15 additional animating textures.
Including Wadfile: \wads\zhlt.wad
  • Contains 2 used textures, 1.19 percent of map (19 textures in wad)
Using Wadfile: \wads\42.wad
  • Contains 0 used textures, 0.00 percent of map (17 textures in wad)
Using Wadfile: \wads\barney.wad
  • Contains 5 used textures, 2.98 percent of map (408 textures in wad)
Using Wadfile: \wads\decals.wad
  • Contains 1 used texture, 0.60 percent of map (245 textures in wad)
Using Wadfile: \wads\firestorm.wad
  • Contains 17 used textures, 10.12 percent of map (257 textures in wad)
Using Wadfile: \wads\halflife.wad
  • Contains 117 used textures, 69.64 percent of map (3116 textures in wad)
Using Wadfile: \wads\hlep2.wad
  • Contains 16 used textures, 9.52 percent of map (1342 textures in wad)
Using Wadfile: \wads\liquids.wad
  • Contains 0 used textures, 0.00 percent of map (32 textures in wad)
Using Wadfile: \wads\op4ctf.wad
  • Contains 1 used texture, 0.60 percent of map (296 textures in wad)
Using Wadfile: \wads\opfor.wad
  • Contains 0 used textures, 0.00 percent of map (332 textures in wad)
Using Wadfile: \wads\tfc.wad
  • Contains 6 used textures, 3.57 percent of map (279 textures in wad)
Using Wadfile: \wads\tfc2.wad
  • Contains 3 used textures, 1.79 percent of map (395 textures in wad)
Using Wadfile: \wads\xeno.wad
  • Contains 0 used textures, 0.00 percent of map (264 textures in wad)
Using Wadfile: \wads\nw.wad
  • Contains 0 used textures, 0.00 percent of map (4 textures in wad)
Using Wadfile: \wads\nw_xeno.wad
  • Contains 0 used textures, 0.00 percent of map (4 textures in wad)
Using Wadfile: \wads\rain.wad
  • Contains 0 used textures, 0.00 percent of map (4 textures in wad)
Wad files required to run the map: "42.wad;barney.wad;decals.wad;firestorm.wad;halflife.wad;hlep2.wad;liquids.wad;op4ctf.wad;opfor.wad;tfc.wad;tfc2.wad;xeno.wad;nw.wad;nw_xeno.wad;rain.wad;"
Texture usage is at 3.08 mb (of 32.00 mb MAX)[/quote]
Posted 8 years ago2016-08-07 11:00:36 UTC Post #331103
Well, one thing I can see here is that you've put the map in the wrong place. The map name (mil_duty10) mus come after the command parameters. So for instance, your CSG parameters should be:
"-cliptype precise -estimate -chart -wadinclude d:\wads mil_duty10". You should also include the game directory with "-game path/to/mod" at the very beggining.
Dr. Orange Dr. OrangeSource good.
Posted 8 years ago2016-08-07 12:37:36 UTC Post #331105
Nice thanks I'll give it a try.
Posted 8 years ago2016-08-07 13:14:43 UTC Post #331106
To me it looks like not a single wad file is wad included, with the exception of zhlt.wad.

If you look at your hlcsg.exe parameters:
hlcsg.exe mil_duty10 -cliptype precise -estimate -chart -wadinclude d:\wads
...you'll see that the -wadinclude option targets a directory, rather than an actual wad file. You'll need to call -wadinclude for every wad file you want to include in your bsp, so the list of parameters for hlcsg.exe can get quite long, depending on the number of wad you want to include.

Also, have you loaded more than 8 wads in Hammer? Having more than 8 wads loaded could cause problems with compiling, not sure about that though. It was a thing way back in the early days of mapping. I always load no more than 8 wads in Hammer.

As for the map name itself, it doesn't matter where it's placed in the commandline parameters. I'm using my own Compilator for compiling, and it places the map file name at the beginning of the commandline, before all the switch options. It has never been a problem.
Posted 8 years ago2016-08-07 14:43:11 UTC Post #331109
Nope. It's no longer a problem with the modern compilers. At least not for me. You can have like 20 wads loaded and it still runs fine. Sometimes Hammer crashes though when you add to many wads at once. Usually it's the safest option to include wads in pairs of 2 into hammer to minimize the risk of it crashing.

I actually wanted the entire folder linked. You don't really need to include every single wad by hand. In Hammer I've got it setup like this:

-wadinclude "wads"

Wads is my folder on D: drive and Hammer finds it automatically ofc I've also linked to these wads within the options menu of Hammer. So that's why it may find the folder by itself not sure.

I suspected as much regarding the command line parameters considering I've been compiling like that for years without ever having any issues. Only this texture wad. glitch at the moment is mysterious to me.
Posted 8 years ago2016-08-07 15:44:54 UTC Post #331112
1. No, you can have many many wads in Hammer and in your map. The warning given by the compile tools was made up by Merl long ago and I argued strongly with him against putting it in, but he insisted. The real cause of the problem was the total length of the wad file paths, not the number of wad files themselves.

2. Wadinclude can match partial filenames and directory names. You don't need to wadinclude each and every file. However the folder name "wads" might be causing some problems, if I were you I would give this a different name, like "milduty" or something. Then if you -wadinclude milduty it will include any used textures from any wad files in the milduty folder.
Posted 8 years ago2016-08-07 15:58:03 UTC Post #331113
So instead of calling -wadinclude for every single wad file, you can also specify a folder like -wadinclude <folder> to wadinclude every wad file in that folder? That's news to me, it must've been a new feature with VHLT then.
Posted 8 years ago2016-08-07 20:50:18 UTC Post #331116
So instead of calling -wadinclude for every single wad file, you can also specify a folder like -wadinclude <folder> to wadinclude every wad file in that folder?
Correct. Wadinclude does complete and partial matching for wad filenames and directory names.

It's done that since the beginning. :) http://twhl.info/articulator.php?art=80
Posted 8 years ago2016-08-07 22:19:34 UTC Post #331118
Well then. Thanks for letting me know, because I didn't know that! :nuts:

:hammer:
Posted 8 years ago2016-08-08 06:25:03 UTC Post #331120
Just use -nowadtextures to include every wad file into the .bsp ;)
Posted 8 years ago2016-08-08 11:49:17 UTC Post #331122
Bad idea trempler.. The reason I'm using wadinclude is to safe up on space and unused textures otherwise I might just keep em open source within the modfolder.
Posted 8 years ago2016-08-08 12:41:49 UTC Post #331123
-nowadtextures also only embeds used textures.
Posted 8 years ago2016-08-08 15:21:15 UTC Post #331124
Hm ya but as far as I read it includes all textures of a used wad then not just the used textures of a specific wad. or not?
Posted 8 years ago2016-08-08 16:39:35 UTC Post #331125
Only used textures.
Posted 8 years ago2016-08-08 16:46:19 UTC Post #331126
Fascinating. I wonder why -nowadtextures is often then considered the lazy and so recommendable method of getting this done.

Another Myth that was introduced with zhlt back then? Either way it's good to know. Thanks. :)
Posted 8 years ago2016-08-08 19:54:04 UTC Post #331127
Well it'll embed used textures from the standard HL wads, so in that respect it did inflate the bsp size larger than it needs to be, since everyone has halflife.wad etc. But these days computers are so powerful it's very little difference between wadinclude and nowadtextures.
You must be logged in to post a response.