Having salvaged (using the Dredger.oxp - Salvage Missile) a small ship I was surprised to be award 429 Million Credits, it certainly made my hours of shipping between Lave and Diso look pretty paltry.
However, I now know this was a bug (fixed) in Dredgers 2.2.6, corrected in 2.2.7.
The problem is when I loaded in 2.2.7 and loaded up Oolite (1.74) , I now have 18 Thousand Trillion credits.
My problem is..how do I get back to my original "4500" credits I had amassed ? Is there an oxp that "cheats" money backwards, or can I alter the save game somehow ?
I hate the feeling of "cheating" and am disinclined to start again, can anyone help ?
Thanks
Rocky
18 Trillion Credits ! Dredger Oxp "Bug"
Moderators: winston, another_commander, Getafix
-
- Mostly Harmless
- Posts: 2
- Joined: Sun Nov 22, 2009 5:32 pm
- CheeseRedux
- ---- E L I T E ----
- Posts: 827
- Joined: Fri Oct 02, 2009 6:50 pm
To alter your savegame, simply open it up in a text editor (beware of the evil Notepad if you're on Windows) and search for <key>credits</key>
The next line reads <integer>2564510</integer>, where 2564510 is whatever # of credits you have.
Note that 2564510 translates into 256451.0 in-game, so to get 4500Cr, you need to put 45000.
Hope that helps.
PS Don't forget to make a backup before mucking around with anything, just in case.
The next line reads <integer>2564510</integer>, where 2564510 is whatever # of credits you have.
Note that 2564510 translates into 256451.0 in-game, so to get 4500Cr, you need to put 45000.
Hope that helps.
PS Don't forget to make a backup before mucking around with anything, just in case.
"Actually this is a common misconception... I do *not* in fact have a lot of time on my hands at all! I just have a very very very very bad sense of priorities."
--Dean C Engelhardt
--Dean C Engelhardt
-
- Mostly Harmless
- Posts: 2
- Joined: Sun Nov 22, 2009 5:32 pm
Thanks !
Perfect..I'm back to being happy...but poor.
Thanks a lot for your help !!!
Rocky
Thanks a lot for your help !!!
Rocky
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
I have been thinking. This bug was caused by using an undefined variable. Should not happen but it did. And sooner or later it will happen in an other oxp.
Would it be an idea to maximise the amount of credits you can award with a single JS command to one million? That way a similar bug would have less drastic results and deliberately awarding credits of this amount is not likely.
It just takes one additional check. Just added it in my version. Oolite itself can not check the integrity of the added sum as it has become a technical valid sum when added by the JS command.
Would it be an idea to maximise the amount of credits you can award with a single JS command to one million? That way a similar bug would have less drastic results and deliberately awarding credits of this amount is not likely.
It just takes one additional check. Just added it in my version. Oolite itself can not check the integrity of the added sum as it has become a technical valid sum when added by the JS command.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
I don't think it would help much. There would still be an enormous amount of money added without the scripter's intention. I don't think it changes much what happens now. It would be best if the addition of credits is not performed at all if the parameter variable(s) is/are undefined. Haven't checked the code to know how feasible this is, but I think it would be a preferred method of confronting this.Eric Walch wrote:Would it be an idea to maximise the amount of credits you can award with a single JS command to one million? That way a similar bug would have less drastic results and deliberately awarding credits of this amount is not likely.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
And I just realised it also not can work because the script does not add a value but sets the whole new value. In case the player has 5.000.000 credits, adding 10 credits would force to write a credits number of 5.000.010another_commander wrote:I don't think it would help much. There would still be an enormous amount of money added without the scripter's intention.Eric Walch wrote:Would it be an idea to maximise the amount of credits you can award with a single JS command to one million? That way a similar bug would have less drastic results and deliberately awarding credits of this amount is not likely.
This check gives no solution.
UPS-Courier & DeepSpacePirates & others at the box and some older versions