Page 2 of 5

Re: Docking fees revisited

Posted: Thu Apr 23, 2015 9:51 am
by Vincentz
ralph_hh wrote:
The point remains unsolved: If I own a Million, what should docking fees of 7 credits be good for?
100Cr. would be sensible, but joung Jamesons can not afford it.

Oolite Economy is a stupid thing. In reality, you would be raised on the planet, get your pocket money as a child, later with your first joy you get some real money. The expenses grow with the income, so does your understanding, how the money business works. Imagine a potential pilot. He would raise a fortune of 100.000 Cr. to pay for a beginners ship. I would imagine, that by the time he was able to earn that much, he knows a lot more about economy. He would add up to his resources until he owns 150.000Cr, to be able to a) equip his ship with some cheap but important gadgets and b) earn money by traing. No one sensible would start a trading career with just 1000Cr in the purse, just to learn that he is not able to buy vital thinks like an injector no be able to earn any money.

This said, I would not miss the early phase of the game.
I always imagine Jameson jr. inherited the ship from recently deceased Jameson sr. So junior sold his belongings, quit his daytime job and bought a one-way ticket from Lave to Orbital Station, arriving with a merely 100 credit.

Re: Docking fees revisited

Posted: Thu Apr 23, 2015 10:22 am
by phkb
Wildeblood wrote:
WTH?

Code: Select all

this.shipDockedWithStation = function (station) {
    ...
    }
That's what you get when you code in a browser window without testing. :lol: Yep, code should read as you describe. My bad.

Re: Docking fees revisited

Posted: Thu Apr 23, 2015 11:00 am
by phkb
Wildeblood wrote:
ralph_hh wrote:
The point remains unsolved: If I own a Million, what should docking fees of 7 credits be good for?
100Cr. would be sensible, but joung Jamesons can not afford it.
Which is why I suggested a 5% wealth tax, rather than a fixed fee.
I'm glad my local shopping centre doesn't charge for parking based on their patrons net wealth... although that might make the parking stations much easier to park in. :wink:

I don't think this really is about how to use up your credits. It's about adding a touch of realism to the game. It's a really small thing, really easy to add, yet it gives the game a little bit more depth. If you want it. And if you prefer, here's some code to replace the "var fee = " line for a 5% net wealth version:

Code: Select all

		var fee = player.credits * 0.05;
		if (fee > 5000) fee = 5000; // limit the fee to 5000 
That'll make docking at stations a much more painful experience!

Or here's a version that is a sliding scale up to 100 cr:

Code: Select all

		var fee = 1;
		if (player.credits >= 100) fee = 5;
		if (player.credits >= 500) fee = 10;
		if (player.credits >= 1000) fee = 50;
		if (player.credits >= 5000) fee = 100;

Re: Docking fees revisited

Posted: Thu Apr 23, 2015 11:46 am
by Day
I dislike to have to wait my turn to enter the station.
I would agree to pay a small fee to be able to enter the station without waiting.

... And that it wouldn't be called a fine, because I'm outraged that a fine and outstanding citizen such as I would be fined like a common delinquent.

That my vessel be correctly handled during my stay in a station would be charged a small fee seems quite normal.

Re: Docking fees revisited

Posted: Thu Apr 23, 2015 11:49 am
by Disembodied
To add a bit more depth, the fees could be graded by how rich the system is, and how much trade it receives. A distant port of call at the tail-end of the line will be glad to see anybody, and would probably have minimal fees. A busy hub, where there's always a queue of ships waiting to get in and docking is at a premium, would probably charge a lot more.

Re: Docking fees revisited

Posted: Thu Apr 23, 2015 12:55 pm
by Layne
phkb wrote:
I love this idea!

A couple of suggestions in the following code. (1) Check the player credit balance before deducting something. If the player doesn't have enough to cover the fee we can assume that the station has a lenient attitude to taking the fee. (2) Have some variation in the fee at different stations. I've put a few in, but there are probably others that could be included, and what happens to the fee can be adjusted as well.

You could also change the voice of the station by storing different message texts in a descriptions.plist file. That way, a mining outpost can sound different to a rockhermit or a space bar.
That's a fantastic idea, phkb-- I went to sleep last night thinking I'd do something similar with different stations to scale the fees today and even add variable flavor messages based on the level. Anything from a tech one system:
'You dock at a grungy platform, unattended, and toss half a credit into an automated hopper.'

Up to the docking message for a shiny tech-15 Dodec:
'Soft music plays as your ship is moored at a spotless berth. A brisk and uniformed attendant scans your registry and deducts a docking fee.'

I also thought about what the docking fees might change in early game-- it makes sun-skimming a more viable pastime, for one thing. If you're on a long route you'd need to plan more carefully; do you save time passing through high-tech systems or just swallow the costs? Is it worth it for your starting Jameson to shell out those six credits for Zaonce docking? Bit more thought into your movements in the early stages.

EDIT: Working on some station variable descriptions now and have moved the arrival message from console to a docking report screen. What would be a good way, code wise, to tie this message to a descriptions.plist that can easily be edited for new messages as more station types are added?

Re: Docking fees revisited

