Jump to content

[1.12.x] - Modular Kolonization System (MKS)


RoverDude

Recommended Posts

15 hours ago, RoverDude said:

Actually... I expect a lot of these mod authors don't even maintain a compatibility patch... they rely on PRs for that.

…which is why a breaking change is particularly impactful.  Having to reset swappable bays is something that players can fix on their own, and you've provided guidance on how to do that, and the option to disable switching costs for the transition.  But for spacecraft that contain life-support parts from other mods, the player has to wait for other modders to release updates too, and there's a big impact (lack of life support!) in the meantime.  That's why I think it's important to have a generic compatibility patch distributed as part of the USI changes — not fixes for specific parts in specific other mods, but something to find all parts still using the old modules, and get them at least into a usable state with the new ones, until such time as the other mods' authors update their own USI integration patches with more specific changes.

Do you have documentation on what changes are needed?  For a part whose hab functionality isn't configurable (e.g. no quarters/common switching), it used to be possible to have just a ModuleHabitation and nothing else.  It looks like now, it has to be treated as a switcher even when there's only one option, so it needs a USI_SwapController, USI_SwappableBay, USI_Converter, and USILS_HabitationSwapOption.  For a part with actual switcher options, it gets more complicated.

I wrote a generic compatibility patch last night for the single-ModuleHabitation case and it seems to work OK, though I haven't tested extensively.  I also get errors about ModuleLifeSupportRecycler not existing, and I haven't done anything with that yet, though I'll try to work on it today.  I think it's probably possible to use MM's looping feature to handle parts with swappable bays using the old modules, but that's likely to be very tricky since MM_PATCH_LOOP is an advanced and esoteric thing.  If I can come up with something that works well, (possibly without the multi-bay looping thing), I'll submit it as a PR.

BTW, I also get errors about ModuleLifeSupport not existing.  Looking at the code from the last USI release, it appears that's an obsolete module that no longer did anything anyway, so those errors can be safely ignored, and anyone using that module on a part should just remove it.  Is that correct?

Edited by Wyzard
Link to comment
Share on other sites

12 hours ago, Wyzard said:

Nertea's excellent station-parts mod, for example, has a bunch of life-support and habitation parts that no longer actually provide any USI life-support or habitation functionality. 

The patch for USI-LS that is included in SSPXr was written by @Pulsar. A new version should be distributed with SSPXr not with USI-LS. Similarly for other mods such as SSTU and KPBS. I have fixed up a module manager patch already for SSPXr for myself (probably with errors and hence unworthy of a PR). If you are in a hurry, as you say, it's not too difficult...

Spoiler

Replace

	MODULE
	{
		name = ModuleLifeSupport
	}

with

	MODULE:NEEDS[USILifeSupport]
	{
		name = USI_SwapController
	}
	MODULE:NEEDS[USILifeSupport]
	{
		name = USI_SwappableBay 
		bayName = Bay 1
		moduleIndex = 0
	}
	MODULE:NEEDS[USILifeSupport]
	{
		name = USI_Converter
	}

and replace

		name = ModuleHabitation

with

		name = USILS_HabitationSwapOption

and replace

		name = ModuleLifeSupportRecycler

with
		name = USILS_LifeSupportRecyclerSwapOption


OR something similar/better.

 

 

Edited by Kaa253
Link to comment
Share on other sites

3 hours ago, RoverDude said:

@Wyzard - to the first point (modules changing), this is a totally breaking change.  Mods are going to have to adjust  (or folks are going to have to toss in some PRs).  Normally I leave this to the modder, but if some of your favorite parts are not converted, then there's always the option of tossing me a MM PR that I can include with USI-LS.  Unfortunately I do not maintain patches for these (the original mod authors do).  

(Edit)

Actually... I expect a lot of these mod authors don't even maintain a compatibility patch... they rely on PRs for that.

 

OK...but in a clean 1.5.1/Constellation install, there are over 200 errors still, mostly reflecting the same error that the old converter partmodules are not found. I put those logs in the same link i have above

Link to comment
Share on other sites

Just now, Gilph said:

OK...but in a clean 1.5.1/Constellation install, there are over 200 errors still, mostly reflecting the same error that the old converter partmodules are not found. I put those logs in the same link i have above

hmm... there should not be.  Will take a look.

Link to comment
Share on other sites

On 11/24/2018 at 6:02 PM, Kaa253 said:

