Jump to content

okbillybunnyface

Members
  • Posts

    113
  • Joined

  • Last visited

Everything posted by okbillybunnyface

  1. It actually appears to be capping out at around 5000x. Out of curiosity, what rate is that set to produce electric charge & water at? edit: nevermind, I just stuck US into my test build and rebuilt it
  2. I accidentally set the new RequestResource() method to be private, so I changed it to public and uploaded a new version. This only affects you if you're a plugin author, so otherwise, feel free to ignore this one.
  3. This is just what you need when the mun starts complaining of leg cramps.
  4. So, I released a new version just now. ^^ This one appears to be pretty robust from my bug testing attempts, I swear!
  5. I just released version 1.2. I wrote a new, way better version of the part.RequestResource() method, which I also commented the hell out of and tried to make easy for other modders to appropriate. Additionally, as I no longer had to dance around the stock part.RequestResource() method, I rewrote pretty much all the code that does the actual resource conversion, and I believe it to be fairly robust now. Please feel free to poke holes in it if you find any. I bug tested it as much as I know how to (without finding anything noteworthy ), but it's hard to fox out everything.
  6. I wasn't entirely sure this would work, but it's transferring resources just fine, and on the first try no less. All I need to do is iron out a divide-by-zero error. I'm kind of proud of myself.
  7. I'm think making my own RequestResource method will solve most issues. It feels like I've been coding around the stock method to keep it from going bump in the night this entire time.
  8. Debugging is hard when so much of the code I'm working with is obfuscated. Give us better documentation, Squad!
  9. Yeah... I'm definitely noticing bugs with the overflow I thought I had squished. I think I'm just going to bite the bullet and rewrite the part.RequestResource() method. I'm tired of its shenanigans. >_>;
  10. Hold the phone--you said you had canOverflow set to false? That should actually stop it from working when it's full. I'll update the readme to specify that. If so, I suspect it's merely not making it to the step where it refunds the input resources for some reason. Them being at a lower final value is probably a rounding error somewhere.
  11. Thanks. That looks a lot like something I was encountering, but I didn't notice it happening on resources other than electric charge. I'll try and see what's going on with it today. The converter keeps its own (hidden) stocks of input/output resources, and requests them independently of the conversion. I suspect it's requesting too fast for some reason.
  12. The storage bag looks great! I can't wait to start including y'all's TAC stuff into my designs. ^^
  13. Indeed! I hadn't considered that, hah. I'll update the install instructions and make a folder structure to encourage consolidation. Thanks
  14. Good news. I fixed the wonkiness with large timewarps. It also appears to work with the test craft you uploaded to your OneDrive. I updated the thread for it. http://forum.kerbalspaceprogram.com/threads/87700-0-24-2-Generic-Resource-Converter-v1-1-Updated-8-2-14?p=1295837#post1295837
  15. Uploaded a fancy new version. I highly recommend you replace the old one. It's quite a lot better.
  16. That is correct. I'll see about adding in the ability to convert on unloaded crafts after I get the initial bugs out.
  17. Thanks for debugging that. Did this happen when you were using the stock generator?
  18. Sorry y'all, I got caught up with work and moving into a new apartment, but here I am.
  19. I've been doing some testing myself with it. I've got a newer version that I need to give you. The one you have has a tendency to think it's full when it's empty (and deactivate if deactivateIfEmpty is true). I also added a few things, and hopefully improved any potential shenanigans with resource transfer (the part.RequestResource() method) by adding in a minimum transfer amount. For inputs, it only requests the minimum transfer if the rate is lower than that, and just waits until it runs out to call it again. If the rate is lower than the minimum, it'll show up on the GUI with occasional blips of 0.0001. With outputs, it stockpiles the resource until it gets more than the minimum, then transfers all of it to the vessel. I also added a canOverflow parameter, which if set to false will stop the converter from running (but won't deactivate it) if there's nowhere to put something. This should take some micromanaging out of it if you're using something at a slower rate than the converter is producing it. There's also a new "Status" field in the part's context menu which will read "Deactivated", "Nominal", "Overflowing!", or "Underflowing!" depending on its activation state, and whether there is a bottleneck somewhere. Edit: The new one works amazingly at anything below 10,000x warp. For some reason, it fails pretty bad after that. :\
  20. [0.24.2] RESOURCECONVERTER v1.22 ---------------------------------------- This is a simple plugin to do resource conversion in a part that doesn't have some of the hang-ups that the stock generator module does. It's intended for use by modders. I made this to help out the guys making Universal Storage, but I thought I'd make a release thread in case someone else has a use for it. INSTALLATION: Simply copy the contents ResourceConverter1.22.zip into your KSP directory, and make the necessary additions to the part's part.cfg (detailed below). MODULE { name = ModuleResourceConverter canOverflow = false //--optional, defaults to false (If set to true, the converter will continue to operate, consuming input resources, even if one of the outputs is full.) deactivateIfFull = false //--optional, defaults to false (If set to true, the converter automatically deactivates if one of the output resources is full.) deactivateIfEmpty = false //--optional, defaults to false (If set to true, the converter automatically deactivates if there one of the input resources is missing. If false, it will continue to 'operate' at 0 speed) INPUT_RESOURCE { name = ElectricCharge rate = 1 } INPUT_RESOURCE { name = LiquidFuel rate = 1 } OUTPUT_RESOURCE { name = MonoPropellant rate = 1 } OUTPUT_RESOURCE { name = Oxidizer rate = 1 } } Download: https://bitbucket.org/okbillybunnyface/moduleresourceconverter/downloads/ResourceConverter1.22.zip Source Code: https://bitbucket.org/okbillybunnyface/moduleresourceconverter/src/ Changelog: v1.22 8/5/2014 -fixed a small bug with passing negative amounts to the RequestResource method (I forgot to add an absolute value....) v1.21 8/5/2014 -Changed the new RequestResource() method to be public (oops). This is a very minor change that won't affect anything unless you plan on making plugins that use the method in this .dll. v1.2 8/5/2014 -Wrote a (much) better version of the stock part.RequestResource() method. Like, there's no comparison. -Rewrote the entire Convert() method to be more robust and to make use of the new RequestResource() method. v1.1 8/2/2014 -Added a status field to converters. -Added canOverflow functionality -Fixed bug with resource flow modes (hopefully, seemed to work) Known Issues: -At large timewarps, the converter may be limited by the total amount of a resource on the vessel rather than (such as with electric charge) the income rate. I'm fairly certain this is due to the order in which resource calculations are performed from one part to the next, and I'm not sure how to fix it. For instance, the converter uses up all the electricity on its turn, but the electric generators don't actually get to replenish it until it's their turn. Solution: Add a bunch of batteries. More info here License: Feel free to use or edit this however you want to. You can credit me if you like, but it is not necessary.
  21. Yeah, it totally borked KSP when I put them in the part.cfgs I was using without the comment // thing. It loads fine with the new sample part.cfg. Sorry ^^; I've been coding in lua too much. It uses -- instead of // for comments. :\
  22. Oops... I made the "optional" comments in my browser, and I forgot to add the // tag haha. I'll edit the post and fix it.
  23. Edit: I am using 64bit KSP on windows Yeah, it should be ModuleResourceConverter.dll I uploaded everything to a bitbucket repo. ModuleResourceConverter.dll Source Code example part.cfg: MODULE { name = ModuleResourceConverter deactivateIfFull = true //--optional, defaults to true (I recommend you leave it true. Otherwise, it'll continue to eat resources) deactivateIfEmpty = false //--optional, defaults to false (If true, it will deactivate if there isn't enough of something. If false, it will continue to operate, albeit at a slower rate set by the limiting reagent) INPUT_RESOURCE { name = ElectricCharge rate = 22 } INPUT_RESOURCE { name = LiquidFuel rate = 0.000036 } OUTPUT_RESOURCE { name = MonoPropellant rate = 0.0448 } OUTPUT_RESOURCE { name = Oxidizer rate = 0.0224 } }
×
×
  • Create New...