Download Link (Current Version)Hey there guys, as I recently mentioned in my Fleet Control Mod Threat, I've been secretly working on ships that can make resources and the ability to mine. This mod probably won't be actively updated for content, I just want it to be out there so people can see and use the tech. I've TRIED to document it as best I could, but when it comes to documentation, that's what kept me from acing Computer Science, so you'll have to forgive me. Feel free to ask any questions though.
I will most likely integrate a system like this to the Fleet Control Mod, but your more than welcome to use this code. Heck, that's why it's here!
How it works: For the Farmstead to produce supplies (I don't think I switched it to "food", it's still supplies) it must be combat ready. It will produce 3 each day, however this amount is modified by your crew level. Green crew produces 25% less, Regular produces the normal amount, Veteran is 25% more, and Elite is 50% more.
I've used Alex's Mining Pods to do the mining. Pick up a wing or two of em from the Hegemony, the fly to an asteroid. Each day a check is made to see if you (actually if every fleet in the system) are sitting near an asteroid. If you are, it calculates your mining power based on your ships. How much mining power you have depends on your combat ready mining pods. The more you have, the more resources you can drain from the asteroid. At the moment, the asteroids never actually die or anything, don't know if I can do that yet.
There are three types of resources you can drain from asteroids. Ore, Metal, and Precious Ore. Precious Ore is rare, but worth a lot to sell. It's worth noting that, as you'd expect, Ore is a fair bit heavier than regular supplies and such, so pack yourself some good cargo space.
If you actually look at the code, it's not too hard to add your own mining ships. There is a hashmap at the bottom of the SupplyEvent and the MiningEvent scripts. Simply add a value to whichever map you like with your ships ID, and the production amount/mining power, and bam it'll get to work.
Version 0.1: (Not publicly released) Added the Farmstead, a modified tanker that actually looks sorta pretty that produces supplies.
Version 0.2: Gave Mining Pods the ability to mine.