The patch for USI-LS that is included in SSPXr was written by @Pulsar. A new version should be distributed with SSPXr not with USI-LS. Similarly for other mods such as SSTU and KPBS. I have fixed up a module manager patch already for SSPXr for myself (probably with errors and hence unworthy of a PR). If you are in a hurry, as you say, it's not too difficult...

  Reveal hidden contents


Replace

	MODULE
	{
		name = ModuleLifeSupport
	}

with

	MODULE:NEEDS[USILifeSupport]
	{
		name = USI_SwapController
	}
	MODULE:NEEDS[USILifeSupport]
	{
		name = USI_SwappableBay 
		bayName = Bay 1
		moduleIndex = 0
	}
	MODULE:NEEDS[USILifeSupport]
	{
		name = USI_Converter
	}

and replace

		name = ModuleHabitation

with

		name = USILS_HabitationSwapOption

and replace

		name = ModuleLifeSupportRecycler

with
		name = USILS_LifeSupportRecyclerSwapOption


OR something similar/better.

 

 

I've modified the SSPXr patch for the new usi-ls format, it seems to work fine with habitat and recycling on a new vessel.

You can find it here : https://pastebin.com/S2JTc95L

It replaces "StationPartsExpansionRedux\Patches\SSPXR-USILS.cfg"

And as Wyzard said, the files in "UmbraSpaceIndustries\MKS\Parts\New folder" need to be removed to be able to use the tundra parts.

Edited by Tegmil
pastebin link fixed
Link to comment
Share on other sites

5 hours ago, LatiMacciato said:

Mind I ask, will the Orbital Logistics change too? The current orbital logistics parts dumping TransportCredits, will this also change?

I hope this time my approach was not that sheesh-like inappropiate.

Edited by LatiMacciato
Link to comment
Share on other sites

@RoverDude, possible bug related to the converter changes: in the Tundra refinery, the "UseSpecialistBonus = true" line is in the USI_ConverterSwapOption modules, which seems wrong since that class doesn't extend ModuleResourceConverter.  The SpecialistEfficiencyFactor and SpecialistBonusBase were moved into the USI_Converter modules, and UseSpecialistBonus probably should be too.  (Other parts might have the same issue too; I haven't checked.)

Edit: Oops, except AbstractSwapOption does have a UseSpecialistBonus field, so maybe that's OK.  But on the other hand, some parts (like the Duna Pioneer) do have it in the USI_Converter, not in the swap option.

Edited by Wyzard
Link to comment
Share on other sites

@Tegmil Your SSPXR-USILS.cfg is perfect. According to my play testing it is working very fine indeed.

I think you should add your forum name to the header comments;

// Modified by Tegmil for the USI_SwappableBay format

cross post your pastebin to the SSPXr thread and submit it as a PR to @Nertea for the next SSPXr release.

Also welcome to the forums by the way :) 

Edited by Kaa253
Link to comment
Share on other sites

In the latest Constellation zip (1.0), the new Atlas parts are included in a folder named GameData\UmbraSpaceIndustries\MKS\Parts\New folder.

I've looked for them in game, but suspect the subfolder may be why they're not appearing. Also, all the part cfg's are the same as the Tundra 3.75 Kolonist module.

Were they intended to be available in-game in this version, or are they provided as a preview?

Link to comment
Share on other sites

4 minutes ago, Kaa253 said:

@Tegmil Your SSPXR-USILS.cfg is perfect. According to my play testing it is working very fine indeed.

I think that patch may make some unintentional changes, though.  For example, in the old system, the PPD-F412M Hydroponics Module (sspx-greenhouse-25-1) has both a ModuleResourceConverter_USI for Agroponics and a ModuleLifeSupportRecycler, so it acts as both a greenhouse and a recycler.  In the new patch, it has two swappable bays, each of which is independently configurable as either Agroponics or Recycler.  So you can have it act as both greenhouse and recycler like before, but now it can also be a double-capacity greenhouse, or a double-capacity recycler.  Since it didn't work that way under the old system (even though it was possible), that seems more like a bug than a feature.

That SSPXR part is what I had in mind when I asked about this issue over in the USI-LS thread.

Link to comment
Share on other sites

Yes, I couldn't find any way to force a specific converter in multibay situations.

It doesn't seem too bad from a balance point because the sspxr hydroponics were underpowered compared to the usi nom-o-matics. With 2 active agro bays the hydroponics produce 16-18 supplies per day per ton of mass versus 18-20 for the nom-o-matics.

