A concept of finding random stuff. And mining.

Post Reply
TheBob
Posts: 76
Joined: Sat Jul 06, 2013 6:04 pm

A concept of finding random stuff. And mining.

Post by TheBob »

So far I have been working on a mission type that assigns you a planet, and tells you to go there and deploy a few survey robots. It's practically finished (have to enable translator use and add some flavors), but now that we have the possibility of spawning landed vessels, and with a bit of thinking, I realised that I have all the tools I'd need for a complete mining/random stuff finding model. A few more LUA functions could make this a bit more detailed and less arbitrary, but I have everything needed to make it work on a reasonably functional level. Here's how it goes:

Consistent random stuff:

Consistent random stuff, like mining sites, can be produced pretty simple by using the planets seed as basis. This would mean that a planet wouldn't have other stuff suddenly when you visit it another time. However, it also means that every planet has the same stuff in every game. This might be prefered by some, but not really by me. It gives expierienced player too much of an advantage knowing where valuable stuff is.
This too could be solved very simply by generating a random seed at the begining of a new game, saving it in the savegame and adding this seed to the planet seed. This way you get a new distribution in every game.
Also, this stuff should only be found in uninhabited systems. It can savely be assumed that inhabited systems don't hold many secrets. Can maybe be dependant on population a bit, but in general, you should go to uninhabited space to find stuff.
Can be further modified by distance to a faction center making border reagions more prone to having undiscovered stuff, once we have some interactions between Lua and factions.

Mining sites and prospecting:

This is an example how this would work for mining sites. I won't put actual values in here, because those will be subject to testing and balancing.
Every planet has a chance of 0 to n potential mining sites. The atributes for such a site would be:
longitude,
lattitude,
resource,
accesability,
abundancy

All these atributes can be generated procedurally from the seed as mentioned above and don't have to be stored anywhere. They are created when a player gets close to a planet.

However, the player cannot see them.
When at a certain distance (low orbit, preferably), the script makes a skillcheck on Sensors (best skill available on board, not necessarily the players) every quarter of an orbital period. If the skillcheck succeeds, the nearest undiscovered site is found. I don't know if I can currently determine if the site is on the other side of the planet, I'll have to try that. If possible, sites out of line of sitecan not be found even with a succesful skillcheck.

