MORE RECENT VERSIONS:
- 220.127.116.11 - New Sizes and Nuclear Reacors
Ever wanted to establish a colony in sr2, but your efforts have been put on hold until a colony mod comes around? Or maybe youve just given up hope bcs, lets be real, mods arent gonna come to mobile?
Well, wait no longer, because with this pretty big vizzy script, mobile and pc players alike can build large self sufficient colonies just about anywhere, or just send colonists to their slow demise in the Urados system because you only packed 5 tons of cargo for a 10 year journey.
Sooo, what exactly does this script do?
First off, it measures the mass of all fuel tanks with names containing "Cargo" on the craft (yes you can rename fuel tanks), then it takes that mass and divides it up among each of the primary resources, those being Food, Water, and Oxygen.
And dont think you can just cheese the system by just ejecting the cargo tanks at launch, the script checks for changes in the Cargo Tanks' total mass, and adjust the max amount for each resource accordingly.
Then the colony uses those resouces over time at a rate determined by the amount of colonists and some other factors. This depletion is based on the amount of time since resources were last added or depleted, so keep in mind that colonies still use resources when you are not controlling them.
Eventually, the colony will run out of resources, and the colonists will inevitably die. This brings us to the only system of the script I am very much not satisfied with, death. The colonists are dead in the script, and the colony will stop producing and using resources, but my original system of killing the in-game astronauts led to the entire colony being irredeamable, so I removed that system, and now its completely up to the player to take the astronauts out back when the resources run low.
Anyways, to prevent the colonists' inevitable death, you can add in various modules like Algae farms, Oxygenators, and Water Recyclers to help recycle or produce resources. Each of these modules requires power, which can be genorated by solar modules (which, yes, do take into account the distance from the sun), and because solar panels dont genorate power at night, a large battery module is needed for every 20 units of power genorated to make the solar modules work.
Now, bcs I dont want the mobile plebs to riot, this script does not use the ansible mod, and as such the only requirments for a module to work is to be within 1 km lateral distance, be above the minimum mass (different for every module type), and have the correct craft name, so its up to the user to not make each module a large cube.
Just to clarify, you don't need to put the script in each module, just the central module, putting it in all would just lag out your game
Also, because I dont have endless amounts of time, theres only one module for every resource as of now, and the only way to genorate power is through solar modules, a problem for urados colonies.
If this does well on the site I'll probably update it, and I'll also have info for if people want to their own modified versions bellow.
Also, this does not currently support colony ships as each module MUST be its own seporate craft. Do seporate modules docked together like a station or colony ship work? Not a clue, I haven't tried. If anyone wants to find out, put your finding in the comments.
And yes, the demo colony shown in the pictures comes with the download, though you will have to rename each module's craft name correctly in flight to get it to work (you can edit the craft names on the map view by clicking the search bar, then the pencil button next to craft names)
And finally, onto the numbers part, think of this as the colonial handbook:
GENERAL STATS - Each colonist uses 2 KG of oxygen per day, 3 KG of food per day, and 10 KG of water per day. The default population for the script is 3, though you can change it easily as the variable for it is at the top, and if you set a parts AG group to 5 and 6, you can activate AG 6 to add one to the population and AG 5 to remove one. Also, for every 100 KG of cargo, you'll get 15 KG of Oxygen, 20 KG of Food, and 65 KG of Water. If you need an example colony, the demo colony that comes with the script is self sufficient for 3 colonists. Also, the default colonial range is 1 KM, and the cargo tanks are intended to be solid fuel tanks.
ALGAE FARMS -
- Must be at least 10,000 KG in mass
- Must have a name containing "Algae" or "Algea"
- Each module uses 5 units of power
- Each module uses 10 KG of water per day
- Each module Generates 6 KG of food per day
WATER RECYCLER -
- Must be at least 15,000 KG in mass
- Must have a name containing "Water Recycler" or "Recycler"
- Each Module uses 8 units of power
- Can recycle up to 60 KG of water per day
- Cannot produce more water than is used by colony (Obviously)
- Must be at least 5,000 KG in mass
- Must have a name containing either "Oxygen" or "Oxygenator"
- Each module uses 2 units of power
- Each module uses 3 KG of food per day
- Each module generates 6 KG of oxygen per day
- Must be at least 1,000 KG in mass
- Must have a name containing "Solar"
- Generates power based on a linear equation (yes its unrealistic but Im lazy), where something like mercury should be a 5, Droo Luna and Cylero are a 4, tydos is a 2-3 (I forgot which), and urados is 2-1 (again, I forgot which).
- Must be above 10,000 KG in mass
- Must have a name that contains "Battery"
- For every 20 units of power generated by Solar Modules, 1 Battery Module is needed (EX: 17 units of power requires 1 Battery, 24 units of power requires 2 batteries).
EXTERNAL CARGO -
- No mass requirement
- Uses no power
- Must have a name containing "Cargo" or "Cargo Tank"
- The script assumes that only 80% of the mass is cargo, which is pretty lenient in my opinion. When a cargo module initially connects to the colony, its cargo mass is divided up among the resources and added to the colony resources. It also adds its cargo mass to the max cargo capacity of the colony. This means that if the cargo module disconnects from the colony, the resources it initially added aren't directly removed, but the colony's max capacity is changed accordingly, and any resources above the new max capacity of the colony are removed. Because of this, it's completely reasonable to just have a cargo vessel connect to the colony, refill the resources, and then leave.
Last but Not Least, My Modification Policy
While the script isn't perfectly organized, and it has a million and one variables flying around, the variables are all initially established at the top, and the script is labeled enough that most people can figure out what part of the script does what, so it shouldn't be impossible for the layman to modify the script and add a module type or something like that in.
Feel free to publish a modified version to the site, but if you do, credit me at the top of the description, bcs this took a truckload of work to make. Also, if you want you can put a link in this post's comments to your modified version and if I like it, I'll make it the canon new version of this script. And with that note, make sure your modifying the newest version, I'll have a link to the newest version at the top.