I have another issue with the deployable habitats : the usi-ls hab module can be started even if the habitat is retracted. There doesn't seem to be any way to change that with standard modulemanager patches.

@RoverDude Speaking of deployables, there seems to be a bug with the mks ones. The "start hab/agri" button is present and functional on a new vessel with retracted modules. This button disappears when the module is deployed and then retracted again (this can easily be tested with the mks ranger mini hab module).

Edited by sumghai
Fixed wrong user mention
Link to comment
Share on other sites

Hi again! I assume my suggestion and the question I had (still have) have not been seen yet. Just want to drop some props about seeing the upcoming features and that I hope the changes are not too dramatic.

I can understand when people are busy with .. *things* instead of reacting to what people say/write in general. Same happens to me too so I understand.

I also noticed that lots of changes for MKS has been discussed but critics or mod-breaking or uncomfy things are beeing ignored. I still believe every mod or add-On should be as it own flow.

Well for me MKS always loooked like it is built to coexist with USI_LS most likely and thatfor the decisions made and things are setted, right?

Regards, I come in peace!

Link to comment
Share on other sites

Excuse my (perhaps) ignorant question - I'm currently starting up new MKS adventures, and I plan to also use hab stuff from SSPXR. Would it be wiser to wait for some update (not sure from USI-LS or other mods though?), or is it (probably) safe to play without risking any breaking changes up ahead?

Specifically regarding the last days discussions. I'm just not following entirely since I don't know how things work together fully.

Link to comment
Share on other sites

34 minutes ago, TackleMcClean said:

Excuse my (perhaps) ignorant question - I'm currently starting up new MKS adventures, and I plan to also use hab stuff from SSPXR. Would it be wiser to wait for some update (not sure from USI-LS or other mods though?), or is it (probably) safe to play without risking any breaking changes up ahead?

Specifically regarding the last days discussions. I'm just not following entirely since I don't know how things work together fully.

Worst case, you will have to reset a few recyclers, etc. along the way once everything is compatible with the new release.  In that instance, you can just turn off LS effects while you upgrade.

Stats, balance, etc. are not changing, just the modules themselves.

Link to comment
Share on other sites

On 11/21/2018 at 1:16 AM, LatiMacciato said:

ok, but what about a toggle option for those who don't want to waste things?

 

On 11/24/2018 at 3:47 PM, LatiMacciato said:

Mind I ask, will the Orbital Logistics change too? The current orbital logistics parts dumping TransportCredits, will this also change?

ok .. np

Quote

Stats, balance, etc. are not changing, just the modules themselves. 

This is why I asked in first place, my approach was most likely not quite the so called "fine british way" as we here in geremany say. I hope the upcoming things just don't stop the fun to play with MKS :)

Edited by LatiMacciato
unalble to type things
Link to comment
Share on other sites

On 11/20/2018 at 6:16 PM, LatiMacciato said:

ok, but what about a toggle option for those who don't want to waste things?

Since I wrote the patch for snacks-recyclers I convert Soil to Recyclables which integrates perfectly into the MKS production chain it sort of makes sense?

I just try to make a useful suggestion, Ideas can be good or bad. I think having a toggle option can be a good thing because recycling is a good thing while wasting resources is always bad.

Recyclables are intended to be things like worn-out machinery, broken tools, flat tires, worn-out catalysts, and other finished products that just need a bit of work to get useable again.  Converting soil/dirt directly into recyclables is bypassing a lot of the refining and processing steps, and is akin to claiming that you always have a fully-stocked junk-yard next to each of your bases which you can endlessly mine for spare parts and easily used materials.  (if you are converting mulch(life support waste) into recyclables then that says very interesting things about how your kerbals digest things).

 

On 11/20/2018 at 7:07 PM, LatiMacciato said:

Hmm. I'm not here to cause damage regarding headaches or anythng! Adding more engineers or more recyclers would cause the chain be more efficient too, right?

Thank you for your reply!

EDIT: There is also the option to implent thing like this via PatchManager written by @linuxgurugamer

I believe that a module manager script can allow you to set the overflow to false for recycleables for the various converters, just remember that if you do this, you will have things like life-support shut-downs rather than discard a broken wrench when the recyclables bin is full.

Also, only the most experienced engineer on a given vessel contributes to the conversion rates for USI-LS and MKS, so multiple engineers will not  speed things up directly(but multiple kerbals can increase the rate of increase for the colonization bonuses, and those in turn affect production).

Link to comment
Share on other sites

First of all Thanks for reply, I appreciate it!

1 hour ago, Terwin said:

