MORE RECENT VERSIONS:
- 1.2.3.0 - 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)
OXYGENATOR -
- 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
SOLAR -
- 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).
BATTERY -
- 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.
@XBeastX sure yea, but make sure you make links clickable by formating them like this:
[Link text](Actual Link)
I Made this Interplanetary crew vehicle using the script... veel vree to check it out https://www.simplerockets.com/c/m8OoS3/XBeastX-Interplanetary-Crew-Vehicle#
@XBeastX It does. Though you can't add colonial modules by docking bcs when 2 crafts merge they become a single craft, though I'm working on a way around that
Really great concept you should try to make a program that do the same for space stations and crew capsules for deep space travel
@Exospaceman ?
gibberish gibberish gibberish What are you even saying lol
@McDuetchVan Ohhhhh no wonder thx so much will try it later
@sushiboi no, your renaming the craft names, not the fuel tanks. you can do that In the map view, by clicking the search button then the pencil next to the names.
It shows 0 modules connected for all the different types of resources
After trying to rename the fuel tanks from your example colony, I still couldn't get the modules to replanish resources
wow this is great. An idea for the next update... Maybe advanced ECLSS pumping so your astronauts urine gets scrubbed the brine is disposed of in a safe manor (that's all the nasty stuff in pee concentrated into one toxic as heck solid) and then that gives you clean water. You can manage the grey water much the same way. Maybe electrolysis machines so you can convert a stable (controllable maybe) amount of water that is being converted into oxygen. This would use Water (dirty or clean but not urine and dirty will reduce the lifetime of the machine) and use electricity and produce oxygen.
@CyleroEnthusiast Well, yes I could do that, but Id has to first make sure that each colony participating has a module specific for the colonial resource interweb thing otherwise I might as well just eliminate the colony border as a whole. But that raises problems as I cant just communicate to the other colonies when the colony becomes part of the resource web, as even if I used ansible I cant send a message to a dead craft (a term I just made up for any craft outside the loading zone so it's not currently running its script), So id have to have each colony script check for other colonies and what their producing and whatnot, and add that to their own separate variable/script for the planetary resource production. That might seem just fine, but there's a pretty game-breaking bug that would result in: let's just say your original colony is named Colony A, and you haven't controlled it in 50 years (so its been 50 in-game years since the script last ran), and now you add in a new colony, Colony B, with 5 algae farms with power and the solar modules and water recyclers to power them. When you go back to colony A, it would realize that there's a colony producing 5 algae farms worth of food, and its been 50 years since it last added or deducted resources, so it'll do the math and give you 50 years worth of 5 algae modules' food production, an absolutely game-breaking amount if you have the storage for it. I feel like if people found that it would either lead to frustration or exploitation so Id have to figure out a way around it before I could add that.
This has a ton of potential! I can even imagine using a distance detector(or not) to make a planetary or universal stockpile, that would be awesome to play with(essentially mks if you know the Kerbal colonization mods)
now i want a life support mod
@SpaceTrebuchet yea, I didn't know if it was when I started, turns out you can
Damn I didn’t know it was even possible
This is very exciting
Alright dude, I read the entire description and downloaded it and have played around with it enough to have a basic understanding of the workings. I’ve concluded that you’re officially on to something here. My mind is racing with little tweaks I can make, but honestly this is an inspiration. I also didn’t know you were good at Vizzy, so that’s cool. Keep up the good work.
This is truly magnificent.
I made your idea as sugestion in game development
Check Here
w o a h
@McDuetchVan LoL
@MSCSpaceworks lmao, took an eternity to type
It's nice and I think it would take an eternity to read description completely, LoL!
I like your concept