Page 1 of 1

[Solved] Not loading my user-defined keyconfig.plist

Posted: Wed Dec 22, 2010 12:47 am
by fatgerman
I'm so happy to have found Oolite... I haven't played this game since it stole a couple of years of my childhood in the 1980s. It's great to find a decent port that updates the game but keeps the feel of the original BBC version.

I've installed the autopackage 1.74.2 version on Kubuntu 10.10, 64 bit.

Anyway, it may have been 30 years but my fingers still remember the key controls from that version, so I made a new version of keyconfig.plist and put it in ~/.Oolite/Addons/Config/keyconfig.plist, as outlined in the FAQ. But it doesn't pick it up and I'm stuck with the default keys.

Eventually I resorted to editing the installed file at /usr/lib/Oolite/oolite.app/Resources/Config/. This works but I don't like doing this as it could so easily get lost if/when I upgrade to a newer version.

Have I put my file in the wrong place, or have I found a bug?

Posted: Wed Dec 22, 2010 8:16 am
by gizmo
Move the keyconfig.plist to ~/.Oolite/Addons

Posted: Wed Dec 22, 2010 10:21 am
by fatgerman
No, that doesn't work.

I notice I'm getting this in the Log :

[searchPaths.dumpAll]: Unrestricted Mode - Resources paths:
/usr/lib/Oolite/oolite.app/Resources
AddOns

but nothing about loading any resources files.

Not loading my user-defined keyconfig.plist

Posted: Wed Dec 22, 2010 12:48 pm
by Getafix
Hi fatgerman, and welcome to the friendliest board this side of Riedquat.

