This also applies to the other mining stations that use this horrible method to generate their inventories.

The Background

The Commonwealth mining colony generates its items based on the following line in its <trade> section.

<Sell criteria="*NU +miningEquipment; -Illegal; -NotForSale; -notStandard; L:1-5;" priceAdj="100" inventoryAdj="100"/>

The inventoryAdj="100" means that the station gets exactly one of every item that meets the preceding criteria.

There are only five items that meet this criteria in the base game and so exactly five mining items will appear in each station (The scanning and excavation pods appear in groups of 4d6 and 2d6 respectively when the game generates them, but this is a completely unrelated thing that I am going to ignore).

The Problem

The problem with this is that when someone starts adding in mining items in mods, each mining station will automatically generate one of each new item, regardless of frequency, so that the station can end up carrying far more than the original five items which was apparently the appropriate number to have for a balanced mining station.

It would make far more sense for mining stations to generate their inventories in the same manner as all the other stations in the game that manage to generate their inventories using the exact same method.

A Solution

Treat the asteroid scanning pods and excavation pods and ammo and generate a semi-fixed amount of them per station. It might help to add the attribute "disposable" to them to help differentiate them from other pieces of mining equipment. I don't know if that would cause any issues with the disposable missile racks but it seems like the most appropriate attribute to use, since they are disposable.

After that, I don't think it would affect the balance of the game much if mining stations had more than just one mining weapon and one miner's cargo hold. I suggest generating 1d4 miningEquipment weapons and 1d4 non-weapon miningEquipment devices.

megas 27 Jun 2015:

I like how mining items, at least the devices, are generated like reactors. It is not "a horrible method" to me.

arkheias 27 Jun 2015:

There is currently no upper limit to how many items can appear. The more mining devices a mod includes, the more items that will appear. They are not restricted by the defined item frequency either. These items also appear whenever you blow up the station, which greatly increases the incentive to do so.

The only way to keep an item from appearing is to mark it as notForSale or notStandard, which would prevent it from appearing in any other stores either.

megas 28 Jun 2015:

The way it works now is not a problem. Mining laser and hold are guaranteed as before, and new mining items from other mods, including the notrandom ones, appear too. This is good.

As for destroying friendly stations, any sovereign that lacks a unique service or game-ender justice system, such as the Commonwealth in non-permadeath games, are already lucrative targets.

arkheias 11 Jul 2015:

I don't quite think you understood my comment, that, or you were being sarcastic and forgot to end yours with the proper sarcasm tag. The way it works now is a problem. A mining laser and hold are guaranteed now, yes, but every new mining item from every installed mod, including every notRandom one is guaranteed to appear too. This is bad. This is horribly bad. As for the issue of certain friendly stations being lucrative targets. This problem just makes mining stations extra super-duper lucrative. This is also bad.

megas 20 Jul 2015:

I was serious, and I disagree that it (i.e., offering every mining item, including notrandom) is bad; I think it is good.

That said, it is probably a good idea to give some mining equipment more attributes like missiles' BasicAmmo and PremiumAmmo to set basic stuff (like stock mining laser and miners hold) apart from more advanced or custom stuff.

george moromisato 12 May 2021:

Here's what I've done in 1.9 Beta 4:

  • I've introduced a new attribute, essentialMiningEquipment, which is a subset of all mining equipment.
  • Mining colonies now generate essential mining equipment using the inventory method.
  • They also spawn a random selection of all mining equipment (which means it is not guaranteed).
  • As before, some mining equipment is marked as advanced, which means only IMUs will have it.

If you want to introduce new mining equipment you have the following choices:

  • All mining equipment must have the miningEquipment attribute.
  • If you want the equipment to be guaranteed, add the essentialMiningEquipment attribute. [NOTE: Technically it is not a guarantee, just very probable.]
  • If you only want the equipment to appear at IMUs, add the advanced attribute.