Neo-Docklights OXP

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Neo-Docklights OXP

Post by Diziet Sma »

I don't know if it's possible or not, but this would be even more useful if the player's ship did not change the lights to red. Then it would (presumably) be possible for the player to be alerted to the imminent launch of a ship from the station by the change to red lights. I seem to recall that this was your original intent, so perhaps it's too much to ask?
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5525
Joined: Thu Jun 12, 2008 6:55 pm

Re: Neo-Docklights OXP

Post by Thargoid »

It's perfectly possible, but I'm not sure it makes so much sense. The idea is that it's from the station, and they wouldn't distinguish the player ship from any other one.

But if you want to do it, open the script file in the OXP and change line 35 from

Code: Select all

function dockingShips(entity) {return entity.isShip && !entity.hasRole("buoy") && ((entity.position.distanceTo(system.mainStation.position) + entity.position.distanceTo(this.lights.position)) < 10100)}
to

Code: Select all

function dockingShips(entity) {return entity.isShip && !entity.isPlayer && !entity.hasRole("buoy") && ((entity.position.distanceTo(system.mainStation.position) + entity.position.distanceTo(this.lights.position)) < 10100)}
Then save it and shift-restart the game. It will blind the docklights to the player ship and do something like you want I think.[/color]
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Neo-Docklights OXP

Post by Diziet Sma »

Thanks! 8) I'll give this a shot.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Neo-Docklights OXP

Post by Diziet Sma »

Ok.. overall, I like the idea of it warning about exiting ships, but having tried it now in a couple of busier systems, I see what you mean.. for instance, it will turn red if another ship drops into the slot behind you as you're docking. And, of course, every ship other than the player makes the lights change to red, which does look a little weird. I think a better way to describe what I'd like to happen was if the lights were green for all inbound ships, and changed to red for all outbound ones.

If that behaviour is possible to easily do.. just a suggestion.. perhaps it could be made into an OXPConfig setting, so the player can choose the behaviour they prefer. Or alternatively, it could be set via N/n.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
hoqllnq
Commodore
Commodore
Posts: 154
Joined: Sun Jan 08, 2006 7:32 pm

Re: Neo-Docklights OXP

Post by hoqllnq »

Sorry not sorry for reviving a years old thread...

Adding phase to the flashers that increase/decrease with distance makes them 'running lights'.
Like so:

Code: Select all

{
    "dockLights_green" = {
        subentities = (
            { type = "flasher"; position = (0.0, 0.0,  -500.0); frequency = 0.5; size = 20; color = greenColor; phase = 3.7; },
            { type = "flasher"; position = (0.0, 0.0,  -750.0); frequency = 0.5; size = 20; color = greenColor; phase = 3.6; },
            { type = "flasher"; position = (0.0, 0.0, -1000.0); frequency = 0.5; size = 20; color = greenColor; phase = 3.5; },
            { type = "flasher"; position = (0.0, 0.0, -1250.0); frequency = 0.5; size = 20; color = greenColor; phase = 3.4; },
            ...etc...
            { type = "flasher"; position = (0.0, 0.0, -9250.0); frequency = 0.5; size = 20; color = greenColor; phase = 0.2; },
            { type = "flasher"; position = (0.0, 0.0, -9500.0); frequency = 0.5; size = 20; color = greenColor; phase = 0.1; },
            { type = "flasher"; position = (0.0, 0.0, -9750.0); frequency = 0.5; size = 20; color = greenColor; phase = 0.0; }
        );
Decreasing the phase with increasing distance, like I did here, makes the lights run towards the station. Personally, I think it is a really nice effect. Maybe the red lights should run outwards.. ..but then switching between red and green could be less smooth.


(Thargoid has made 4 posts in the past 2 years, all of them indicating he has retired from OXP'ing and that his OXPs are up for adoption. If this one is not under anyone's care, and others think this is a nice idea, I wouldn't mind taking it.)
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 609
Joined: Sun Jul 21, 2013 12:26 pm

Re: Neo-Docklights OXP

Post by Astrobe »

hoqllnq wrote: Mon Oct 23, 2017 11:19 pm
(Thargoid has made 4 posts in the past 2 years, all of them indicating he has retired from OXP'ing and that his OXPs are up for adoption. If this one is not under anyone's care, and others think this is a nice idea, I wouldn't mind taking it.)
This is actually a neat hack. Obligatory bikeshedding: I would make it faster and perhaps have two or more periods going on (*). Disclaimer: I'm not using Neo-docklights anymore to make docking less easy (I'm a Flight Simulator nostalgic), but it is a really good docking help for Jamesons who can't afford a docking computer - besides the ambiance aspect.


(*) I was expecting slight luminosity variations instead of the full extinction of the flashers, but apparently the API doesn't allows that. The only option I guess would be to have a fixed weak flasher paired with a varying one - but I'm not sure it's worth the trouble and that's just me anyway.
User avatar
hoqllnq
Commodore
Commodore
Posts: 154
Joined: Sun Jan 08, 2006 7:32 pm

Re: Neo-Docklights OXP

Post by hoqllnq »

Astrobe wrote: Thu Oct 26, 2017 6:59 pm
bikeshedding:
The frequency is 0.5 so the period is 2 sec. The phase is from 0 to 3.7 sec., so almost but not quite 2 waves.

I tried doubling the step size, so the phase is from 0 to 7.4, which gives 3.7 waves in a 2 sec. period.
It looks better.

I also tried leaving the phase as is and doubling the frequency. This also results in 3.7 waves, but in 1 sec. so they travel twice as fast. I don't like this one quite so much. The lights run so fast that it looks as if the station is firing a weapon.

If you/anyone wants to try/test it, here is a modified oxz. It has the green lights running inwards at original speed and the red lights running outwards at double speed.
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 609
Joined: Sun Jul 21, 2013 12:26 pm

Re: Neo-Docklights OXP

Post by Astrobe »

Thanks for the OXZ.

Maybe a way to satisfy (almost) everyone would be to turn Neo-docklight into an equipment that would then allow different modes... But I myself wouldn't do that extra work given the current feedback level.
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 609
Joined: Sun Jul 21, 2013 12:26 pm

Re: Neo-Docklights OXP

Post by Astrobe »

This apparently triggers a z-buffer (?) bug. Or is it visible in the unmodified version? The flashers seem to be behind the station when almost aligned and close to the station. If someone can confirm, this should be reported to the dev team directly as I don't think it can be caused by a bug in the OXP itself.
User avatar
hoqllnq
Commodore
Commodore
Posts: 154
Joined: Sun Jan 08, 2006 7:32 pm

Re: Neo-Docklights OXP

Post by hoqllnq »

Astrobe wrote: Sun Oct 29, 2017 4:55 pm
If someone can confirm
Can confirm. At some point when you're close, the flashers seem clipped by te station.

In the unmodified version, something weird is going on as well, but less noticeable.
At some point you see only one more flasher and when you go through it you see more.
Post Reply