key config

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
elite
Deadly
Deadly
Posts: 128
Joined: Thu Jun 21, 2007 9:26 am

key config

Post by elite »

I can't seem to change my key config file.

I want to change 'increase speed' from w to s and 'decrease speed' from s to x.

When I edit the file the changes don't take effect, even when I hold down shift to clear the cache.

I had this poblem with v1.70 too but I managed to solve it by using the keyconfig file from 1.68.

1.68 used intergers (decimal numbers) instead of characters.

Don't suppose anyone has the 1.68 keyconfig file and can post the code here...please.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Can anyone confirm that modifying the 1.71 key config file does work under Windows or Linux?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

@ elite: Sorry if this a stupid question: Which keyconfig-file have you changed? The one within Oolite itself, or the one inside AddOns/Config/? Because if you would change the former, the change would be overwritten again by the latter.
User avatar
Lestradae
---- E L I T E ----
---- E L I T E ----
Posts: 3095
Joined: Tue Apr 17, 2007 10:30 pm
Location: Vienna, Austria

Me!

Post by Lestradae »

@Ahruman:
Can anyone confirm that modifying the 1.71 key config file does work under Windows or Linux?
I have Windows Vista and my Config is in AddOns/Config; and it seems to work fine.
User avatar
elite
Deadly
Deadly
Posts: 128
Joined: Thu Jun 21, 2007 9:26 am

Post by elite »

Commander McLane wrote:
@ elite: Sorry if this a stupid question: Which keyconfig-file have you changed? The one within Oolite itself, or the one inside AddOns/Config/? Because if you would change the former, the change would be overwritten again by the latter.
I don't have a keyconfig file in the addons folder.
I changed the one in the main resorces/config folder.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Ah, yes, I seem to remember that (unlike the Mac-version) the PC-distribution does not come with a pre-installed Config-folder inside the AddOns-folder.

But it is advisable to create one, anyway. So go to your AddOns-folder and create a Config-folder there. Then copy the keyconfig.plist from resources/config, and paste it to the newly created folder. Now you can fiddle with your keys without the need to manipulate files inside the game itself (also the file in resources/config should be write-protected; perhaps this is the problem?). Everything you do somewhere in the AddOns will automatically overwrite (or amend) the equally named document in the game's resources.

And I for myself have just successfully changed a key configuration in 1.71 (although I am on a Mac, admittedly). Now the Advanced Navigational Array is working again. :D (It's name must have been changed from kay_advanced_nav_array to key_advanced_nav_array somewhere between 1.69.1.1 and 1.71 (presumably in 1.70, as it wasn't working in there as well). Which may be the secret reason why other people had problems with it, too?!?)
User avatar
elite
Deadly
Deadly
Posts: 128
Joined: Thu Jun 21, 2007 9:26 am

Post by elite »

Commander McLane wrote:
So go to your AddOns-folder and create a Config-folder there. Then copy the keyconfig.plist from resources/config, and paste it to the newly created folder.
Tried that. Still not working. And the file is not write protected.

Here is my Keyconfig file contents:

{
key_roll_left = 253; // left arrow
key_roll_right = 252; // right arrow
key_pitch_forward = 255; // up arrow
key_pitch_back = 254; // down arrow
key_yaw_left = ",";
key_yaw_right = ".";

key_increase_speed = "s";
key_decrease_speed = "x";
key_inject_fuel = "i";

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

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_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";
}


However in game, increase speed is still w and decrease speed is still s.
User avatar
elite
Deadly
Deadly
Posts: 128
Joined: Thu Jun 21, 2007 9:26 am

Post by elite »

Ok now this is strange.

I deleted the main keyconfig file in the resource folder and took out ALL oxp's, just in case one of them was effecting my keys.

However w is still set to increase speed and s decreases speed.

Other keys also can't be changed. It isn't just w and s.
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

elite wrote:
key_next_compass_mode = "";
This is your problem. " is an escape code for putting a quotation mark in a string. As such, the parser thinks the string continues to the next quotation mark. The solution is to write:

Code: Select all

key_next_compass_mode		= "\";
as seen in the built-in keyconfig.plist.

This error should cause a message in your stderr file. Under Mac OS X it looks like this:

Code: Select all

XML parser error:
	Unexpected character { at line 1
Old-style plist parser error:
	Missing ';' on line 53
which is a bit obtuse but at least tells you about where in the file the problem is. (It’s actually on line 52; line 53 is where the next quotation mark is and the parser sees the string being followed by a 0.)
User avatar
elite
Deadly
Deadly
Posts: 128
Joined: Thu Jun 21, 2007 9:26 am

Post by elite »

Thanks Ahruman that worked.
Post Reply