### RESGen Output Example Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/mapping/porting_goldsrc_to_source.md Example output from RESGen.exe, listing assets used by a .bsp map file. This helps in identifying and locating missing textures, models, and sounds for porting. ```text // quadrocket_adam2.res - created with RESGen v2.0.2. // RESGen is made by Jeroen "ShadowLord" Bogers, // with serveral improvements and additions by Zero3Cool. // For more info go to http://resgen.hltools.com // .res entries (19): gfx/env/2desertbk.tga gfx/env/2desertdn.tga gfx/env/2desertft.tga gfx/env/2desertlf.tga gfx/env/2desertrt.tga gfx/env/2desertup.tga halflife.wad ice.wad models/backpack.mdl models/ball.mdl models/pent.mdl models/quad.mdl sound/adam2/adam2-1.wav sound/adam2/temple.wav sound/items/inv1.wav sound/weapons/scock1.wav sprites/xsmoke1.spr tfc.wad tfc2.wad ``` -------------------------------- ### Import Savelocs Example Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_saveloc_import.md Imports savelocs from the 'surf_example' map into the current map. Ensure the map name is provided as an argument. ```bash mom_saveloc_import surf_example ``` -------------------------------- ### Start Spectating Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_spectate.md Starts spectating in free roam mode if no players are currently active. Use this command without any arguments to initiate spectating. ```bash mom_spectate ``` -------------------------------- ### Restart to Bonus Track Start Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_restart.md This command teleports the player to the start of a specified bonus track (e.g., track 1 for bonus 1). If the player is not currently on that bonus track, the command also sets their timer to that bonus track. This is useful for accessing and practicing specific bonus levels. ```command mom_restart 1 ``` -------------------------------- ### Group Size Calculation Example Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/ranking_cosmetic_xp.md Demonstrates how to calculate the size of each group for a map with 400 completions, using the defined parameters and formulas. ```plaintext Group 1 size = max(1 * 400^0.5, 10) = max(20, 10) = 20 Group 2 size = max(1.5 * 400^0.56, 45) = max(42.98, 45) = 45 Group 3 size = max(2 * 400^0.62, 125) = max(82, 125) = 125 Group 4 size = max(2.5 * 400^0.68, 250) = max(147, 250) = 250 ``` -------------------------------- ### Example Slick Material (VMT) Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/mapping/adding_slick_to_your_map.md Use the %compileSlick parameter in a material's VMT to make surfaces slick. This is guaranteed to work on world geometry and func_detail. ```valve-material-type "LightmappedGeneric" { $basetexture test_materials\slick_ice %compileSlick 1 } ``` -------------------------------- ### Install Hugo Extended on Windows Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/create_docs_page.md Use Winget to install the extended version of Hugo on Windows. This command should be run in a terminal with administrator privileges. ```bash winget install Hugo.Hugo.Extended ``` -------------------------------- ### Example .rad File for Texture Lights Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/mapping/porting_goldsrc_to_source.md This is an example of a .rad file used to define texture lights in GoldSrc maps. Place this file in the same directory as your game's gameinfo.txt file. ```rad hl1/~light3b 235 235 255 1200 hl1/~LIGHT3A 255 130 130 650 tfc/~tm_white 255 255 255 200 hl1/+0~tnnl_lgt4 255 255 220 2000 ``` -------------------------------- ### Page Front Matter Example Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/create_docs_page.md Example of YAML front matter for a Hugo documentation page. This metadata is used for page title, categories, and tags. ```yaml --- title: Creating Docs Pages categories: - guide tags: - meta - contributing --- ``` -------------------------------- ### Mounting Garry's Mod Games in Hammer++ Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/mapping/hammer_plus_plus_setup.md Configure the mount.cfg file to allow Hammer++ to access content from various Garry's Mod games. Adjust paths to match your installation. ```cfg "mountcfg" { "cstrike" "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Counter-Strike Source\\cstrike" "tf" "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Team Fortress 2\\tf" "portal" "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Portal\\portal" "portal2" "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Portal 2\\portal2" "momentum" "C:\\Program Files (x86)\\Steam\\steamapps\\common\\Momentum Mod Playtest\\momentum" } ``` -------------------------------- ### Spectate by Player Name Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_spectate.md Starts spectating a specific player by their in-game name. Provide the player's name as an argument to target them. ```bash mom_spectate ``` -------------------------------- ### PBR Shader VMT Example Source: https://github.com/momentum-mod/docs/blob/master/content/docs/shaders/physically_based_rendering.md Defines a material using the PBR shader, specifying base textures, normal maps, parallax settings, and environment maps. Use `$model 1` for model materials. ```vmt PBR { $baseTexture concrete/concrete01_C $MRAOTexture concrete/concrete01_MRAO $emissionTexture concrete/concrete01_E $bumpMap concrete/concrete01_N $parallax 1 $parallaxCenter 0 $parallaxDepth .05 $envMap env_cubemap %keywords concrete,PBR,brutalist } ``` -------------------------------- ### Group Rank Ranges Example Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/ranking_cosmetic_xp.md Illustrates the rank ranges for each group based on the calculated group sizes, showing how ranks are allocated. ```plaintext Group 1 = ranks 11-30 (begins from rank 11, contains 20 spots) Group 2 = ranks 31-75 (begins from rank 31 = end of G1, contains 45 spots) Group 3 = ranks 76-200 (begins from rank 76 = end of G2, contains 125 spots) Group 4 = ranks 201-450 -- note this exceeds #completions (400)! So it extends all the way to rank 400, and anyone who completes the map is automatically in at least group 4. ``` -------------------------------- ### Formula System Example Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/ranking_cosmetic_xp.md Calculates points awarded based on the formula 'Points = 50000 / (rank + 49)'. The number of map completions does not affect this calculation. ```plaintext Player sets a time of rank 468 on a map with 1333 completions. Formula points awarded = `50000 / (468 + 49)` = 96.7 => 97 points. (Note that the # of completions on the map did not affect the points awarded!) ``` -------------------------------- ### Restart to Start of Main Track Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_restart.md This command teleports the player to the beginning of the main track, designated as track 0. It's a common way to reset progress on the primary course. ```command mom_restart 0 ``` -------------------------------- ### Clear Start Mark on Specific Track Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_start_mark_clear.md Use this command to clear the start mark on a specific track by providing its number. For example, to clear track 2, use 'mom_start_mark_clear 2'. ```bash mom_start_mark_clear 2 ``` -------------------------------- ### Set Player Rocket Count Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/mapping/weapon_and_ammo_systems.md Example demonstrating how to set a player's rocket count to a specific value using the SetRockets input. This is often used in conjunction with trigger setups for jump maps. ```plaintext SetRockets 4 ``` -------------------------------- ### Serve Docs Locally with Hugo Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/create_docs_page.md Build and serve the documentation site locally using the Hugo server command. This command should be run from the 'docs' directory of your cloned repository. ```bash hugo server ``` -------------------------------- ### Delete Start Zone Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_zone_delete.md Use this command to remove the designated start zone. ```bash mom_zone_delete start ``` -------------------------------- ### Clear Start Mark on Current Track Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_start_mark_clear.md Use this command to clear the start mark on the currently active track. No track number is required. ```bash mom_start_mark_clear ``` -------------------------------- ### Enable Math Typesetting with KaTeX Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/create_docs_page.md Set the 'math' front matter to 'true' to enable LaTeX rendering for content enclosed in $$ delimiters. ```markdown math: true ``` ```latex $$ e^{ \pm i\theta } = \cos \theta \pm i\sin \theta $$ ``` -------------------------------- ### Command Reference Shortcode Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/create_docs_page.md Use the 'cmdref' shortcode to reference commands, like 'mom_restart'. ```markdown {{}} ``` -------------------------------- ### Restart to Current Track Start Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_restart.md When no track number is specified, this command resets the player to the starting position of the track they are currently on. This is the default behavior for restarting the current segment. ```command mom_restart ``` -------------------------------- ### Surf Turnbinds Configuration Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/gamemode_specific_cfgs.md Defines mouse button bindings for the Surf gamemode. Place this in 'surf.cfg' within the 'momentum/cfg' folder. ```cfg bind mouse1 +left bind mouse2 +right ``` -------------------------------- ### Restart Current Stage Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_restart_stage.md Teleports the player to the start of the current stage. This is useful when a player needs to retry a stage from the beginning. ```bash mom_restart_stage ``` -------------------------------- ### Info Hint Shortcode Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/create_docs_page.md Use the 'hint info' shortcode to display informational notices in blue. ```markdown {{}} This one is blue {{}} ``` -------------------------------- ### Calculate Initial Speed Addition Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/gamemodes/ahop.md Calculates the initial amount of speed to add based on forward movement and the speed boost percentage. ```cpp float flSpeedAddition = fabs( mv->m_flForwardMove * flSpeedBoostPerc ); ``` -------------------------------- ### Convert Textures with Xwad Command Line Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/mapping/porting_goldsrc_to_source.md Use the Xwad command-line tool to convert .wad files to .tga, which can then be converted to .vtf. Specify base directory, WAD file location, and enable automatic VTF conversion. ```bash xwad.exe -BaseDir [path to gameinfo.txt] -WadFile [path to .wad file] -vtex ``` -------------------------------- ### General Turnbinds Configuration Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/gamemode_specific_cfgs.md Defines default mouse button bindings for other gamemodes. Place this in 'game.cfg' within the 'momentum/cfg' folder to override Surf-specific binds when not in Surf. ```cfg bind mouse1 +attack bind mouse2 +attack2 ``` -------------------------------- ### Spectate by Steam ID Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_spectate.md Starts spectating a specific player using their Steam ID. Provide the player's Steam ID as an argument to target them. ```bash mom_spectate ``` -------------------------------- ### Decompile Quake 3 BSP to MAP using Q3Map2 Source: https://github.com/momentum-mod/docs/blob/master/content/docs/guide/mapping/porting_quake3_to_source.md Use this command in a batch file to decompile a Quake 3 .bsp map file into a .map file. Ensure Q3Map2.exe is in the same directory as the .bsp and the batch file. ```batch " [PATH TO q3map2.exe]" -game q3a -convert -format map [NAME OF THE BSP].bsp ``` -------------------------------- ### Restart Current Track's First Stage Source: https://github.com/momentum-mod/docs/blob/master/content/docs/command/mom_restart_stage.md Teleports the player to the start of the current track, effectively resetting to the beginning of the first stage. This is similar to the mom_restart command. ```bash mom_restart_stage 1 ```