A small bug report here: if I have hypercargo installed, and I hit F5-F5 and then F8 at the main station, I get taken to the trading screen but it is missing some info:
I'll check it out. Probably some problem with HC and commodity markets. Anything in the log?
Can't reproduce it . Oolite 1.77, HC 1.10, mO 2.2.2, mO-cm 1.1. To debug further, I need your oxp list so I can replicate your install. Please post the relevant part from your log here or pm me.
With the help of laxori666 and his excellent bug report I was able to hunt the bug down and squash it. And while I was out there I spotted and squashed another bugger too .
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.playerBoughtCargo = function(commodity, units, price)
{
this.$eventTimer = new Timer(this, function() { this.$updateBoughtCargo(commodity, units, price); }, 1, -1);
}
this.$updateBoughtCargo = function(commodity, units, price)
{
... original playerBoughtCargo function
{
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.
Big thank you, realbrit, for a detailed bug report. That helped a lot .
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.
spara wrote:
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.