1.73.4-test : false number displayed for cargo transport fee

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
snork
---- E L I T E ----
---- E L I T E ----
Posts: 551
Joined: Sat Jan 30, 2010 4:21 am
Location: northern Germany

1.73.4-test : false number displayed for cargo transport fee

Post by snork »

hej

Oolite 1.73.4-test on WinXP(32),
Pentium 2, Geforce2 gts (no shader)
oxps : pods, cargo_wreck_teaser, yah, asteroid storm, hawksound, hyperradio, snark

See the picture. When delivered, it does pay 594.4 Credits, which is almost exactly eight times as much as those 74.40962 on display.

Image

The savegame is with a Cobra Mk.3, and somethimes (but not always, the screenshot is with Python bought) when buying a Python so I can accept the contract, on carrier market revisit the number has changed to the mostly correct 594,- credits instead of the 74.40962 credits.

savegame : http://www.filedropper.com/shipyard
Oh, the filehoster renamed the file to .xml instead of .oolite-save. Well. :|


I have not run into any strange numbers before or after.

a sidenote : when I close Oolite, and then in windows explorer rename a savegame (so I remember which one I why want to keep), in Oolite it still appears under it's old name.
The preferred way to report incorrect behaviour, broken scripting methods and non-functional property list keys is now through the BerliOS bug tracker.
Well I looked at it, but since I need to register with it first, I instead post it here. :?

well, have a nice sunday
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 »

Hello Snork,

Good catch. I think it was not reported before. It was annoying me also for a long time. It could be that this error was present for a long time. But it just happened I fixed this particular bug a few weeks ago in trunk.

The problem was it used a rounding routine that rounded numbers on two significant values with the remainder turning into zeros. However, this formula was written with integers in mind. And because integers below 100 don't needed the rounding, it did nothing with those low numbers.

However, for the fee calculation were real numbers used for rounding and values below 100 now were displayed with full decimal part.
sidenote : when I close Oolite, and then in windows explorer rename a savegame (so I remember which one I why want to keep), in Oolite it still appears under it's old name.
Yes that is sometimes a bit annoying. It is because the commander name is also saved in the saved game and it is this internal name that is displayed, not the filename.
Something similar happens when you make a copy of your commander, open that file and just save it without renaming the commander: you will overwrite your original file, not the copy. :cry: This has cost me some saved games already, while trying to work with a copy. :x
User avatar
snork
---- E L I T E ----
---- E L I T E ----
Posts: 551
Joined: Sat Jan 30, 2010 4:21 am
Location: northern Germany

Post by snork »

Eric Walch wrote:
Good catch. I think it was not reported before.
This is hard to tell for me as a user, with the board not supporting "search : in topic titles only".
I bet the most of any questions I might want to ask sooner or later have been asked and answered before, but I have trouble to find the topics. :?
I know I'm no good with searching, but still...
Eric Walch wrote:
Yes that is sometimes a bit annoying. It is because the commander name is also saved in the saved game and it is this internal name that is displayed, not the filename.
Ah, good to know. So I can edit that and fine it is. :)
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: 1.73.4-test : false number displayed for cargo transport

Post by Commander McLane »

snork wrote:
See the picture. When delivered, it does pay 594.4 Credits, which is almost exactly eight times as much as those 74.40962 on display.
Of course it pays 594.4 cr, but not because that's "Pays" times eight, but because it is 520 + 74.4.

This is how contract payments generally work. On taking the contract you have to pay the premium (in this case 520 cr), and on delivery you get this money back plus the "pay", which is your profit. So for the 160 tons Narcotics contract visible on your screenshot you would first have to pay 11120 cr (which you could afford with your current cash), and would get paid 16420 cr on delivery, which is 11120 + 5300.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: 1.73.4-test : false number displayed for cargo transport

Post by Eric Walch »

Commander McLane wrote:
This is how contract payments generally work.
Yes, and this is quite different than passenger transports were the pilot first receives an advanced fee and on successful delivery the fee itself. So for passengers you can add up both values to see your total profit while for contracts, only the last value is your profit.

Some time ago I tried to figure out if a Jameson can make an earning out of just collecting the advance fees from the passengers and than ignore them. At the end of the timeline they just will leave the ship making room for the collection of another passenger.

A passenger cabin costs 800 cr. Some passengers pay a Jameson 1000 credits advance. So you have an immediate earning of 200 cr. But for such a fee the passenger will occupy the cabin for about 30 days. For that next passenger, you already have the cabin and you can put the 1000 credits immediately in your pocket.

I did not play it to the end, but I am sure that without the 5 ton passenger cabin you have more capacity for trading and could make more money out of the 5 ton cargo space in 30 days than 1000 cr, so it is probably not an lucrative way to earn money fast.
Post Reply