Jump to content

local.cfg vs. user.cfg


Recommended Posts

Dear Community, can you please give me a hint where to put manual adjustments - in local.cfg or user.cfg? I use a25 autobuilds under Windows 10 and also svn versions on Debian 11 (if that makes a difference with regard to the two config files). BTW, user.cfg is not mentioned on this wiki section; however, it appears in various spots in the FAQs and the GameDataPaths section (only about macOS, though) of the wiki. Therefore, I am a bit puzzled what should be adjusted in which of the two files (not to mention the dev.cfg that can also exist ;)). Thanks for your help! :)

BTW, the tinygettext.debug (mentioned there in the wiki) is not in my user.cfg (a25 under Windows 10).

PS: How can I manually format text in a forum post to appear like this?

Link to comment
Share on other sites

Here are the list of all the Config values I could find in the C++;

Spoiler

 

CFG_GET_VAL("screenshot.tiles", tiles);
CFG_GET_VAL("screenshot.tilewidth", tileWidth);
CFG_GET_VAL("screenshot.tileheight", tileHeight);
CFG_GET_VAL(g_Game && g_Game->IsGameStarted() ? "adaptivefps.session" : "adaptivefps.menu", fpsLimit);
CFG_GET_VAL("rlinterface.address", server_address);
CFG_GET_VAL("view.scroll.speed", m_ViewScrollSpeed);
CFG_GET_VAL("view.scroll.speed.modifier", m_ViewScrollSpeedModifier);
CFG_GET_VAL("view.rotate.x.speed", m_ViewRotateXSpeed);
CFG_GET_VAL("view.rotate.x.min", m_ViewRotateXMin);
CFG_GET_VAL("view.rotate.x.max", m_ViewRotateXMax);
CFG_GET_VAL("view.rotate.x.default", m_ViewRotateXDefault);
CFG_GET_VAL("view.rotate.y.speed", m_ViewRotateYSpeed);
CFG_GET_VAL("view.rotate.y.speed.wheel", m_ViewRotateYSpeedWheel);
CFG_GET_VAL("view.rotate.y.default", m_ViewRotateYDefault);
CFG_GET_VAL("view.rotate.speed.modifier", m_ViewRotateSpeedModifier);
CFG_GET_VAL("view.drag.speed", m_ViewDragSpeed);
CFG_GET_VAL("view.zoom.speed", m_ViewZoomSpeed);
CFG_GET_VAL("view.zoom.speed.wheel", m_ViewZoomSpeedWheel);
CFG_GET_VAL("view.zoom.min", m_ViewZoomMin);
CFG_GET_VAL("view.zoom.max", m_ViewZoomMax);
CFG_GET_VAL("view.zoom.default", m_ViewZoomDefault);
CFG_GET_VAL("view.zoom.speed.modifier", m_ViewZoomSpeedModifier);
CFG_GET_VAL("view.height.smoothness", m_HeightSmoothness);
CFG_GET_VAL("view.height.min", m_HeightMin);
CFG_GET_VAL("view.near", m_ViewNear);
CFG_GET_VAL("view.pos.smoothness", m_PosX);
CFG_GET_VAL("view.pos.smoothness", m_PosY);
CFG_GET_VAL("view.pos.smoothness", m_PosZ);
CFG_GET_VAL("view.zoom.smoothness", m_Zoom);
CFG_GET_VAL("view.rotate.x.smoothness", m_RotateX);
CFG_GET_VAL("view.rotate.y.smoothness", m_RotateY);
CFG_GET_VAL("view.far", m_ViewFar);
CFG_GET_VAL("view.fov", m_ViewFOV);
CFG_GET_VAL("materialmgr.quality", qualityLevel);
CFG_GET_VAL("materialmgr." + conf + ".min", valmin);
CFG_GET_VAL("materialmgr." + conf + ".max", valmax);
CFG_GET_VAL("max_actor_quality", quality);
CFG_GET_VAL("variant_diversity", value);
CFG_GET_VAL("gui.cursorblinkrate", m_CursorBlinkRate);
CFG_GET_VAL("gui.session.minimap.pingduration", m_PingDuration);
CFG_GET_VAL("gui.session.minimap.blinkduration", blinkDuration);
CFG_GET_VAL("tinygettext.debug", tinygettext_debug);
CFG_GET_VAL("locale", locale);
CFG_GET_VAL("lobby.server", m_server);
CFG_GET_VAL("lobby.xpartamupp", sXpartamupp);
CFG_GET_VAL("lobby.echelon", sEchelon);
CFG_GET_VAL("lobby.tls", tls);
CFG_GET_VAL("lobby.verify_certificate", verify_certificate);
CFG_GET_VAL("network.upnprootdescurl", rootDescURL);
CFG_GET_VAL("network.duplicateplayernames", duplicatePlayernames);
CFG_GET_VAL("network.observerlimit", maxObservers);
CFG_GET_VAL("network.lateobservers", observerLateJoin);
CFG_GET_VAL("lobby.buddies", buddies);
CFG_GET_VAL("network.observermaxlag", max_observer_lag);
CFG_GET_VAL("lobby.stun.server", server_name);
CFG_GET_VAL("lobby.stun.port", port);
CFG_GET_VAL("lobby.stun.delay", delay);
CFG_GET_VAL("lobby.stun.delay", delay);
CFG_GET_VAL("console.history.size", m_MaxHistoryLines);
CFG_GET_VAL("gui.cursorblinkrate", m_cursorBlinkRate);
CFG_GET_VAL("joystick.enable", joystickEnable);
CFG_GET_VAL("joystick.deadzone", m_Deadzone);
CFG_GET_VAL("profiler2.server.port", listeningPort);
CFG_GET_VAL("profiler2.server", listeningServer);
CFG_GET_VAL("profiler2.server.threads", numThreads);
CFG_GET_VAL("profiler2.gpu.arb.enable", enabledARB);
CFG_GET_VAL("profiler2.gpu.ext.enable", enabledEXT);
CFG_GET_VAL("profiler2.gpu.intel.enable", enabledINTEL);
CFG_GET_VAL("userreport.id", userID);
CFG_GET_VAL("userreport.enabledversion", version);
CFG_GET_VAL("userreport.url_upload", url);
CFG_GET_VAL("windowed", windowed);
CFG_GET_VAL("xres", m_ConfigW);
CFG_GET_VAL("yres", m_ConfigH);
CFG_GET_VAL("bpp", m_ConfigBPP);
CFG_GET_VAL("display", m_ConfigDisplay);
CFG_GET_VAL("hidpi", m_ConfigEnableHiDPI);
CFG_GET_VAL("vsync", m_ConfigVSync);
CFG_GET_VAL("forceglversion", forceGLVersion);
CFG_GET_VAL("forceglprofile", forceGLProfile);
CFG_GET_VAL("forceglmajorversion", forceGLMajorVersion);
CFG_GET_VAL("forceglminorversion", forceGLMinorVersion);
CFG_GET_VAL("pauseonfocusloss", g_PauseOnFocusLoss);
CFG_GET_VAL("gui.scale", g_GuiScale);
CFG_GET_VAL("nohwcursor", forceGL);
CFG_GET_VAL("macmouse", macMouse);
CFG_GET_VAL("mod.enabledmods", modsStr);
CFG_GET_VAL("profiler2.autoenable", profilerHTTPEnable);
CFG_GET_VAL("texturequality", textureQuality);
CFG_GET_VAL("profiler2.autoenable", profilerGPUEnable);
CFG_GET_VAL("renderpath", renderPath);
CFG_GET_VAL("antialiasing", newAAName);
CFG_GET_VAL("sharpening", newSharpName);
CFG_GET_VAL("sharpness", m_Sharpness);
CFG_GET_VAL("skycolor", skystring);
CFG_GET_VAL("gl.checkerrorafterswap", checkGLErrorAfterSwap);
CFG_GET_VAL("renderpath", renderPath);
CFG_GET_VAL("preferglsl", enabled);
CFG_GET_VAL("shadows", enabled);
CFG_GET_VAL("shadowpcf", enabled);
CFG_GET_VAL("fog", enabled);
CFG_GET_VAL("gpuskinning", enabled);
CFG_GET_VAL("gpuskinning", m_GPUSkinning);
CFG_GET_VAL("shadowscascadecount", CascadeCount);
CFG_GET_VAL("shadowscovermap", ShadowsCoverMap);
CFG_GET_VAL("shadowscutoffdistance", m->ShadowsCutoffDistance);
CFG_GET_VAL("shadowscascadedistanceratio", m->CascadeDistanceRatio);
CFG_GET_VAL("shadowquality", QualityLevel);
CFG_GET_VAL("showsky", m_RenderSky);
CFG_GET_VAL("ooslog", m_EnableOOSLog);
CFG_GET_VAL("serializationtest", m_EnableSerializationTest);
CFG_GET_VAL("rejointest", m_RejoinTestTurn);
CFG_GET_VAL("gui.session.snaptoedgesdistancethreshold", distanceThreshold);
CFG_GET_VAL("sound.mastergain", m_Gain);
CFG_GET_VAL("sound.musicgain", m_MusicGain);
CFG_GET_VAL("sound.ambientgain", m_AmbientGain);
CFG_GET_VAL("sound.actiongain", m_ActionGain);
CFG_GET_VAL("sound.uigain", m_UIGain);
CFG_GET_VAL("sound.mindistance", m_MinDist);
CFG_GET_VAL("sound.maxdistance", m_MaxDist);
CFG_GET_VAL("sound.maxstereoangle", m_MaxStereoAngle);

 

 

 

 

