Skip to content

Commit

Permalink
use cubemap compiling hack again
Browse files Browse the repository at this point in the history
add advanced example for multiple maps maybe
  • Loading branch information
Python1320 committed Feb 4, 2016
1 parent b9f71f0 commit 378919a
Show file tree
Hide file tree
Showing 6 changed files with 236 additions and 6 deletions.
3 changes: 2 additions & 1 deletion extras/build_cubemaps.lua
Original file line number Diff line number Diff line change
@@ -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..."

Expand Down
2 changes: 2 additions & 0 deletions extras/gmodcommander.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
alias bcmaps buildcubemaps
alias exitgame quit
16 changes: 11 additions & 5 deletions extras/gmodcommander.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
94 changes: 94 additions & 0 deletions game_compiling/gameinfo.txt
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
94 changes: 94 additions & 0 deletions game_hammer/gameinfo.txt
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
33 changes: 33 additions & 0 deletions user_config_example_adv.cmd
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 378919a

Please sign in to comment.