Station Approaches and manual docking

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

another_commander wrote:
No, sorry. The problem is that my vacation is now over (:-(), so I'm back to "not much time for coding" mode. Unless someone adds the "override for all stations default" parameter, this stays as is for now.

The good news though is that for the core game it's only three stations that need to have their entries modified.
Shame about the holidays..

Here's the patch for the global flag - it first loads and sets the default, if any (defaulting to NO) and then loads the per-station override flag, defaulting to the default.

Code: Select all

micha@mamba:~/src/oolite/trunk.20080926.2$ cat micha_globalDockingClearanceFlag.patch 
Index: src/Core/Entities/StationEntity.m
===================================================================
--- src/Core/Entities/StationEntity.m   (revision 1771)
+++ src/Core/Entities/StationEntity.m   (working copy)
@@ -757,7 +757,8 @@
        equipmentPriceFactor = OOMax_f(equipmentPriceFactor, 0.5f);
        hasNPCTraffic = [dict fuzzyBooleanForKey:@"has_npc_traffic" defaultValue:YES];
 #ifdef DOCKING_CLEARANCE_ENABLED
-       requiresDockingClearance = [dict boolForKey:@"requires_docking_clearance" defaultValue:NO];
+       requiresDockingClearance = [[UNIVERSE currentSystemData] boolForKey:@"requires_docking_clearance" defaultValue:NO];
+       requiresDockingClearance = [dict boolForKey:@"requires_docking_clearance" defaultValue:requiresDockingClearance];
 #endif
 
        if ([self isRotatingStation] && [self hasNPCTraffic])
The glass is twice as big as it needs to be.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Thanks for the patch. A slightly modified version of it has already gone into SVN.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Cool :)
The glass is twice as big as it needs to be.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

There's a bug in the current implementation.

There's a guard in StationEntity.m:acceptDockingClearanceFrom which doesn't set docking clearance if the station is not the main station.
However, in PlayerEntity.m:docked it calls the penaltyForUnauthorizedDocking for every station type.

I've also extended this concept a little by effectively putting the player ship into a queue when the player requests docking clearance and the station automatically notifying the player when his slot has arrived. Otherwise in busy systems the player would never have their clearance request accepted. Still needs a bit of tweaking, but once done I can upload the patch.

<edit>
Bug 014633 raised.
REM to Self: raise bugs in the bugtracker, not here!
</edit>
The glass is twice as big as it needs to be.
User avatar
Dr Beeb
Dangerous
Dangerous
Posts: 127
Joined: Sun Mar 23, 2008 10:28 pm
Location: Mt. Vista, Oosa, Biarge System, Galaxy 1

Re: ...

Post by Dr Beeb »

Lestradae wrote:
Could this docking approach scenario not be given some kind of switch that is "off" by default, but can be switched on by oxps?