Note tinygettext.debug is in that list https://trac.wildfiregames.com/ticket/6333#ticket but not in default.cfg

41 minutes ago, Ceres said:

PS: How can I manually format text in a forum post to appear like this?

Don't think you can. Copy pasting from a text editor will work though.

42 minutes ago, Ceres said:

Dear Community, can you please give me a hint where to put manual adjustments - in local.cfg or user.cfg? I use a25 autobuilds under Windows 10 and also svn versions on Debian 11 (if that makes a difference with regard to the two config files). BTW, user.cfg is not mentioned on this wiki section; however, it appears in various spots in the FAQs and the GameDataPaths section (only about macOS, though) of the wiki. Therefore, I am a bit puzzled what should be adjusted in which of the two files (not to mention the dev.cfg that can also exist ;)). Thanks for your help! :)

In general you should use user.cfg

/**
 * Namespace priorities:
 * - Command line args override everything
 * - User supersedes HWDetect (let the user try crashing his system).
 * - HWDetect supersedes mods & default -> mods can mod hwdetect itself.
 * - SYSTEM is used for local.cfg and is basically for setting custom defaults.
 */
enum EConfigNamespace
{
	CFG_DEFAULT,
	CFG_MOD,
	CFG_SYSTEM,
	CFG_HWDETECT,
	CFG_USER,
	CFG_COMMAND,
	CFG_LAST
};