On finding a site, a few things happen:
A prospecting mission is created in the player log, if it is the first time the player finds a potential mining site. If it is already created, the site will be added to the mission and a list with found sites can be seen in the mission details, as to not clutter the mission list.
A waypoint is created, that is a vessel without mesh landed on those coordinates. This could be left out if longitude and latitude of the player are visible in the UI (I know you can look it up, but unless it is part of the oficial UI I can't count on people using it), or if the core would provide a waypoint interface. Anyways, this solution will work.

The next phase starts: The player knows where the site is, but not its atributes. It could be that the site is worthless (abundance zero), so he lands near the site and deploys a survey bot (unload 1t of robots on planet, spawn surveybot vessel landed there, remove waypoint). The bot won't be able to move around, but it's totally ok for our purposes. There is a survey bot now that is analysing what's there.

I am uncertain yet about survey times. It has either to be pretty short, not holding the player up for too long, or very long, making it feasible for the player to do other stuff in the meantime and then come back for the results. I'm tending towards the second option, but would be glad for opinions. It might be too long a delay of gratification to keep the average player motivated.

Anyways, now the player can also see the atributes. He can return to civilisation and sell that information to a mining company. The value of the information depends on the atributes of course: The resource, the abundancy and the accesability.

IF, and only if, the accesability is 1 (surface or close to it) the player can choose to exploit it himself. Care will be taken that these resources are never very abundant, so the player cannot dump a cashcow on a planet and retire. Exploiting would mean dumping a not yet specified ammount of mining machinery at the site, whereupon a mining machine vessel will be spawned that will slowly start to extract the resource.

In this case, the information on the site would be removed from the list of sites in the prospecting mission (all information in this list can be sold), and instead an "active mining" mission will be created, that keeps track of all the machines you droped, so you can return to them and get your cargo.

Cargo loading would happen by landing near the mining machine. The machine will automatically transfer all it has, or what you can load, and go on extracting until the site is mined empty.

Savegame concerns:

For a very active explorer, this can result in a lot of stuff to store in the savegame. I have spent some thought to compress it down to the minimum, which is easily managable even if the player finds hundreds of sites.
The bulk of the data will be the system. I'm not sure how much space this takes up. The rest is relatively painless:
I need one byte for the body indesx within the system, one byte for the site index, and one byte for the state (0 = discovered, 1 to 100 = surveyed %, 101 to 200 = exploited %). That's about all I'll have to save for every single site. Sites can be grouped to locations, so the location doesn't have to be stored for every site.
All the other atributes can be generated from this data.
What I don't know is whether I can work with bytes in lua or if I have to stick to integers. That would increase the required space somewhat. On the other hand it wouldn't be too hard to put all of this information into one single integer. Still somewhat wasteful (8 bytes instead of 3), but nothing that would lead to a problem unless someone plays the same game his entire live and discovers the whole galaxy...


Other possibilities:
The very same system can be used for anything that can be found on planets. Two obvious ones that come to mind are derelicts from which you can salvage cargo or maybe even some equipment, and alien ruins from which you can collect alien artefacts, cool proceduraly generated histories of what happened to them and who they were.
Although there is the question whether Aliens ever existed in the pioneer verse, which is up to the worldbuilders. I'm not really thinking all-powerful mystic precursors, I'm thinking of races that died a pitiful death somewhere in development before reaching the stars (read McDevitt's "the engines of God" to get an impression of the kind of feeling I'm aiming for. Well, read it anyways, it's one of the best archeological SF I got my hands on).

Pirate Bases and smuggler hideouts could be done similarly, although it would arguably make more sense to do them as starports and handle them in the core. Although "Vessel-bases" have the advantage of being destructible... And if we ever get turrets, we'd also have immediate AA-batteries.

Anyways, that's the concept as it manifested these few days in my head. I'd like some input, suggestions, critisism, that kind of stuff.
Tichy
Posts: 132
Joined: Tue Jul 02, 2013 12:00 pm

Re: A concept of finding random stuff. And mining.

Post by Tichy »

Another possibility could be some kind of spy mission for a faction. This will be more dangeous, because you are going to some "secret site" and it could be guarded. Maybe some of this sites could be purpousely placed on the dark side of a planet that's tidal locked on it's main star, so the landing will be more difficult. Those sites can be placed also on inhabitated systems. I think that there may be some other kind of sites that could be placed on inhabitated systems. Also, a planet is a big place: while it have some cities, it could also have a pirate hideouts somewhere else.
I think that ground staports and cities could also be made destructible.
I am uncertain yet about survey times. It has either to be pretty short, not holding the player up for too long, or very long, making it feasible for the player to do other stuff in the meantime and then come back for the results. I'm tending towards the second option, but would be glad for opinions. It might be too long a delay of gratification to keep the average player motivated.
I think that, even if will take long, the player could use some strategy like depositing the bots on a planet, then move to another planet on the same system, deposit some bot there... and so on. Then he will get back to the first planet to recover the bots.
Also, we can use time compression.

If I forget a bot on a planet, it will stay there forever, or it will be destroyed after some time? If I have some bots on a planet, and the I hyperspace to another system, the bots will remain there?
TheBob
Posts: 76
Joined: Sat Jul 06, 2013 6:04 pm

Re: A concept of finding random stuff. And mining.

Post by TheBob »

If I forget a bot on a planet, it will stay there forever, or it will be destroyed after some time? If I have some bots on a planet, and the I hyperspace to another system, the bots will remain there?
Bot deployment will be noted in the save. If the saved state shows between 1 and 100, the script will know that there's a bot working there, and spawn it again in the apropriate location if you reenter the system. If the state shows between 101 and 200, it will know that you left a mining machine there. If it shows 201, it will know that you sold the information and the site won't show up anymore and you can't exploit it (it still has to remember that though, otherwise you could survey it again).
Tichy
Posts: 132
Joined: Tue Jul 02, 2013 12:00 pm

Re: A concept of finding random stuff. And mining.

Post by Tichy »

Another question. :) Is there the possibilty to find NPC doing this kind of tasks, or is it only for the player? I'd like to see busy NPCs doing various works and missions exactly like the ones you can do as player.
TheBob
Posts: 76
Joined: Sat Jul 06, 2013 6:04 pm

Re: A concept of finding random stuff. And mining.

Post by TheBob »

Another question. :) Is there the possibilty to find NPC doing this kind of tasks, or is it only for the player? I'd like to see busy NPCs doing various works and missions exactly like the ones you can do as player.
That is well outside my scope here. NPC behavior would be an altogether different module. Like tradeships, you could spawn random prospectors, miners, etc. No problem (except that the AI can't land currently). But that's not on my horizon for the moment. First we have to give players stuff to do, some time later maybe we can give the NPCs some stuff too... ;)
Ray
Posts: 16
Joined: Mon Sep 16, 2013 5:09 am
Location: CANADA
Contact:

Re: A concept of finding random stuff. And mining.

Post by Ray »

Another finding stuff could be capsules with quests (alternative of bottle with a message found in the sea)
Post Reply