That way, someone who deems this should not be in the core game doesn`t have to use it/see it, and whoever wants to have it in installs the oxp?

Viable compromise?

L
I hope so, the people really affected by docking fees/waiting your slot are those relatively new to the game and don't have a docking computer yet. Having finally reached the Aegis they now have to deal with traffic controllers and pay fees - not included in the price of the fuel :shock: - doesnt sound like the original game to me for new, struggling traders. A newbie coming in to dock manually is probably equivalent to CAA/FAA 'fuel emergency': stuff the holding pattern, clear the runway, and come on in - with everyone running out of your way ...
White dots were so much easier to hit
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

There aren't any docking fees - only a penalty if you don't request clearance.

The queuing mechanism is now part of the dev-trunk for anybody who wants to give it a try. Remember to set the flags in planetinfo.plist and/or shipdata.plist as the default is NO.
The glass is twice as big as it needs to be.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

As a sneak preview (still some testing to be done, and final polishing such as the readme files etc), here's a little script I've been working on for the last couple of evenings.

Doesn't yet include the docking permission request (as I don't have 1.72, only 1.712.2), but aside from that my first trials shows it works well enough.

Requires the player not to have Docking Computers installed, but other than that should work for everyone (I was going to limit it to lower ranks, but after some discussion decided not to).

Let me know what you think...
Last edited by Thargoid on Thu Oct 09, 2008 12:55 pm, edited 1 time in total.
User avatar
Micha
Commodore
Commodore
Posts: 815
Joined: Tue Sep 02, 2008 2:01 pm
Location: London, UK
Contact:

Post by Micha »

Cool, I'll give this a try tonight.

The main change to support Docking Clearance in 1.72 would be to tell the player to request DC when they reach the Buoy (and wait for it to be granted if there is existing traffic) prior to starting their docking run.

Also, should this script run in every system, or only in Lave? In the Dark Wheel novella there was a mention of the Lave docking authorities allowing for unlimited docking runs for new pilots so it'd fit in very nicely with that.
The glass is twice as big as it needs to be.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

I'm applying the general principle to all my OXPs to wait for 1.72 to be released before I go in and revise them all and make them compatible/make use of the new toys. Just so things can be in their final release state, so minimise work and updates.

I would agree though from the comments so far that's where the request will go, and it should be simple to add in (it's just another step in the script chain).

It probably goes without saying that the script is for 1.71.2 at the moment, so you'll have to do the usual player --> player.ship swap etc for 1.72 when you try it out.

Personally I think the script can run anywhere rather than just Lave (at least until you get dock comp's or annoyed with it and deinstall it). But again it's a trivial addition to the first check to make it Lave only.
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 »

Thargoid wrote:
As a sneak preview (still some testing to be done, and final polishing such as the readme files etc), here's a little script I've been working on for the last couple of evenings.
It works great, a must for every Jameson. Just a few comments:

1) The display time of 3 seconds is a little short. Other messages have a default of 4.5 seconds. And this are longer sentences, so doubling the time looks reasonable.

2) As it is mend for newbies, I would call it dockingLessons.oxp or similar.

3) And in the light of a lot of traders just hitting the buoy on launching lately, you could add a warning on launch to clear the docking area as soon as possible after launch. Maybe with a timer that checks the position a few seconds after launch and keeps running as long the player stays in the launch path.

(point 3 is not Docking control, but strongly related)
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Post by Thargoid »

All good thoughts. It's now renamed traffic control, has 5 second messages, and tells people off if they linger in the approach lane after launch (but only once, although the timer keeps running - seems that's a built-in property of commsMessage if you try to do the same one multiple times by a timer).

The link above is revised to the new file (the one in my post anyway, I can't amend the quote in Eric's), will launch it properly in the expansion pack section.
Konrad Mule
Poor
Poor
Posts: 7
Joined: Tue Oct 21, 2008 10:51 am

Post by Konrad Mule »

hmm, I'm not sure I'll ever be bothered to get docking authorisation. It's bad enough already waiting for other ships to get outta the damn way when there are people shootin at me!

But is there something that can be done to improve the docking AI? it's kinda funny seeing a Boa split itself open trying to wriggle through the docking bay but it doesn't make sense that should ever happen really. Not in the 32nd century.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

Konrad Mule wrote:
hmm, I'm not sure I'll ever be bothered to get docking authorisation. It's bad enough already waiting for other ships to get outta the damn way when there are people shootin at me!
We could always increase the penalties for unauthorized docking exponentially and stain your legal record for repeated violations. We have ways of making you comply, you know :twisted: :D

Apart from the jokes, the default game behaviour will not be changed. You will have to edit planetinfo.plist and activate the docking authorization system yourself, if you want it in your game.
User avatar
FSOneblin
---- E L I T E ----
---- E L I T E ----
Posts: 460
Joined: Tue Oct 30, 2007 12:15 am
Location: Yes, That is True

Post by FSOneblin »

another_commander wrote:
Konrad Mule wrote:
hmm, I'm not sure I'll ever be bothered to get docking authorisation. It's bad enough already waiting for other ships to get outta the damn way when there are people shootin at me!
We could always increase the penalties for unauthorized docking exponentially and stain your legal record for repeated violations. We have ways of making you comply, you know :twisted: :D

Apart from the jokes, the default game behaviour will not be changed. You will have to edit planetinfo.plist and activate the docking authorization system yourself, if you want it in your game.
For every planet? And is the way of making you comply the pain monster, or is that just for taxes?

FSOneblin
Don't panic

Now an "adult!"
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6682
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

No, not for every planet. You do it once in the universal section of planetinfo.plist, like this:

Code: Select all

universal =
	{		
		// Default docking clearance requirement for stations.
		stations_require_docking_clearance = yes;
	};
and then it applies for all stations. You can also set specific stations' clearance requirements by editing their shipdata info, so that, for example, Coriolis and Dodecs can be set to not require clearance, while Icos do. Also, by default, rock hermits will be set to not require docking clearance regardless of the universal setting.

It has been stated above already, but I emphasize that if you set the docking clearance to yes, you do not pay taxes for entering the station. You pay a penalty only if you enter without authorization. If you get authorization and dock before your slot expires, nothing will be deducted from your credits.
Post Reply