Just re-discovered oolite and wondering about mouse control

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
wolis
Average
Average
Posts: 11
Joined: Sun Nov 15, 2009 1:28 am
Contact:

Just re-discovered oolite and wondering about mouse control

Post by wolis »

Hi guys,

Im posting this here as its a suggestion unless someone can tell me how to do it with the current configs etc..

Can the mouse be configured to yaw with left and right movements?

oolite is looking absolutely fabulous these days (last checked it out several years ago and was a very decent Elite re-make back then).

Now I have played such a myriad of space trading sims since I first played Elite on my C64, I have found the mouse an ideal input device for directions.. if you can yaw with left and right mouse movements instead of rolling.

Since oolite seems very customisable I was hoping I would find a mouse config file or something in the keyconfig.plist but nothing seems like will will allow this change.

Is it hard coded into the exe?
Can it be changed?

Also.. any chance of mouse control when in windowed mode (yes Im running it on Windows)?

And finally any reason why my AddOn\keyconfig.plist file is being ignored? Do I need to flip another switch somewhere?

Thanks.
--
___ http://creativeobjectworld.com
/\___\ a free-form, text-based, browser-based,
\/___/ real-time, multi-user virtual world
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Just re-discovered oolite and wondering about mouse cont

Post by another_commander »

Hi and welcome. On with some answers:
wolis wrote:
Can the mouse be configured to yaw with left and right movements?
Not at the moment. It may be tricky enabling it to yaw, although to be honest I have not looked at that part of the code lately, so I may be wrong on that.
Also.. any chance of mouse control when in windowed mode (yes Im running it on Windows)?
Mouse control in a window can be problematic, because the game window does not capture the mouse (and I am glad that it does not), so it is easy to click out of the window and cause it to lose focus. So mouse control in window is not really recommended.

Having said that, you may want to give a try to tomorrow's nightly build (found here, from tomorrow on obviously), which will contain a modification that will allow mouse control in a window. You will need to edit the .GNUstepDefaults file, found in the <OoliteInstallDir>/oolite.app/GNUstep folder and add inside the block titled "oolite" this line, amongst the rest of the settings:

Code: Select all

"mouse-control-in-windowed-mode" = YES;
I deliberately made it so that a game file needs to be edited to enable it, since mouse control when in window is discouraged.
And finally any reason why my AddOn\keyconfig.plist file is being ignored? Do I need to flip another switch somewhere?
Shouldn't this be AddOns\keyconfig.plist? If it does not work, try making a Config folder under AddOns and putting the keyconfig.plist in there.
User avatar
wolis
Average
Average
Posts: 11
Joined: Sun Nov 15, 2009 1:28 am
Contact:

Re: Just re-discovered oolite and wondering about mouse cont

Post by wolis »

Having said that, you may want to give a try to tomorrow's nightly build
Thanks.. will check it out tomorrow.
Shouldn't this be AddOns\keyconfig.plist? If it does not work, try making a Config folder under AddOns and putting the keyconfig.plist in there.
Yes.. I first copied it into AddOns then followed your suggestion of making a folder AddOns\Config.

Reading file access while oolite starts (procmon.exe) I see it read the standard keyconfig.plist, then it looks for one in AddOns (not found) then in AddOns\Config (found and read). It then scanned all of the AddOns folders but found no keyconfig.plist in any of those .. but still my key-remapping does not work.

Im trying to make left and right cursor to yaw

Code: Select all

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

What am I missing?
--
___ http://creativeobjectworld.com
/\___\ a free-form, text-based, browser-based,
\/___/ real-time, multi-user virtual world
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

The modified keyconfig.plist should work if placed inside AddOns (just tested both with trunk and 1.73.4 release). Can you please post the Latest.log file, found inside <OoliteInstallDir>/oolite.app/Logs?
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Just re-discovered oolite and wondering about mouse cont

Post by Screet »

wolis wrote:
What am I missing?
Did you hold down shift while loading oolite to force-flush the cache?

Screet
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Just re-discovered oolite and wondering about mouse cont

Post by another_commander »

Screet wrote:
wolis wrote:
What am I missing?
Did you hold down shift while loading oolite to force-flush the cache?

Screet
We need to put this in a sticky methinks:

There are two plists in Oolite that do not require holding shift down, because they are not cached. The two plists are:
keyconfig.plist
logcontrol.plist

Holding shift down in this case is therefore not a requirement and does not change anything. The modified keyconfig should (and does) work without cache flushing.
User avatar
wolis
Average
Average
Posts: 11
Joined: Sun Nov 15, 2009 1:28 am
Contact:

Post by wolis »

Ah.. thanks for the mention of logs (PS love the concept of latest and previous.log).

I had also (remapped the fire key to the space bar, but did not remark it properly:

Code: Select all

key_fire_lasers				= 32; "a";
so the log reads:

Code: Select all

[plist.parse.foundation.failed]: Failed to parse ../AddOns/Config/keyconfig.plist as a property list using Foundation. 
Retrying using homebrew parser. 
WARNING: the homebrew parser is deprecated and will be removed in a future version of Oolite. Parse failed at line 13 (char 332) - unexpected character (wanted '=')
  [plist.homebrew.parseError]: Property list isn't in XML format, homebrew parser can't help you.
[script.addShips.failed]: ***** SCRIPT ERROR: in "system script_actions", addShipsAt: could not add 1 ships with role "krait"
Thats stuff about a ship not loading must be from one of the many addons I have loaded.

Its a pitty the entire keyconfig fails because of one mistake not just that one line.. but I guess the more pain we feel the more we go looking for the cause.

That keyconfig change helps tremendously.. I hope you have sucess trying to make mouse contrrol yaw

Thanks

Thanks
--
___ http://creativeobjectworld.com
/\___\ a free-form, text-based, browser-based,
\/___/ real-time, multi-user virtual world
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

If you do this:

Code: Select all

key_fire_lasers				= 32; /* was "a"; */
it should work.
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
wolis
Average
Average
Posts: 11
Joined: Sun Nov 15, 2009 1:28 am
Contact:

Re: Just re-discovered oolite and wondering about mouse cont

Post by wolis »

another_commander wrote:
Mouse control in a window can be problematic, because the game window does not capture the mouse (and I am glad that it does not), so it is easy to click out of the window and cause it to lose focus. So mouse control in window is not really recommended.

Having said that, you may want to give a try to tomorrow's nightly build (found here, from tomorrow on obviously), which will contain a modification that will allow mouse control in a window. You will need to edit the .GNUstepDefaults file, found in the <OoliteInstallDir>/oolite.app/GNUstep folder and add inside the block titled "oolite" this line, amongst the rest of the settings:

Code: Select all

"mouse-control-in-windowed-mode" = YES;
I deliberately made it so that a game file needs to be edited to enable it, since mouse control when in window is discouraged.
Great! thanks.. works like a charm.

Now Im intrigued.. I have the AsteroidStorm 3.53.oxp and it complained when I tried running oolite-trunk-1.74.0.2748-dev.exe, but it seems happy with oolite-trunk-1.74.0.2753-dev.exe.
--
___ http://creativeobjectworld.com
/\___\ a free-form, text-based, browser-based,
\/___/ real-time, multi-user virtual world
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 »

That often happens when a bug is first made and then corrected. :wink:
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: Just re-discovered oolite and wondering about mouse cont

Post by Eric Walch »

wolis wrote:
Now Im intrigued.. I have the AsteroidStorm 3.53.oxp and it complained when I tried running oolite-trunk-1.74.0.2748-dev.exe, but it seems happy with oolite-trunk-1.74.0.2753-dev.exe.
That max version I added deliberate because the mission offering stuff will be rewritten for 1.74 and I planned to have a 1.74 adapted release by than. But it is save to remove or raise the max_version in requires.plist
User avatar
wolis
Average
Average
Posts: 11
Joined: Sun Nov 15, 2009 1:28 am
Contact:

Re: Just re-discovered oolite and wondering about mouse cont

Post by wolis »

Eric Walch wrote:
That max version I added deliberate...
Ah.. curiosity sated. Thanks.
--
___ http://creativeobjectworld.com
/\___\ a free-form, text-based, browser-based,
\/___/ real-time, multi-user virtual world
User avatar
wolis
Average
Average
Posts: 11
Joined: Sun Nov 15, 2009 1:28 am
Contact:

Re: Just re-discovered oolite and wondering about mouse cont

Post by wolis »

Hi another_commander.. any thoughts or progress or out-right refusals on this?
another_commander wrote:
wolis wrote:
Can the mouse be configured to yaw with left and right movements?
Not at the moment. It may be tricky enabling it to yaw, although to be honest I have not looked at that part of the code lately, so I may be wrong on that.
now I have re-mapped my left/right to yaw it feels a whole lot more comfortable.. but that icing on the cake would be mouse control... with auto-dampening so no sudden right-click to stop.

I really should learn whatever language this is coded in so I can have a tinker myself.

Thanks.
--
___ http://creativeobjectworld.com
/\___\ a free-form, text-based, browser-based,
\/___/ real-time, multi-user virtual world
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6683
Joined: Wed Feb 28, 2007 7:54 am

Re: Just re-discovered oolite and wondering about mouse cont

Post by another_commander »

wolis wrote:
Hi another_commander.. any thoughts or progress or out-right refusals on this?
another_commander wrote:
wolis wrote:
Can the mouse be configured to yaw with left and right movements?
Not at the moment. It may be tricky enabling it to yaw, although to be honest I have not looked at that part of the code lately, so I may be wrong on that.
now I have re-mapped my left/right to yaw it feels a whole lot more comfortable.. but that icing on the cake would be mouse control... with auto-dampening so no sudden right-click to stop.

I really should learn whatever language this is coded in so I can have a tinker myself.

Thanks.
Not enough free time to work on this at the moment. It is more complicated than what it looks and will probably require a new menu item in Game Options so that it can be set in a user friendly way. Unless one of the other coders wants to give it a go now, my guess is that it will have to wait for a while.

The language you want to learn if you are interested in giving a hand is Objective-C.
Post Reply