### Start Hugo Local Development Server Source: https://docs.momentum-mod.org/guide/create_docs_page Builds the documentation site and hosts it locally using Hugo. Changes to markdown files will automatically trigger a rebuild and browser refresh. Press Ctrl+C to stop. ```shell hugo server ``` -------------------------------- ### SearchPaths Configuration for Hammer++ (CS:GO) Source: https://docs.momentum-mod.org/guide/mapping/hammer_plus_plus_setup This section within the `gameinfo.txt` file tells Hammer++ where to find game assets. It includes content from base CS:GO, mounted custom content, and Momentum Mod itself. ```text game "csgo/pak01_dir.vpk" game "csgo/mounted_content/cstrike_content" game "csgo/mounted_content/portal2_content" game "csgo/mounted_content/tf2_content" game "csgo/mounted_content/momentum_content" ``` -------------------------------- ### Start Mark Commands Source: https://docs.momentum-mod.org/tags/start Commands related to managing the start mark on tracks. ```APIDOC ## mom_start_mark_clear ### Description Clears the current track's saved start location if there is one. Optionally accepts a track number. ### Method COMMAND ### Endpoint mom_start_mark_clear [track_number] ### Parameters #### Path Parameters - **track_number** (integer) - Optional - The track number for which to clear the start mark. Defaults to the current track if not specified. ### Request Example ``` mom_start_mark_clear ``` ``` mom_start_mark_clear 2 ``` ### Response No specific response body, command is executed directly. ``` ```APIDOC ## mom_start_mark_create ### Description If in a start zone, creates a start mark (a customized starting location/angle) for the current track. Start marks are saved with savelocs in `momentum/savedlocs.txt`. If in a stage zone, creates a temporary start mark which is wiped every run. ### Method COMMAND ### Endpoint mom_start_mark_create ### Parameters None ### Request Example ``` mom_start_mark_create ``` ### Response No specific response body, command is executed directly. ``` -------------------------------- ### Add Multiple Commands to a Static HUD Menu (KV3) Source: https://docs.momentum-mod.org/guide/custom_hud_menus This example shows how to extend a static HUD menu to include multiple commands. It builds upon the basic structure by adding more entries to the `main_commands` array, allowing for a richer user interface within the HUD menu. Duplicate labels and commands are permitted. ```kv3 { main_commands = [ { "label" "Some command" "command" "mom_some_command" }, { "label" "Some other command" "command" "mom_some_other_command" }, { "label" "Some other command" "command" "mom_some_other_command" }, ... ] } ``` -------------------------------- ### Mounting Games Configuration for Hammer++ (Garry's Mod) Source: https://docs.momentum-mod.org/guide/mapping/hammer_plus_plus_setup This configuration file allows Hammer++ to load content from various Source engine games mounted by Momentum Mod. Ensure the paths accurately reflect your game installations. ```json "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" } ``` -------------------------------- ### Teleport Player to Trick Start Zone Source: https://docs.momentum-mod.org/command/mom_tricks_tele_to_trick Teleports the player to the starting zone of a specified trick. This is useful for quickly accessing trick start points for practice or other gameplay purposes. ```APIDOC ## mom_tricks_tele_to_trick ### Description Teleports the player to the start zone of the given trick. ### Method POST ### Endpoint /websites/momentum-mod/mom_tricks_tele_to_trick ### Parameters #### Path Parameters - **trick_id** (string) - Required - The ID of the trick to teleport to. ### Request Example ```json { "trick_id": "example_trick_id" } ``` ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating successful teleportation. #### Response Example ```json { "message": "Player teleported to trick start zone." } ``` ``` -------------------------------- ### Tricksurf Teleport and Tracking Commands Source: https://docs.momentum-mod.org/tags/tricksurf Commands for teleporting to trick start zones and tracking tricks in the Tricksurf game mode. ```APIDOC ## mom_tricks_tele_to_trick ### Description Teleports the player to the start zone of the given trick. ### Method Not applicable (Command) ### Endpoint Not applicable (Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example Not applicable (Command) ### Response #### Success Response (200) Not applicable (Command) #### Response Example Not applicable (Command) ## mom_tricks_track_trick ### Description Tracks a trick to complete, taking the trick ID as the parameter. ### Method Not applicable (Command) ### Endpoint Not applicable (Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example Not applicable (Command) ### Response #### Success Response (200) Not applicable (Command) #### Response Example Not applicable (Command) ``` -------------------------------- ### Markdown Page Front Matter Example Source: https://docs.momentum-mod.org/guide/create_docs_page Demonstrates the front matter structure for a Markdown page in Hugo. This YAML section defines metadata such as title, categories, and tags for the page. ```yaml --- title: Creating Docs Pages categories: - guide tags: - meta - contributing --- ``` -------------------------------- ### mom_restart Source: https://docs.momentum-mod.org/tags/teleport Restarts the player to the start of the current track. Optionally takes a track number. ```APIDOC ## mom_restart ### Description Restarts the player to the start of the current track; the player is teleported to their start mark if they have one, otherwise they are teleported to the middle of the start zone. If there is no start zone, the player will be teleported to the spawn position. Optionally takes a track number as a parameter, which can be used to get to bonus'. In the tricksurf gamemode this teleports the player back to their currently tracked trick, if there is any. ### Method Command ### Endpoint N/A ### Parameters #### Arguments - **track_number** (integer) - Optional - The track number to restart on. ### Request Example ``` mom_restart mom_restart 5 ``` ### Response #### Success Response (200) Player is restarted at the beginning of the track. #### Response Example N/A ``` -------------------------------- ### Install Hugo Extended via Winget (Windows) Source: https://docs.momentum-mod.org/guide/create_docs_page Installs the extended version of Hugo, a static site generator, using the Windows Package Manager (Winget). Ensure you run the terminal as an administrator. ```shell winget install Hugo.Hugo.Extended ``` -------------------------------- ### Calculate Initial Speed Addition (C++) Source: https://docs.momentum-mod.org/guide/gamemodes/ahop Calculates the initial amount of speed to add to the player's current speed. This is done by taking the absolute value of the product of the forward movement input and the speed boost percentage. The forward movement input varies based on the player's action (e.g., 320 for sprint jump, 190 for running jump). ```c++ float flSpeedAddition = fabs( mv->m_flForwardMove * flSpeedBoostPerc ); ``` -------------------------------- ### Define Texture Lights in .rad File Source: https://docs.momentum-mod.org/guide/mapping/porting_goldsrc_to_source Sets up texture lights for maps by providing RGB color values and brightness in a .rad file. This file should be placed alongside the game's gameinfo.txt. ```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 ``` -------------------------------- ### VMT Configuration for Models with PBR Shader Source: https://docs.momentum-mod.org/shaders/physically_based_rendering This VMT setup is used for applying the PBR shader to models. It specifies base texture, MRAO, bump map, and emission texture. The $model 1 parameter is crucial for model compatibility. ```valve_material_type PBR { $basetexture "models\props\pbr_asset_d" $mraotexture "models\props\pbr_asset_mrao" $bumpmap "models\props\pbr_asset_n" $emissiontexture "models\props\pbr_asset_e" $envmap "env_cubemap" $model "1" } ``` -------------------------------- ### Sticky Jump Sound Configuration Source: https://docs.momentum-mod.org/tags/sticky-jump/page/2 Configure specific sound behaviors for the Sticky Jump weapon. ```APIDOC ## mom_sj_sound_shot_charged_threshold ### Description Controls the amount of time (in seconds) a stickybomb needs to be charged before playing a more powerful version of the sticky shot sound. ### Method GET (or POST, PUT for setting value) ### Endpoint /websites/momentum-mod/mom_sj_sound_shot_charged_threshold ### Parameters None (for GET), Value (for POST/PUT) ### Request Example (POST/PUT) { "charge_time_seconds": 1.5 } ### Response #### Success Response (200) - **charge_time_seconds** (float) - The charged time threshold in seconds. #### Response Example { "charge_time_seconds": 1.5 } ``` -------------------------------- ### trigger_momentum_timer_start Source: https://docs.momentum-mod.org/tags/timer/page/2 An entity that starts the map or bonus upon leaving its area. ```APIDOC ## trigger_momentum_timer_start ### Description A trigger entity in Momentum Mod that starts the map or bonus upon leaving it. *Note: Refer to the Zone Types page for more general information on Zones. ### Type Entity ### Category Timer, Trigger, Start ### Keyvalues #### Path Parameters - **track_number** (integer) - Required - The track that this zone belongs to. -1: All Tracks, 0: Main Map, 1+: Bonus Tracks - **zone_number** (integer) - Required - The zone number of the trigger. Zone 0 is reserved for invalid and stop triggers. Zone 1 is reserved for start triggers. Zones 2 and up are for stage/checkpoint triggers. - **speed_limit** (float) - Required - Speed limit in UPS (Units Per Second). ``` -------------------------------- ### Tricksurf Trick Recording Commands Source: https://docs.momentum-mod.org/tags/tricksurf Commands for recording and managing tricks in the Tricksurf game mode. ```APIDOC ## mom_tricks_record ### Description Starts recording zones to make a trick. Going into the trick zones during this mode will record the trick path to take. ### Method Not applicable (Command) ### Endpoint Not applicable (Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example Not applicable (Command) ### Response #### Success Response (200) Not applicable (Command) #### Response Example Not applicable (Command) ## mom_tricks_record_stop ### Description Stops recording zones and makes the trick. Takes the name for it as a parameter. This will be saved out to a file named after the map (`.tricks`) inside the `zones/` folder. ### Method Not applicable (Command) ### Endpoint Not applicable (Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example Not applicable (Command) ### Response #### Success Response (200) Not applicable (Command) #### Response Example Not applicable (Command) ``` -------------------------------- ### Zone Configuration Variables Source: https://docs.momentum-mod.org/tags/start Variables for configuring the appearance and behavior of zones. ```APIDOC ## mom_zone_start_draw_color ### Description Color of the start zone(s) in RGBA format. ### Method VARIABLE ### Endpoint mom_zone_start_draw_color ### Parameters - **color** (RGBA) - The color to set for start zones. ### Request Example ``` mom_zone_start_draw_color "255 0 0 128" ``` ### Response No specific response body, variable is set directly. ``` ```APIDOC ## mom_zone_start_draw_mode ### Description Changes the draw mode of the start zone(s). 0 = Off; invisible, 1 = Outlines, 2 = Outlines as overlays (see through walls), 3 = Faces, 4 = Faces as overlays (see through walls). ### Method VARIABLE ### Endpoint mom_zone_start_draw_mode ### Parameters - **mode** (integer) - The draw mode for start zones. Must be one of: 0, 1, 2, 3, 4. ### Request Example ``` mom_zone_start_draw_mode 1 ``` ### Response No specific response body, variable is set directly. ``` ```APIDOC ## mom_zone_start_limitspdmethod ### Description Changes the limit speed method used in the start zone. Take into account player z-velocity = `0`, Ignore z-velocity = `1`. ### Method VARIABLE ### Endpoint mom_zone_start_limitspdmethod ### Parameters - **method** (integer) - The speed limiting method. 0 to take z-velocity into account, 1 to ignore z-velocity. ### Request Example ``` mom_zone_start_limitspdmethod 1 ``` ### Response No specific response body, variable is set directly. ``` ```APIDOC ## mom_zone_start_maxleavespeed ### Description Max leave speed for the start trigger. `0` to disable. ### Method VARIABLE ### Endpoint mom_zone_start_maxleavespeed ### Parameters - **speed** (float) - The maximum speed allowed when leaving the start trigger. Set to `0` to disable. ### Request Example ``` mom_zone_start_maxleavespeed 1000 ``` ### Response No specific response body, variable is set directly. ``` ```APIDOC ## mom_zone_type ### Description Changes the type of zone to be created when using `mom_zone_mark` / `mom_zone_create`. Options: "auto", "start", "end", "stage", "checkpoint". ### Method VARIABLE ### Endpoint mom_zone_type ### Parameters - **type** (string) - The type of zone to create. Accepted values are "auto", "start", "end", "stage", "checkpoint". ### Request Example ``` mom_zone_type "start" ``` ### Response No specific response body, variable is set directly. ``` -------------------------------- ### Timer Entity Source: https://docs.momentum-mod.org/tags/start An entity that controls the start of the map or bonus timer. ```APIDOC ## trigger_momentum_timer_start ### Description A trigger entity in Momentum Mod that starts the map or bonus upon leaving it. ### Method ENTITY ### Endpoint trigger_momentum_timer_start ### Parameters #### Keyvalues - **track_number** (integer) - Optional - The track that this zone belongs to. -1 for All Tracks, 0 for Main Map, 1+ for Bonus Tracks. - **zone_number** (integer) - Optional - The zone number of the trigger. Zone 0 is reserved for invalid and stop triggers. Zone 1 is reserved for start triggers. Zone numbers 2 and up are for stage / checkpoint triggers. - **speed_limit** (float) - Optional - Speed limit (UPS) for the trigger. ### Request Example ``` { "track_number": 0, "zone_number": 1, "speed_limit": 500.0 } ``` ### Response No specific response body, entity is placed in the map. ``` -------------------------------- ### mom_saveloc_nav_first Source: https://docs.momentum-mod.org/tags/teleport Goes to the first saveloc in the list and teleports the player to it. ```APIDOC ## mom_saveloc_nav_first ### Description Goes to the first saveloc in the list and teleports the player to it. ### Method Command ### Endpoint N/A ### Parameters None ### Request Example ``` mom_saveloc_nav_first ``` ### Response #### Success Response (200) Player is teleported to the first saveloc. #### Response Example N/A ``` -------------------------------- ### trigger_momentum_timer_start API Source: https://docs.momentum-mod.org/tags/trigger/page/4 Starts the map or bonus timer upon the player leaving its volume. ```APIDOC ## POST /trigger_momentum_timer_start ### Description This trigger entity initiates the map or bonus timer once the player exits its volume. ### Method POST ### Endpoint /trigger_momentum_timer_start ### Parameters This entity does not have specific keyvalues detailed in the provided text beyond its core function. ### Request Example ```json { "message": "Timer start trigger activated." } ``` ### Response #### Success Response (200) - **message** (string) - Indicates the timer start trigger has been configured. #### Response Example ```json { "message": "Timer start trigger configured." } ``` ```