I believe I have found a bug. I'm seeing a problem with event dependency when I dock at a station. I'm running the latest Trunk build for 1.79. The playerBoughtCargo function in the mo_CommodityMarket oxz is firing and completing before the same function in marketObserver has had time to execute. The result is that the buy log is left showing double the quantity of goods bought as the sale and re-buy under moCommodityMarket is processed before the original buy.

When I dock at a station I then get a message that I lost X amount of cargo because the buy log quantity and the manifest quantity are different. This means that my trader rating is constantly moving in a negative direction.

EDIT:

I have resolved the issue by updating the playerBoughtCargo function in the script.js file in oolite.oxp.spara.mo_commodity_markets.oxz to the following:

I believe I have found a bug. I'm seeing a problem with event dependency when I dock at a station. I'm running the latest Trunk build for 1.79. The playerBoughtCargo function in the mo_CommodityMarket oxz is firing and completing before the same function in marketObserver has had time to execute. The result is that the buy log is left showing double the quantity of goods bought as the sale and re-buy under moCommodityMarket is processed before the original buy.

When I dock at a station I then get a message that I lost X amount of cargo because the buy log quantity and the manifest quantity are different. This means that my trader rating is constantly moving in a negative direction.

EDIT:

I have resolved the issue by updating the playerBoughtCargo function in the script.js file in oolite.oxp.spara.mo_commodity_markets.oxz to the following:

This gives a second for all other playerBoughtCargo events to process before processing the moCommodityMarket event.

Nice fix . I wonder why this issue has not surfaced before. I'll be updating the oxp with the fix later. Thanks for reporting and for the fix.

Edit: Bugger . Something's still wrong after the fix. Try a fresh start and buy and sell something. I'll have to dig deeper. Don't have time at the moment though. I'll be back with it later or in a couple of days. It might be that Market Observer needs a stab rather than Commodity Markets.

I'd seen the "Cargo Lost" messages on docking before but they did not seem to affect anything so I had ignored them. Now I have a trader rating to protect I started looking!

The fix works for me as far as reporting the correct profit/loss on a transaction. I started a new commander, bought food and textiles, launched, turned around and docked with Lave station. No cargo lost report, no change to the trader rating, correct calculation of profit/loss if I sell the cargo.

However the fix has now introduced an issue on the purchase screen where the quantity, price and player credits do not get updated accurately. I'll continue to look.

I'd seen the "Cargo Lost" messages on docking before but they did not seem to affect anything so I had ignored them. Now I have a trader rating to protect I started looking!

The fix works for me as far as reporting the correct profit/loss on a transaction. I started a new commander, bought food and textiles, launched, turned around and docked with Lave station. No cargo lost report, no change to the trader rating, correct calculation of profit/loss if I sell the cargo.

However the fix has now introduced an issue on the purchase screen where the quantity, price and player credits do not get updated accurately. I'll continue to look.

There seems to be a core bug in effect here. I'll report it and wait for a fix and then I'll look deeper. Meanwhile I suggest not using Commodity Markets oxp. Market Observer should work just fine.

There was no bug in the core, but a feature I was not aware of. I'm wiser again, thanks to cim . I have fixed the issue realbrit reported and now there are new versions of both Market Observer (2.2.5) and Commodity Markets (1.2.2) available from the expansion manager. Both need to be updated for Commodity Markets to work properly.

Another Oolite 1.79/1.80 glitch fixed. MFDs are meant to work so that if you dock and launch the game remembers what was shown. That breaks if someone uses hud switching and switches to a hud that does not have MFDs defined. Even though no MFDs are shown while docked, they must be defined. Market Observer did exactly that, it switched to it's own hud that had no MFDs defined in the market screen and the game forgot the MFD layout even though the correct HUD was restored.

This has now been fixed. Version 2.2.6 defines two bogus MFDs to the market screen and now the game remembers the layout. Get the new version from the expansion pack manager.

There are a few switching huds out there that should be checked for this behaviour, if they get converted to oxzs.

This has now been fixed. Version 2.2.6 defines two bogus MFDs to the market screen and now the game remembers the layout. Get the new version from the expansion pack manager.

Probably no hurry at this stage, but it might be worth defining more than two for this sort of thing, since there's no limit on the number of MFDs a HUD can define, and you want to have at least as many as any real HUD.

Quote:

There are a few switching huds out there that should be checked for this behaviour, if they get converted to oxzs.

...and a quick note on this, hopefully without derailing the whole thread: from 1.79 you can bind HUD elements to particular alert conditions, so some switching HUDs may be simplified to non-switching HUDs.