I'll check it out. Probably some problem with HC and commodity markets. Anything in the log?laxori666 wrote: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:
[Release] Market Observer
Moderators: winston, another_commander
Re: [Release] marketObserver 2.2.2
Re: [Release] marketObserver 2.2.2
Doesn't look like it, no. This is the tail end of me turning game on, loading, hitting F5-F5 F8, getting the bugged screen, then exiting:spara wrote:I'll check it out. Probably some problem with HC and commodity markets. Anything in the log?
Code: Select all
15:18:38.052 [startup.complete]: ========== Loading complete in 5.84 seconds. ==========
15:18:40.542 [dirty_hack]: Hacking WildShips
15:18:40.542 [dirty_hack]: Hacking Anarchies
15:18:40.542 [dirty_hack]: Hacking ConStores
15:18:40.542 [dirty_hack]: Hacking Tionisla Chronicle Array
15:18:40.542 [dirty_hack]: Hacking Space Bars
15:18:40.543 [dirty_hack]: Hacking Buoy Repair
15:18:43.535 [script.load.world.listAll]: Loaded 180 world scripts:
[...]
15:18:46.204 [script.javaScript.exception.unexpectedType]: ***** JavaScript exception (Safe_Docking 1.0.1): TypeError: worldScripts[s] is undefined
15:18:46.204 [script.javaScript.exception.unexpectedType]: ../AddOns/Safe_Docking.oxp/Scripts/SD_script.js, line 52.
15:18:47.242 [dirty_hack]: Hacking WildShips
15:18:47.242 [dirty_hack]: Hacking Anarchies
15:18:47.242 [dirty_hack]: Hacking ConStores
15:18:47.242 [dirty_hack]: Hacking Tionisla Chronicle Array
15:18:47.242 [dirty_hack]: Hacking Space Bars
15:18:47.243 [dirty_hack]: Hacking Buoy Repair
15:18:55.408 [exit.context]: Exiting: Exit Game selected on options screen.
15:18:55.411 [gameController.exitApp]: .GNUstepDefaults synchronized.
Closing log at 2013-09-03 15:18:55 -0400.
Re: [Release] marketObserver 2.2.2
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.
- Norby
- ---- E L I T E ----
- Posts: 2577
- Joined: Mon May 20, 2013 9:53 pm
- Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
- Contact:
Re: [Release] marketObserver 2.2.2
My guess: try to reduce the refresh timer from 8 to 1 second in the 463. line near the end of script.js and the info maybe shown shortly.laxori666 wrote:I get taken to the trading screen but it is missing some info
Re: [Release] marketObserver 2.2.3
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 .
New version (2.2.3)
* fixed two rare bugs
New version (2.2.3)
* fixed two rare bugs
Re: [Release] marketObserver 2.2.3
Laxori666 has tweaked the Commodity Markets OXP addon to preserve buy/sell prices over saves. Download an updated version (1.2) from the wiki.
Re: [Release] marketObserver 2.2.3
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.
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:
Code: Select all
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
{
Re: [Release] marketObserver 2.2.3
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.realbrit wrote: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.Code: Select all
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 {
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.
Re: [Release] marketObserver 2.2.3
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.
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.
Re: [Release] marketObserver 2.2.3
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.realbrit wrote: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.
Re: [Release] marketObserver 2.2.3
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 .
Big thank you, realbrit, for a detailed bug report. That helped a lot .
Re: [Release] marketObserver 2.2.3
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.
There are a few switching huds out there that should be checked for this behaviour, if they get converted to oxzs.
Re: [Release] marketObserver 2.2.3
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: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.
...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.spara wrote:There are a few switching huds out there that should be checked for this behaviour, if they get converted to oxzs.
Re: [Release] marketObserver 2.2.3
No hurry of course, but since I have updated the Aad-hud to have 4 mfds, I had to update this one too. Now this one supports huds with up to 6 mfds.
Re: [Release] marketObserver 2.2.8
New version 2.2.8
* Fixed issue with Target Reticle oxp.
* Fixed issue with Target Reticle oxp.