Mineral Store Reset

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

Moderators: another_commander, winston

Post Reply
User avatar
stranger
---- E L I T E ----
---- E L I T E ----
Posts: 351
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Mineral Store Reset

Post by stranger »

Mineral Store Reset

Latest OXZ update - Version 0.4.2
Updated 28 January 2019

This OXP helps to play in-system miner scenario, preventing saturation of main station market.
In vanilla game you have market capacity max 127 tons of minerals. Starting with 50+ tons of minerals already on market you have 75 tons of minerals or so to sell on main station. It gives you cash only 75*13 = 975 creds. Not sufficient sum to buy Ore Processor for 3500 creds! After market saturation you have only option to leave system through somebody’s wormhole with hope for better luck.
Now mineral store on main station market is sometimes resets. Reset flag sets to zero and increased with random increment when player ship leaves planet vicinity. Increment value depends on system productivity: systems with high GNP has more demands for raw minerals. When reset flag reaches 1 mineral store resets and reset flag sets to zero again.
Take attention: reset increment is not activated if you just collecting minerals in planet proximity. You must fly to minimum 3 planet radii distance (event this.shipExitedPlanetaryVicinity is called).
Last edited by stranger on Wed Jan 30, 2019 1:29 pm, edited 7 times in total.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4618
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Mineral Store Reset

Post by phkb »

This looks great! Can I suggest you add a manifest.plist file? Something like this:

Code: Select all

{
	identifier = "oolite.oxp.stranger.MineralStoreReset";
	version = "0.4";
	title = "Mineral Store Reset";
	required_oolite_version = "1.77";
	description = "Randomly resets mineral store for main station to avoid market saturation.";
	category = "Mechanics";
	author = "stranger";
	license = "CC-BY-NC-SA 3.0";
}
This will eliminate a couple of warning messages in the log file for Oolite versions 1.80ff. I'm assuming you'd call this "Mechanics" but feel free to change it to whatever you think is appropriate.

Suggestion: What about Rock Hermits or other stations? Should their mineral store get reset as well? It's harder to check for the same condition you're using for the main station, but worth thinking about.
User avatar
stranger
---- E L I T E ----
---- E L I T E ----
Posts: 351
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Mineral Store Reset

Post by stranger »

Is I need to change package version if I'll only add manifest.plist without editing of any code?
Mineral Store Reset v 0.4 without manifest.plist
The same Mineral Store Reset with manifest.plist - the same v 0.4 of maybe like 0.4.1?

About Rock Hermits and other stations - there are some considerations I'll try to express later.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4618
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Mineral Store Reset

Post by phkb »

stranger wrote:
Is I need to change package version if I'll only add manifest.plist without editing of any code?
I'd change the version to 0.4.1 when creating a new package - adding a manifest file is a minor change from a coding point of view, but it does help in making versions distinct.
User avatar
stranger
---- E L I T E ----
---- E L I T E ----
Posts: 351
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Mineral Store Reset

Post by stranger »

Some considerations about updating secondary markets.
Source of minerals is not bottleneck in mining business if you have unlimited pool of asteroids in system. Bottleneck is market capacity for selling minerals. But as far as I know main station is the only market in system demanding minerals. Has you any advantages in case of updating secondary markets if selling minerals on main station is more profitable and less risky?
Of course if you are not friendly welcomed on main station it would be another game. Some players may prefer ways of free opportunity (sometimes smuggler, sometimes miner etc) with resetting mineral store on black markets, but this side of Ooniverse is not for me.

Updated: Mineral Store Reset with manifest.plist included.
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1244
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Mineral Store Reset

Post by UK_Eliter »

Good stuff.

'You are exited planetary vicinity' isn't great English, though. 'You have left the planet's vicinity' would be better, though it might leave the player wondering why s/he is being told that. (I haven't seen the message in game - I haven't test the OXP. Perhaps the OXP does provide some context.)
User avatar
stranger
---- E L I T E ----
---- E L I T E ----
Posts: 351
Joined: Thu Apr 05, 2018 5:31 am
Location: Vladivostok, Russia

Re: Mineral Store Reset

Post by stranger »

UK_Eliter wrote: Tue Apr 17, 2018 3:20 pm
'You are exited planetary vicinity' isn't great English, though.
Agree with you, looks ugly. :oops:
Moreover, it is confusing. There are no any specific messages in this OXP. Sometimes I see message, when my ship approaching planet vicinity (event this.shipEnteredPlanetaryVicinity). Don't remember exact formulation. I was sure message also calls triggered by event this.shipExitedPlanetaryVicinity. Not so sure now. Maybe just memory aberration.
Thanks for feedback!
Post Reply