Posted: Fri Apr 24, 2015 4:57 am
by SteveKing
Disembodied wrote:
To add a bit more depth, the fees could be graded by how rich the system is, and how much trade it receives. A distant port of call at the tail-end of the line will be glad to see anybody, and would probably have minimal fees. A busy hub, where there's always a queue of ships waiting to get in and docking is at a premium, would probably charge a lot more.
Superhub must have exhorbitant fees then, 'cause I saw my first one the other night, was in the cue to dock, but no-one was docking - probably all arguing with control over the cost :D

Having said that though, the idea (to add a little immersion) is sound. Integrating it with current economics is less straight forward. Paying for the privilege of jumping the docking cue is a better way of putting 'fined', and charging a percentage of income, I think, is fine. Tying a standard fee to income level sounds fine as well.

Another view - Perhaps there could be a docking fee (perhaps a launch fee) based on value of hold cargo (appended to the same code that recognises that you are carrying illegals). The code would stop a launch if there is not enough credits in the account to pay the launch fee so you have to sell something from your hold to cover it.

Or perhaps in terms of the GST (VAT) idea, this figure is hidden, so all that needs to be stated, on say the commodities screen, is "This includes xxCr of Launch Tax" with no actual change to the trading mechanic. To keep it immersive, perhaps non-luxury items like food, minerals can state 'no tax' and luxuriy items can state '20% tax'. This then becomes a (hopefully) relatively straight forward js calculation oxp.

Re: Docking fees revisited

Posted: Sun Apr 26, 2015 11:33 pm
by Layne
After a couple of days of wrangling with the code and a lot of help (special thanks to Eris, phkb, and others on the forum) I am pleased to release my first complete OXP, Docking Fees.

What this oxp does: It adds docking fees based on tech level to all GalCop stations (the fee is 1/2 the system's tech level, between 0.5 credits for a tech 1 to 7.5 credits at tech 15) as well as some colourful docking messages chosen at random. Rock hermits and many OXP stations are also included, either as no-cost landing stations (they either offer limited services or poor trading) or in some cases costing more than the main station to dock. (Astrofactories/commie factories cost a healthy bribe to dock with because of the cheaper equipment prices, casinos cost twice as much as the main station because they're luxury retreats, etc.) I have attempted to include as many OXP stations as I could find, but the list is by no means complete due to the number of additional stations that are mission-created or in older OXPs. Any station not specifically excluded by scripting will default to the base 1/2 system tech credit docking fee and messages, so some adjustments may need to be made.

What this oxp does not do: There are no complex calculations based on system economy or the wealth of the player, only a very simple base fee that is modified in certain cases for non-GalCop stations. I will not pretend to have been able to test the extra stations comprehensively as I do not use all the oxp's that contain them. I hope I've been able to catch enough stations that fall outside of the normal range to make patching up the remaining ones simple enough, and as I've licensed this as a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) anyone who needs to modify the code as new stations are added or found can do so.

As this is my first OXP I've tried to assemble it according to the standard conventions for add-on format. Any mistakes are my own responsibility and I will amend them in another release if necessary.

I also would like to request that this thread be moved to 'Expansion Packs' as it has progressed beyond the Suggestion Box, thanks!

This download includes both an oxp and oxz version of the mod-- needless to say, please only install one or the other but not both!
http://s000.tinyupload.com/?file_id=063 ... 0283942510
EDIT: Depreciated and unappreciated download. Please use the download manager or wiki to get the latest version instead.

Please enjoy and let me know what you think!

Re: Docking fees revisited

Posted: Mon Apr 27, 2015 6:44 am
by Smivs
Congrats on the release (and your slide into the Dark Side :) ).

Re: Docking fees revisited

Posted: Mon Apr 27, 2015 8:06 am
by Day
Congratulations too :-)

Re: Docking fees revisited

Posted: Mon Apr 27, 2015 8:20 am
by Vincentz
Imho a good solution. Looking forward to being ripped of my hard earned credits ;)
Installed and testing...

Re: Docking fees revisited

Posted: Mon Apr 27, 2015 10:45 am
by Norby
Nice work!

An "use strict"; would be good in the first line of your script. I got this in trunk:

Code: Select all

12:36:57.068 [oxp-standards.deprecated] OOStandardsInternal (OODebugStandards.m:92): Script ~/.Oolite/AddOns/oolite.oxp.Layne.DockingFees.oxz/Scripts/docking_fee.js does not "use strict";
There is an enforce-oxp-standards setting in .GNUstepDefaults which help to make future-proof code.

Re: Docking fees revisited

Posted: Mon Apr 27, 2015 12:19 pm
by Diziet Sma
Well done, and welcome to the Dark Side Clubhouse! Cookies are on the plate over on the corner table.
Layne wrote:
As this is my first OXP I've tried to assemble it according to the standard conventions for add-on format.
...
This download includes both an oxp and oxz version of the mod-- needless to say, please only install one or the other but not both!

http://s000.tinyupload.com/?file_id=063 ... 0283942510
Might I suggest you take a look at The All-in-One Guide to OXZ Packaging and Distribution for preferred distribution methods.

Re: Docking fees revisited

Posted: Tue Apr 28, 2015 3:55 pm
by Layne
Update; OXZ added to Oolite.org. The download linked on this thread is depreciated, though is still useful if you prefer the addon in the old OXP format, I suppose. 'Use strict' has been added to the script per Norby's recommendation.

Re: Docking fees revisited

Posted: Sun May 03, 2015 2:19 pm
by another_commander
Moved to Expansion Pack at Layne's request.