Jump to content

[WIP] [Plugin] [.22+] Ship Manifest


Papa_Joe

Recommended Posts

Hey all,

I've been lurking the development forums for neigh on 2 years now, tried my hand at a website to manage persistence files and manage parts on vessels. It was gobbled up in the great forum wipe of April.

Since then, I've been searching for something of value to contribute. I think I've found something.

Ship Manifest is a blatant rip off of Crew Manifest. Given that vXSovereignXv has been too busy, and is looking for someone to support Crew Manifest, I started looking at the code. Just as I had updated it for .22, Sarbian released an updated version!!!!

So, I thought oh well. I can use it to learn. Well I did. One of the biggest "holes" in my flight experience was an easy way to manage resources within a given vessel. Oh there are tools out there to do it, as part of a larger toolset, or you can use Hyper edit and others to simply fill your tanks, so to speak. I didn't want to do that. I wanted to have a bit more realism and control over where resources are stored.

So, Ship Manifest was born. Ship Manifest takes Crew manifest to it's logical extention. If we can move kerbals around our ship, why not resources?

First, I've incorporated Crew manifest into this Plugin. More correctly, I've used Crew Manifest as a basis for this work. I would be happy to take over support for Crew Manifest as part of this plug in going forward. Ive been around for a couple of years and plan on being around for awhile longer. Sarbian indicated that while he brought it up to date, he was not going to entertain feature enhancements. (correct me if I'm wrong).

I've then added a Resource Manifest, a tool for moving resources between parts in your ship, using the same easy to navigate system that vXSovereignXv used for Crew Manifest. It is a second button, using Toolbar as Sarbian has incorporated. Toolbar will be included with the distribution.

With that said, I will plan on releasing Ship manifest when it is ready, (week or so...)

Here are some screen shots. Much is already done... Crew manifest you have already seen so I won't bore you with redundant shots.

I'd love to hear of any ideas for enhancements.

screenshot40.png

screenshot39.png

Edited by Papa_Joe
Clarifications
Link to comment
Share on other sites

definately something I would use.. it would save so much time and atl+L click click .. click.. ship is spinning click miss click miss.. Arrggg!! <throws mouse at screen> Yeah.. I could use this.

In my case, I've incorporated Monopropellant into my fairing adapters. You can't click on them no matter what you do, until the fairings pop off...

So, it allows you to have multiple systems flowing simultaneously?

Not sure I understand the question.

Edited by Papa_Joe
Link to comment
Share on other sites

Good idea. I remember to have seen this functionality as part of another mod, but I didn't really want to install that (could have been a large one, or not updated). Therefore, I like to have the possibility to move resources around thanks to this.

Just to brainstorm now: it makes sense to move liquid or gas resources from one to another tank, as long as they are connected. Easy enough to move electric charge among accumulators. It would be gamey to move solid resources, though.

Also, it would be an improvement over the stock game to limit the connections between tanks: most often, in reality, tanks belonging to different stages are not connected.

What about if your mod could simulate pumps and valves and electric switches, as used to control the connections between tanks/accumulators? Maybe to devise a sort of "control panel" where these devices can be activated?

Link to comment
Share on other sites

With that said, I will plan on releasing Ship manifest when it is ready, (week or so...) [noparse][...][/noparse] I'd love to hear of any ideas for enhancements.

  1. Allow the user to specify an exact amount of $Resource to transfer. Kerbals are indivisible (short of the Kethane blender... yuck), LiquidFuel is not.
  2. Pick a license, slap a legal disclaimer on it and release a beta version?

Link to comment
Share on other sites

Not sure I understand the question.

Is the point of the mod so that you can have multiple tanks feeding into one another simultaneously, as opposed to the single-tank the stock game offers? I am a bit unsure about what it actually does, mechanically..

Link to comment
Share on other sites

Is the point of the mod so that you can have multiple tanks feeding into one another simultaneously, as opposed to the single-tank the stock game offers? I am a bit unsure about what it actually does, mechanically..

The point is to make transfering fuels and the like a simple affair.. Diomeda and Fail-Man 3D made some excellent suggestions.. I would add, make fuel transfers use electric charge (Running the pump).. but in that vein I would make two versions of this mod. The game/fun version and the realism/difficulty version. Making allowance for those where difficulty = fun. I guess those guys can keep alt_l click click.. dammit!.

Link to comment
Share on other sites

Love the feedback. Looks like this one may be a keeper.

Is the point of the mod so that you can have multiple tanks feeding into one another simultaneously, as opposed to the single-tank the stock game offers? I am a bit unsure about what it actually does, mechanically..

Actually it does not affect resource flow in any way. It only "simulates" transfers of resources by adding to the target and subtracting from the source.

I think what he's getting at is whether or not you can do two transfers simultaneously

Ah. in actual fact it is possible. Currently I could transfer any or all resources from one part to another or between groups of parts where matching resources exist. Just need to think thru the interface to make it both intuitive and easy.

Good idea. I remember to have seen this functionality as part of another mod, but I didn't really want to install that (could have been a large one, or not updated). Therefore, I like to have the possibility to move resources around thanks to this.

Just to brainstorm now: it makes sense to move liquid or gas resources from one to another tank, as long as they are connected. Easy enough to move electric charge among accumulators. It would be gamey to move solid resources, though.

Also, it would be an improvement over the stock game to limit the connections between tanks: most often, in reality, tanks belonging to different stages are not connected.

What about if your mod could simulate pumps and valves and electric switches, as used to control the connections between tanks/accumulators? Maybe to devise a sort of "control panel" where these devices can be activated?

For a realism mode, I could see the issue with solids. for casual play, I'm not going to "sweat the details" of how moving that resource might occur. If I add a config switch... done.

In fact, this capability exists, on the tweakable in the context menu for the part. Crossfeed capable. turn it off. also there is a flow switch for each resource on the tweakable as well.

you think I should add that capability to the tool to save trying to click the **** part? Sounds like it makes sense. BTW, cant wait to see what tweakables brings ihn .23, and how I may be able to leverage it...

I like the idea of consuming electricity. just need to figure out where to draw current from... (from all could be a long calculation, but also possible)

There is already a fine new mod out that provides the resource switching and control you seek and also provides for action group control. PDCWolf has created Perfectrons. Link: http://forum.kerbalspaceprogram.com/threads/37138-Wolf-Aerospace-Perfectrons-L-E-S-Pack

I'm not going to compete with that. Ship Manifest will simply be another option for control.

**EDIT** On second thought, there may be some things I can do along these lines that will be complementary...

  1. Allow the user to specify an exact amount of $Resource to transfer. Kerbals are indivisible (short of the Kethane blender... yuck), LiquidFuel is not.
  2. Pick a license, slap a legal disclaimer on it and release a beta version?

Agreed. Plan is to create a slider control to allow easy tuning of the amount. My code is already plumbed for it. License will be the same as Crew manifest (do what you want). I'll be uploading to Git and releasing soon. Still a few tweaks, before presentable. I've never done a Spaceport addition before...

I would also make the parts that are being transferred light green on the ship, so you can see what you're doing if you are trying to balance it. Or even better create a COM indicator, like the VAB/SPH

It actually does that. Look in the first image on the left side of the ship. Green for source, Red for target. Same as Crew manifest. I'm working on highlighting all parts Yellow that contain the selected resource in the Resource manifest window.

Edited by Papa_Joe
Link to comment
Share on other sites

For a realism mode, I could see the issue with solids. for casual play, I'm not going to "sweat the details" of how moving that resource might occur. If I add a config switch... done.

It seems to me that resources defined as "NO_FLOW" in the resource config (e.g., solid fuel) should certainly not be transferable.

I love the idea of your mod, but if it allows transferring resources that clearly aren't meant to be transferable, then it's just plain cheating.

Link to comment
Share on other sites

It seems to me that resources defined as "NO_FLOW" in the resource config (e.g., solid fuel) should certainly not be transferable.

I love the idea of your mod, but if it allows transferring resources that clearly aren't meant to be transferable, then it's just plain cheating.

And that is the beauty of this game. You can play it any way you like.

To promote the most fun, I will include the ability to configure it for more realism, disable cheats, etc.

One of the things I'm thinking about is a configurable pump speed. at the moment the transfer is instantaneous. I could make it transfer per a flow calculation of some sort, and smoothly move the resource, over a given period of time. maybe a whirr sound for the mechanics...

anyway....

Link to comment
Share on other sites

The existence of TAC Fuel Balancer should probably be mentioned, since there's something of an overlap in functionality. It doesn't have any of the manifest functions though, and I can certainly see these two as distinct options. I presume you're already aware of it, but I haven't seen it brought up.

Unrelated: Do perfectrons have some sort of resource management function? I thought they were just a nicer looking separatron.

Link to comment
Share on other sites

The existence of TAC Fuel Balancer should probably be mentioned, since there's something of an overlap in functionality. It doesn't have any of the manifest functions though, and I can certainly see these two as distinct options. I presume you're already aware of it, but I haven't seen it brought up.

Unrelated: Do perfectrons have some sort of resource management function? I thought they were just a nicer looking separatron.

I was aware of TAC Fuel balancer, but I viewed this tool as more of a COM type of tool, where I'm really more concerned with moving resources prior to staging, moving resources around a space station, loading vessels prior to undocking, etc...

I do agree tho that I will have to be sure to keep this mod's role distinct in the scheme of the current modscape.

In reference to Unrelated. you are correct. While the mod I referenced is indeed a fine mod, it is NOT the one I was thinking of. The Mod I'm thinking of had several fuel and attachable parts that provided for resource routing and action group control. It looked to be a great mod for managing a complex vessel without having to pull your hair out. I wish I could remember it's name. It had a host of parts.

Edited by Papa_Joe
Link to comment
Share on other sites

In reference to Unrelated. you are correct. While the mod I referenced is indeed a fine mod, it is NOT the one I was thinking of. The Mod I'm thinking of had several fuel and attachable parts that provided for resource routing and action group control. It looked to be a great mod for managing a complex vessel without having to pull your hair out. I wish I could remember it's name. It had a host of parts.
It didn't happen to be RogueTech did it? I think it's defunct now, but I still have the bookmark for it. Never did use it.
Link to comment
Share on other sites

It actually does that. Look in the first image on the left side of the ship. Green for source, Red for target. Same as Crew manifest. I'm working on highlighting all parts Yellow that contain the selected resource in the Resource manifest window.

Doh.. now I see it.

Link to comment
Share on other sites

Just a thought. If you add in power needed to move resources around have multiple speeds. A really slow speed would cost no power (or negligeable) but higher throughput would cost exponentially more. That way you get the best of both worlds. In an absolute emergency you can transfer fuel etc around without power, but normally you would use power just to get it done in a reasonable time. As a note, if this used power to transfer at the same rates as alt right click functionality in stock for transfer, it'd be a bit silly. That stock transfer doesn't use power after all.

Link to comment
Share on other sites

Update:

Release version here: http://forum.kerbalspaceprogram.com/threads/62270-0-23-Ship-Manifest-%28Crew-Manifest-style-Ship-s-Resource-Manager%29

Current activities:

Working out mouse over detection.

I've researched the Unity and c# libraries, and I'm familiar with C# and event handling. I'm struggling with finding the right place to add an event hanlder for on mouse Exit. anybody that can point me in the right direction?

I'm using Tool bar, and I;m managing singleton instances for the controller for each vessel. Any mod out that that have implemented on mou exit this way?

Link to comment
Share on other sites

If what you mean if on mouse events related to the toolbar buttons, please know Trigger Au is developing with those for his own mods.

This is the problem I'm attempting to solve.

Each part will be highlighted to show it contains a selected resource. when you mouse over the part, KSP takes over and clears the highlighting. I want to capture the mouse exit event and revert the highlighting correctly. This way the experience is seamless. SO I need to capture the part's mouse exit event.

I'm not sure how Unity/KSP has implement event handling. I'm certain I can attach a listener to the gui, and figur out from there... how to captuer the gui, and pass it to my controller.

Edit: I think I just solved my problem. I get a collection of parts that contain a given resource. I "should" be able to attach a handler to it....

Gonna go implement ant test...

Looks like it worked!

Release imminent...

Edited by Papa_Joe
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...