Docking fees revisited

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

Moderators: winston, another_commander

User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Docking fees revisited

Post by Norby »

To fix this I suggest the following into the 83. line of docking_fee.js.

Code: Select all

fee = Math.round(fee*10)/10;
Layne
---- E L I T E ----
---- E L I T E ----
Posts: 355
Joined: Sat Mar 28, 2015 11:14 pm

Re: Docking fees revisited

Post by Layne »

Alex wrote:
I've just installed HDBG and Docking Fees.
Is it normal to have a docking fee like
7.899999999999999C ?
At every port I get *. to 15 places? docking fee.
It is very not normal and even a tad eccentric. I've never installed HDBG until now; that's Norby's creation.

Can I get a bit more info? List of other relevant OXP's especially station-related ones? I see nothing in HDBG that would interfere with the docking fee script.

To check on this I just did a cursory test of both HDBG and Docking Fees together in both 1.80 and 1.82, and the fees calculate out at normal range for me, exactly half the system tech level for a normal GalCop station, sometimes higher if the station is an unusual one that requires a bribe (like commie or dictator stations). I am not seeing this error and I need more information about relevant oxps you might have. I presume you're using the latest Docking Fees via download manager, right? Not the depreciated early version linked from this thread?
Norby wrote:
To fix this I suggest the following into the 83. line of docking_fee.js.

Code: Select all

fee = Math.round(fee*10)/10;
I'd rather not tinker the code any more until I know I absolutely have to; if there's another cause I want to find out about it first. (Side note, having looked at HDBG for the first time I noticed one of the pictures has a really bright yellow sun that's right behind the yellow-colored arrival report text, and the 'glare' makes a patch of text hard to read.)

Please let me know what you can, Alex, especially if you have station-related OXP's.
Reports of my death have been greatly underestimated.
User avatar
Alex
---- E L I T E ----
---- E L I T E ----
Posts: 770
Joined: Mon Oct 06, 2008 10:49 pm
Location: Oz. The land of some gold but mostly rust

Re: Docking fees revisited

Post by Alex »

Layne wrote:
Alex wrote:
I've just installed HDBG and Docking Fees.
Is it normal to have a docking fee like
7.899999999999999C ?
At every port I get *. to 15 places? docking fee.
It is very not normal and even a tad eccentric. I've never installed HDBG until now; that's Norby's creation.
Oh I never said it was a problem, I like it and will be keeping it, maybe I'm a tad 'eccentric' Though never really been rich enough for eccentric just plain mad in my family.
LOOK OUT!!!
OOPS..
"Press Space" Commander
If you do not see "Press Space" more often than you want.. Your not trying!
Layne
---- E L I T E ----
---- E L I T E ----
Posts: 355
Joined: Sat Mar 28, 2015 11:14 pm

Re: Docking fees revisited

Post by Layne »

Alex wrote:
Oh I never said it was a problem, I like it and will be keeping it, maybe I'm a tad 'eccentric' Though never really been rich enough for eccentric just plain mad in my family.
Well, ok, but my point was that that math error isn't supposed to be happening, and the only time I ever had the same problem was during early testing of the OXP when it was sometimes reading multiple roles for the same station (usually those blasted Commie Astromines) and calculating out station fees more than once, and getting those sorts of rounding errors. In normal use, no fraction of a station fee should ever work out to less than half a credit on the nose. But without knowing if you've got another OXP in play, or if you're using the old version of the mod, or have more than one copy of it installed (say, the OXP and the OXZ at the same time), I can't be sure what's going on there. Thanks for the feedback, though!
Reports of my death have been greatly underestimated.
User avatar
ding
Harmless
Harmless
Posts: 1
Joined: Sun Jun 24, 2018 3:44 am

Re: Docking fees revisited

Post by ding »

Does not work with a "Bank of the Black Monks" though it is in the code

Code: Select all

"dockfee_monks" = ("The hushed cloisters of the Black Monks are somewhat intimidating; an air of foreboding hangs over you as you finish scanning your ship's registry and disembark."); 
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Docking fees revisited

Post by phkb »

Layne has kindly allowed me to take over as maintainer for this OXP, and a new version (1.6.2) should now be available from the download manager. Apart from fixing the Black Monks issue, it also adds a docking message for the Tionisla Orbital Graveyard station, and also prevents any more instances of the "4.2999999999" fees amounts from being deducted.
User avatar
Cholmondely
Archivist
Archivist
Posts: 5345
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Docking fees revisited

Post by Cholmondely »

Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Docking fees revisited

Post by phkb »

I've just posted an update to this OXP. Functionally, there should be no change. No new stations added or calculation changes. What I have done is made it possible for other stations, not currently configured to work with Docking Fees, to add their own fee into the system without the need to re-distribute this OXP for every change. The interface is fairly simple and is documented on the wiki (link in post above).

If anyone notices that fees aren't working the same way as before please let me know so I can visit the station in question and work out where I might have messed up the conversion.
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: Docking fees revisited

Post by Milo »

Failing to update to 1.7 from 1.6.2 via expansion manager:
23:20:27.070 [oxz.manager.error] -[OOOXZManager processDownloadedOXZ]: Downloaded OXZ does not have the same identifer and version as expected. This might be due to your manifests list being out of date - try updating it.
Version in downloaded manifest file is 2.0 not 1.7.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Docking fees revisited

Post by phkb »

D’oh! :oops:
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Docking fees revisited

Post by phkb »

Ok, I’ve updated the manifest on the DM to match the file version. It should update successfully now. Thanks for the heads up!
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 462
Joined: Mon Sep 17, 2018 5:01 pm

Re: Docking fees revisited

Post by Milo »

Update worked this time. Thanks!
User avatar
Massively Locked
Dangerous
Dangerous
Posts: 84
Joined: Tue Nov 20, 2012 12:20 pm

Re: Docking fees revisited

Post by Massively Locked »

Back from my coffee break :)

I noticed that rock hermits & con stores were charging the same as the main station. I looked into the script & saw that they should both be free. When I set their fee to any positive number- it worked just fine. It's only when set to 0 that it's not working. I tried changing the fee to "multiplier: 0", but that resulted in the same. I'm guessing that all the other stations with "fee: 0" aren't working either.

I'm on Oolite 1.9 & DF 2.0
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Docking fees revisited

Post by phkb »

Massively Locked wrote: Mon Aug 01, 2022 2:55 am
Back from my coffee break :)

I noticed that rock hermits & con stores were charging the same as the main station. I looked into the script & saw that they should both be free. When I set their fee to any positive number- it worked just fine. It's only when set to 0 that it's not working. I tried changing the fee to "multiplier: 0", but that resulted in the same. I'm guessing that all the other stations with "fee: 0" aren't working either.

I'm on Oolite 1.9 & DF 2.0
Thanks for the heads-up. I'll check it out and get an update out shortly.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Docking fees revisited

Post by phkb »

OK, update is out. Docking fees should now be working correctly at all stations.
Post Reply