Cargo space reduced from 35t to 17t out of the blue...

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

Moderators: winston, another_commander, Getafix

User avatar
Charles
Average
Average
Posts: 13
Joined: Fri Jun 24, 2016 4:30 pm
Location: Germany

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by Charles » Mon Jun 27, 2016 7:16 pm

And it happened again. I tried Ship Respray style II (red skin), left game, went back and suddenly only 12 t... So I have now removed the Ship Respray and Ship Stoprage Helper OXP's for the time being.

User avatar
phkb
Commodore
Commodore
Posts: 2313
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by phkb » Mon Jun 27, 2016 10:25 pm

Could I get you to try again, but this time turn on the "data keys" so I can see what model you switched to. Also, did you have any passenger berths installed, or the large cargo bay?

Just to clarify: there is no need to uninstall those OXP's, as they do nothing on their own. ShipStorageHelper is a tool that can be used by other OXP's, and ShipRespray only goes into action when you tell it to, and then it disappears from view. It sets your ship's dataKey. If you don't order a respray, nothing will happen. So both OXP's can stay in place without any impact on your game.

User avatar
Charles
Average
Average
Posts: 13
Joined: Fri Jun 24, 2016 4:30 pm
Location: Germany

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by Charles » Tue Jun 28, 2016 9:59 am

phkb wrote:Could I get you to try again, but this time turn on the "data keys" so I can see what model you switched to. Also, did you have any passenger berths installed, or the large cargo bay?
Okay. Where or how do I turn on the data keys? I did have the large cargo bay and a passenger berth installed (30 t). Before I did not have a passenger berth. In any case, 18 t get taken away from max cargo space.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5394
Joined: Wed Feb 28, 2007 7:54 am

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by another_commander » Tue Jun 28, 2016 10:10 am

Is this with game version 1.82? If yes, could you try to give it a go with the latest nightly build and see if the problem persists?

User avatar
Charles
Average
Average
Posts: 13
Joined: Fri Jun 24, 2016 4:30 pm
Location: Germany

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by Charles » Tue Jun 28, 2016 10:58 am

another_commander wrote:Is this with game version 1.82? If yes, could you try to give it a go with the latest nightly build and see if the problem persists?
Yes, this happened with v1.82. Upon your recommendation, I downloaded and installed the latest nightly build that didn't end in .md5 (oolite-trunk-1.84.0.e9bfc4c-dev.linux-x86_64.tgz from June 23, I think). Nothing has changed.

