[Retired] Troomp OXP 0.9

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: another_commander, winston

User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: [Release] Troomp OXP 0.8

Post by Wildeblood »

This looks suspect to me:-

Code: Select all

this.$commValueTimer = new Timer(this, this.$commValueMessage, 0, 0.5);
A console message can persist for up to ten seconds, so $commValueMessage should only need to be called once every nine seconds (during the last second they fade out), not every half second. This:-

Code: Select all

this.$commValueTimer = new Timer(this, $commValueMessage, 0, 9);
- should work, provided this.$commValueMessage is also called immediately each time the frame callback detects a transaction.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: [Release] Troomp OXP 0.8

Post by Commander McLane »

Wildeblood wrote:
This looks suspect to me:-

Code: Select all

this.$commValueTimer = new Timer(this, this.$commValueMessage, 0, 0.5);
A console message can persist for up to ten seconds, so $commValueMessage should only need to be called once every nine seconds (during the last second they fade out), not every half second.
And even if the optional duration parameter of the message is used, its minimum value is 1 second:
http://wiki.alioth.net/index.php/Oolite ... oleMessage
User avatar
tinker
Deadly
Deadly
Posts: 166
Joined: Tue Jul 22, 2008 7:45 am
Location: Sachsen

Re: [Release] Troomp OXP 0.8

Post by tinker »

Changing that worked for me, thank you.
Semper Dissimilis
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Troomp OXP 0.8

Post by spara »

Thank you guys for spotting and guidance. I've had no probs on my system, but obviously my current solution seems to be an overkill. I'll fix it to the next release. Meanwhile Wildebloods advice should fix it if you're having trouble.

I've gone through the documentation countless times, but relevant stuff just slips through :roll:. These bits of info are quite essential:
Wildeblood wrote:
A console message can persist for up to ten seconds...
Commander McLane wrote:
And even if the optional duration parameter of the message is used, its minimum value is 1 second:
http://wiki.alioth.net/index.php/Oolite ... oleMessage
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Troomp OXP 0.9

Post by spara »

New version is up (0.9).

* Timers rationalized as suggested by Wildeblood.
* Integrated some nice hud elements from Wildebloods AI Trading Assistant.
* Added commonly known min, average and max prices of commodities into market screen. (in other words integrated marketAide)
* Removed reputation displays from Sothis welcome screen as I found those to be a bit out of place. Let this oxp be just about trading.

Once again, thank you for testing and commenting. Feedback is always welcome.
User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Release] Troomp OXP 0.9

Post by Solonar »

For version 1.77, this oxp is failing to calculate the average price and the profit loss for Liquors/Wines, Gem-Stones and Alien Items. It is also failing to properly calculate the profits for the cargo contracts. After doing several contracts I was thrust into negative profit rating.
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Troomp OXP 0.9

Post by spara »

Solonar wrote:
For version 1.77, this oxp is failing to calculate the average price and the profit loss for Liquors/Wines, Gem-Stones and Alien Items. It is also failing to properly calculate the profits for the cargo contracts. After doing several contracts I was thrust into negative profit rating.
Oh bugger :?. Well, this oxp needs some rewrite anyway and I have some new ideas that might now be doable :D. All I need is some time. Will be fixed, thanks for reporting.
User avatar
Wildeblood
---- E L I T E ----
---- E L I T E ----
Posts: 2286
Joined: Sat Jun 11, 2011 6:07 am
Location: Western Australia

Re: [Release] Troomp OXP 0.9

Post by Wildeblood »

Solonar wrote:
For version 1.77, this oxp is failing to calculate the average price and the profit loss for Liquors/Wines, Gem-Stones and Alien Items.
Open troomp.js, go to the this.startUp function, and change the line that defines the commodities array. Make it look like this:-

this.$commodities = ["food","textiles", "radioactives","slaves", "liquor_wines", "luxuries", "narcotics","computers", "machinery", "alloys","firearms", "furs", "minerals", "gold","platinum", "gem_stones", "alien_items"];
User avatar
Solonar
Deadly
Deadly
Posts: 174
Joined: Sun Dec 04, 2011 4:04 am
Location: Galaxy 2 - Space Truckin

Re: [Release] Troomp OXP 0.9

Post by Solonar »

Wildeblood wrote:
Solonar wrote:
For version 1.77, this oxp is failing to calculate the average price and the profit loss for Liquors/Wines, Gem-Stones and Alien Items.
Open troomp.js, go to the this.startUp function, and change the line that defines the commodities array. Make it look like this:-

this.$commodities = ["food","textiles", "radioactives","slaves", "liquor_wines", "luxuries", "narcotics","computers", "machinery", "alloys","firearms", "furs", "minerals", "gold","platinum", "gem_stones", "alien_items"];


Thank you! This has resolved the first part of my issues.
Image

SolarTech proudly presents the Plasma Turret Regulator Device Apparatus, aka the Turret Toggler
User avatar
ZygoUgo
---- E L I T E ----
---- E L I T E ----
Posts: 406
Joined: Mon Nov 17, 2008 4:15 pm
Location: Blighty

Re: [Release] Troomp OXP 0.9 (1.76.1 only)

Post by ZygoUgo »

Hi there, sorry to be the bearer of bad news, got a game save here with an (8meg) ton of Troomp spam in it, I'll up load it here for you :arrow:
https://www.box.com/s/npcp7i4q9frtgviyhcg1
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2676
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: [Release] Troomp OXP 0.9 (1.76.1 only)

Post by spara »

ZygoUgo wrote:
Hi there, sorry to be the bearer of bad news, got a game save here with an (8meg) ton of Troomp spam in it, I'll up load it here for you :arrow:
https://www.box.com/s/npcp7i4q9frtgviyhcg1
Yeah. I never quite finished this one as there was a bug in 1.77 that broke it. Then again there are other neat stuff that made me abandon this and write marketObserver. There must be quite a few bugs left in this. :D Try marketObserver.
Post Reply