Jump to content

making a mod compatable with backgroudProcessing/Resources


Recommended Posts

@JPLRepo@FreeThinker@linuxgurugamer

 

In the near future (once the current projects are finished and I find some more time) I plan on making ODFC (On Demand Fuel Cells) compatible with backgroundProcessing.

Thing is - there seems to be at least three different versions out there - and no clear cut indication of which is -- well, for lack of better phrase - the one most commonly used. I say three because there is the third - which is the original plus I believe there might be something like it (same original code) in KSPIe.

image.png

 

Now one has instructions for integrating a BR/BP into a mod. Rather straightforward (I think it was the original); just have to add a little code to handle the code, and stubs for BR/BP to hook into.

 

What is further confusing is that the most current version links into a generic RO-TAC github - as part of a whole. Not complaining, just showing I've done some research.

I am not the strongest C#/KSP programmer, else this might be straightforward.

the TL;DR: which is the most used, is there a guide / help to integrating into it and any other helpful words / assistance would be great.

Happy New Year!

 

JPLRepo/background-processing

https://github.com/linuxgurugamer/background-processing/tree/master

 

jamespicone_3475 (*** malicious site we no longer use ***)

Here is the HOWTO guide - will it work with the 'other versions'?

seems that JPLRepo's version is an updated version of @jamespicone's

and then LGG picked it up - but don't think it automatically supports ODFC, so back to the question of if I implement the integration code supplied by @jamespicone (and update it) - will the TACLS version recognize the integration code? the LGG version?

long post - but the topic isn't confusing - just a long series of threads to get lost in.

Thank you in advance and Happy New Year! May all your launches explode with brilliance (oops - go swimmingly!)

Link to comment
Share on other sites

21 hours ago, zer0Kerbal said:

@JPLRepo@FreeThinker@linuxgurugamer

 

In the near future (once the current projects are finished and I find some more time) I plan on making ODFC (On Demand Fuel Cells) compatible with backgroundProcessing.

Thing is - there seems to be at least three different versions out there - and no clear cut indication of which is -- well, for lack of better phrase - the one most commonly used. I say three because there is the third - which is the original plus I believe there might be something like it (same original code) in KSPIe.

image.png

 

Now one has instructions for integrating a BR/BP into a mod. Rather straightforward (I think it was the original); just have to add a little code to handle the code, and stubs for BR/BP to hook into.

 

What is further confusing is that the most current version links into a generic RO-TAC github - as part of a whole. Not complaining, just showing I've done some research.

I am not the strongest C#/KSP programmer, else this might be straightforward.

the TL;DR: which is the most used, is there a guide / help to integrating into it and any other helpful words / assistance would be great.

Happy New Year!

 

JPLRepo/background-processing

https://github.com/linuxgurugamer/background-processing/tree/master

 

jamespicone_3475 (*** malicious site we no longer use ***)

Here is the HOWTO guide - will it work with the 'other versions'?

seems that JPLRepo's version is an updated version of @jamespicone's

and then LGG picked it up - but don't think it automatically supports ODFC, so back to the question of if I implement the integration code supplied by @jamespicone (and update it) - will the TACLS version recognize the integration code? the LGG version?

long post - but the topic isn't confusing - just a long series of threads to get lost in.

Thank you in advance and Happy New Year! May all your launches explode with brilliance (oops - go swimmingly!)

I ditched this mod myself.. and my mods don't use it. Instead I wrote my own. It's currently distributed with a couple of my mods. I did have plans to release it as a separate mod, but haven't got there yet... you know, real life priorities, etc.

Link to comment
Share on other sites

1 hour ago, JPLRepo said:

I ditched this mod myself.. and my mods don't use it. Instead I wrote my own. It's currently distributed with a couple of my mods. I did have plans to release it as a separate mod, but haven't got there yet... you know, real life priorities, etc.

I totally understand RL priorities - and yours are ours. :D

is there a way to integrate into yours like the original?

I am speculating that your is *somewhat* based on it, and maybe the same code will work with it?

Link to comment
Share on other sites

The reason is that nobody is using those plugins and they never got any attention beside a few modders.
Any kind of background processing mod introduce a lot of issues and mean a lot of mod compatibility problems.
The core problem is that the various pieces of stock code related to resource processing (on loaded vessels) have deep issues.
The only real way to get around them all would be to bypass the whole thing and write a whole new resource framework/API complete with all the required partmodules, then convince everyone to use them or to use that common API instead of the stock system/modules.
There has been some efforts here and there but so far nobody has come with something good enough for widespread adoption.

Link to comment
Share on other sites

4 hours ago, Gotmachine said:

bypass

yes, that makes sense.

three points:

  • ODFC does rewrite the stock resource converter and is using modernized code that *seems* to be running very well, very fast, and with a small footprint.
  • KSP is not the same code as it was back then in the zer0.point days. So much has improved and changed, including .NET and Unity and especially the code. Might work better now.
  • Nothing changes in KSP unless the modders first make it so. Every. Single.Improvement. in KSP over the last several years has been driven by the players using mods that broke ground and changed/improved the user experience. *To Go Boldly*

Only way to find out is to try. doesn't matter how many reasons why not, only need one reason to do it. I have that reason. :D Cause I want to, and there are examples of how it can be re-written (Kerbalism for example  and TACLS).

So yes, any assistance I get can to fill in the boilerplate and initially to make sure the boilerplate still integrates is appreciated.

 

Link to comment
Share on other sites

My point is that there is no widely adopted background processing plugin.
The only active ones are JPLRepo's backgroundprocessing and Kerbalism, they are incompatible with each other, the first one isn't really distributed and not maintained much, the latter isn't independent from the whole Kerbalism mod.
So in the context of ODFC, you can add some code to support/integrate with those if you want (although in the case of kerbalism, ODFC is mostly irrelevant), but you will still need your own fallback.

 

Edited by Gotmachine
Link to comment
Share on other sites

59 minutes ago, Gotmachine said:

no widely adopted background processing plugin.

yes there is - in the top

all mods ranked by most downloaded in CKAN:

  • #44 in 1.8.1 compatible mods
  • #56 in all mods.
59 minutes ago, Gotmachine said:

the first one isn't really distributed and not maintained much

see below - updated to 1.8.9 and is available through CKAN.

image.png

59 minutes ago, Gotmachine said:

in the case of kerbalism, ODFC is mostly irrelevant

again I tend to disagree. Since ODFC replaces the stock module, Kerbalism (as good as it is) doesn't control it, and in fact the authors have stated they won't support it. It works as good if not better (especially with upcoming features already in the works) than Kerbalism's integrated version.

For those players who do  not have Kerbalism installed, which is a large percentage, it would be nice to have this option.

For those players (which seem like MANY (see above highlighted image taken just now from CKAN) who want background Resources/Processing - this is a very relevant question. Because if ODFC can integrate, other mods can as well.

Now back to the OP's question without further derailment.

PS

compare and contrast those numbers vs. Kerbalism (which is a great mod):

image.png

Edited by zer0Kerbal
Link to comment
Share on other sites

Those downloads are here because Background Resource is bundled with TAC-LS and DeepFreeze.
As a Kerbalism contributor and someone that followed all those background processing mods since a few years, I was just giving you some insight related to your question.

Background Resource is a rewrite of the old background processing mod, you got JPLRepo answer, he didn't really release it and as far as I know there has been very little activity on it, and I don't think it's really mean't to be hooked into at this state.
The source is here : https://github.com/JPLRepo/REPOSoftTechKSPUtils/tree/master/BackgroundResources

In my opinion it's way too far to be complete for widespread use, it doesn't handle solar panel correctly at high timewarp speeds and it only support stock modules. There are a lot of popular mods using custom converters and generators.
That's why I suggest going the stock way of post-facto processing on vessel load instead of continuous background processing, unless you really want to face all the very hard to fullfill mod support requests that will come with that decision.

Edited by Gotmachine
Link to comment
Share on other sites

57 minutes ago, Gotmachine said:

downloads

it still is being used. >half a million downloads means ALLOT of players are using it.

57 minutes ago, Gotmachine said:

complete

only needs to handle ODFC when it is hooked up. everything / anything else is moot in my opinion. I would like it to work - but that is another issue.

57 minutes ago, Gotmachine said:

think

 

57 minutes ago, Gotmachine said:

opinion

 

So enough derailment of this thread kindly. Unless you have something constructive to add - like code or direct answers to my questions.

 

Edited by zer0Kerbal
Link to comment
Share on other sites

On 1/2/2020 at 4:53 AM, zer0Kerbal said:

which is the most used, is there a guide / help to integrating into it and any other helpful words / assistance would be great.

JPLRepo's Background Resource is the only one alive, BackgroundProcessing by jamespicone is dead since a very long time.
Background Resource isn't really released and isn't meant to be hooked into by external mods like BackgroundProcessing was, as far as I know.

I gave you the link to the Background Resource repo where you can see a some examples of how it adds supports for the stock modules (even some barebone support for a NFE module).
Talk with JPLRepo, maybe he will accept a PR.

Is that a direct answer enough ?

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