AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to get list of texture names (https://forums.alliedmods.net/showthread.php?t=83208)

MPNumB 01-05-2009 19:29

How to get list of texture names
 
How can I get all texture names of the map and what classes (metal/wood/snow/sand/water...) they are?

Arkshine 01-05-2009 20:20

Re: How to get list of texture names
 
It's possible to get the texture name ( http://forums.alliedmods.net/showthr...656#post737656 ) but I don't know how to get a complete list, probably with a software. I know that there some maps ( texture name + class ) listed in materials.txt file but It will not help really.. (client)

MPNumB 01-05-2009 22:06

Re: How to get list of texture names
 
All used texture names are in *.bsp what we can read and also there we can find *.wad files...

Reading *.bsp we can get what wad files are used, but I didn't found a way how to hook texture names...

Reading *.wad files... There are texture names there also, but I don't know how to hook them...

danielkza 01-06-2009 03:22

Re: How to get list of texture names
 
If the solutions seems too complicated maybe you're asking yourself the wrong question.

What's the particular reason you need this?

MPNumB 01-06-2009 08:58

Re: How to get list of texture names
 
Automatic maps/*_detail.txt file creation.

danielkza 01-06-2009 11:06

Re: How to get list of texture names
 
Quote:

Originally Posted by MPNumB (Post 739261)
Automatic maps/*_detail.txt file creation.

Well there isn't any simpler way to do this. You'll probably have to parse the BSP on your on. It should not be simple, but nor difficult, since HLSDK has everything you need for that task.

MPNumB 01-07-2009 19:36

Re: How to get list of texture names
 
Quote:

Originally Posted by arkshine (Post 739057)
It's possible to get the texture name ( http://forums.alliedmods.net/showthr...656#post737656 ) but I don't know how to get a complete list, probably with a software. I know that there some maps ( texture name + class ) listed in materials.txt file but It will not help really.. (client)

Ok...

but:

PHP Code:

new iCvarStr[65];
get_cvar_string("test"iCvarStr64);
new 
iReturn dllfunc(DLLFunc_PM_FindTextureTypes_Texture); 

So 'iReturn' is allways 67 'C'. I'm confused...

// edit...

Ok, found out: first this dllfunc works only for textures in materials.txt list. Second if texture isn't there it returns 'C'. Third - if map was compiled using -nowad function (or whatever that function is - function that formats .wad file in .bsp), server crashes.

So is there anyother way ?


All times are GMT -4. The time now is 09:14.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.