**CNQ3 for level designers** # Requirements You will need: - Windows 10 x64 or Windows 11 x64 - A GPU capable of Direct3D feature level 12 - CPMA in the cpma folder - [All official CPMA maps](https://cdn.playmorepromode.com/files/cpma-mappack-full.zip) You can grab the latest version here: https://myt.playmorepromode.com/cnq3/ # CNQ3 shader tools demo ![CNQ3 shader tools demo](https://www.youtube.com/watch?v=vson9LBExRY) Of interest: - finding and replacing shaders - finding and replacing images - editing shaders - seeing shader info (where is it loaded from, referenced images, etc.) - seeing image info (where is it loaded from, referenced shaders, etc.) All of these have been improved since the video was made. # CNQ3 console demo ![CNQ3 console demo](https://www.youtube.com/watch?v=I2BTd6qE3Xk) Of interest: - searching the log and cycling results - mark mode (multi-line copies FROM the console) # Key notes - You can grab the latest version here: https://myt.playmorepromode.com/cnq3/ - CNQ3 doesn't currently work with mods other than CPMA - CNQ3 has fs_game set to cpma by default, so it will use the "default" CPMA install - If you want to use a CPMA mod folder with a different name, you can still set fs_game as usual # The GUI To use the built-in GUI, you can use the following binds (feel free to change the keys!): ```text bind F1 "keycatchgui;togglegui" bind F2 "keycatchgui;toggleguiinput" ``` # General notes - The `keycatchgui` prefix tells the engine the key bind is always active - That means even in the main menu, demo player, when the console is down, etc. - The `keycatchgui` binds override *everything*, including existing console and GUI shortcuts! - F1 to enable the GUI if not already visible anywhere (main menu & demo playback is fine too) - F2 toggle mouse input going to the GUI vs normal behavior (console, game, etc.) - You can move or look around without having to hide the GUI - GUI enabled: Ctrl+Shift+S to show the shader explorer or use the menu bar - GUI enabled: Ctrl+Shift+I to show the image explorer or use the menu bar - GUI enabled: Ctrl+Shift+E to edit the shader under the crosshair (only when a map is loaded with cheats) or open the editor from the shader details window - You can replace multiple shaders/images from the shader/image detail windows - You can restore them individually from the the shader/image detail windows - You can restore them all at once from the shader/image explorers windows - You can only edit 1 shader at a time - Replacing a shader being edited means your code edits will be cleared/lost - Saved shaders are stored in cpma/scripts - The CNQ3 client's executable has sv_pure set to 0 by default, so overrides will always work fine - Try avoiding using the F5 key and some other useful shortcut keys for your keycatchgui binds - F5 is used by the shader editor to apply code changes - If you edit a shader and want to keep the results before editing a new one: - Save first edited shader to a file - Close dialog and `/vid_restart` - Open next shader for editing # Editing shaders To see/edit shader code: - Launch the map with cheats, i.e. `/devmap cpm3b_b1` - Point at the surface of interest - Ctrl+Shift+E to start editing the shader # Lightgrids To see the map's lightgrid, you need to enable the CRP (GPU with HW RT required): - `r_pipeline 1;crp_volLight 1;vid_restart` - Enable GUI, then `Tools -> Edit Volumetrics -> Debug -> Draw ambient light grids` # Mixed usage To see the list of all shader mixed-use problems (the same image is used with different flags in various shaders): - `/shadermixeduse` # Texture issues I also have a command-line tool for finding and fixing texture issues, I'll need to clean it up and release it one day...