Page 1 of 1

Talkative space combat tweak

Posted: Wed Aug 15, 2012 4:44 am
by spara
Hello to all.

I've been playing Oolite for a quite some time and with all the oxps it's an amazing game. It's been well over 10 years since I've been this addicted to a game. Don't know if it's a good thing, though. Thank you all.

One thing I like a lot is that you can tweak the oxp:s to your liking.

Talkative space compass gives you the name of the object when you browse objects in advanced space compass. Here is a little tweak to give you the distance too. Add the following code to the end of the script.js just before the last }.

Code: Select all

//distance to object
if (mode != "COMPASS_MODE_BASIC") {
           dist = (player.ship.position.distanceTo(whom) - whom.collisionRadius)/1000;
           player.consoleMessage(dist.toFixed(3)+" km");
}

Re: Talkative space combat tweak

Posted: Wed Aug 15, 2012 7:09 am
by Smivs
Hi spara, and welcome to the friendliest board this side of Riedquat.
Great first post - we are always impressed by a useful contribution. :)

Re: Talkative space combat tweak

Posted: Wed Aug 15, 2012 6:07 pm
by Shipbuilder
Welcome onboard Spara.

Glad you like what is being produced and as Smivs says great first post. :D

Re: Talkative space combat tweak

Posted: Wed Aug 15, 2012 7:48 pm
by spara
Thanks.

This board sure is the "friendliest board this side of Riedquat."

I wish I had more time to waste on Oolite.

Re: Talkative space combat tweak

Posted: Fri Aug 17, 2012 10:32 am
by Gimi
spara wrote:
Thanks.
This board sure is the "friendliest board this side of Riedquat."
I wish I had more time to waste on Oolite.
Waste? :shock:
I'm unable to connect the dots in that last statement. :D

Welcome, and thanks for the code snippet. Under consideration for inclusion in my personal copy.

Re: Talkative space combat tweak

Posted: Fri Aug 17, 2012 11:20 am
by Smivs
spara wrote:
I wish I had more time to waste on Oolite.
Don't worry, the time will find you :D Other things might suffer, but..... :wink:

Re: Talkative space combat tweak

Posted: Mon Aug 20, 2012 4:09 pm
by CommonSenseOTB
spara wrote:
Hello to all.

I've been playing Oolite for a quite some time and with all the oxps it's an amazing game. It's been well over 10 years since I've been this addicted to a game. Don't know if it's a good thing, though. Thank you all.

One thing I like a lot is that you can tweak the oxp:s to your liking.

Talkative space compass gives you the name of the object when you browse objects in advanced space compass. Here is a little tweak to give you the distance too. Add the following code to the end of the script.js just before the last }.

Code: Select all

//distance to object
if (mode != "COMPASS_MODE_BASIC") {
           dist = (player.ship.position.distanceTo(whom) - whom.collisionRadius)/1000;
           player.consoleMessage(dist.toFixed(3)+" km");
}
Good job spara! :D

Re: Talkative space combat tweak

Posted: Mon Aug 20, 2012 8:03 pm
by Tricky
spara wrote:
Hello to all.

I've been playing Oolite for a quite some time and with all the oxps it's an amazing game. It's been well over 10 years since I've been this addicted to a game. Don't know if it's a good thing, though. Thank you all.

One thing I like a lot is that you can tweak the oxp:s to your liking.

Talkative space compass gives you the name of the object when you browse objects in advanced space compass. Here is a little tweak to give you the distance too. Add the following code to the end of the script.js just before the last }.

Code: Select all

//distance to object
if (mode != "COMPASS_MODE_BASIC") {
           dist = (player.ship.position.distanceTo(whom) - whom.collisionRadius)/1000;
           player.consoleMessage(dist.toFixed(3)+" km");
}
I would just like to say, "I HATE YOU!", in a nice way. :lol:

I should have thought of that myself. :(

Talkative Compass should have had this as standard.

Re: Talkative space combat tweak

Posted: Mon Aug 20, 2012 9:48 pm
by JazHaz
Tested this tweak today, can report it works well. One thought, putting distances in kilometers might make Oolite distances feel a little small. Maybe Astronomical Units or ParSecs might be better.

Edit: not ParSecs as they are about 3.26 light-years each! If the km value could be multiplied by 0.01 or even 0.001 then the AU figure might be better.

Re: Talkative space combat tweak

Posted: Mon Aug 20, 2012 10:24 pm
by Tricky
JazHaz wrote:
Tested this tweak today, can report it works well. One thought, putting distances in kilometers might make Oolite distances feel a little small. Maybe Astronomical Units or ParSecs might be better.

Edit: not ParSecs as they are about 3.26 light-years each! If the km value could be multiplied by 0.01 or even 0.001 then the AU figure might be better.
Mmm... 25.6 kilometer = 0.000000171 astronomical unit whereas 1 astronomical unit = 149,597,870.691 kilometer. Maybe we could define an Oolite AU being the distance between Lave and it's star* (without [EliteWiki] Farsun or [EliteWiki] Sensible Sun OXP).

(*Not sure what that is ATM)

Re: Talkative space combat tweak

Posted: Tue Aug 21, 2012 4:54 am
by spara
Km:s make the system feel unrealistically small. Unless you imagine yourself vey small.
...Maybe we could define an Oolite AU...
This is a great idea. Would it be OU, OAU or maybe OoAU? The last one sounds funniest.

Re: Talkative space combat tweak

Posted: Tue Aug 21, 2012 7:43 am
by Smivs
<Smivs chuckles - he loves the idiosyncracies of Oolite scale>

Re: Talkative space combat tweak

Posted: Tue Aug 21, 2012 8:36 am
by Disembodied
Pick a unit with sufficiently large numbers, i.e. where far away things are several hundred units off at least, and call them "klicks", as per Starship Troopers, or something. It's US military slang for "kilometre", apparently, but by the 32nd century it could mean anything.