Page 1 of 5

(Beta) Mining Contracts

Posted: Sat Oct 10, 2015 12:56 am
by diagoras
After discussion in this thread about Start Choices I want to present you first raw draft of new expansion pack - Mining Contracts. My goal was to make "Miner" starting choice little less hardcore while providing new kind of activity.

This expansion adds new interface to Rock Hermit stations. In this interface numerous mining corporations are offering you to gather fixed amount of minerals or alloys for them before deadline. Prices they are paying are proportional to tightness of schedule, but always below market. Be aware that if you are not working hard enough, penalties for not meeting contract terms in time can make you in debt to employer instead of receiving reward.

What is an advantage of taking mining contracts instead of selling on market? Very simple - usually there is a lot of contracts open for signing. This way you can dump way more minerals or alloys then very shallow market of Rock Hermits can bear.

Update: Have found severe bug in save-load mechanism, do not rewrite your important saves.
Update: Fixed save/load bug, v1.1 now
Update: Added tracking of cargo amounts required to complete signed contracts to the Missions screen (F5F5), v1.2 now
Update: Added compatibility with Asteroid Tweaks by spara, v1.3 now
Update: Iceteroids are not required now (thanks to Diziet Sma) and contracts for alloys made less frequent, v1.4
Update: Various improvements in interface, added possibility of waiting at the station for new contract, slightly adjusted balance, v1.5
Update: Waiting at the station for new contracts is not free now, v1.6
Update: Signing mining contract now adds Rock Hermit to your Advanced Space Compass, also some balance adjustments, v1.7
Update: Mining Beacon Descrambler addon to ASC is now purchasable at all Rock Hermits for clean commanders, v1.8
Update: Shrinked contract details screen for smaller resolutions and some balance adjustments, v1.9
Update: Obscure race condition bug in waiting for new contract squashed, also balance adjustments, v1.10
Update: Bugfix release - docking with rock hermits after witchjump do not invalidates descrambilng keys anymore, v1.11
Update: Made average contract difficulty dependent on system government type, also chaotic rock hermits are giving contracts too now, v1.12

Download link - http://bitbucket.org/diagoras/oolite/do ... s_1.12.oxz

PS I'm not sure I will be devoting much time into future support and development of this expansion, so project is open for early adoption.

Re: (Beta) Mining Contracts

Posted: Sat Oct 10, 2015 11:48 am
by UK_Eliter
I like the sound of this. I might try it out when I get time.

EDIT: And congrats on your first OXP! Advice: don't produce too many, otherwise you'll spend ages maintaining them (especially if, as was the case with me, at first you have little idea of what you doing!)

Re: (Beta) Mining Contracts

Posted: Sat Oct 10, 2015 11:50 am
by Norby
Very nice first OXP! :)

I suggest to use JSON in playerWillSaveGame:

Code: Select all

	missionVariables.MC_contracts = JSON.stringify(this.MC_contracts);
Then load in startUp:

Code: Select all

	var s = missionVariables.MC_contracts;
	if( s	&& s.length > 0 ) this.MC_contracts = JSON.parse(s);
If you have no time to go through The All-in-One Guide to OXZ Packaging and Distribution then after your fixes I can upload your oxz into the wiki and the in-game manager.

Re: (Beta) Mining Contracts

Posted: Sat Oct 10, 2015 5:48 pm
by Layne
Very clever idea-- I never had much interest in mining but it's nice to see it dusted off as a valid career option.

Re: (Beta) Mining Contracts

Posted: Sat Oct 10, 2015 7:06 pm
by diagoras
Thank you for your support, everyone! Norby, special thanks to you - recipe worked like charm, I will update download link in a moment. And I would be very grateful if you'll help me with all this local bureaucracy - next few days probably won't leave me any free time for it. By the way, it can be that bitbucket links are already direct enough for in-game manager, so some steps may be skipped probably - though, you are more experienced in deciding this.

Re: (Beta) Mining Contracts

Posted: Sat Oct 10, 2015 9:46 pm
by Norby
[wiki]Mining Contracts OXP[/wiki] got a wiki page and available in the Activities category within the manager.
I uploaded this .oxz into the wiki due to the bitbucket link give the usual error.

Re: (Beta) Mining Contracts

Posted: Sat Oct 10, 2015 10:39 pm
by diagoras
Norby wrote:
[wiki]Mining Contracts OXP[/wiki] got a wiki page and available in the Activities category within the manager.
I uploaded this .oxz into the wiki due to the bitbucket link give the usual error.
Thank you very much! I have already sent PMs to cim and maik, but when accounts will be created probably I will be unavailable myself. Meanwhile, I have bumped version to 1.2 with useful additional feature - enjoy your mining :-)

Re: (Beta) Mining Contracts

Posted: Sun Oct 11, 2015 1:45 am
by UK_Eliter
Diagoras, I'd like to check I understand the fundamentals of your expansion pack. Does it work as follows?

