Jump to content

genericeventhandler

Members
  • Posts

    280
  • Joined

  • Last visited

Everything posted by genericeventhandler

  1. Solar panels, wouldn't work, that was my first thought, panels obscured would think it was night. I suppose you could look at the increase in Electriccharge, but even that is tricky, how do you decide if you are in darkness? charge is negative, In sunlight charge is positive. I might try this. if charge is negative and ec > 25% turn on lights if charge is negative and ec < 25% turn off lights (to conserve power) if charge is positive and ec > 25% turn off lights ( in sunlight ) Of course that doesn't account for RTG's The other alternative, is to make a light that has a solar panel attached, if the solar panel has flow turn the light off, if it doesn't turn the light on. But that requires creating a special part, and that I'm no good at. I'll try the module thing though.
  2. I don't know if it's possible, I'll have a look to see if I can figure it out.
  3. I didn't say it was good programming practice, just overused in java. In C# if you don't know how to handle something throw the correct exception, or a new exception inherited from System.Exception (never ApplicationException and never inherited from another exception) if the method you are calling throws exceptions, can you avoid those exceptions by doing some checking before? if you can't avoid the exception, let it bubble to a method that can handle it. Log if you catch the exception, but don't log if you throw; GE
  4. Psudeo code, because I don't want to point fingers. If(vesselPart == null) { throw new Exception("Vessel part not found"); } and in the calling method try{ ..... } catch(Exception) { // log the message. <<<< GE: psuedo comment in the code. throw; } There are other instances, where it's just being used for logic try{ PerformActionOnPart(); } catch (Exception) { // Part not found return; } Probably a Java developer at heart, as exceptions are pretty lightweight in Java. No so in C# GE
  5. It's not the debug log, but the actual log file that he is trying to write to, or is that the same thing?
  6. TL;DR: Exceptions are bad, what is the correct way to write to the log? I'm currently looking at other peoples code to learn more about how things work, In the mod I'm looking at, no names, the developer is using Exceptions to log information. I've been doing C# since before day 1, and Exceptions shouldn't be used to define logic, they are hugely memory consuming and slow. So what is the correct way to write to the log in KSP? I might change this mod as it's one I use regularly. Thanks GE
  7. I'm pretty sure you need an input resource to counter your output resource. MODULE { name = ModuleGenerator isAlwaysActive = False requiresAllInputs = True INPUT_RESOURCE { name = ElectricCharge rate = 1 } OUTPUT_RESOURCE { name = Ore rate = 10.0 } }
  8. Hi I'm guessing something is invalid with your config, is that the full file, because I can't see the closing bracket for the Part definition. Try adding an input resource of ElectricCharge if that is not the problem.
  9. If you just want to modify the existing objects and add a new resource, have a look at my modellessmodlets, in my signature. I add a dust resource, look in the drill that you want to modify and add a new resourceharvester just changing the resource type that you need.
  10. Hi, I'm looking for testers for this little plugin I wrote. (Compiled against KSP 1.1.2 and RT 1,7 ) What it does If your probe has no connection at all, it will use the highest range antenna to look for an active signal until it is connected to the network. Usages: Recover those lost probes that went out of the comunications cone during a planetary transfer Switch to another relay satellite, if the signal path is blocked by an unforeseen problem Future updates: I don't know, any suggestions welcome. Version: 0.1 https://github.com/genericeventhandler/RemoteTechAutoScan/archive/master.zip (look for the gamedata folder, it's buried in there somewhere. ) Source : https://github.com/genericeventhandler/RemoteTechAutoScan
  11. TL:DR : Q: How do I get a Vessel object for the current vessel, when not in a part module I'm trying to write a plugin for remotetech that will after a delayed time ( 1 - 2 hours), will start cycling the longest range transmitter through different targets to try to find a connection if there isn't one available. Scenario. My duna network just went out of range of kerbin, but there is a possible connection available via another satelite in a sun orbit. I want to have the probe start cycling possible connections until it finds a valid connection. In the future, this would be done via an interface while still in kerbin orbit, ie. Kerbin - Mission Control Comms Sat 1 - 6 Sun Sat 1 - 6 Jool comms 1 - 6 etc. Thanks GE
  12. Try using this The latest install is near the last page, I use it in my fuel dump / refuelling crafts. You set up the tanks you want to drain first as a higher priority ie 15 turn the pump on. I usually do it this way Lower stages get a priority of 15-14-13 Vampire craft who salvage fuel get 12-11-10 (Priority 0 on the Monoprop main tanks, 11 on the overflow tanks) Fuel dump gets 9 - 8 - 7 and active craft upper stages get 7 - 0 This way I know that my lower stages will burn correctly any lower fuel can be picked up by the vampire ships, fuel transfer is automatic. Vampires dock to the fuel dump and automatically dump their excess fuel into the dump. Any mission craft docking with the fuel dump will automatically be refuelled. Visiting fuel trucks have one rcs tank set to 0 so that they can undock and de-orbit.
  13. Look at Remote Tech and the wiki on how to set up a stationary keo sync network In the early stages, every ship that you send up add a little probe, one probe core, one battery, one solar panel, a communitron 16 and a parachute. When you start your de-orbit burn, release the communication probe when your periapsis is just below 70km , arming the parachute at the same time. Once you get a number of these little probes launching unmanned stuff will be easier until you get your keo-sync satellites in place with communitron 32's. When you have that in place, just switch to each of your mini satellites and watch them fall back.
  14. I have time delay on, For landing, I use landertrons (page 10) and mechjeb translation control to keep the descent to < 50ms, If I'm being very paranoid, I cover the craft in Roverdudes airbags and bounce to a landing. More complex manoeuvres are planned with mechjeb and then executed with the flight computer.
  15. I've built a number of subs today, everything worked well, a couple of points. Close button is needed for the Info window panel, it can stay open if you switch ships. The ballast tank is in another group from the other two parts, they should really all be in the same tech node on the tree. Suggestion: Have a maximum Sink / Surface rate, blowing tanks or filling them to the top can result in bad things happening. Include a part that can be made buoyant that can be surface attached, I used the USI Survivability floats. Include a part that can be made heavy that can be surface attached, I used KIS lead weight. Hope this helps, the basic functions worked great. GE
  16. I'll test some more over the weekend, although diving and auto keeling were working the last time I landed on water, my crafts flip upside down when I blow the tanks.
  17. You realise that the sepratrons are pointing inwards instead of outwards on your boosters. That warm glow in the middle of your rocket appears just after take off. Releasing the launch clamps and seeing TWR 0.99
  18. I'm usually good with checking "Stage Recovery" window to see if I have enough chutes, checking with mechjeb that I have enough dV for the mission. Solar panels are always added, smart part and grouping to deploy passive antennas and fairings when above 57 km. The only thing that I like to add, which I forget a lot is a KIS container with a spare screwdriver in it, I wish I knew how to add one through mm patches. As to staging, that generally messes up, last night I had a one stage + payload with 4 boosters strapped to the side. The boosters went off by themselves and left the payload on the pad. Doh!
  19. Is it a fresh install? Outdated mods can cause some weird stuff in the vab. I would start a new career game, and relearn, a lot has changed since my first rocket. A lot more has changed in the last year. GE
  20. That's it, obviously retextured. but just what I was looking for. thankyou.
  21. It was a tank four to wrap a t800 tank, the outside was the same size as a rockomax slight gap inbetween to put fuel lines. Separator was in the Center of the tank. Colour was big orange tank orange. ;-)
  22. No, but that does look interesting, it was a stand alone tank, one mesh, one texture (orange like a rokomax), and a .cfg file.. thanks though Ge
  23. Hi A while ago someone made a radial detachable tank with it's own decoupler in it, that packed around a T800 to make a rockomax sized tank. I've tried searching for it every way I know but I can't seem to find it. Is the author still about? Thanks GE
×
×
  • Create New...