What happens is this: Buying ship respray style II for Cobra Mk III, admiring its beauty, leaving station, checking cargo space, which is still intact at this time. Then pausing, F2, exit game. Starting game again, loading autosave (or even with dedicated save it's the same), checking status with double F5 or looking on market screen pressing F8. And there we have it again: 12t instead of 30t max (-5t due to berth). Before I had it filled to capacity with goods. Now 18t of them are gone. Passenger remains unaffected.

Hope this helps.

another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 5394
Joined: Wed Feb 28, 2007 7:54 am

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by another_commander » Tue Jun 28, 2016 12:20 pm

OK, with Ship Storage Helper 0.28 and Ship Respray 1.2.1, this is what I get. Please confirm that the same happens to you if you follow these steps:
1. Load a Cobra III savegame with an empty cargo hold. Make sure you have the Large Cargo Bay installed.
2. Go to the F8 screen and buy 35t of whatever.
3. Check that your F5/F5 says Cargo 35 t (35 t).
4. Go to the F3 screen and select Ship Respray.
5. Select Respray Style 2 and buy it.
6. Now, without exiting the game, check your log file. At this point, mine contains this:

Code: Select all

14:13:46.680 [Oolite Equipment Control]: The large cargo bay was removed when there wasn't enough spare space to contain it.
This is probably due to an OXP failing to validate cargo bay removal before trying it. The cargo bay has been restored to prevent inconsistencies
7. Save the game to a new file.
8. Check again F5/F5. It should still say Cargo 35 t (35 t).
9. Again without exiting the game, load the savefile you just created.
10. At this point, I find that the F5/F5 screen says Cargo 35 t (50 t). This is obviously incorrect. The equivalent of another cargo bay has been added to the cargo capacity of the ship.

For me, this happens only with Respray Style 2. Respray Styles 1 & 3 are just fine and their savegames load without issues.

I think that what you are experiencing is very much related to the above. The warning quoted earlier comes from the built-in script oolite-equipment-control.js and is there to prevent removal of cargo bays when the ship is full, which is most likely what Respray does when swapping ships.

Edit: Looks like step 2 is optional. The same increase in cargo capacity happens even if you don't buy anything.
Edit2: Seems that the issue is caused by the Respray Ship script awarding a cobra3-alternate ship for respray style 2, which is defined to have a 35t capacity by default (the others have 20t), so when the game reads the savefile and sees a cargo bay, it goes ahead and adds 15 tons to the base 35 ones.

User avatar
Charles
Average
Average
Posts: 13
Joined: Fri Jun 24, 2016 4:30 pm
Location: Germany

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by Charles » Tue Jun 28, 2016 2:54 pm

Alright, I'm getting the same (1.84.0.6810-160625-8ff36e2 (x86-64 test release) under Linux 3.19.0-32-generic):

Code: Select all

16:42:53.795 [Oolite Equipment Control]: The large cargo bay was removed when there wasn't enough spare space to contain it. 
This is probably due to an OXP failing to validate cargo bay removal before trying it. The cargo bay has been restored to prevent inconsistencies.
16:42:53.826 [LogEvents]: Player bought new ship: Cobra Mark III 9485
Following through with step 10, I just get Cargo 17 t (17 t), and nothing on top of 35 t.

User avatar
phkb
Commodore
Commodore
Posts: 2313
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by phkb » Tue Jun 28, 2016 11:04 pm

another_commander wrote:which is defined to have a 35t capacity by default (the others have 20t)
Wha?! :shock: Ok, I didn't see that one coming. I've put a fix into the next version of ShipRespray to address this issue.
Charles wrote:Where or how do I turn on the data keys?
When you open the ship respray selection screen, one of the menu items is "Show data keys" which turns on an additional piece of info on the screen. That data key will allow me to see which version of the Cobra you've selected. In the core game there will be about 3 versions of the Cobra Mk3, but with additional ship packs (like the ClassicShips and ClassicVarietyPack) there could be lots more.

I'm at work at the moment, but I'll test out the procedure you outlined shortly and see what my results are.

User avatar
phkb
Commodore
Commodore
Posts: 2313
Joined: Tue Jan 21, 2014 10:37 pm
Location: [p]laying [h]ard and [k]icking [b]utt somewhere in G7...

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by phkb » Wed Jun 29, 2016 10:10 pm

OK, you'll be happy to note that I found the problem! The error is actually in the Classic Shipyard OXP, where the Cobra 3 player template is defined as having a maximum cargo of 2t. 2t + the cargo cargo bay of 15t gives you the 17t magic number.

I've uploaded a new version of ShipRespray which fixes this bug by including a shipdata-overrides.plist. I'll be sending the bug report through to smivs. Thanks for reporting!

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Disunited Kingdom
Contact:

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by Smivs » Thu Jun 30, 2016 7:06 am

Thanks for the reports - v1.1 of classicShipyard is now available via the manager.
Commander Smivs, the friendliest Gourd this side of Riedquat.

User avatar
Charles
Average
Average
Posts: 13
Joined: Fri Jun 24, 2016 4:30 pm
Location: Germany

Re: Cargo space reduced from 35t to 17t out of the blue...

Post by Charles » Thu Jun 30, 2016 5:28 pm

phkb wrote:OK, you'll be happy to note that I found the problem! The error is actually in the Classic Shipyard OXP, where the Cobra 3 player template is defined as having a maximum cargo of 2t. 2t + the cargo cargo bay of 15t gives you the 17t magic number.

I've uploaded a new version of ShipRespray which fixes this bug by including a shipdata-overrides.plist. I'll be sending the bug report through to smivs. Thanks for reporting!
Good job! Thanks a lot!

Post Reply