Page 1 of 1

Binding keys to new commands

Posted: Wed Dec 29, 2010 5:55 pm
by bjasspa
Apologies in advance, I'm new to Oolite and I'm hoping the problem is my ignorance!

I'm trying to create a 'fast forward' button which makes time go ten times faster; I want this because at the start fighting is not wise and trading is quite slow waiting for other ships to get out of the way so that I can use 'j' (or am I missing something?). So hunting around I've found the timeAccelerationFactor which is just what I need, I have written the following script to test it:

this.compassTargetChanged = function(whom, mode)
{
if(mode == "COMPASS_MODE_PLANET") timeAccelerationFactor = 1.0;
if(mode == "COMPASS_MODE_BEACONS") timeAccelerationFactor = 10.0;
}

This makes time go 10x faster when I change the compass mode to a beacon and it slows down again when changed to the planet. But this messes around with the compass which I don't want (and I haven't got an advanced compass at the start :-).

What I really want is to create a new key binding which toggles the state, i.e. bound to the key 'o' say. Can this be done? I can't find anything in the docs on how to create a new 'key_<my_command>' which can them be used in the keyconfig.plist file. Is it me being dumb?

Thanks for a great game - really brought be memories which I had long thought lost and I hope many new ones to come!

Re: Binding keys to new commands

Posted: Wed Dec 29, 2010 6:05 pm
by Eric Walch
bjasspa wrote:
What I really want is to create a new key binding which toggles the state, i.e. bound to the key 'o' say. Can this be done? I can't find anything in the docs on how to create a new 'key_<my_command>' which can them be used in the keyconfig.plist file. Is it me being dumb?
Not dumb, just a way ahead of the rest of us. Wait until 1.75 gets released. Than this will be possible. I assume that a lot of oxps will start using this feature, so you really must decide which one to add or you will drown in all that new equipment.

For now a warm welcome at this side of the galaxy and fly at a slow pace until the next Oolite will see daylight.

Posted: Wed Dec 29, 2010 6:06 pm
by Smivs
Hi and welcome to the friendliest board this side of Riedquat.
There may be a few problems doing what you are doing, partly because there are several types of Beacon. There is one at the witchpoint, one at the station and often one at a Rock hermit as well. Also, many OXPs have unique beacons, so it's not that straightforward. Otherwise it seems like it might be useful.
Edit:- sort of Ninja'd by Eric!
There are other ways of getting to the planet quickly, the best being to angle up away from the planet as you exit witchspace, fly under Torus Drive for a few seconds then angle back to the planet. This way you will avoid the spacelanes (and other ships) and you will get to the planet in seconds.
Also, invest in Fuel Injectors which will (fuel permitting) allow you to blast past other ships at high speed.
One other point...most of the fun in Oolite comes during the run into the planet and many of us string it out as long as possible. Get the right eye-candy and a nice leisurely run into the planet becomes a joy.

Posted: Thu Dec 30, 2010 10:08 am
by Commander McLane
Hi, bjasspa, and another friendly welcome! :D

You could also simply use the time acceleration factor in it's in-built vanilla flavour, which is already bound to a key. Hit 'P' for pause, then hit 'Left Arrow' for making the game slower or 'Right Arrow' for making the game faster. This works in increments between 1/16 and 16 times.

If you display the frame rate (toggle with 'F') you will also see the current value of the TAF.

Posted: Fri Dec 31, 2010 3:53 pm
by bjasspa
This game is fantastic and thanks for the replies & tips (fuel injectors are great!)

But am I really the only impatient old timer? Sitting back and watching the world go by (quite literally) is fine for a while but there's so much more to do in the game!

The tip to use the pause and then arrows works but not simple enough (for me :-). For now I've created a new 'Cranky FastForward' equipment (costing 0.1 Cr so I can buy it right at the beginning) which unfortunately has to award and interfere with the advanced compass - but the 'fast forward' feature is great and the ease of implementation shows the strength of Oolite's kernel. I even have it auto switching off when player's condition changes to red - neat.

I would like to get this working independently and like the 'j' jumpdrive key so if any one has any ideas of how to better hook this in I would be grateful. When in 1.75 coming out?

P.S. I discovered the advantage of having a fast forward while playing the Atari ST Elite on a PC using the Steem emulator which has a fast forward built in - this was good but Oolite is a lot better!

Re: Binding keys to new commands

Posted: Tue Jan 25, 2011 5:32 pm
by TGHC
bjasspa wrote:
Thanks for a great game - really brought be memories which I had long thought lost and I hope many new ones to come!
Hi bjasspa

Welcome to the Oolite universe, if you haven't already, install both the Famous Planets, and Griffs Shipset_all_in_one OXP,s they'll blow your mind!

Re: Binding keys to new commands

Posted: Mon Feb 14, 2011 12:13 pm
by bjasspa
TGHC - thanks for the suggested OXPs but alas my machine can't handle them :-( Being a programmer I went for CPU & memory rather than graphics so it just can't handle the shader effects.

While I'm on that subject is there any way to control the nebular effects? Its with some sadness that I make this request because the effects are fantastic but some systems have such a high number of nebular effects (multiple layers) that it brings my machine down to a stuttering wreck (there's one near Zaria in Galaxy 2 whcih I ended up going to frequently while doing the Ionics mission - excellent missing, thanks Galileo!)

I've trawled the visible and hidden settings but can't find one that effects this - any help appreciated.

Re: Binding keys to new commands

Posted: Mon Feb 14, 2011 12:17 pm
by Cody
If you're using Oolite's own skies (no systems OXP installed), then you can adjust the star and nebulae multipliers here:
~\Oolite\oolite.app\Resources\Config\planetinfo.plist... in the Universal section. That might help.

Re: Binding keys to new commands

Posted: Mon Feb 14, 2011 12:36 pm
by bjasspa
Thanks El Viejo for the steer - have found and tweaked the settings (found the documentation too! why did I fail to find them first time round? :shock:)

Re: Binding keys to new commands

Posted: Mon Feb 14, 2011 12:47 pm
by Commander McLane
Good that you found the documentation as well. Just in case you every lose it again, here's a link:

http://wiki.alioth.net/index.php/Planetinfo.plist

Everything else you need to modify Oolite is listed in the scripting category:

http://wiki.alioth.net/index.php/Catego ... _scripting

Re: Binding keys to new commands

Posted: Mon Feb 14, 2011 1:38 pm
by Smivs
Sorry for such a shameless plug, but my Smivs'Shipset has a low-resolution edition specifically for computers with limited graphics abilities. The textures are the same size as those that come as standard, and might be suitable for you. :)
Smivs.

Re: Binding keys to new commands

Posted: Tue Feb 15, 2011 1:49 am
by CheeseRedux
Smivs wrote:
Sorry for such a shameless plug
How can you be sorry if it's shameless? :wink: