katateochi

[1.3.1] Docking Fuel Pump

Recommended Posts

I have no idea, but do you have enabled something like "obey crossfeed rules" in your game/career difficulty settings?

Edited by Jebs_SY

Share this post


Link to post
Share on other sites
9 minutes ago, Jebs_SY said:

I have no idea, but do you have enabled something like "obey crossfeed rules" in your game/career difficulty settings?

This?

qUUyGUh.png

Does it have to be? It was like this by default.

Edited by BlackSun

Share this post


Link to post
Share on other sites

I would just try both. However ON is more limiting, cause you cannot pump fuel through parts that have no "internal cross feed". However, off should allow to pump what you want.

Share this post


Link to post
Share on other sites
20 minutes ago, Jebs_SY said:

I would just try both. However ON is more limiting, cause you cannot pump fuel through parts that have no "internal cross feed". However, off should allow to pump what you want.

Well, except I can't pump anything in some weird cases. Like shown above. I can't use the mod in any other circumstances than lab conditions. I need it the most in orbit, though...

Share this post


Link to post
Share on other sites

@BlackSun There are some issues with this and I've not had time to figure it out. It's something to do with the logic for working out which parts are on which side of the docking ports, works in some craft designs, but not in others. Bear with me and I'll try to get it fixed. If you could post the test setup craft you've got that doesn't work that would help me.

Share this post


Link to post
Share on other sites

W1jOQhr.png

There are multiple craft, docked in orbit. Orbit One is my intended refueling station, and the Phoenix is docked to it right now along with a fuel tank it hauled up into orbit at the bottom there, and one escape pod craft hidden behind that tank.

It's got two docking rings, up top and at the bottom. The engine is still attached, for emergency orbit corrections since it doesn't even have RCS. But theoretically, lots and lots of fuel.

I'll include the craft files if I can figure out how. Because I don't know how to upload files here...

Share this post


Link to post
Share on other sites
12 minutes ago, BlackSun said:

I'll include the craft files if I can figure out how. Because I don't know how to upload files here...

ah well, as it happens craft sharing is kinda my thing (:wink:) click the KerbalX link in my sig. 
I can't promise a quick fix, but I will do my best!

Share this post


Link to post
Share on other sites
5 hours ago, katateochi said:

ah well, as it happens craft sharing is kinda my thing (:wink:) click the KerbalX link in my sig. 
I can't promise a quick fix, but I will do my best!

I won't be signing up there just to share a file.

There you go:

- with part mods included http://www.filedropper.com/kerbalspaceprogram-blacksuncraftfiles
- just the craft files http://www.filedropper.com/kerbalspaceprogram-blacksuncraftfiles_2

Mods are OPT Space Plane Parts & the Alcubierre-drive "Warp Ship ISX Enterprise".

Hope it helps.

Edited by BlackSun

Share this post


Link to post
Share on other sites

Very useful, i have a question, will it work with resources from life support (TAC)?

And my mod have a micro docking node, did i need to put any code on it's part, or you automatically detect every custom docking port?

My docking port is only for resources. This one.

Screen Shot 2017-01-10 at 2.33.35 AM

(the side one)

Edited by Climberfx

Share this post


Link to post
Share on other sites

The bug just destroyed one of my stations with everything that was docked to it in career mode.

I tried to refuel an empty mono-propelled probe, which didn't work. Without using the pump fuel function, even. I just clicked at both tanks, but it didn't allow me to pump anything anywhere with that docked probe. Then I tried to do it with "pump fuel", and it completely annihilated my entire solar system. Camera mid-space somewhere, nothing existed anymore, altitude full of red zeros - then the game crashed.

On restart and reload, the complete station with everything docked to it is gone. I don't know what exactly is the reason for that, maybe it set the stations altitude to 0, into Kerbins core, or it just completely deleted the station from existance because it was corrupted or whatever - using this without saving your game before you pump any fuel can straight up ruin your game. I'd even go as far as to say with the mod installed, you will randomly find yourself unable to pump ANY fuel to an empty craft which needs it, stranding that craft somewhere because if you try to fuel it, it just nukes everything that's attached to it.

Then again, playing with bigger ships that require refueling without this mod is near impossible, too. We really need that mod to work, it's one of the most important functions that should really be vanilla functionality. Please fix... please ;.;

Share this post


Link to post
Share on other sites
3 hours ago, FellipeC said:

Will it work on 1.3?

No, it doesn't.

Also simple recompiling don't fix it.

Share this post


Link to post
Share on other sites

I think I got rid of the NaN errors / disapearing solar system. So, if anyone is willing to test I made a quick recompile for KSP 1.3.1 x64.

I've included the only source file I changed so you can check what I did here @katateochi. (I know you're gonna hate the changes, but I had to make it idiot-proof for the compiler to exclude compilation errors. :D And it seems to have done the trick! :D)

It doesn't solve the exotic craft design errors tho.

( @katateochi: If you want me to remove the download, please feel free to ask. )

Edited by dueb

Share this post


Link to post
Share on other sites
44 minutes ago, dueb said:

So, if anyone is willing to test I made a quick recompile for KSP 1.3.1 x64.

44 minutes ago, dueb said:

@katateochi: If you want me to remove the download, please feel free to ask.

Dude! This is fantastic! I've not had time to maintain this (KerbalX takes priority on my free dev time) so this is really great.

I've just had a quick test (with simple stock craft design) in 1.3.1 and it seems to be working fine; fuel gets pumped, larger docking ports pump faster than smaller ones, rate of transfer per tank changes depending on how many tanks are involved in the transfer so that's all worked as intended. Only thing I noticed (not sure if that was your changes, not had a chance to look at the code yet) was it doesn't seem to produce much heat during transfer, but that's ok. Ports overheat and then stop transfer if you try to transfer in opposite directions, but they don't explode, which I guess is for the best, safety cut off features and all that! 

Can you send me a pull request on github with your changes and I'll make them the official next release.  For now I'll put a note on the first post to use your 1.3.1 fix.

This is the second time you've helped out with this mod and I really appreciate it. I was wondering, do you want to make this a joint venture?

Share this post


Link to post
Share on other sites

I fully understand KerbalX eats most of your time! Don't worry! :D

About the recompile, I didn't changed anything code-wise: it's just some reformating. So that should not affect anything feature-wise.

And since I have now a github account, sure: I'll submit you a PR, but as I said, I'm not sure you'll like the changes as I makes it a bit less readable. :D (Just some coding habits)

For the joint venture, I'm not opposed to! But I have to admit that I'm lacking plugin writing knowledge for now... What I can do however, is to try to "fix" the plugin as KSP versions releases... :P

(PS: I changed the download link since I noticed I messed up the folder name.)

Share this post


Link to post
Share on other sites
11 minutes ago, dueb said:

And since I have now a github account, sure: I'll submit you a PR, but as I said, I'm not sure you'll like the changes as I makes it a bit less readable. :D (Just some coding habits)

Excellent. I prob won't have time to look at merging it today, but I'll get to it in the next day or two. I'm sure the changes are fine, and if I really don't like your formatting I can always adjust it. My approach is very influenced by the prefered style for Ruby which isn't inline with prefered styles in C so, yeah, whatever! 

15 minutes ago, dueb said:

For the joint venture, I'm not opposed to! But I have to admit that I'm lacking plugin writing knowledge for now... What I can do however, is to try to "fix" the plugin as KSP versions releases... :P

I'm pretty new to plugin writing and C# too, so your help has been very appreciated. Yeah if you can help with updates that would be great and any other fixes/improvements just send me a pull request. 
 

Share this post


Link to post
Share on other sites

PR submitted!

21 minutes ago, katateochi said:

Excellent. I prob won't have time to look at merging it today, but I'll get to it in the next day or two. I'm sure the changes are fine, and if I really don't like your formatting I can always adjust it. My approach is very influenced by the prefered style for Ruby which isn't inline with prefered styles in C so, yeah, whatever!

Yeah, maybe I should redo this PR then... :D Give me some time, I'll send you an other one inline with your formatting.

21 minutes ago, katateochi said:

I'm pretty new to plugin writing and C# too, so your help has been very appreciated. Yeah if you can help with updates that would be great and any other fixes/improvements just send me a pull request.

If I can, sure! I'll do it then! :wink:

 

Edit: New PR submitted! :wink:

Edited by dueb

Share this post


Link to post
Share on other sites

So, I did an other test for good measure, and got the NaN error (again :huh:) while pumping two facing docking ports at the same time.

But I think I tracked down the error this time: NaN errors comes from divisions by zero. And the only place where there is divisions in your code, is in the OnUpdate() function.

tanks["available"].Count and tanks["required"].Count can be equals to 0. So there should checks here. But I can't dig more into it today...

Anyway, if I do this, it's because I'm glad to help! Be sure of that! :wink:

Edited by dueb

Share this post


Link to post
Share on other sites

I've put up a new release (0.0.3) - https://github.com/Sujimichi/DockingFuelPump/releases/tag/0.0.3

This includes @dueb's fixes, some tweaking and a couple new minor features.
Rate of flow and heating of docking ports has been tweaked. Ports should get hot during transfer but shouldn't explode unless transfer is sustained for a long time. Smaller ports overheat faster than large ports. Radiators are a good idea to maintain pump efficiency. 
Context menu now shows some info (efficiency and temp) during transfer.

Structure of settings has been changed and now includes an option to adjust the rate at which ports gain heat (or you can just disable heating).
Settings now also allows you to change which resources are ignored, but default this is just ElectricCharge (noflow resources ie solid fuel are always ignore and that can't be changed).
The resource section of settings also allows you to set certain resources to transfer in the opposite direction. The idea here is for use with things like TAC-LF and waste products are set to transfer in reverse. So a supply ship can connect and you hit pump fuel on the supply ship's docking port and fuel, food, oxygen and water are transferred to the recipient ship while waste, wastewater and carbondioxide are transferred to the supply ship.  
That can be changed in dfp_settings.cfg

 

Share this post


Link to post
Share on other sites

Thanks for this new release @katateochi! :D

Reverse flowing resources are a great idea! I thought about it but didn't to go further...

Anyway, I'm still working on it on my side (with my formatting, I'm sorry :blush:). And if I come up with something, I'll submit you a PR if you want. :wink:

Share this post


Link to post
Share on other sites

new minor version out. 
two main things are
- a fix to the logic for identifying which parts are either side of the docking ports which should fix the issues of the fuel pump not doing anything on some craft designs.
- the "pump fuel" button on the context menu is only show on docking ports which are docked (or pre-attached). 
Also fixed the fuel pump on the claw which wasn't working at all.  There are still some issues with the fuel pump on the claw (ie decoupling doesn't stop the fuel pump).

I would suggest that you disable the heating feature in the settings. I've left it on by default because I do intend for that to be a feature of this, but right now it is not working as I'd like.  I need to think about it some more (and probably learn more about KSP logic around part heating).
 

Share this post


Link to post
Share on other sites

Hello,

Version 0.0.4 is not working for me. The game is loading, kind of, but doesn't show the main menu. Instead, I am looking at a blue sky with the usual HUD and can do nothing. As I am a noob, it would be nice if you could tell me which logs you might need. 0.0.3 is working fine.

Thanks

Alex

Share this post


Link to post
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.