diff --git a/extras/build_cubemaps.lua b/extras/build_cubemaps.lua index 6514486..054d3c6 100644 --- a/extras/build_cubemaps.lua +++ b/extras/build_cubemaps.lua @@ -1,11 +1,12 @@ if GetConVar("con_nprint_bgalpha"):GetString()=="cubemaps" then + local i=120 hook.Add("Think","agwegwegg",function() i=i-1 if i>0 then return end hook.Remove("Think","agwegwegg") - RunConsoleCommand"buildcubemaps" + RunConsoleCommand"bcmaps" hook.Add("ShutDown","agwegwegg",function() print"Quitting..." diff --git a/extras/gmodcommander.cfg b/extras/gmodcommander.cfg new file mode 100644 index 0000000..19eec12 --- /dev/null +++ b/extras/gmodcommander.cfg @@ -0,0 +1,2 @@ +alias bcmaps buildcubemaps +alias exitgame quit diff --git a/extras/gmodcommander.cmd b/extras/gmodcommander.cmd index f279ecb..74fa0fe 100644 --- a/extras/gmodcommander.cmd +++ b/extras/gmodcommander.cmd @@ -5,8 +5,12 @@ -@rem copy /Y build_cubemaps.lua "%GameDir%"\lua\autorun\client\build_cubemaps.lua > nul -@rem @if ERRORLEVEL 1 goto fail +copy /Y build_cubemaps.lua "%GameDir%"\lua\autorun\client\build_cubemaps.lua > nul +@if ERRORLEVEL 1 goto fail + +copy /Y gmodcommander.cfg "%GameDir%"\cfg\gmodcommander.cfg > nul +@if ERRORLEVEL 1 goto fail + copy /Y mapcomp_write_missing.lua "%GameDir%"\lua\autorun\client\mapcomp_write_missing.lua > nul @if ERRORLEVEL 1 goto fail @@ -20,15 +24,17 @@ copy /Y mapcomp_write_missing.lua "%GameDir%"\lua\autorun\client\mapcomp_write_m @goto out :missing -start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -dev -disableluarefresh -insecure -nohltv +map %2 +alias "exitgame quit" +con_nprint_bgalpha writemissing +start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -dev -disableluarefresh -insecure -nohltv -condebug -textmode -toconsole +map %2 +alias "exitgame quit" +con_nprint_bgalpha writemissing @goto win :cubemaps_ldr -start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -nodev -disableluarefresh -insecure -nohltv +map %2 +sv_cheats 1 +mat_hdr_level 0 +mat_specular 0 -buildcubemaps +@rem start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 0 +mat_specular 0 -buildcubemaps +start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 0 +mat_specular 0 +exec gmodcommander +con_nprint_bgalpha cubemaps @goto win :cubemaps_hdr -start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -nodev -disableluarefresh -insecure -nohltv +map %2 +sv_cheats 1 +mat_hdr_level 2 +mat_specular 0 -buildcubemaps +@rem start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 2 +mat_specular 0 -buildcubemaps +start /wait /min hl2.exe -game "%GameDir%" -multirun -w 1024 -h 768 -windowed -console -disableluarefresh -insecure -nohltv -condebug -toconsole +map %2 +sv_cheats 1 +mat_hdr_level 2 +mat_specular 0 +exec gmodcommander +con_nprint_bgalpha cubemaps @goto win @goto win diff --git a/game_compiling/gameinfo.txt b/game_compiling/gameinfo.txt new file mode 100644 index 0000000..4f9c4b8 --- /dev/null +++ b/game_compiling/gameinfo.txt @@ -0,0 +1,94 @@ +"GameInfo" +{ + game "Garry's Mod - Compiling" + type multiplayer_only + nomodels 1 + nohimodel 1 + nocrosshair 0 + hidden_maps + { + "test_speakers" 1 + "test_hardware" 1 + } + nodegraph 0 + GameData "tf.fgd" + InstancePath "maps/instances/" + advcrosshair 1 + + "GameData" "X:/do/gmod/metastruct/mapfiles/metastruct.fgd" + "GameData0" "x:/g/steam/steamapps/common/Source SDK Base 2013 Multiplayer/bin/base.fgd" + "GameData1" "x:/g/steam/steamapps/common/Source SDK Base 2013 Multiplayer/bin/cstrike.fgd" + "GameData2" "x:/g/steam/steamapps/common/Source SDK Base 2013 Multiplayer/bin/halflife2.fgd" + "InstancePath" "X:/do/GMod/metastruct/mapfiles" + + FileSystem + { + SteamAppId 4000 // 218 + ToolsAppId 211 + + // + // Setup engine search paths. + // + // If a search path contains "_english", and the current language is not english, then + // another search path will be inserted above the english one by replacing "_english" with + // the appropriate language. + // + // To debug how the engine has parsed this file, type "path" at the console. + // + // Search paths are relative to the base directory, which is where hl2.exe is found. + // + // |gameinfo_path| points at the directory where gameinfo.txt is. + // |all_source_engine_paths| points at the directory cintaining HL2 shared content. + // + SearchPaths + { + game "X:/do/GMod/metastruct/mapdata/" + + // We search VPK files before ordinary folders, because most files will be found in + // VPK and we can avoid making thousands of file system calls to attempt to open files + // in folders where they don't exist. (Searching a VPK is much faster than making an operating + // system call.) + game "X:/g/steam/steamapps/common/Counter-Strike Source/cstrike/cstrike_pak.vpk" + game "X:/g/steamlib/steamapps/common/Team Fortress 2/tf/tf2_textures.vpk" + game "X:/g/steamlib/steamapps/common/Team Fortress 2/tf/tf2_sound_misc.vpk" + + //game "X:/g/steamlib/SteamApps/common/Team Fortress 2/tf_misc" + game "X:/g/steamlib/steamapps/common/Team Fortress 2/tf/tf2_misc.vpk" + + game "X:/g/steamlib/steamapps/common/GarrysMod/garrysmod/garrysmod.vpk" + game "X:/g/steamlib/steamapps/common/GarrysMod/sourceengine/hl2_textures.vpk" + game "X:/g/steamlib/steamapps/common/GarrysMod/sourceengine/hl2_sound_misc.vpk" + game "X:/g/steamlib/steamapps/common/GarrysMod/sourceengine/hl2_misc.vpk" + platform |all_source_engine_paths|platform/platform_misc.vpk + + // Now search loose files. We'll set the directory containing the gameinfo.txt file + // as the first "mod" search path (after any user customizations). This is also the one + // that's used when writing to the "mod" path. + mod+mod_write+default_write_path |gameinfo_path|. + + // Add the TF directory as a game search path. This is also where where writes + // to the "game" path go. + game+game_write "X:/g/steamlib/steamapps/common/GarrysMod/garrysmod" + + // Where the game's binaries are + gamebin "X:/g/steamlib/steamapps/common/GarrysMod/garrysmod/bin" + + // Last, mount in shared HL2 loose files + game |all_source_engine_paths|hl2 + platform |all_source_engine_paths|platform + + // Random files downloaded from gameservers go into a seperate directory, so + // that it's easy to keep those files segregated from the official game files + // or customizations intentially installed by the user. + // + // This directory is searched LAST. If you visit a server and download + // a custom model, etc, we don't want that file to override the default + // game file indefinitely (after you have left the server). Servers CAN have + // custom content that overrides the default game files, it just needs to be + // packed up in the .bsp file so that it will be mounted as a map search pack. + // The map search pack is mounted at the top of the search path list, + // but only while you are connected that server and on that map. + game+download "X:/g/steamlib/steamapps/common/GarrysMod/garrysmod/download" + } + } +} diff --git a/game_hammer/gameinfo.txt b/game_hammer/gameinfo.txt new file mode 100644 index 0000000..d0b0120 --- /dev/null +++ b/game_hammer/gameinfo.txt @@ -0,0 +1,94 @@ +"GameInfo" +{ + game "Garry's Mod - Compiling" + type multiplayer_only + nomodels 1 + nohimodel 1 + nocrosshair 0 + hidden_maps + { + "test_speakers" 1 + "test_hardware" 1 + } + nodegraph 0 + GameData "tf.fgd" + InstancePath "maps/instances/" + advcrosshair 1 + + "GameData" "X:/do/gmod/metastruct/mapfiles/metastruct.fgd" + "GameData0" "x:/g/steam/steamapps/common/Source SDK Base 2013 Multiplayer/bin/base.fgd" + "GameData1" "x:/g/steam/steamapps/common/Source SDK Base 2013 Multiplayer/bin/cstrike.fgd" + "GameData2" "x:/g/steam/steamapps/common/Source SDK Base 2013 Multiplayer/bin/halflife2.fgd" + "InstancePath" "X:/do/GMod/metastruct/mapfiles" + + FileSystem + { + SteamAppId 4000 // 218 + ToolsAppId 211 + + // + // Setup engine search paths. + // + // If a search path contains "_english", and the current language is not english, then + // another search path will be inserted above the english one by replacing "_english" with + // the appropriate language. + // + // To debug how the engine has parsed this file, type "path" at the console. + // + // Search paths are relative to the base directory, which is where hl2.exe is found. + // + // |gameinfo_path| points at the directory where gameinfo.txt is. + // |all_source_engine_paths| points at the directory cintaining HL2 shared content. + // + SearchPaths + { + game "X:/do/GMod/metastruct/mapdata/" + + // We search VPK files before ordinary folders, because most files will be found in + // VPK and we can avoid making thousands of file system calls to attempt to open files + // in folders where they don't exist. (Searching a VPK is much faster than making an operating + // system call.) + game "X:/g/steam/steamapps/common/Counter-Strike Source/cstrike/cstrike_pak.vpk" + game "X:/g/steamlib/steamapps/common/Team Fortress 2/tf/tf2_textures.vpk" + game "X:/g/steamlib/steamapps/common/Team Fortress 2/tf/tf2_sound_misc.vpk" + + game "X:/g/steamlib/SteamApps/common/Team Fortress 2/tf_misc" + //game "X:/g/steamlib/steamapps/common/Team Fortress 2/tf/tf2_misc.vpk" + + game "X:/g/steamlib/steamapps/common/GarrysMod/garrysmod/garrysmod.vpk" + game "X:/g/steamlib/steamapps/common/GarrysMod/sourceengine/hl2_textures.vpk" + game "X:/g/steamlib/steamapps/common/GarrysMod/sourceengine/hl2_sound_misc.vpk" + game "X:/g/steamlib/steamapps/common/GarrysMod/sourceengine/hl2_misc.vpk" + platform |all_source_engine_paths|platform/platform_misc.vpk + + // Now search loose files. We'll set the directory containing the gameinfo.txt file + // as the first "mod" search path (after any user customizations). This is also the one + // that's used when writing to the "mod" path. + mod+mod_write+default_write_path |gameinfo_path|. + + // Add the TF directory as a game search path. This is also where where writes + // to the "game" path go. + game+game_write "X:/g/steamlib/steamapps/common/GarrysMod/garrysmod" + + // Where the game's binaries are + gamebin "X:/g/steamlib/steamapps/common/GarrysMod/garrysmod/bin" + + // Last, mount in shared HL2 loose files + game |all_source_engine_paths|hl2 + platform |all_source_engine_paths|platform + + // Random files downloaded from gameservers go into a seperate directory, so + // that it's easy to keep those files segregated from the official game files + // or customizations intentially installed by the user. + // + // This directory is searched LAST. If you visit a server and download + // a custom model, etc, we don't want that file to override the default + // game file indefinitely (after you have left the server). Servers CAN have + // custom content that overrides the default game files, it just needs to be + // packed up in the .bsp file so that it will be mounted as a map search pack. + // The map search pack is mounted at the top of the search path list, + // but only while you are connected that server and on that map. + game+download "X:/g/steamlib/steamapps/common/GarrysMod/garrysmod/download" + } + } +} diff --git a/user_config_example_adv.cmd b/user_config_example_adv.cmd new file mode 100644 index 0000000..ad306ef --- /dev/null +++ b/user_config_example_adv.cmd @@ -0,0 +1,33 @@ +@rem see config.cfg for potential configuration paths + +@set SteamAppUser=Python132o +@set SteamPath=x:\g\steam + +@set SteamPathAlt=x:\g\steamlib + +@set mapfolder=X:\do\gmod\metastruct\mapfiles + +@set mapdata=X:\do\gmod\metastruct\mapdata + +:metaver +@if "%METAVER%"=="2" @GOTO META2 +@if "%METAVER%"=="3" @GOTO META3 +@set /P METAVER="Meta 2 or 3> " +@goto metaver + +:META3 +@set mapfile=metastruct_3 +@set mapname=gm_construct_m3_%BUILD_VERSION% +@set mapwsid=481548423 +@set version_file=%mapfolder%\ver.txt +@GOTO METAVER_END +:META2 +@set mapfile=metastruct_2 +@set mapname=gm_construct_m_%BUILD_VERSION% +@set mapwsid=426381305 +@set version_file=%mapfolder%\ver_meta2.txt +@GOTO METAVER_END +:METAVER_END + +@set GameExeDir=%SteamPathAlt%\steamapps\common\GarrysMod +@set GameDir=%GameExeDir%\garrysmod