https://www.17buddies.rocks/index.html

17's Buddies Maps HL1 Maps HL2 Wads Plan des Maps
17 Buddies
Only for stats

Welcome Guest ( Log In | Register )

Find Out Which Wads Are In Effective Use By A Bsp, How to find out which WAD files are in effective use by a BSP file?
eduardolucioac
post 07/10/2022 - 04:06:55 |   Post #1
+Reply

Group: Member
Posts: 7
Joined: 02/10/2017

br 


With the following command...

CODE
HLExtract.exe -p "fy_office.bsp" -e "root\fy_office.ent"


... is possible to find out which WAD files (textures) are listed as in use by a BSP (map) file as this output example ("fy_office.ent" file content extracted in the above command)...

CODE
{
"wad" "\programme\valve\valve\thwc_hl.wad;\programme\valve\cstrike\sourcebuero.wad;\programme\valve\cstrike\villaggio.wad;"
"mapversion" "220"
"MaxRange" "4096"
"skyname" "tornsky"
"classname" "worldspawn"
"classname" "worldspawn"
}
[...]


Notice that in the item "wad" several WAD files (textures) are listed. It turns out that none of these WAD files are needed even though they are listed. This happens with many BSP (map) files.

I've already tried several utilities and haven't found any that allow me to set this information correctly. I needed a utility that can be used via command line, as I need this output in text.

Is there any utility or strategy (via the command line) that I can use to correctly define this information, ie which WAD files (textures) are actually in use by a BSP (map) file?

Thanks! (IMG:style_emoticons/default/smiley-ipb-421-60dce7.gif)
Post PM
Website
Go to the top of the page
 
New
Replies
LiveWire
post 07/10/2022 - 18:03:12 |   Post #2
+Reply

Group: Advanced
Posts: 127
Joined: 28/07/2013

gb 


I can`t think of any, it might be worth asking on https://twhl.info/ in case someone there knows. Have a search though github as there`s lots of half-life / goldsrc tools on there.

Whats the reason to you need to do this?



Found this on https://github.com/kriswema/resgen

Do not ignore unused WAD files. Necessary if the client insists on receiving all WADs referenced by the BSP, even if unused. Only works if used with the -u option.

Parses relevant resource files to make sure they are actually used (such as WAD files) or to check if they have dependencies (such as MDL files with seperate textures). Only works with -e option.

This post has been edited by LiveWire: 07/10/2022 - 18:17:20
Post PM
Go to the top of the page
eduardolucioac
post 08/10/2022 - 02:13:30 |   Post #3
+Reply

Group: Member
Posts: 7
Joined: 02/10/2017

br 


QUOTE (LiveWire @ 07/10/2022 - 14:03:12) *
I can`t think of any, it might be worth asking on https://twhl.info/ in case someone there knows. Have a search though github as there`s lots of half-life / goldsrc tools on there.

Whats the reason to you need to do this?



Found this on https://github.com/kriswema/resgen

Do not ignore unused WAD files. Necessary if the client insists on receiving all WADs referenced by the BSP, even if unused. Only works if used with the -u option.

Parses relevant resource files to make sure they are actually used (such as WAD files) or to check if they have dependencies (such as MDL files with seperate textures). Only works with -e option.



RESGen does not work this way. This option gives us the false feeling that it has this ability.

Thanks! (IMG:style_emoticons/default/thank_you2.gif) Thanks!
Post PM
Website
Go to the top of the page
LiveWire
post 10/10/2022 - 23:22:33 |   Post #4
+Reply

Group: Advanced
Posts: 127
Joined: 28/07/2013

gb 


QUOTE (eduardolucioac @ 08/10/2022 - 02:13:30) *
RESGen does not work this way. This option gives us the false feeling that it has this ability.

Thanks! (IMG:style_emoticons/default/thank_you2.gif) Thanks!



Hi, did you try that linked version of resgen? from the comments I would of thought it checks the wads.

https://hlbsp.sourceforge.net/index.php?content=bspdef


I used above link to make a bsp loader for unity, if you look at the texture lump string names are in BSPMIPTEX with the texture width and height, if the mipmap offsets are zero then it searches though the wad list in the bsp for them, if it can`t find the texture it uses a puple/black checkerboard.

As you said the wads in hammers list seem to be included even if they are not used, I`m not sure if this is still the case with recent compilers like vhlt umhlt.


Most of the c# coded needed to make a tool to check textures is in here

https://github.com/thelivewire/unityHalf-life
Post PM
Go to the top of the page
eduardolucioac
post 11/10/2022 - 23:34:50 |   Post #5
+Reply

Group: Member
Posts: 7
Joined: 02/10/2017

br 


QUOTE (LiveWire @ 10/10/2022 - 19:22:33) *
Hi, did you try that linked version of resgen? from the comments I would of thought it checks the wads.

https://hlbsp.sourceforge.net/index.php?content=bspdef


I used above link to make a bsp loader for unity, if you look at the texture lump string names are in BSPMIPTEX with the texture width and height, if the mipmap offsets are zero then it searches though the wad list in the bsp for them, if it can`t find the texture it uses a puple/black checkerboard.

As you said the wads in hammers list seem to be included even if they are not used, I`m not sure if this is still the case with recent compilers like vhlt umhlt.


Most of the c# coded needed to make a tool to check textures is in here

https://github.com/thelivewire/unityHalf-life


QUOTE
I`m not sure if this is still the case


I can't say if you're right, but I can say with certainty what I wrote in these excerpts...

QUOTE
A BSP file can have its textures embedded in it so that it will not need the referenced WAD files;
A WAD file can have textures that have the same name as textures in another WAD file. The precedence of loaded textures is always by the last loaded WAD - the order followed is the same as the "wad" attribute which has the list of referenced WAD files. This can give the false impression that a WAD is not needed if a previous one already has textures with the same name, however this can result in the wrong textures being loaded.


QUOTE
Most of the c# coded needed to make a tool to check textures is in here


I found this information very useful, but unfortunately the code I am writing is not in C#. Thank you anyway. (IMG:style_emoticons/default/smiley-ipb-421-60dce7.gif)
Post PM
Website
Go to the top of the page
LiveWire
post 12/10/2022 - 12:05:10 |   Post #6
+Reply

Group: Advanced
Posts: 127
Joined: 28/07/2013

gb 


https://github.com/kriswema/resgen


eduardolucioa looking at its source code the above version of resgen looks to do exacly what you need.



QUOTE (eduardolucioac @ 11/10/2022 - 23:34:50) *
I can't say if you're right, but I can say with certainty what I wrote in these excerpts...


I found this information very useful, but unfortunately the code I am writing is not in C#. Thank you anyway. (IMG:style_emoticons/default/smiley-ipb-421-60dce7.gif)

Post PM
Go to the top of the page

Posts in this topic

2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

New
 


RSS Lo-Fi Version
 
Skin © Chapo