Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal enabledelayedexpansion
- set source=xp_texnum.vmf
- set result=xp_texnum_mod.vmf
- set /a idx=0
- cd /d "..\Half-Life 2\hl2\materials"
- for /d %%d in (Brick Building_Template Concrete Metal Nature Plaster Stone Tile Wood) do (
- cd %%d
- for %%v in (*_normal.vtf) do call :getname %%d/%%v
- cd ..
- )
- set /a idx=0
- set tex=dummy
- cd /d "%~dp0"
- for /f "tokens=1-2*" %%a in (%source%) do (
- if %%a=="material" (
- if not %%b=="TOOLS/TOOLSSKYBOX" (
- if not %%b=="TOOLS/TOOLSCLIP" (
- call :select
- echo %%a !tex! %%c>>%result%
- ) else echo %%a %%b %%c>>%result%
- ) else echo %%a %%b %%c>>%result%
- ) else echo %%a %%b %%c>>%result%
- )
- endlocal
- pause
- goto :eof
- :getname
- set /a idx=%idx%+1
- set vtf=%1
- set tex%idx%="%vtf:~0,-11%"
- goto :eof
- :select
- set /a idx=%idx%+1
- set tex=!tex%idx%!
- goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement