Jump to content

[KSP 1.3.1] Simple Logistics (2.0.2) - Who needs pipes? 2017-10-17


RealGecko

Recommended Posts

Lately my Munar base turned into a mess of eight different vessels connected together with KAS winches. FPS reduced dramatically, managing became nearly impossible. I turned my gaze on to USI MKS and it's Logistics feature, but MKS adds too much stuff I don't really need. So after hacking a little I discovered that all logistics is done by USI Tools mod and MKS is not really required to do the job. Instead of reinventing the wheel I created a set of patches to bring logistics to stock parts. But I was completely unhappy with the fact that I cannot transfer Rocket Parts from my RP printing lab to nearby RP freight. So I decided to create my won logistics system with Blackjack and .... whatever...

PA05bBw.png

How it works:

  • Vessel must be landed (sounds familiar :D)
  • Each command capsule (and probe core of course) now has Logistics Module on board (switched off by default)
  • As soon as module is enabled ship becomes a part of logistics network where each vessel share same resource pool
  • Resources spread evenly across all resource capacitors over network with priority to less capacitive ones. That means that resource will be drained from bigger ones first, while preserving resources in smaller ones.
    FygUhoD.png

 

  • Resources spread in physical range from active vessel (~2400 meters)
  • Ships with no command module (debris) always become part of network
  • WARNING!!! This does not work in background, only on active vessel and nearby ones.
  • Vessel that is not the part of network may still request resources from pool
  • Compatible with Community Resource Pack, so every resource is shareable as soon it is transferable

Requirements:

  • Module Manager

Source:

GitHub repo

License:

GPLv3

Pure stock example:

Build a simple power production ship, may be automated. For this example I'll use Fuel Cells:

dNIIF32.png

You can enable resource sharing from command module right click menu, but as it becomes bigger and bigger with every other mod installed I also added possibility to enable it from Simple Logistics main UI:

Axhjmej.png

Let's do this, now our Generator Ship shares resources, but it is the only ship in network for now:

RDWjDeP.png

Now let's bring in something that will mine ore and plug it in. This Driller has no solar panels or any other power source. It'll receive power from the Generator:

OzESTzO.png

Now it's time for ore processor. It's purely automatic and does not have any power sources too. It'll user power from Generator and produce LfOx and MonoProp:

JL7rITi.png

Let's plug it in too. You can see that our Generator shared some LfOx with us already, that's how even resource distribution works:

1YnSPqu.png

It'll feed LfOx back to Generator so it will have juice to produce more power, so that Converter will be able to produce more LfOx, to feed it back to Generator, that will produce....... (Perpetuum Mobile??? :D:D:D)

Let's wait a bit until our network is full of LfOx:

3KzgyiM.png

Now let's bring some vessel that really really REALLY WANTS SOME FUEL:

Zct1C5Q.png

As you can see it's tanks are as dry as Sahara. So, how do we refuel it? The answer is obvious: you may plug it into network so other ships will share resources with it.

But what if you just want to fill up your tanks and rock? Pretty simple: every vessel that is near the network may request resources from pool without being part of network.

NMPMA3g.png

Adjust sliders to your needs and hit Request Resources:

mScUQRY.png

Yeah, now our tanks are full.

So our lander may depart for exploration:

99uJsqL.png

And our refuelling base is ready to serve another ship:

lnDv1Q3.png

Oops :D:D:D

I WANT IT!

Spacedock as usual

Don't forget about Module Manager :wink:

Edited by RealGecko
Mod update
Link to comment
Share on other sites

38 minutes ago, CobaltWolf said:

Out of curiosity, does this affect SEP parts?

Currently mod only affects LfOx tanks, MonoProp tanks, Ore tanks, RTGs, Resource Converters that output EC, USRU processors and Command Modules.

But that's an interesting idea to add SEP support, so we don't have all those nasty booms happening now :D

Link to comment
Share on other sites

Just now, RealGecko said:

Currently mod only affects LfOx tanks, MonoProp tanks, Ore tanks, RTGs, Resource Converters that output EC, USRU processors and Command Modules.

But that's an interesting idea to add SEP support, so we don't have all those nasty booms happening now :D

I think I managed to actually squash most of them (though I think the "stuff teleported up into the air on reload" thing is a KAS bug) today, when I discovered the origin point of those 3 experiments was below them, meaning that when you attached something to them (causing the colliders to reevaluate), I think rays shoot out from the origin and cause the part to blow up if it finds a foreign collider before reaching the end of its own...

I think the EC transfer would work, but I think the experiments need to be physically connected to the central station for the science to work.

Link to comment
Share on other sites

1 hour ago, RealGecko said:

Hmmm, AFAIK USI Tools work nicely with USI LS (it would be strange if it didn't :D). At least I saw it transferred fertilizer form USI Kontainer to "Ranger" Agricultural Module as I was testing MKS.

So I think it's possible. May require some time though, as I never played with any LS system.

Feel free to add PR on GitHub :wink:

mmmm I'm going to take a look at it and see if it works. Thanks for the fast reply.

Well I made a MMpatch, well changed one of yours to work with snacks:

@PART[*]:AFTER[Snacks]:HAS[#category[Payload],@RESOURCE[Snacks],@RESOURCE[Soil],!MODULE[USI_ModuleResourceWarehouse],!MODULE[ProceduralPart]]
{
    MODULE
    {
        name = USI_ModuleResourceWarehouse
    }
}

But Snacks doesn't find the resources anyways and the Kerbals faint of starvation.I supose Snacks needs to  be adapted to it.

Edited by Elkram
Link to comment
Share on other sites

5 minutes ago, Elkram said:

Making it work would really be cool.

Actually yesterday I tried my own mod and I was not pleased with USI Tools mechanics. So I overcame my laziness and started to write code. I hope I'll be able to create simpler and better mechanics. Expect version 2.0 :D

Link to comment
Share on other sites

Just now, RealGecko said:

Actually yesterday I tried my own mod and I was not pleased with USI Tools mechanics. So I overcame my laziness and started to write code. I hope I'll be able to create simpler and better mechanics. Expect version 2.0 :D

That would be awesome. I can help with beta testing if you want.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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...