void CONFIG_Init(const CmdLineArgs& args)
{
	TIMER(L"CONFIG_Init");

	CConfigDB::Initialise();

	// Load the global, default config file
	g_ConfigDB.SetConfigFile(CFG_DEFAULT, L"config/default.cfg");
	g_ConfigDB.Reload(CFG_DEFAULT);	// 216ms
	// Try loading the local system config file (which doesn't exist by
	// default) - this is designed as a way of letting developers edit the
	// system config without accidentally committing their changes back to SVN.
	g_ConfigDB.SetConfigFile(CFG_SYSTEM, L"config/local.cfg");
	g_ConfigDB.Reload(CFG_SYSTEM);

	g_ConfigDB.SetConfigFile(CFG_USER, L"config/user.cfg");
	g_ConfigDB.Reload(CFG_USER);

	g_ConfigDB.SetConfigFile(CFG_MOD, L"config/mod.cfg");
	// No point in reloading mod.cfg here - we haven't mounted mods yet

	ProcessCommandLineArgs(args);

	// Collect information from system.cfg, the profile file,
	// and any command-line overrides to fill in the globals.
	LoadGlobals();	// 64ms
}

As you can see, user.cfg is loaded after local.cfg overwriting all the changes.

 

The dev.cfg file is used to detect a development copy. From a quick glance it has two usages

1) Allow developpers to save maps in the current mod rather than in the user mod

2) Allow to use the long string locale in the game to test if the text fits everywhere.

 

 

 

 

  • Like 1
Link to comment
Share on other sites

Thank you so much! :heart:

Please allow me collecting some useful settings adjustments here for further reference (and maybe discussion, too ;)). These are settings that cannot be changed in the game settings menues but in user.cfg. Under Windows 10, it's there:

C:\Users\<username>\AppData\Roaming\0ad\config\user.cfg

The values shown below are proposals I found in various posts in the forum. I have not tested them and recommend that you backup your user.cfg before changing it

Zoom and scroll speed:

view.scroll.speed = "200"
view.zoom.default = "200"

view.zoom.min = "3"
view.zoom.max = "900"

Attacks (some people might consider swapping hotkeys for attackmove and attackmoveUnit):

[hotkey.session]
attack = Ctrl                              ; Modifier to attack instead of another action (e.g. capture)
attackmove = Ctrl                     ; Modifier to attackmove when clicking on a point
attackmoveUnit = "Ctrl+Q"      ; Modifier to attackmove targeting only units when clicking on a point (should contain the attackmove keys) 

 

Edited by Ceres
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...