Deep Space Dredger 'problem'

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

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Nijik
Competent
Competent
Posts: 32
Joined: Mon Feb 09, 2009 11:24 am
Location: Beds, UK

Deep Space Dredger 'problem'

Post by Nijik »

Evening, I've just completed a fairly routine recovery of a Mosquito Trader (ds), albeit with a bit of a scrap around the Dredger, when I got the Receiving Salvage Update telling me everything was ok and that "The D.S.D. Endeavour deposits NaN credits for the craft and its remaining cargo of NaN tons of Sim-Combat training systems.".
On checking my cash I'm now 400,000,000 credits up!
Can anyone shed any light on this?

Running Windows XP Media Centre v5.1 sp3, Oolite 1.73.4 with the following OXP's:
Amen Bricks Megaships; Anarchies 2.3; Behemoth 2.5.4; BehemothSpacewar 1.2.1; BountyScanner 1.061; Cargo_wrecks_teaser 1.5.3; Cataclysm; cobra3njx; Commies; DeepSpacePirates 1.2.3; Dictators 1.3; Dredgers 2.2.6; Executive Spaceways 2.2; Freaky Thargoids 3.1; Fuel Tank 2.2; Gates 1.00; Generation Ships 1.1; Globestation 2.0; Griff_normalmapped_ships; gwxstations; halsis; impcourier; Llama; Marett_vol1; Missile Rack 1.02; murgh_xships 1.0.1; newships; nuvipers; orbits; PAGroove_Stations 1.2.1; Pirate coves 1.2.1; Planetfall 1.23; RandomHits 1.3.6; Rock Hermit Locater 1.3; Saleza 2.1; Snoopers 1.0.1; Supercobra 1.4; Thargorn Threat 1.3.1; Transports 2.51; Trident Down 1.4; UPS-courier 1.6.1; Vector 1.3; x-ships.
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Re: Deep Space Dredger 'problem'

Post by Screet »

Nijik wrote:
On checking my cash I'm now 400,000,000 credits up!
Can anyone shed any light on this?
:shock: I don't have the salvage missiles anymore, as even a full python often brought only around 2000Cr and smaller ships often returned less money than the cost of the missile. IIRC there was an adjustment afterwards, but what you write there sounds like an immense miscalculation based on uninitialized variables....

Screet
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: Deep Space Dredger 'problem'

Post by Eric Walch »

Nijik wrote:
Evening, I've just completed a fairly routine recovery of a Mosquito Trader (ds), albeit with a bit of a scrap around the Dredger, when I got the Receiving Salvage Update telling me everything was ok and that "The D.S.D. Endeavour deposits NaN credits for the craft and its remaining cargo of NaN tons of Sim-Combat training systems.".
On checking my cash I'm now 400,000,000 credits up!
Can anyone shed any light on this?
Thanks for the report. It is a bug introduced in the latest version 2.2.6. (I added it 2 weeks ago so there are not many copies around with this bug) I have not tested but the bug must be in:

Code: Select all

this.derelictDocked = function (station)
{
    if (worldScripts.deep_space_dredger.checkSalvage(this.ship))
    {
        var maxCargo = (0 < oolite.compareVersion("1.73")) ? "availableCargoSpace" : "cargoSpaceAvailable";
        var cargo = Math.round(this.ship[maxCargo]/2.5*Math.random());
        var payment = Math.round(this.ship.mass/1000)*10 + cargo * 13;
Starting with Oolite 1.74 scripts need to use an other name for maxCargo. Therefor I added a test for oolite version, but it must not be 1.73 but 1.74. The bug is in the last function of the file dredgers.js. Change it into

Code: Select all

(0 < oolite.compareVersion("1.74"))
The same fix must also applied a few lines higher.
Now the cargo becomes undefined when using oolite 1.73 and payment becomes a completely undefined random value. (it works correct with 1.72 and trunk)

I will replace this with a new version 2.2.7 today.
Last edited by Eric Walch on Sat Nov 14, 2009 12:19 pm, edited 2 times in total.
User avatar
Nijik
Competent
Competent
Posts: 32
Joined: Mon Feb 09, 2009 11:24 am
Location: Beds, UK

Re: Deep Space Dredger 'problem'

Post by Nijik »

Screet wrote:
:shock: I don't have the salvage missiles anymore, as even a full python often brought only around 2000Cr and smaller ships often returned less money than the cost of the missile. IIRC there was an adjustment afterwards, but what you write there sounds like an immense miscalculation based on uninitialized variables....

Screet
Yeah I know what you mean, about the small payouts anyway! I had recovered a Boa recently and was disappointed with the payout, this was my last missile left so I was just using it up, glad I did now although it feels a bit cheeky...
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: Deep Space Dredger 'problem'

Post by Eric Walch »

Nijik wrote:
Yeah I know what you mean, about the small payouts anyway! I had recovered a Boa recently and was disappointed with the payout ...
It was never designed for making easy money. Revenue is based on ship mass an maxCargo. It is intentional that smaller ships are not worth the effort but specially anacondas with their large cargo holds can be lucrative. It is up to the player to decide which ships to salvage and which not.
User avatar
Nijik
Competent
Competent
Posts: 32
Joined: Mon Feb 09, 2009 11:24 am
Location: Beds, UK

Re: Deep Space Dredger 'problem'

Post by Nijik »

Eric Walch wrote:
Nijik wrote:
Yeah I know what you mean, about the small payouts anyway! I had recovered a Boa recently and was disappointed with the payout ...
It was never designed for making easy money. Revenue is based on ship mass an maxCargo. It is intentional that smaller ships are not worth the effort but specially anacondas with their large cargo holds can be lucrative. It is up to the player to decide which ships to salvage and which not.
Fair do's, just me being greedy I guess although to take up a missile slot on the off chance an Anaconda is gonna drift by is just a call we'll have to make, still love the OXP mind.
User avatar
Nijik
Competent
Competent
Posts: 32
Joined: Mon Feb 09, 2009 11:24 am
Location: Beds, UK

Post by Nijik »

Ah knew it was too good to last, just downloaded the fixed version (2.2.7) and not only has my 400,000,000 credit windfall disappeared but my original hard earned 300,000'ish credits have been swiped as well! My balance now stands at 7461 credits. :shock:
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

Post by Screet »

Nijik wrote:
Ah knew it was too good to last, just downloaded the fixed version (2.2.7) and not only has my 400,000,000 credit windfall disappeared but my original hard earned 300,000'ish credits have been swiped as well! My balance now stands at 7461 credits. :shock:
Guess it's been an overflow of the variable.

Hey, at least you're lucky that it seems to be unsigned, otherwise you might never be able to get out of your debts without editing your savefile ;)

Screet
User avatar
treczoks
Deadly
Deadly
Posts: 162
Joined: Fri Sep 25, 2009 9:32 am
Location: Königswinter, Germany

Re: Deep Space Dredger 'problem'

Post by treczoks »

Nijik wrote:
On checking my cash I'm now 400,000,000 credits up!
Can anyone shed any light on this?
On the one hand I'd say "don't complain", on the other hand you might need the money to run from the mafia now :lol:
[It/we/I] [awoke]. [Identity]:[Undetermined], [Location]:[Undetermined], [Objective]:[Destroy]. [Priorize([Determination]:[Identity])]:[High]. [Execute].
Post Reply