diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 896784002..bd3164ac5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -51,6 +51,13 @@ jobs: directory: ./${{ env.FGD_BUILD_DIR }}/p2ce/ filename: 'fgd-p2ce.zip' + - name: Zip templategame FGD + uses: thedoctor0/zip-release@master + with: + type: 'zip' + directory: ./${{ env.FGD_BUILD_DIR }}/templategame/ + filename: 'fgd-templategame.zip' + - name: MD build run: .\build.bat md all @@ -67,6 +74,13 @@ jobs: type: 'zip' directory: ./${{ env.MD_BUILD_DIR }}/p2ce/ filename: 'md-p2ce.zip' + + - name: Zip templategame MD + uses: thedoctor0/zip-release@master + with: + type: 'zip' + directory: ./${{ env.MD_BUILD_DIR }}/templategame/ + filename: 'md-templategame.zip' - name: Artifact Upload uses: actions/upload-artifact@v3 @@ -75,8 +89,10 @@ jobs: path: | ./${{ env.FGD_BUILD_DIR }}/momentum/fgd-momentum.zip ./${{ env.FGD_BUILD_DIR }}/p2ce/fgd-p2ce.zip + ./${{ env.FGD_BUILD_DIR }}/templategame/fgd-templategame.zip ./${{ env.MD_BUILD_DIR }}/momentum/md-momentum.zip ./${{ env.MD_BUILD_DIR }}/p2ce/md-p2ce.zip + ./${{ env.MD_BUILD_DIR }}/templategame/md-templategame.zip if-no-files-found: error - name: Get previous tag @@ -99,8 +115,10 @@ jobs: files: | ${{ env.FGD_BUILD_DIR }}/momentum/fgd-momentum.zip ${{ env.FGD_BUILD_DIR }}/p2ce/fgd-p2ce.zip + ${{ env.FGD_BUILD_DIR }}/templategame/fgd-templategame.zip ${{ env.MD_BUILD_DIR }}/momentum/md-momentum.zip ${{ env.MD_BUILD_DIR }}/p2ce/md-p2ce.zip + ${{ env.MD_BUILD_DIR }}/templategame/md-templategame.zip fail_on_unmatched_files: true - name: Create Manual Release @@ -111,6 +129,8 @@ jobs: files: | ${{ env.FGD_BUILD_DIR }}/momentum/fgd-momentum.zip ${{ env.FGD_BUILD_DIR }}/p2ce/fgd-p2ce.zip + ${{ env.FGD_BUILD_DIR }}/templategame/fgd-templategame.zip ${{ env.MD_BUILD_DIR }}/momentum/md-momentum.zip ${{ env.MD_BUILD_DIR }}/p2ce/md-p2ce.zip + ${{ env.MD_BUILD_DIR }}/templategame/md-templategame.zip fail_on_unmatched_files: true diff --git a/build.bat b/build.bat index 4b30816b3..ef75a50b0 100644 --- a/build.bat +++ b/build.bat @@ -1,7 +1,7 @@ @echo off SETLOCAL enabledelayedexpansion -SET games=momentum p2ce +SET games=momentum p2ce templategame SET modes=fgd md SET "build_dir=build" @@ -94,6 +94,11 @@ IF /I %game%==ALL ( CALL :build_game_fgd momentum EXIT /B +:build_fgd_templategame + CALL :copy_hammer_files templategame + CALL :build_game_fgd templategame + EXIT /B + :build_game_fgd echo Building FGD for %1... mkdir "%build_dir%/%1" diff --git a/build.sh b/build.sh index 115a0929d..4d03d14b7 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/bin/bash modes="fgd md" -games="momentum p2ce" +games="momentum p2ce templategame" build_dir="build" build_md_dir="build_md" @@ -55,6 +55,11 @@ build_fgd_momentum() { build_game_fgd momentum } +build_fgd_templategame() { + copy_hammer_files templategame + build_game_fgd templategame +} + build_game_markdown() { echo "Generating markdown from FGD for $1..." mkdir -p "$build_md_dir/$1" diff --git a/hammer/cfg_templategame/CmdSeqDefault.wc b/hammer/cfg_templategame/CmdSeqDefault.wc new file mode 100644 index 000000000..73571a4dd --- /dev/null +++ b/hammer/cfg_templategame/CmdSeqDefault.wc @@ -0,0 +1,177 @@ +"Command Sequences" +{ + "Fast" + { + "1" + { + "enabled" "1" + "special_cmd" "none" + "run" "$bsp_exe" + "params" "-game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "2" + { + "enabled" "1" + "special_cmd" "none" + "run" "$vis_exe" + "params" "-fast -game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "3" + { + "enabled" "1" + "special_cmd" "none" + "run" "$light_exe" + "params" "-fast -StaticPropLighting -StaticPropPolys -game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "4" + { + "enabled" "1" + "special_cmd" "copy_file" + "run" "" + "params" "$path\\$file.bsp $bspdir\\$file.bsp" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "5" + { + "enabled" "1" + "special_cmd" "none" + "run" "$game_exe" + "params" "-dev -console -allowdebug -hijack -game $gamedir +map $file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "1" // All game_exe things apparently have no wait, but it isn't used so whatever + } + } + "Full Compile" + { + "1" + { + "enabled" "1" + "special_cmd" "none" + "run" "$bsp_exe" + "params" "-game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "2" + { + "enabled" "1" + "special_cmd" "none" + "run" "$vis_exe" + "params" "-game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "3" + { + "enabled" "1" + "special_cmd" "none" + "run" "$light_exe" + "params" "-StaticPropLighting -StaticPropPolys -game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "4" + { + "enabled" "1" + "special_cmd" "copy_file" + "run" "" + "params" "$path\\$file.bsp $bspdir\\$file.bsp" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "5" + { + "enabled" "0" + "special_cmd" "none" + "run" "$game_exe" + "params" "-dev -console -allowdebug -hijack -game $gamedir +map $file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "1" // All game_exe things apparently have no wait, but it isn't used so whatever + } + } + "AO Full Compile" + { + "1" + { + "enabled" "1" + "special_cmd" "none" + "run" "$bsp_exe" + "params" "-game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "2" + { + "enabled" "1" + "special_cmd" "none" + "run" "$vis_exe" + "params" "-game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "3" + { + "enabled" "1" + "special_cmd" "none" + "run" "$light_exe" + "params" "-StaticPropLighting -StaticPropPolys -game $gamedir $path\\$file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "4" + { + "enabled" "1" + "special_cmd" "copy_file" + "run" "" + "params" "$path\\$file.bsp $bspdir\\$file.bsp" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "0" + } + "5" + { + "enabled" "0" + "special_cmd" "none" + "run" "$game_exe" + "params" "-dev -console -allowdebug -hijack -game $gamedir +map $file" + "ensure_check" "0" + "ensure_fn" "" + "use_process_wnd" "1" + "no_wait" "1" // All game_exe things apparently have no wait, but it isn't used so whatever + } + } +} diff --git a/hammer/cfg_templategame/GameConfig_default.txt b/hammer/cfg_templategame/GameConfig_default.txt new file mode 100644 index 000000000..5de2a1c70 --- /dev/null +++ b/hammer/cfg_templategame/GameConfig_default.txt @@ -0,0 +1,26 @@ +"Games" +{ + "Template Game" + { + // NOTE: All of these paths are in relation to where hammer.exe is!!! + "GameDir" "..\..\templategame" + "Hammer" + { + "GameData0" "..\..\templategame\templategame.fgd" + "DefaultTextureScale" "0.250000" + "DefaultLightmapScale" "16" + "GameExe" "chaos.exe" + "DefaultSolidEntity" "func_detail" + "DefaultPointEntity" "info_player_start" + "BSP" "vbsp.exe" + "Vis" "vvis.exe" + "Light" "vrad.exe" + "PostCompiler" "" + "GameExeDir" "" + "MapDir" "..\..\sdk_content\maps" + "BSPDir" "..\..\templategame\maps" + "CordonTexture" "tools/toolsskybox" + "MaterialExcludeCount" "0" + } + } +} diff --git a/unify_fgd.py b/unify_fgd.py index 7c3930330..0af97c418 100644 --- a/unify_fgd.py +++ b/unify_fgd.py @@ -36,6 +36,7 @@ GAMES = [ ('P2CE', 'Portal 2: Community Edition'), ('MOMENTUM', 'Momentum Mod'), + ('TEMPLATEGAME', 'Template Game'), ] # type: List[Tuple[str, str]] GAME_ORDER = [game for game, desc in GAMES] @@ -49,6 +50,7 @@ 'P2CE': {'HL2_ENTITIES', 'USE_VEHICLES', 'USE_PORTALS', 'USE_PAUSE', 'USE_NAV_MESH', 'USE_AI', 'USE_NEXTBOT', 'USE_SAVE_RESTORE', 'USE_SLOWTIME', 'INST_IO', 'VSCRIPT', 'PROPCOMBINE', 'USE_TEAM', 'USE_MULTIPLAYER'}, 'MOMENTUM': {'USE_PORTALS', 'INST_IO', 'PROPCOMBINE'}, + 'TEMPLATEGAME': {'USE_PAUSE', 'USE_NAV_MESH', 'USE_AI', 'USE_NEXTBOT', 'USE_SAVE_RESTORE', 'INST_IO', 'VSCRIPT', 'PROPCOMBINE', 'USE_TEAM', 'USE_MULTIPLAYER'}, } ALL_FEATURES = {