Converting soil/dirt directly into recyclables is bypassing a lot of the refining and processing steps, and is akin to claiming that you always have a fully-stocked junk-yard next to each of your bases which you can endlessly mine for spare parts and easily used materials. 

True, an additional processing step would be needed in reality. I just might update the conerters of my snacks-recyclers to convert soil to dirt, since it seems the most plausible solution. They already convert only to Mulch if no MKS is installed and USI-LS is found.

What you think of I just swap out Recyclables with Dirt at the same rate? (might just also solve Recyclables exceeding issue I spoke about earlier)

some OT:
I personally think playing a game shouldn't feel like you're at work doing things for money IMHO. Another thing is that KSP is already very time consuming so I try making things not stealing my free time. This can differ from person to person I'm aware of that! I accept your argument taking Dirt in account, regardless.

Some questions that came up considering Snacks:

  • Would in reality recycling soil to their elements produce any of MetallicOre, Substrate, Minerals, Silicates, ExoticMinerals, RareMetals or even Water?
  • Is Snacks not aimed to be a simple LS?
  • Would recycling Soil to Dirt be easier than to Recyclables?


I noticed MKS aims to be a realistic thing, I also noticed the heads of the Kerbals are most likely not but EXTREMELY cute!

However, I'm glad there is a conversation about it! :)

EDIT: updated commit (it feels like it makes more sense now)

Edited by LatiMacciato
Link to comment
Share on other sites

1 hour ago, LatiMacciato said:

First of all Thanks for reply, I appreciate it!

True, an additional processing step would be needed in reality. I just might update the conerters of my snacks-recyclers to convert soil to dirt, since it seems the most plausible solution. They already convert only to Mulch if no MKS is installed and USI-LS is found.

What you think of I just swap out Recyclables with Dirt at the same rate? (might just also solve Recyclables exceeding issue I spoke about earlier)

Why not just use the part intended to turn dirt into raw resources:

https://github.com/UmbraSpaceIndustries/MKS/wiki/Parts-(Tundra-Series)#mks-tundra-industrial-regolith-sifter

Not nearly as efficient as mining and refining each resource separately, but it will give you everything present on the body that you have a container for(at rates controlled by the resource ratios for that body, but any resources you can't store, will be dumped).  Note: this is a little bit like having a tiny drill for each resource, you still need refineries to get refined resources.

 

1 hour ago, LatiMacciato said:

some OT:
I personally think playing a game shouldn't feel like you're at work doing things for money IMHO. Another thing is that KSP is already very time consuming so I try making things not stealing my free time. This can differ from person to person I'm aware of that! I accept your argument taking Dirt in account, regardless.

Some questions that came up considering Snacks:

  • Would in reality recycling soil to their elements produce any of MetallicOre, Substrate, Minerals, Silicates, ExoticMinerals, RareMetals or even Water?
  • Is Snacks not aimed to be a simple LS?
  • Would recycling Soil to Dirt be easier than to Recyclables?


I noticed MKS aims to be a realistic thing, I also noticed the heads of the Kerbals are most likely not but EXTREMELY cute!

However, I'm glad there is a conversation about it! :)

EDIT: updated commit (it feels like it makes more sense now)

There are already lots of options to make USI-LS and MKS easier.  Using the USI settings, I often put per-seat habitation back at 1 month for example.  I think you may still need to edit the configs to change how much supplies a Kerbal will consume in a day, but this has not really been much of an issue for me, as a small drill+small MPU can keep your nom-o-matics running as long as you like for a small crew.

 

Link to comment
Share on other sites

This is mostly for @Wyzard but to others following along as well:

The converter changes made in the latest version of USITools (and thus all mods in the USI suite that rely on USITools, i.e. MKS, USI-LS, etc.) were necessary because the previous implementation of swappable converters could not support running the same recipe in multiple bays simultaneously on a part that has multiple bays. You could set all the bays to the same recipe but you would only get the output of a single converter. This ended up being a result of the way the system was designed, not a bug.

So the only way to fix it was to overhaul the entire system. Unfortunately, the new system just isn't compatible with the old way of doing things. We could have left the old code in to ease the transition but what would have likely happened is that other mods would have never gotten around to updating their parts to use the new system and then a year from now, when we finally decided to remove the legacy code, a bunch of mods would have broken and no one would remember why. Better to tear that bandaid off now in my opinion.

Breaking changes are as much a headache for us as they are for everyone else. We try to avoid them if we can. I play KSP with mods that integrate with USI-LS as well and will be impatiently waiting on them to update (or writing the PRs myself if I get too impatient ;)). In the meantime, I'll be enjoying Assembly Plants that can make Machinery in all 3 bays at the same time.

