Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

[Retired] In-System Market Restore

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

Moderators: another_commander, winston

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] In-System Market Restore 1.2

Post by spara »

laxori666 wrote:
This is a great idea! I have installed the In-System_Market_Restore_1.2.oxp but it doesn't work 100% with commodity markets. In particular I have:

- marketObserver_2.2.2.oxp
- mO-Commodity_Markets_1.1.oxp

What seems to happen is that the base price is stored and doesn't change, but the adjustment for the buy & sell is re-generated when the game is loaded. So this is a humble feature request..
Hmmm. That would require mO-Commodity_Markets to save the commodities' pricefactors on save and load them on startup. Quite an easy tweak, but not nr. 1 on my todo list. I'll implement it some time :) .
laxori666
Competent
Competent
Posts: 37
Joined: Mon Sep 02, 2013 3:45 am

Re: [Release] In-System Market Restore 1.2

Post by laxori666 »

spara wrote:
Hmmm. That would require mO-Commodity_Markets to save the commodities' pricefactors on save and load them on startup. Quite an easy tweak, but not nr. 1 on my todo list. I'll implement it some time :) .
Wow that was really easy! I just did it, hah. I had to rename the folder to get the game to load it again but it seems to work... here's a pastebin for the modified file.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Release] In-System Market Restore 1.2

Post by Diziet Sma »

laxori666 wrote:
I had to rename the folder to get the game to load it again but it seems to work...
That's what shift-starts are for..

Oolite didn't notice your change because it builds a cache of all the scripts, etc. It makes for faster game starts that way. But it means Oolite won't notice any changes you make until it rebuilds the cache. (Oolite automatically rebuilds the cache if it notices an OXP has been added or removed. That's why renaming the folder worked for you.)

A simpler method is to just hold down the Shift key when you start the game, hold it down until you see the spinning Cobra MkIII, and Oolite will rebuild its' cache.
Last edited by Diziet Sma on Wed Sep 04, 2013 4:57 pm, edited 2 times in total.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
laxori666
Competent
Competent
Posts: 37
Joined: Mon Sep 02, 2013 3:45 am

Re: [Release] In-System Market Restore 1.2

Post by laxori666 »

Diziet Sma wrote:
laxori666 wrote:
I had to rename the folder to get the game to load it again but it seems to work...
That's what shift-starts are for..

Oolite didn't notice your change because it builds a cache of all the scripts, etc. It makes for faster game starts that way. But it means Oolite won't notice any changes you make until it rebuilds the cache. (Oolite automatically rebuilds the cache if it notices an OXP has been added or removed. That's why renaming the folder worked for you.)

A simpler method is to just hold down the Shift key when you start the game, hold it down until you see the spinning Cobra MkIII, and Oolite will rebuild its' cache.
Oh ok, great. I was wondering if there was an easier way - thanks!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Release] In-System Market Restore 1.2

Post by Diziet Sma »

Old hands at editing Oolite OXP files edit their GNUstepDefaults file and set 'always-flush-cache' to YES. This is known as "putting a brick on the shift key". :mrgreen:
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [Release] In-System Market Restore 1.2

Post by Cody »

Diziet Sma wrote:
Old hands at editing Oolite OXP files edit their GNUstepDefaults file and set 'always-flush-cache' to YES. This is known as "putting a brick on the shift key".
Even without the brick, it becomes automatic when one has tinkered - as does checking the log after every flight.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Gimi
---- E L I T E ----
---- E L I T E ----
Posts: 2073
Joined: Tue Aug 29, 2006 5:02 pm
Location: Norway

Re: [Release] In-System Market Restore 1.2

Post by Gimi »

Diziet Sma wrote:
Old hands at editing Oolite OXP files edit their GNUstepDefaults file and set 'always-flush-cache' to YES. This is known as "putting a brick on the shift key". :mrgreen:
Or they always hold down the shift key every time they launch Oolite because that is just how you start Oolite. Of course, one day, having forgotten all about it, they start wondering why Oolite is started this way.
"A brilliant game of blasting and trading... Truly a mega-game... The game of a lifetime."
(Gold Medal Award, Zzap!64 May 1985).
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] In-System Market Restore 1.2

Post by spara »

laxori666 wrote:
spara wrote:
Hmmm. That would require mO-Commodity_Markets to save the commodities' pricefactors on save and load them on startup. Quite an easy tweak, but not nr. 1 on my todo list. I'll implement it some time :) .
Wow that was really easy! I just did it, hah. I had to rename the folder to get the game to load it again but it seems to work... here's a pastebin for the modified file.
:shock: "Impressive. Most impressive." :D I'll put that into mO-Commodity_Markets and release a new version.
laxori666
Competent
Competent
Posts: 37
Joined: Mon Sep 02, 2013 3:45 am

Re: [Release] In-System Market Restore 1.2

Post by laxori666 »

spara wrote:
laxori666 wrote:
Wow that was really easy! I just did it, hah. I had to rename the folder to get the game to load it again but it seems to work... here's a pastebin for the modified file.
:shock: "Impressive. Most impressive." :D I'll put that into mO-Commodity_Markets and release a new version.
Coolio! This community is pretty great. This game is a living and breathing entity. The tinkering possibilities are endless =D.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16063
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: [Release] In-System Market Restore 1.2

Post by Cody »

laxori666 wrote:
The tinkering possibilities are endless.
Here... have a cookie!
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Release] In-System Market Restore 1.2

Post by Diziet Sma »

Cody wrote:
laxori666 wrote:
The tinkering possibilities are endless.
Here... have a cookie!
And welcome to what we refer to as "The Darkside" of Oolite! :)
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
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] In-System Market Restore 1.2

Post by spara »

When saving the game at a secondary station on Oolite 1.79, the game saves the state of that station's market. This clashed with this oxp, especially with hermits. I have done what I could and uploaded a new version (1.3) to the expansion manager. It's far from perfect, as same types of stations get their markets shuffled on load, but I still think it's better than totally resetting them.
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: [Retired] In-System Market Restore

Post by spara »

I'm taking this OXP off because so many oxp stations have been upgraded to use the populator in 1.80 and that way the core game handles the saving and restoring of the markets.
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6311
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: [Retired] In-System Market Restore

Post by Diziet Sma »

I'd suggest perhaps you consider leaving it available for those that stay with 1.77.1 for whatever reasons..
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
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: [Retired] In-System Market Restore

Post by spara »

Diziet Sma wrote:
I'd suggest perhaps you consider leaving it available for those that stay with 1.77.1 for whatever reasons..
Yep. It's still available from the wiki. I moved it to the "OXPs with Problems" section in the main list. That's for broken and deprecated OXPs I believe.
Post Reply