Page 1 of 4

Mining OXP

Posted: Mon Jul 12, 2010 12:35 pm
by docwild
I'll start this thread to see if there is any interest or if it has been done before but I'm thinking of something along the lines of creating large asteroids between 1.5 and 3 AUs in every system. These asteroids would be large and permanent. Placing them randomly would be the easiest solution, with a savegame dictionary for every asteroid found, so they can be added to the compass and re-found giving the illusion of consistency. The proper way to do it would be to place them based on the seed numbers.

New equipment would be needed to, a pylon mounted asteroid claim missile and an asteroid scanner. With the scanner it would tell you if the asteroid had already been claimed and of what value it is and if not the missile would be used. Once claimed an asteroid would generate an income based on its value. A way to steal a claimed asteroid should also be possible (a second kind of missile?), but illegal, and this would mean that any claimed mines would face a small chance of being lost every 24 hours. A possible way to steal it would be to shoot the asteroid for a while until the claim has gone (something else to shoot at). Payments from asteroids could be paid to commanders every 7 days, with some kind of update on their held or lost claims. MiningAIs could be created to look after their 'claims' and revealing clues as to asteroid locations.

I've looked cursorily at the scripting but I think it should be possible given the available methods, relatively simple. I can't promise to give a lot of time to it but the idea is now out there so please tell me what you think.

Posted: Mon Jul 12, 2010 12:45 pm
by Disembodied
It's an interesting idea, but one criticism might be that it's a bit impersonal: specifically, just getting money posted to you after you've staked your claim seems a bit hands-off. It might be more engaging if the player had to collect their earnings in person.

How about if the missile delivered mining robots? After a certain amount of time has passed, the asteroid is replaced by an identical asteroid with a Rock-Hermit-esque docking port. You know where the asteroid is, and you have the access codes (this could be done using something like the docking clearance system, maybe). When you go back and dock you can get in and "buy" whatever has been mined since your last visit for 0 Cr. The longer you leave it between visits, the more there is to collect when you go back again.

"Claim-jumping" would be like hacking: you'd crack someone else's automine code, sneak in and loot the place.

Of course, such automines might well attract the attention of opportunist pirates: you might launch from your mine straight in to a pirate ambush. :twisted:

Posted: Mon Jul 12, 2010 12:50 pm
by Smivs
Disembodied wrote:It's an interesting idea, but one criticism might be that it's a bit impersonal: specifically, just getting money posted to you after you've staked your claim seems a bit hands-off. It might be more engaging if the player had to collect their earnings in person.
This sounds better, but then you'd have to stay in the same system, or at least re-visit it regularly. I suppose if you had several mines in adjacent systems it would make sense.
How would you know when your asteroid is mined-out?
Overall though, I like the idea. :)

Posted: Mon Jul 12, 2010 1:53 pm
by Disembodied
Smivs wrote:This sounds better, but then you'd have to stay in the same system, or at least re-visit it regularly. I suppose if you had several mines in adjacent systems it would make sense.
How would you know when your asteroid is mined-out?
Overall though, I like the idea. :)
I was thinking that it would be something you could re-visit every now and then: you'd plant the automine, then take off elsewhere. You'd maybe circle around and come back again in another half-dozen or dozen jumps and check to see what it had dug up for you.

I don't know if the mines ever would be mined-out, to any practical extent: even a small asteroid will contain a lot of stuff. Maybe though you'd have to lose all claims (or assume they'd be stolen off you) when you make a Galactic jump.

Posted: Mon Jul 12, 2010 2:20 pm
by Cmd. Cheyd
Disembodied wrote:You know where the asteroid is, and you have the access codes (this could be done using something like the docking clearance system, maybe). When you go back and dock you can get in and "buy" whatever has been mined since your last visit for 0 Cr. The longer you leave it between visits, the more there is to collect when you go back again.

"Claim-jumping" would be like hacking: you'd crack someone else's automine code, sneak in and loot the place.
Talk with PhantorGorth. He may have something that could be of help to whoever starts this OXP project. :)

Posted: Mon Jul 12, 2010 2:42 pm
by myst.RAVEN
Intriguing. I'm in favour of something that lets the player essentially acquire real-estate - all characters are currently pretty much homeless, and though that does have a certain romantic appeal, there's also something to be said (in my opinion) for options for a more settled sort of character.

As for how the income is acquired: I think a combination of both could work. The mine could yield a, say, monthly revenue stream, but if visited in person the yield could be higher (hands-on management, cutting out the middle-man, whatever.) This would mean that a player could have far-flung holdings, and not spend their game time traversing an inspection circuit (which, I must say, would surely drive me to kill myself!), yet reward the diligence and presence of mind of visiting an owned venture.

The concept, I think, has merit, and that's half the battle. The nitty-gritties, of course, are the other half...

Posted: Mon Jul 12, 2010 2:46 pm
by docwild
I think visiting to collect is better, I'm not sure about a docking port appearing but it would possibly make a lot of things easier. Perhaps the asteroid scanner could take up the function when the player is in range; maybe dumping alloys or precious metals into the hold (star trek transporter style?? or spawning cargo pods nearby for scooping). This gives another pirating opportunity, find a claimed asteroid and lay in wait for the owner to collect or steal the spawned pods. I was thinking that the more you visited your mined asteroids the less chance of them being jumped so you could have a portfolio of asteroids which you visit to collect and protect. When the visits stop, the earnings and eventually the ownership will too. This could be balanced to prevent huge asteroid portfolios earning millions of credits based on the amount of systems you can possibly visit in a given time, could be comparable to passenger contracts. I'd imagine the higher tech and economy systems would have less unclaimed asteroids than the others.

Perhaps even, when a precious metals asteroid is found its value degrades over time eventually spewing out alloys only, perpetually. Or every asteroid produces everything in decreasing probabilities for gems and such so stealing asteroids isn't as profitable as finding new ones. I doubt asteroids will ever dry up, space is big after all.

"Space is big. You just won't believe how vastly, hugely, mind- bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space." - Douglas Adams

Posted: Mon Jul 12, 2010 2:55 pm
by myst.RAVEN
Ah yes, you've hit on an interesting and important subtlety there - the systems' interaction with government and economy types. I think, for example, in anarchies asteroids might change hands often, but consequently be richer, as they haven't had the chance to be exploited properly. In a feudal system, the efficiency with which it has been mined might be higher, but wouldn't be too high - feudal societies were not known for their efficiency; however, they might be somewhat more tightly controlled. On the other end of the scale, of course, in a developed corporate state, the paperwork has always been bulletproof, and so perhaps claims have been retained by their "rightful owners" for long periods, even reverting back after any chicanery has been resolved...

This aspect could lend depth to the concept, in a subtle yet hopefully not too transparent manner.

Posted: Mon Jul 12, 2010 3:03 pm
by Disembodied
docwild wrote:I think visiting to collect is better, I'm not sure about a docking port appearing but it would possibly make a lot of things easier. Perhaps the asteroid scanner could take up the function when the player is in range; maybe dumping alloys or precious metals into the hold (star trek transporter style?? or spawning cargo pods nearby for scooping). This gives another pirating opportunity, find a claimed asteroid and lay in wait for the owner to collect or steal the spawned pods. I was thinking that the more you visited your mined asteroids the less chance of them being jumped so you could have a portfolio of asteroids which you visit to collect and protect. When the visits stop, the earnings and eventually the ownership will too. This could be balanced to prevent huge asteroid portfolios earning millions of credits based on the amount of systems you can possibly visit in a given time, could be comparable to passenger contracts. I'd imagine the higher tech and economy systems would have less unclaimed asteroids than the others.

Perhaps even, when a precious metals asteroid is found its value degrades over time eventually spewing out alloys only, perpetually. Or every asteroid produces everything in decreasing probabilities for gems and such so stealing asteroids isn't as profitable as finding new ones. I doubt asteroids will ever dry up, space is big after all.

"Space is big. You just won't believe how vastly, hugely, mind- bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space." - Douglas Adams
I'd prefer spawning cargo pods to just having material appear in your hold ... the latter doesn't seem very E/Oolitey. :) But I think quietly replacing the asteroid, the next time the player jumps back in, with an identical one that has a dock would be easier. Or maybe you could borrow Thargoid's technique from Planetfall and let the players "land on the surface".

I like the idea that the more you visit, the less likely you are to be claim-jumped – maybe that could be counterbalanced by the more you visit, the more likely you are to attract the attentions of pirates.

There should definitely be a risk-reward balance: like you say, there should be more, and better, rocks in the lower-tech and (especially) the more dangerous systems. If you want to find an unclaimed, high-value rock, you'll need to go exploring in the Anarchy systems!

A lot of the rocks will be off the main routes, though, so – for people not running the Deep Space Pirates OXP – you might want your OXP to add in some off-lane pirates and/or competitors.

Posted: Mon Jul 12, 2010 3:44 pm
by DaddyHoggy
How about as you approach the surface stored pods are given a micro burst of magnetic impulse so that they drift off the surface into your general direction - perfect opportunity for the pirates to attack as you scoop up your cargo (a cargo pod sized dock that "launches" your earnings?)

Posted: Mon Jul 12, 2010 7:18 pm
by Switeck
Random Hits has weird auto-miners on the asteroids around the space bar.
Rock Hermit Locater could locate your asteroids if you added their type to its locater.
You'd need to make your mod some sort of mission type so the game remembers to place the same asteroids in the same system on revisit.

Posted: Thu Jul 22, 2010 7:11 pm
by docwild
http://www.box.net/shared/5i3h37u1ay

Mines are placed in the system randomly for every new visit. Mines will persist in their locations when you save but only in the current system, allowing you to continue a search pattern (if that's your kind of thing). The exception to that is the mines which you have already taken over which will always be in the location you left them. They are placed centred around the sun within 1 wp->sun distance. Unclaimed mines will reveal their location to you as will the mines you own, the mines which are claimed by others may reveal their beacon to you or, more likely, you may notice a battle or explosion in deep space (keep an eye on your port and starboard views) which provides clues. Beacons are not available immediately as a lightspeed delay is worked out, this is in order that the beacons are uploaded to the compass in the order that you receive them allowing you to know what status the mines are. Unclaimed mines are more likely in less stable governments, and is impossible by default in rich capitalists (but you may still intercept beacons). Leave the mine too long and it may be taken over. Taking over mines is as simple as docking, although for claimed mines this will fall to random chance but if you don't have the requisite resources the AI will be grumpy. Mines require resources, 20t of food and 5t of slaves (standard), extras can be taken in the form of commodities which the human workers like increasing productivity but also increasing your likelihood of gaining a criminal record. Asteroid claims can be destroyed by taking the station to low energy although this isn't fully implemented yet for claimed mines but it should work-ish for owned mines.

This is still in early stages, it only gives gold (and probably too much) which will be available after at least one day of mining. I have released it under the same license as Oolite so contributions are open and you may use it within those terms (I don't really mind, but dropping me a note would be appreciated). The code is rough around the edges and is in need of a bloomin good refactoring. However, trying to test everything which I have so far is a huge task for one person so an alpha release is my solution. If you'd like to test, contribute or comment I'd be most humbled. Thank you.


Still to do:

Add miners, probably modified pirateAIs
Orient stations, because my cheaty workaround sucks
Tweak economy, possibility of mines which give mostly alloys or precious metals but it shouldn't be exclusively one kind of thing.
I'm thinking of making the produce available for free, once it is available on the stations commodity market rather than script-awarding it
More action

Let me know:

Too many stations, not enough? in Mining.oxp/Scripts/miningScript.js the lines "this.minMines" and "this.maxMines" are available for tweaking, but it doesn't check that max is greater than min so be careful.

Too much gold or required resources? Not enough?

Does this slow your machine down? (it shouldn't as it's mostly precalculated, destroying your own mine claims is possible and is processed ingame to allow for an immediate jump without introducing a bug, so if you have a slow machine you might like to try that)

Suggestions, contributions or hateful vitriol will be accepted in good humour. :P


docwild

Posted: Thu Jul 22, 2010 8:48 pm
by Kaks
Suggestion: I'd rename the topic of this thread: "[RELEASE] - Mining OXP" has a nice ring to it. :) And I'd put the download link on the first post! :D

Other than that, nothing for now! I'll play around with it on the weekend, haven't got too much Oolite time for the next 2 evenings... :)

Posted: Thu Jul 22, 2010 9:29 pm
by docwild
Makes sense Kaks, will do. My gratitude. I will likely keep that download link updated, if anything else substantial is added in. It's these warm evenings, you see, when sleeping is impossible for me :P

Posted: Fri Jul 23, 2010 12:32 am
by Arexack_Heretic
Interesting / exciting subject. :)

I always planned to claim a rock for myself....but I kept snagging on my asteroids looking like turds. Mind if I try to code a sub-oxp at some point? (I'd like to add a few specialcargo trips (number of trips depending on playership cargohold) that create a miningoutpost at the found asteroid.

Your asteroids, objects as large as a station can often been seen from the witchpoint...
If you want the rocks to be really invisible until found, you could create them as seed generated locations (as a missionVariable/ scriptproperty), then have them spawned only as the player comes within X range. specialist scanner could also improve such range. playercentric, but whatthehell. :)
I guess this is not what you want, still...

I read that taking over mines requires resources, may i suggest in addition to slaves and supplies, also taking firearms for a hostile takeover and machinery for starting up your own mine. (or for increasing productivity)
Amount of slaves and machinery could determine mining yield, amount of firearms reduce the chance of the mine being claimed by jumpers, food could be used up by the slaves.
at a certain size overseers are required, a passenger berth to ship him/her there. luxuries and wines etc for upkeep.
Hire a local small trader to shuttle ores to the mainstation and food to the mine.
oh, the possibilities are endless! :D