The good news is that updating part configs is pretty easy and I'm sure the other modders would happily accept pull requests. I'll be glad to help anyone who wants to take a stab at helping the other modders get their mods updated to work with the new converter system.

Link to comment
Share on other sites

10 hours ago, Terwin said:

Why not just use the part intended to turn dirt into raw resources:

Soil is produced from Kerbals. The recycling plant ISRU's now convertes that into Dirt instead Recyclables so I updated my repo for the snacks-recyclers on gitlab.com.
I might add a patch that enables snacks-recyclers on the Regolith Sifter if both MKS & USI-LS is found and only Recycling Plant if MKS only is installed that also get the the 250-ISRU-features.

USI-LS is a great mod in the USI universe and people should be encouraged to use it. However, I personally just prefer snacks because it is lots easier and saves some parts in my install. To have an easier usage of non-USI-LS  installs I believe the Recycling Plant is also ok to use for recycling soil back to snacks. snacks into Resources that MKS and USI-LS uses, e.g. adding it to the chain.

I hope this makes sense tho. Regards!

EDIT: updated

Edited by LatiMacciato
Link to comment
Share on other sites

6 hours ago, DoktorKrogg said:

We could have left the old code in to ease the transition but what would have likely happened is that other mods would have never gotten around to updating their parts to use the new system and then a year from now, when we finally decided to remove the legacy code, a bunch of mods would have broken and no one would remember why. Better to tear that bandaid off now in my opinion.

Makes sense to remove the old PartModules instead of maintaining code for two systems that do the same thing.  However, I've just submitted a pull request with the MM patch that I alluded to a few days ago.  It does a reasonably decent job of updating parts that use the old modules, to make them work with the new system instead.  It's not intended as a long-term solution — maintainers of other mods still ought to update their own USI integration patches to use the new system directly — but that may take time, possibly a long time for old/abandoned mods, so the idea is just to ease the pain for players in the interim, by at least getting stuff back into a usable state wrt this transition.  I'd appreciate if people who use mods that integrate with USI could give this a try (here's a direct link to the patch file itself) and let me know if it works well, has problems, or whatever.

Also, a few issues with the prerelease that I've noticed:

  • The Malemute geology lab still uses ModuleLifeSupportRecycler.
  • The Otter MiniSub_Pod and DERP fuel cell still use ModuleResourceConverter_USI.
  • The MKS Parts folder has configs for two Atlas harvester parts.  One of them actually has an associated .mu file, though the other one's model is missing.  I didn't think the Atlas parts were finished yet, but anyway, both configs use ModuleResourceHarvester_USI.
  • Some parts in the bundled GroundConstruction still use old modules too.
  • The bundled copy of GroundConstruction is also missing 001_AnisotropicPartResizer.dll.  (This causes a ReflectionTypeLoadException in 002_MultiAnimators.dll during game startup, and seems to break some GC functionality.)
Link to comment
Share on other sites

17 hours ago, LatiMacciato said:

Soil is produced from Kerbals. The recycling plant ISRU's now convertes that into Dirt instead Recyclables so I updated my repo for the snacks-recyclers on gitlab.com.
I might add a patch that enables snacks-recyclers on the Regolith Sifter if both MKS & USI-LS is found and only Recycling Plant if MKS only is installed that also get the the 250-ISRU-features.

Ah, the English translation uses 'mulch' instead of 'soil' for that resource.

Nom-o-matics take 10 soil/mulch and 1 fertilizer to produce 11 supplies, so that is what I generally use for converting it back into supplies, just start with a bit of supplies and a lot of fertilizer and that will last you a long time, especially with some recyclers(a MPL-LG-2  and enough RT-500s to keep everyone at 79% is the way I usually go).

Even though I generally put in fertilizer production 'just in case' just a 2.5m can of fertilizer is plenty for a crew of 2-5 for a round trip to Duna for example(Usually with a fair bit left when I get back to Kerbin)

Just make sure you have enough production(1 kerbal uses 10.8 supplies/day(6 hrs), reduced by recyclers, so a 25000 which produces 14 supplies/day can easily supply 6 kerbals at 79% recycling, using less than 1.3 fertilizer/day, which gives ~3500 days with a 2.5m fertilizer can, which is > 8 yrs)

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...