Skip to content

Tweakable Settings

#xoxor4d edited this page Dec 23, 2024 · 2 revisions

Commandline Arguments

  • -xo_disable_map_conf :: disable loading of map specific .conf files (remix variables)

Console Commands

  • Map Settings:

    • xo_debug_toggle_node_vis :: Toggle debug visualization of bsp leafs using the remix API
    • xo_debug_toggle_rayportal_info :: Toggle debug info for portal pairs spawned via mapsettings
    • xo_debug_toggle_sound_print :: Toggle debug info about played sounds (lights :: mapsettings)
    • xo_debug_toggle_model_info :: Toggle model debug visualization (hidemodel :: mapsettings)
    • xo_mapsettings_update :: Reload the map_settings.toml file + map.conf
    • xo_gamesettings_update :: Reload the game_settings.toml file
  • Remix Variables:

    • xo_vars_parse_options :: Re-parse the rtx.conf and resets everything (incl. runtime settings)
    • xo_vars_reset_all_options :: Reset all options (modified by .conf files) to the rtx.conf level
    • xo_vars_clear_transitions :: Clear all ongoing transitions
  • Culling:

    • xo_cull_toggle_frustum :: Toggle No Frustum Culling & Frustum Culling + Force Current Area (default Mode of MapSetting -> CULL -> Mode 0 or 2)

GameSettings

  • The game_settings.toml file in portal2-rtx can be used to tweak certain features of the compatibility mod.
  • The file will be automatically created (default settings) when launching the compatibility mod.
  • Valid modifications of settings are considered and will be written back to the file when it gets re-generated
  • Addition or the deletion of settings via future updates should not interfere with your settings as long as the configured setting is still available
  • Use in-game console command xo_gamesettings_update to reload the file
  • Currently available settings:
  • Enable culling of exit portal areas when the entry portal is not visible from the players POV (++ performance) (on)
  • Check each node for potential emissive light strips (rectangular with limited depth) & force-draw node on match. (on)
  • Spawn billboard sprites (fake volumetrics) on light props (off)
  • Spawns an additional surface on emancipation grills that can be turned into an invisible, but emissive surface using the toolkit (on)

Making changes to the rtx.conf

  • If you intent to tweak remix runtime settings (eg. mark textures) and want to save them afterwards, make sure to use cmd: xo_vars_parse_options to restore all runtime settings (so they match the rtx.conf settings on disk).
  • Why is this important? The map settings logic will tweak remix variables. If you save the runtime settings without resetting them first, you'll overwrite the rtx.conf settings with the per map settings.
  • You might want to start the game with the -xo_disable_map_conf commandline argument if you intend to, eg. tag a whole bunch of textures in a single session. This will disable map setting config loading.



To be moved ...

Guides

Fix light bleed / lights turning off due to culling:

  • Go to spot where culling occurs and use cvar r_lockPvs 1 to freeze vis updates
  • Use cmd xo_debug_toggle_node_vis
  • Note the current area you are in
  • Move into the leaf (green cube) that is getting culled
  • Open the map_settings.toml file found in root/portal2-rtx/
  • Add a new entry under [CULL] if the map is not listed yet
  • Add or edit the area entry and add all the leafs you want to force to leafs
sp_a1_intro2 = [
        { area = 4, leafs = [712, 713, 714, 780] },
        { area = 6, leafs = [178, 179, 180, 236] }
    ]
  • Use cmd xo_mapsettings_update to reload the map_settings file
  • You might need to enter a new area for it to update
  • Disable r_lockPvs

Spawn unique map marker meshes

  • Use cvar cl_showPos 1 to see your current position
  • Add a new entry under [MARKER] if the map is not listed yet
  • Declare the marker number and the position of the marker
  • Duplicates are allowed
sp_a1_intro3 = [
        { marker = 5, position = [-380, 840, -250] },
        { marker = 6, position = [18, 2283, -363] },
        { marker = 7, position = [-500, -500, 1150] }
    ]
  • Use cmd xo_mapsettings_update to reload the map_settings file

Setting remix variables per map

  • Add your_mapname.conf to root/portal2-rtx/map_configs/ which includes all the remix variables you want to change when loading the map. This file will be loaded automatically if it exists.
  • You can chain additional config files found in the map_configs folder by adding the map name under [CONFIGVARS]
    sp_a1_intro2 = { startup = ["chromatic.conf, asd.conf"] }

Animate remix variables

  • Add the map name under [CONFIGVARS] if it does not exist yet
  • Use the transitions key (array) to define a config that holds all the goal remix vars:
    sp_a1_intro2 = { startup = ["chromatic.conf"], transitions = [
        { conf = "chromatic_explosion.conf", leafs = [424, 425], mode = 0, ease = 8, duration = 0.5, delay_in = 0.0, delay_out = 0.1 }
    ]}
  • ^ The animation is triggered once when the player enters/leaves visleaf 424 or 425
  • You can also trigger animations when certain choreographies start or end:
    sp_a1_intro2 = { startup = ["chromatic.conf"], transitions = [
        { conf = "chromatic_explosion.conf", leafs = [424, 425], mode = 0, ease = 8, duration = 0.5, delay_in = 0.0, delay_out = 0.1 },
        { conf = "chromatic_explosion.conf", choreo = "prehub28.vcd", mode = 1, ease = 8, duration = 2.5, delay_in = 0.0, delay_out = 1.0 }
    ]}
  • ^ This will trigger once when prehub28.vcd ends (mode).
  • All parameters and values are explained within the map_settings.toml file

Clone this wiki locally