Page 4 of 5

Re: Docking fees revisited

Posted: Sun Sep 13, 2015 10:00 am
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;

Re: Docking fees revisited

Posted: Sun Sep 13, 2015 11:33 am
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.

Re: Docking fees revisited

Posted: Sun Sep 20, 2015 3:34 am
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.

Re: Docking fees revisited

Posted: Sun Sep 20, 2015 11:10 am
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!

Re: Docking fees revisited

Posted: Sun Jun 24, 2018 4:02 am
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."); 

Re: Docking fees revisited

Posted: Sun Jul 01, 2018 8:38 pm
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.

Re: Docking fees revisited

Posted: Mon May 31, 2021 7:48 am
by Cholmondely

Re: Docking fees revisited

Posted: Fri Jul 16, 2021 7:08 pm
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.

Re: Docking fees revisited

Posted: Sat Jul 17, 2021 3:22 am
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.

Re: Docking fees revisited

Posted: Sat Jul 17, 2021 3:59 am
by phkb
D’oh! :oops:

Re: Docking fees revisited

Posted: Sat Jul 17, 2021 4:02 am
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!

Re: Docking fees revisited

Posted: Sat Jul 17, 2021 4:25 am
by Milo
Update worked this time. Thanks!

Re: Docking fees revisited

Posted: Mon Aug 01, 2022 2:55 am
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

Re: Docking fees revisited

Posted: Mon Aug 01, 2022 3:30 am
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.

Re: Docking fees revisited

Posted: Mon Aug 01, 2022 4:19 am
by phkb
OK, update is out. Docking fees should now be working correctly at all stations.