Reduction

General discussion for players of Oolite.

Moderators: another_commander, winston

User avatar
Gareth3377
Deadly
Deadly
Posts: 136
Joined: Sat Feb 17, 2007 11:46 pm
Location: Worcester

Reduction

Post by Gareth3377 »

Hey all - a quick query...

I'm currently playing Oolite V. 1.70 on Win Vista (running like a dream so far). Absolutely fantastic as always, but can anybody tell me how to reduce the size of the sun, or make it further away from the planet? I've tried searching the forums, but cannot find a solution.

Thanks in advance.

P.S. It's great being back in the Ooniverse - I've tried getting into X3 recently and am finding it a bit of struggle to be honest.
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 »

Hmmm. From javascript, you can reposition the sun itself using

Code: Select all

system.sun.setPosition();
If it's something you'd like to take on, you can always create a javascript based OXP that repositions the sun whenever you enter a system.

There's 'a few' pages worth of information on all you can do in the wiki. I foundthese pages expecially helpful! :)
User avatar
Gareth3377
Deadly
Deadly
Posts: 136
Joined: Sat Feb 17, 2007 11:46 pm
Location: Worcester

Post by Gareth3377 »

Unfortunately my programming skills are zero. However, how do I access the Javascript to change the position of the sun - just to make it a bit further away from the planet?
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 »

Ok, try [edit2]farsun v1.01 for size. Extract it inside the AddOns directory, and the suns will all be much further away than before.

Javascript is only accessible from OXPs: the one in the link above is the smallest OXP I've seen so far. If you want, you can have a look inside farsun.oxp/Config/script.js to see how it's done. :)
Last edited by Kaks on Wed Feb 27, 2008 11:30 pm, edited 2 times in total.
User avatar
TGHC
---- E L I T E ----
---- E L I T E ----
Posts: 2157
Joined: Mon Jan 31, 2005 4:16 pm
Location: Berkshire, UK

Post by TGHC »

Just as a matter of interest why do you want to reposition the sun?
The Grey Haired Commander has spoken!
OK so I'm a PC user - "you know whats scary? Out of billions of sperm I was the fastest"
User avatar
Roberto
---- E L I T E ----
---- E L I T E ----
Posts: 318
Joined: Sun Jun 11, 2006 1:16 pm
Location: London, UK

Post by Roberto »

So he can enter the Nexus?

Sorry, I'm being silly :)
User avatar
Gareth3377
Deadly
Deadly
Posts: 136
Joined: Sat Feb 17, 2007 11:46 pm
Location: Worcester

Post by Gareth3377 »

Heh, heh.

No, I want to replace the sun because I just think it's too close to the planet. Just wanted to add a little bit of realism (though not to much and certainly not full blown newtonian physics ho ho ho).
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 »

Gareth3377 wrote:
Just wanted to add a little bit of realism.
Good luck for that, but you're fighting a lost battle there. It's not only the size/distance of the sun, but the planet is too small, the ships and stations too big, everything much too close to each other (the average witchpoint is some 500 kilometers from the planet! Imagine a position 500 kilometers of the Earth. Would Earth be a small ball in the distance, or fill half of the sky?). And of course the fact that the speed of light (1.0 LV) is a stunning 1000 meters per second!

What I want to say: Distances and speeds are hopelessly screwed up in Oolite. Just don't remind us, and we may try to be happy with it. :?
User avatar
Hoopy
---- E L I T E ----
---- E L I T E ----
Posts: 438
Joined: Wed Oct 03, 2007 8:54 pm
Location: Durham, England

Post by Hoopy »

light speed is 300,000 km per hour. In Oolite it's something like 1 km per second (my 0.3LM ship takes about 10 seconds to get 3 km from the station before i hit the hyperspace button) which is 3,600 km per hour.

So it's roughly 100 times slower in Oolite.

But things are 100 times closer together so it still takes the 'right' amount of time to get to the sun from the planet. Earth is 8 light minutes from the sun so it'd take my ship about 25 minutes. And that's about what it takes in Oolite.

The point of all this is that it means that a given volume of space is made (100x100x100) a million times smaller so the chances of you randomly bumping into someone are a million times higher. So you get some combat and everything is fun.

I think the ships are also made 100 times bigger in each direction as otherwise you wouldn't be able to see them until you were far too close.
User avatar
The Edible Poet
Competent
Competent
Posts: 36
Joined: Sat Dec 29, 2007 8:04 pm

Post by The Edible Poet »

Gareth3377 wrote:
Heh, heh.

No, I want to replace the sun because I just think it's too close to the planet. Just wanted to add a little bit of realism (though not to much and certainly not full blown newtonian physics ho ho ho).
I can get with that. I happily have more than enough willing suspension of disbelief to allow some admissible technical anomalies to spoil my Boba Fet bounty hunting antics.

However when I jump into a system and the sun looks like it's blatantly sitting on top of the planet, it does tend to grate on my illusion just a little.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

I have not looked at the code, but I think re-locating the sun to just other co-ordinates instead of changing the whole co-ordinate system will introduce a bug.

In UPS for instance I place a station and ships with the sun co-ordinate system "SPU". I am pretty sure this will point to the old position. The same will probably happen to oolites own sun-skim traders. And there are more sun based OXP' like "sunskimmers.OXP"
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 »

Bugs: probably! :?

Afaik, spu always works with the real position of the sun, not where it should have been.

If farsun is called first, UPS should place the station in the new position.

If UPS is called first, then farsun will move the sun leaving the station behind.

Changing

Code: Select all

this.shipExitedWitchspace
to

Code: Select all

this.shipWillExitWitchspace
inside farsun should be enough to make sure farsun is called before UPS... will have a look this evening, and will let you know! :)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Afaik, spu always works with the real position of the sun, not where it should have been.

If farsun is called first, UPS should place the station in the new position.
Nice. I made the changes and it works well with the UPS solar mission. All the ships are distributed over the new tradelanes and the station is at the new sun. But it takes a wile to get there. I should have got an bonus for the distance but they just gave me 100 cr. for the job.

Meaning al OXP's will work with it as long as the use no coordinates in meters, but only relative values like UPS.
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 »

Excellent! I'm updating the farsun micro oxp as we speak.


Eric, if you want people to get a bonus for the extra distance, you can always add something like:

Code: Select all

if (worldScripts.farsun) bonus = 25 *  worldScripts.farsun.multiple;
That would multiply a 25 Cr. bonus by the sun distance multiplier inside farsun... ;)
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Kaks wrote:
Excellent! I'm updating the farsun micro oxp as we speak.
Eric, if you want people to get a bonus for the extra distance, you can always add something like:

Code: Select all

if (worldScripts.farsun) bonus = 25 *  worldScripts.farsun.multiple;
That would multiply a 25 Cr. bonus by the sun distance multiplier inside farsun... ;)
Interesting. I never thought of accessing other scripts variables this way. But when I add a bonus I would calculate it based on the exact distance. (Other OXP's could do the same)

or, alternatively I could use:

Code: Select all

this.shipWillEnterWitchspace = function()
{
   if(worldsScripts.farsun) worldScripts.farsun.factor = 1
}
When I want to add the base in the next system, and the sun is on his old spot again.
Post Reply