I've tested gizmo's suggestion on Mandriva2009 64bit with oolite trunk r3773,
and it works for me (i've changed roll and pitch keys).
In fact I copied (not moved) from original destination and altered the target.

I'm about to setup a Kubuntu 10.04 32bit with oolite 1.74.2 and test again.

Not loading my user-defined keyconfig.plist

Posted: Wed Dec 22, 2010 1:13 pm
by Getafix
For Mandriva2009 64bit and oolite 1.74.2 works too.

Not loading my user-defined keyconfig.plist

Posted: Wed Dec 22, 2010 1:26 pm
by Getafix
For Kubuntu10.04 32bit works fine for oolite 1.74.2 too.

Try forcing a cache flush by pressing the Shift key when you execute oolite.
You will know that the cache has been flushed by looking into the Latest.log for the line
[dataCache.rebuild.explicitFlush]: Cache explicitly flushed with shift key. Rebuilding from scratch.

Posted: Wed Dec 22, 2010 4:02 pm
by fatgerman
Thanks, but still no joy. I tried the Shift-key while executing (and checked for the line in the log). I also tried deleting completely the default keyconfig.plist, but the default keymap is still used.

I'm getting this when I start oolite from a console

2010-12-22 15:58:15.282 oolite[2962] File NSUserDefaults.m: 626. In [NSUserDefaults +standardUserDefaults] Improper installation: No language locale found

I wonder if this has something to do with it being 64-bit? Kubuntu 64 bit has /usr/lib, /usr/lib32, and /usr/lib64 (which is a symlink to /usr/lib). Oolite is installed in /usr/lib.

Not loading my user-defined keyconfig.plist

Posted: Thu Dec 23, 2010 10:01 am
by Getafix
The "no language locale found" should not worry you.
fatgerman wrote:
..and checked for the line in the log...
I presume that the cache flush message was there, right?

Posted: Thu Dec 23, 2010 12:12 pm
by Commander McLane
It should work just like you did it originally, that's why we're so puzzled.

Another possible explanation could be an unintentional error in the filename, which would make Oolite ignore it altogether. So make sure that your custom keyconfig is exactly named "keyconfig.plist".

Or you could have made a syntax error while editing the file, like accidentally deleting a ";" character or so, which could lead Oolite to not parse the file at all, again falling back to its original keyconfig.

Or could it have something to do with an incorrectly set permission for ~/.Oolite/Addons/Config/keyconfig.plist?

Posted: Thu Dec 23, 2010 1:34 pm
by fatgerman
I presume that the cache flush message was there, right?
Yes it was. I've done it again just now, just to be sure.
Another possible explanation could be an unintentional error in the filename, which would make Oolite ignore it altogether. So make sure that your custom keyconfig is exactly named "keyconfig.plist".
It definitely is.
Or you could have made a syntax error while editing the file, like accidentally deleting a ";" character or so, which could lead Oolite to not parse the file at all, again falling back to its original keyconfig.
The file works if I put it in /usr/lib/Oolite/oolite.app/Resources/Config/
It's the same file. I'll paste it on the end of this post.
Or could it have something to do with an incorrectly set permission for ~/.Oolite/Addons/Config/keyconfig.plist?

Code: Select all

bob@marmite:~$ cd .Oolite/Addons/Config
bob@marmite:~/.Oolite/Addons/Config$ ls -l
total 4
-rw-r--r-- 1 bob bob 1388 2010-12-22 00:29 keyconfig.plist
bob@marmite:~/.Oolite/Addons/Config$ cat keyconfig.plist
{
	key_roll_left				= ",";		// left arrow
	key_roll_right				= ".";		// right arrow
	key_pitch_forward			= "s";		// up arrow
	key_pitch_back				= "x";		// down arrow
	key_yaw_left				= 253;
	key_yaw_right				= 252;

	key_increase_speed			= 32;
	key_decrease_speed			= "/";
	key_inject_fuel				= "i";

	key_fire_lasers				= "a";
	key_launch_missile			= "m";
	key_next_missile			= "y";
	key_ecm					= "e";

	key_target_incoming_missile		= "T";
	key_target_missile			= "t";
	key_untarget_missile			= "u";
	key_ident_system			= "r";

	key_scanner_zoom			= "z";
	key_scanner_unzoom			= "Z";

	key_launch_escapepod			= 27;		// escape
	key_energy_bomb				= "\t";		// tab

	key_galactic_hyperspace			= "g";
	key_hyperspace				= "h";
	key_jumpdrive				= "j";

	key_dump_cargo				= "d";
	key_rotate_cargo			= "R";

	key_autopilot				= "c";
	key_autopilot_target			= "C";
	key_autodock				= "D";
	key_docking_clearance_request		= "L";

	key_snapshot				= "*";
	key_docking_music			= "s";

	key_advanced_nav_array			= "^";
	key_map_home				= 302;		// Home
	key_map_info				= "i";

	key_pausebutton				= "p";
	key_show_fps				= "F";
	key_mouse_control			= "M";

	key_comms_log				= "`";
	key_next_compass_mode			= "\\";

	key_cloaking_device			= "0";

	key_contract_info			= "?";

	key_next_target				= "+";
	key_previous_target			= "-";

	key_custom_view				= "v";

	key_dump_target_state			= "H";
}

Posted: Thu Dec 23, 2010 3:31 pm
by Commander McLane
There you have it!

It was right under our noses, and nobody (including myself, when I c&p'd your path name) noticed: :evil:

The OXP folder is called "AddOns", not "Addons" (upper-case "O"). Linux is case-sensitive, and won't recognize the complete folder. Which in effect means that none of your OXPs should be working.

The good news is that correcting the folder name should solve your problem. :D

Posted: Thu Dec 23, 2010 3:48 pm
by fatgerman
Oh I don't believe I missed that! Whack me with a thargoid and call me Jameson!

Thanks all, clearly I'm still Harmless but I must be considred a danger to myself if I don't spot something that obvious :-D

Not loading my user-defined keyconfig.plist

Posted: Thu Dec 23, 2010 4:03 pm
by Getafix
-- Getafix runs towards the first wall in the office and starts banging his head.

That was a good one! 8)

Posted: Thu Dec 23, 2010 5:52 pm
by Thargoid
fatgerman wrote:
Oh I don't believe I missed that! Whack me with a thargoid and call me Jameson!
*SMACK* You Jameson! :twisted: