Xonotic Forums
[SOLVED] reload map changes in game - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Help & Troubleshooting (https://forums.xonotic.org/forumdisplay.php?fid=4)
+--- Thread: [SOLVED] reload map changes in game (/showthread.php?tid=8639)



reload map changes in game - Nyx - 08-05-2021

I'm making maps in Netradiant and whenever I compile the map I start xonotic and do "chmap mapname" which works fine but then if I make changes to a map in Netradiant and compile it again and then do "chmap mapname" the changes are not in the map and I have to restart xonotic to see the changes. can I somehow reread the user data directory to get those changes while in game without having to restart?


RE: reload map changes in game - _para - 08-05-2021

That I'd also like to know. But you can just append a number to the compiled map and do "chmap mapname1". So you don't have to restart.


RE: reload map changes in game - Mario - 08-05-2021

Generally a clean restart is the best way to go about it, but you can also refresh the renderer with
Code:
r_restart

Then you need only restart the match to play the new changes.


RE: reload map changes in game - ballerburg9005 - 08-06-2021

r_restart works even on the loaded map!

I was told to try fs_rescan at first, but it is sort of broken and only loads new assets reliably.


RE: reload map changes in game - Victor - 08-18-2021

I'm working around this by first loading another map and then loading my own map again. You can do this very quickly by assigning hotkeys for it. I'm using one hotkey for Xoylent (map xoylent) and a second hotkey for my own map.
This loads much faster than using r_restart, because it doesn't reload all resources, but loads the updated map file.


RE: reload map changes in game - Julius - 08-19-2021

load a map: map mapname
reload changes: fs_rescan ; r_restart

PD: some map entities and items are not refreshed. Neither do the skybox textures.



-


RE: reload map changes in game - Julius - 08-19-2021

I have this in my autoexec.cfg configuration file, in case it would help someone:





Code:
// -----------------------------------------------------------------------------
// MAP DEVELOPMENT:
// -----------------------------------------------------------------------------

// Screenshots Format:
"scr_screenshot_jpeg" "0"               // [1] Use JPG instead of TGA
"scr_screenshot_jpeg_quality" "0.98"    // [0.9] Compression level
"scr_screenshot_png" "1"                // [0] Use PNG instead of TGA

// Clean HUD for screenshots (F12):
alias nohud_1 "viewsize 120; r_drawviewmodel 0; crosshair 0; cl_hidewaypoints 1; shownetgraph 0; showfps 1; showtime 0; showdate 1"
alias nohud_0 "viewsize 100; r_drawviewmodel 1; crosshair 16; cl_hidewaypoints 0; shownetgraph 1; showfps 1; showtime 1; showdate 1"
alias nohud "nohud_${r_drawviewmodel}"
bind z "nohud"

// Spectator's cam speed (mousewheel resets to default 1.5):
bind x "toggle sv_spectator_speed_multiplier 0.50 0.25; impulse 11"

// Draw everything | lightmaps only | lightmaps + normalmaps shading:
bind c "toggle gl_lightmaps 0 1 2"

// Show statistics & tris:
"r_speeds_graph" "0"                    // [0] Do not show it by default
"r_speeds_graph_x" "8"
"r_speeds_graph_y" "8"

bind v "toggle r_speeds_graph 0 1; toggle r_showtris 0 1"


That is:

set PNG format for screenshots.

z key: enable/disable some hud elements prior to taking map screenshots.

x key: slow spectator's cam speed. Good to fly around geometry to observe details.

c key: a toggler to show everything, lightmaps only or lightmaps + normalmaps applied.

v key: draw map statistics.


-