RealGecko

[KSP 1.2.1] Simple Logistics (2.0.0) - Who needs pipes? 2016-11-24

Recommended Posts

RealGecko    496

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

Share this post


Link to post
Share on other sites
CobaltWolf    10592

Nice! Looks like it would be a useful companion for USI/MKS alternatives such as KPBS.

Out of curiosity, does this affect SEP parts? I'm wondering how badly a lack of connection would effect the custom science system for it.

Share this post


Link to post
Share on other sites
RealGecko    496
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

Share this post


Link to post
Share on other sites
CobaltWolf    10592
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.

Share this post


Link to post
Share on other sites
RealGecko    496
2 minutes ago, CobaltWolf said:

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.

Yes, that may be an issue. USI Logistics does not touch science in any manner, but maybe @DMagic's Science Relay may help?

Share this post


Link to post
Share on other sites
BrutalRIP    52

if you could somehow implement planetary logistics into stock also...that would be awesome :wink:

Share this post


Link to post
Share on other sites
RealGecko    496
4 minutes ago, BrutalRIP said:

if you could somehow implement planetary logistics into stock also...that would be awesome :wink:

Planetary Logistics is implemented in MKS KolonyTools.dll. So, no luck at this point :wink:

Share this post


Link to post
Share on other sites
sebi.zzr    237

I had a similar idea that didn't work back then,but i'm glad it's finally sorted out.

Spoiler

 

24udpFO.jpg

Share this post


Link to post
Share on other sites
RealGecko    496
8 minutes ago, sebi.zzr said:

I had a similar idea that didn't work back then,but i'm glad it's finally sorted out.

I'm glad that I did not add MKS-Lite into my career during 1.1.3 times. It would be ruined now.

Share this post


Link to post
Share on other sites
RealGecko    496

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:

Share this post


Link to post
Share on other sites
Elkram    39
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

Share this post


Link to post
Share on other sites
RealGecko    496
9 hours ago, Elkram said:

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

I'll see what can be done, USI Logistics may be tricky sometimes :)

Share this post


Link to post
Share on other sites
Elkram    39
18 hours ago, RealGecko said:

I'll see what can be done, USI Logistics may be tricky sometimes :)

Making it work would really be cool.

Share this post


Link to post
Share on other sites
RealGecko    496
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

Share this post


Link to post
Share on other sites
Elkram    39
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.

Share this post


Link to post
Share on other sites
RealGecko    496
16 hours ago, Elkram said:

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

It works!

PK4jPLs.png

MUA HA HA HA HAAAAAAA

Share this post


Link to post
Share on other sites
theJesuit    310
6 minutes ago, RealGecko said:

34vKX1n.png

MUA HA HA HA HA HA HAAAAAAAAA

So I take then that version 2.0 is coming soon then? :D

Peace.

Edited by theJesuit

Share this post


Link to post
Share on other sites
RealGecko    496
3 minutes ago, theJesuit said:

So I take then that version 2.0 is coming soon then?

Yeeeeeah :D

Share this post


Link to post
Share on other sites
5thHorseman    7630

Neat! I've wanted something like this for a long time but have been too lazy busy to try to make it myself.

Share this post


Link to post
Share on other sites
RealGecko    496
Just now, 5thHorseman said:

Neat! I've wanted something like this for a long time but have been too lazy busy to try to make it myself.

Well, I was lazy busy too with version 1.0.0, result is known :D:D:D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now