Jump to content

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


RealGecko

Recommended Posts

9 minutes ago, RealGecko said:

I wrote Simple Logistics from scratch :D

Your MM patches are nice, but most of the Magic still happens in USI Tools, which you have as a dependency :wink:

That said, personally, I wouldn't want this to be included in MKS, because MKS parts are somewhat "balanced" towards ressource sharing, whereas this looks pretty much like free magic resource transport.

Link to comment
Share on other sites

1 minute ago, Kobymaru said:

Your MM patches are nice, but most of the Magic still happens in USI Tools, which you have as a dependency :wink:

Oh, man! I said it twice and I'll repeat it once more: I'm rewriting the mod, version 2.0 won't have any dependencies except MM. New code. From scratch. Separate DLL. From scratch. For those who are interested here's the code of PartModule:

using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

namespace SimpleLogistics
{
	public class LogisticsModule: PartModule
	{
		[KSPField(isPersistant = true, guiName = "Resource Sharing", guiActive = true)]
		private bool isActive = false;

		public bool IsActive { get { return isActive; } }

		[KSPEvent(guiActive = true, guiName = "Toggle Resource Sharing")]
		private void Toggle() {
			isActive = !isActive;
		}

		public void Set(bool status) {
			isActive = status;
		}

		public override string GetInfo()
		{
			return "Logistics Module for easy resource sharing.";
		}

		public override void OnStart(PartModule.StartState state) {
		}
	}
}

And that's the ONLY PartModule in new version, that will be applied to every command module.

6 minutes ago, Kobymaru said:

whereas this looks pretty much like free magic resource transport.

You don't like it? You don't use it! No one will blame you.

Any other questions?

Link to comment
Share on other sites

2 minutes ago, RealGecko said:

Oh, man! I said it twice and I'll repeat it once more: I'm rewriting the mod, version 2.0 won't have any dependencies except MM. New code. From scratch. Separate DLL.

Sorry, I did not understand that from your posts. Because version 1.0 which is on GitHub now has only patches and a USI Tools dependency. My mistake.

2 minutes ago, RealGecko said:

You don't like it? You don't use it! No one will blame you.

I know, thanks. I was more referring to RoverDudes comment on accepting pull requests.

Link to comment
Share on other sites

Just now, MatterBeam said:

Would you mind if I put it down as suggested mod for use with SimpleConstruction?

Man, I use your Simple Construction in my career, do it, rock on! :D:D:D

2 minutes ago, MatterBeam said:

Also, does this transfer any resources, or does it need an MM patch to be able to use non-stock resources?

It uses MM to add LogisticsModule to command modules (capsules, drone cores) and that's the way to detect if vessel shares resources or not. And when it goes to resources it simply scans every vessel for available resources and spreads them all around the network. So if resource is created as PartResource (doubt if there are other ways :D) then it will be shareable. I tested it with Simple Construction and Snacks and everything looked cool. It plays nicely with CRP, for example Depleted Uranium has:

flowMode = NO_FLOW
transfer = NONE

So it cannot be transferred, even by Simple Logistics :D:D:D

Link to comment
Share on other sites

1 hour ago, RealGecko said:

Man, I use your Simple Construction in my career, do it, rock on! :D:D:D

It uses MM to add LogisticsModule to command modules (capsules, drone cores) and that's the way to detect if vessel shares resources or not. And when it goes to resources it simply scans every vessel for available resources and spreads them all around the network. So if resource is created as PartResource (doubt if there are other ways :D) then it will be shareable. I tested it with Simple Construction and Snacks and everything looked cool. It plays nicely with CRP, for example Depleted Uranium has:


flowMode = NO_FLOW
transfer = NONE

So it cannot be transferred, even by Simple Logistics :D:D:D

Sounds great. I'm encountering a problem when this mod is in use though: I cannot transfer resources manually between different parts. Is this intended?

Link to comment
Share on other sites

3 minutes ago, MatterBeam said:

Sounds great. I'm encountering a problem when this mod is in use though: I cannot transfer resources manually between different parts. Is this intended?

Ah yes, that's the issue, I transfer resources on per part basis instead of per vessel basis. So it is not possible to transfer resources between parts in one vessel until it is connected to network. By the way, I completely forgot to test this, but I think it must work: you can try and lock some resource on some part and it will be preserved.

Link to comment
Share on other sites

2 minutes ago, RealGecko said:

Ah yes, that's the issue, I transfer resources on per part basis instead of per vessel basis. So it is not possible to transfer resources between parts in one vessel until it is connected to network. By the way, I completely forgot to test this, but I think it must work: you can try and lock some resource on some part and it will be preserved.

I'll be more precise: if I have Vessel 1 with tanks A and B, sitting next to Vessel 2, I cannot move resources between tanks A and B.

Link to comment
Share on other sites

4 minutes ago, MatterBeam said:

I'll be more precise: if I have Vessel 1 with tanks A and B, sitting next to Vessel 2, I cannot move resources between tanks A and B.

Ah, yes. That's right too. I thought about adding this feature, but looks like it's a bit tricky to implement, because even though vessels share resources with each other, they're technically separate vessels for the game. And game by itself does not allow to see resources of another vessel in right-click menu and of course does not allow to transfer them :)

That's why I added that "Request Resources" feature. The vessel that's not the part of network may just request desired amount from resource pool.

Link to comment
Share on other sites

For some reason this is not working for me.At first i thought there is a conflict with another mod,but i tried with fresh install (stock,veselemover,MM and simple logistic),with no avail.i get the UI,but not the option for "plug into network".EXtWGxd.jpg

KSP.log:http://pastebin.com/SNt5VNxM

 

Edited by sebi.zzr
Link to comment
Share on other sites

45 minutes ago, sebi.zzr said:

For some reason this is not working for me.At first i thought there is a conflict with another mod,but i tried with fresh install (stock,veselemover,MM and simple logistic),with no avail.i get the UI,but not the option for "plug into network".

That's pretty odd. I see no errors about SL mod loading in the log, but there's a bunch of errors like this one:

[LOG 18:52:10.315] PartLoader: Compiling Part 'Squad/Parts/Misc/AsteroidDay/HECS2/HECS2_ProbeCore'
[ERR 18:52:10.319] Cannot find a PartModule of typename 'ModuleLogistics'

Sometime KSP installation goes crazy, I don't know what causes it. My advice to you: if you're using Steam, then go to Game Properties - Local Files - Verify Integrity of Game Cache. It helped me few times when KSP became really unresponsive :)

24 minutes ago, riocrokite said:

very nice work man, one additional useful thing is that I can now launch rockets without fuel loss using big engines that need to spool up. I just need place a big tank of fuel nearby :wink:

Yeah, I personally want to use the biggest of this tanks to create on surface fuel depot :D:D:D

Link to comment
Share on other sites

11 minutes ago, RealGecko said:

That's pretty odd. I see no errors about SL mod loading in the log, but there's a bunch of errors like this one:


[LOG 18:52:10.315] PartLoader: Compiling Part 'Squad/Parts/Misc/AsteroidDay/HECS2/HECS2_ProbeCore'
[ERR 18:52:10.319] Cannot find a PartModule of typename 'ModuleLogistics'

Sometime KSP installation goes crazy, I don't know what causes it. My advice to you: if you're using Steam, then go to Game Properties - Local Files - Verify Integrity of Game Cache. It helped me few times when KSP became really unresponsive :)

I'm not steam user,i downloaded game from store.
EDIT:I heard that Windows don't like .dlls to be installed in Program Files or in Documents,so i tried again and put everything in C:\Games\KSP_win64 with no avail.

Edited by sebi.zzr
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...