If I do not sign up for a mining contract, then I can sell a small amount of minerals at a price P; whereas, if I do sign up, then I can sell a larger amount of minerals for a price not much less than P?

Re: (Beta) Mining Contracts

Posted: Sun Oct 11, 2015 4:15 am
by Diziet Sma
Welcome the the Darkside clubhouse, diagoras! There's a plate of cookies over there, on the table.
diagoras wrote:
Almost forgot: For this version [wiki]Icesteroids[/wiki] are the requirement. Unfortunately, I haven't found easy way to detect its presence dynamically.
Fortunately, with OXZs, you don't need to.. simply make Icesteroids a dependency in the manifest.plist. But I see Norby already has things well in hand for you.

Re: (Beta) Mining Contracts

Posted: Sun Oct 11, 2015 5:31 am
by maik
diagoras wrote:
Norby wrote:
[wiki]Mining Contracts OXP[/wiki] got a wiki page and available in the Activities category within the manager.
I uploaded this .oxz into the wiki due to the bitbucket link give the usual error.
Thank you very much! I have already sent PMs to cim and maik, but when accounts will be created probably I will be unavailable myself. Meanwhile, I have bumped version to 1.2 with useful additional feature - enjoy your mining :-)
Anyways, you do have a wiki account now. Oh, and welcome!

Re: (Beta) Mining Contracts

Posted: Sun Oct 11, 2015 9:43 am
by diagoras
UK_Eliter wrote:
Diagoras, I'd like to check I understand the fundamentals of your expansion pack. Does it work as follows?

If I do not sign up for a mining contract, then I can sell a small amount of minerals at a price P; whereas, if I do sign up, then I can sell a larger amount of minerals for a price not much less than P?
Sort of. Average contract gives you price per ton around half of market one, while exact proportion depends on difficulty of contract - the stricter deadline is, the closer to market price per ton you receive. Please note that while you can dispatch contracted cargo by parts, you receive your payment only on closing the contract - will it be fulfilled amount, passed deadline, or manual termination.
Diziet Sma wrote:
Fortunately, with OXZs, you don't need to.. simply make Icesteroids a dependency in the manifest.plist. But I see Norby already has things well in hand for you.
Nah, you misunderstood a bit - I mean, actually Icesteroids should not be "hard" dependency. Nothing prevents my OXP to work without it - I should just give only minerals contracts in that case. Unfortunately I haven't found way to detect Icesteroids in script, so had to make it a dependency.
maik wrote:
Anyways, you do have a wiki account now. Oh, and welcome!
Thank you!


For everyone who are trying this expansion - your feedback on gameplay mechanics will be invaluable. Average and variance in size of contracts, difficulty of deadlines, reward-per-ton comparing to market - all this parameters are pulled out of a hat and most probably require fine tuning. Share your feelings on what should be adjusted and how.

Re: (Beta) Mining Contracts

Posted: Sun Oct 11, 2015 10:26 am
by Diziet Sma
diagoras wrote:
Nah, you misunderstood a bit - I mean, actually Icesteroids should not be "hard" dependency. Nothing prevents my OXP to work without it - I should just give only minerals contracts in that case. Unfortunately I haven't found way to detect Icesteroids in script, so had to make it a dependency.
Wouldn't the easiest way be to test if any entities with the role "staer9_asteroid" are in the system?

Re: (Beta) Mining Contracts

Posted: Sun Oct 11, 2015 10:49 am
by diagoras
Diziet Sma wrote:
Wouldn't the easiest way be to test if any entities with the role "staer9_asteroid" are in the system?
Interesting idea! I'll probably check it next time I'll have free time for oolite. Though, it probably won't be the case in next few days at least.

Casual reminder that expansion is open for early adoption - anyone interested enough may apply. I will gladly answer any questions regarding script.

Re: (Beta) Mining Contracts

Posted: Sun Oct 11, 2015 10:54 am
by spara
From the game mechanic perspective regarding mining as a career choice:

* Problem: Hermits accept only a small amount of minerals making it next to impossible to collect enough dough for the Ore Processor.
* General solution: Allow hermits to accept more minerals.

This oxp offers contracts that the player can accept and off to mining. I love the flavor texts of contracts as they really add to the game. However, I think that from player's point of view, it's better to go mining first (no hurry, just meditate and mine) and then visit a hermit and see if there's a contract to be filled. I can see the idea of adding some deadlines and excitement of filling them, but as a miner, I usually venture far with no time limits. You know, just me and the rocks kind of thing. So, here's a suggestion (just a suggestion, take it or leave it :D ). How about taking away the signing part? Just open contracts that extend the market giving a nice solution to the general problem. That way there would be the flavor, but no deadlines. And the open contracts could fill up over time by NPCs too (simulated or real). And when the contract is full, a shipment full of minerals could launch and head for the main station. And naturally new contracts should open over time to keep the market accepting minerals.

Re: (Beta) Mining Contracts

Posted: Sun Oct 11, 2015 11:01 am
by spara
Looks like I need to hurry, if I want to fulfill these contracts :mrgreen: :
Image