Jump to content

Superfluous J

Members
  • Posts

    15,690
  • Joined

  • Last visited

Everything posted by Superfluous J

  1. My suggestions: Test everything on Kerbin first. Nothing worse than getting everything on Mun and finding out that the docking ports are a quarter meter off. Accept that things won't work even though you tested them on Kerbin. That way, if they do you'll be happy about it Different gravity means things can be slightly off. Usually you can get them to work anyway but be prepared for disappointment. Use wheels, and sideways docking ports. Land nearby and drive the base together. And Finally, look into the Kerbal Attachment/Inventory System mods. They make attaching landed structures much easier.
  2. I think I tried every name I could think of, EXCEPT "facility" ScenarioUpgradeableFacilities.GetFacilityLevel() is exactly what I needed. You are partially responsible for version 0.4 of my mod
  3. Yay for bugfix releases! 0.4: Bugfix Release - Fixed bug in science experiments: AYA allowed you to perform surface samples in a command chair without having to upgrade R&D - Fixed bug in science experiments: AYA would only run the first experiment it came across in any given part. Now it will run each experiment in turn for all parts. Note this did not affect the stock game, but would affect any modded parts with multiple experiments. - Included all source files in source zip, to hopefully make it easier for others to build from source. This is on Spacedock and should be on CKAN soon. See first post for more details.
  4. It may be better to ask "how do I determine data from the persistent file/game state in my mod?",but that's more general than what I need right now. In my mod All Y'All, there is a minor bug in that you can run a surface sample if you have a Kerbal in a command chair but have not upgraded the R&D Building to the 2nd tier. I'd like to plug this hole by checking - whenever a surface sample would be run - the tier level of the building to make sure the Kerbal should be capable of it. I've done a few searches but my Fu doesn't seem strong tonight. I can't seem to find ANY information about modding and the building tiers at all. Anybody have an idea here, or a link to something that could help?
  5. Thank you both! Having solid code examples works wonders for me. However it probably shows how new I am at this whole coding thing that this suggestion: was actually all I needed. Adding those parenthesis at the end not only cleared up the compile error, but now triggers all the experiments!
  6. Between (literally) buying Factorio right before the sale started and expecting No Man's Sky in less than a month, I decided to skip the Summer Sale this year.
  7. Update to this: I found a flaw in my thinking (no surprise there). The variable I had named "thisPart" is not a part at all, but a module. So it appears that the line: var thisPart = eachPart.FindModuleImplementing<ModuleScienceExperiment>(); is the culprit. It's just finding the first experiment. However, I don't know how to tell it to loop through each experiment. Below I have a nonworking line where I renamed thisPart to thisExperiment so it's easier for me to read: foreach (ModuleScienceExperiment thisExperiment in eachPart.FindModulesImplementing<ModuleScienceExperiment>) however this fails with the error: Severity Code Description Error CS0446 Foreach cannot operate on a 'method group'. Did you intend to invoke the 'method group'? To which I answer... "I didn't intend anything. I don't even know what that means."
  8. tl;dr: I can't figure out how to - in code - automatically kick off more than one experiment per part. I got it in my head to make a single part that can do all science experiments. Because I'm lazy. I mean efficient. Anyway. I want - say - the Gravioli Detector to just have all the other experiments in it so I don't have to have to bring all the other stuff too. I used ModuleManager to add the other 4 "simple" experiments (temperature, barometer, seismic, and atmosphere) to the Gravioli Detector and sure enough, in the game the buttons show up and work without a hitch. I can via the (many) buttons execute all 5 experiments, review them, remove them, etc. However, it's clunkly to do so, clunkier than just bringing the other 5 experiment parts along in the first place. Well lucky for me I wrote All Y'All, which automatically kicks off experiments. So I right clicked the part, selected "Perform All Science" and... it only ran the Gravioli Detector. Looks like the moron who wrote this mod set it up to only run whatever experiment it found in the part first. So I dug into the code to see what I could do, and (as is common for me) I couldn't figure it out. I am by no means an expert but it looks to me like it's not even possible to do, though I tend to doubt anything I think about coding. Here's my code as it stands (0.3 version of AYA): public class AYA_Science : PartModule { [KSPEvent(guiActive = true, guiActiveEditor = false, guiName = "Perform All Science")] public void DoAllScience() { foreach (Part eachPart in vessel.Parts) { var thisPart = eachPart.FindModuleImplementing<ModuleScienceExperiment>(); if (thisPart != null) thisPart.DeployExperiment(); } } } And here's what I changed it to that doesn't work: public class AYA_Science : PartModule { [KSPEvent(guiActive = true, guiActiveEditor = false, guiName = "Perform All Science")] public void DoAllScience() { foreach (Part eachPart in vessel.Parts) { var thisPart = eachPart.FindModuleImplementing<ModuleScienceExperiment>(); foreach (KSPModule eachModule in thisPart.Modules) { if (thisPart != null) thisPart.DeployExperiment(something_clever); } } } } There are 2 things wrong with the above code: There is no "thisPart.Modules" list. I don't know how to get the list of all modules in a part, or even if that's what I need to do here. But it seems like a reasonable thing to want. Where I put "something_clever" I have no idea what to put. If anything CAN even be put there. All the examples I've found, that's blank. It seems though with it being blank, the game itself is never expecting a part to have more than one science experiment. So am I just boned? No clever shortcuts for me? Or can someone cleverer than I help a poor scripter-turning-coder out?
  9. I started a new series! (watch it in the spoiler below) I also am working on modding, both All Y'All (Removing those pesky ForEach loops that were great but are now bad for reasons I don't understand but accept, and also trying to trigger multiple experiements on the same part) and possibly also WarpUnlocker (which I want to tweak to my personal liking). But modding can be a super huge chore for me so who knows if either of these will actually happen
  10. According to the Past Broadcasts page, the last few Squadcasts were on June 23rd, June 16th, and June 9th. So normally on Thursdays, and they seem to have taken yesterday off.
  11. I will never understand this outlook. To get to Minmus orbit from LKO, you need about 1100m/s. If you show up at Minmus with empty tanks and fill up there (so you again have 1100m/s) you can: Flyby Moho Land on Gilly and make a good run at coming back. Land on Ike and make a good run at coming back. Flyby Dres Get into orbit of Jool and (via gravity assists) any of its moons. Make a stab at an Eeloo flyby. And these assume that your 1100m/s ship doesn't toss extra mass on its way out (which can greatly increase total dV) that it couldn't ditch on the way to Minmus. 1100m/s Single Stage to Minmus could easily get 50% more dV by ditching dry tanks and whatnot. And don't say it's extra work that you could just throw extra fuel tanks at on the surface. Of course you could. You could save even more time by not playing the game at all. Just because you don't want to do it doesn't make it an inherently bad idea.
  12. Huh. Oh well, you could push them to the top of the staging list, I've done that for things I don't want to deal with before, like motherships with multiple ships each with their own staging. It's usually easier to just put all that stuff in a single stage at the very top of the list because redocking things together messes up staging anyway.
  13. Right click, disable staging. I'm almost positive fairings have that in stock. The big problem with this in my experience is that the fairing bases tend to explode when they get too hot, which they will do if you don't come in perfectly prograde.
  14. Sweet, and no worries. I was just doing a quick test run to see if my "big idea" for the series was workable. It is, so long as I don't kill Jeb too many times.
  15. The pyramids waypoint marker is way off the ground. It may even be in space, it's so high. This may be due to WaypointManager as I'm seeing it on the screen this way, but I figure it's more likely to be in the contract that way. I don't know if the contract itself is wouldn't complete due to this, because I killed Jeb trying to get to the pyramids. It's not all of the waypoints, though. The two for the island airfield were spot on, both for WaypointManager and for the contract completion.
  16. I like putting 2 of the tiny starter fins on a booster angled slightly (5 degrees, using the rotate tool) outward so aerodynamics causes the boosters to magically just drift away. If you place them right on the COM of the dropped stage, and are dropping 4-6 boosters at the same time, it's quite cool to watch them all just drift away while maintaining their facing. I'll try the "single fin on the outside" trick though, as that seems the most elegant.
  17. Not Tylo (though I've got a lander up there that can handle it easily, if it wasn't for the fact that I can't dock to it) but yes, Eve was stop #1. The 3 worlds I didn't land on are Laythe (which is supposed to be next), Vall (which I can SSTSABTO* with the Tylo lander), and Tylo itself. And then of course Kerbin. *Single Stage To Surface And Back To Orbit.
  18. I always wanted to implement what I would call the "70s clock" constellation of ships. 12 large fuel stations that each had filled up at Minmus and then brought itself down into an elliptical orbit as if returning back to Kerbin, but then getting into a stable polar orbit that is guaranteed to never intersect Minmus' or Mun's SOIs. Like this: Then whenever I wanted to go interplanetary, I'd not have to encounter Minmus and all that jazz. My launched ship would just need to match periapses (is that the term?) with the station that was closest to the ideal launch angle, then burn up to meet it (fixing that station's inclination angle temporarily and cheaply out at apoapsis), fuel up, and head off to its destination. Then the fuel outpost would either go back to Minmus to refuel, or there'd be a dedicated refueler for the stations that would go out and fill it back up. It's way more work than I'd want to put in, but I still thought it'd be cool.
  19. If by "still working" you mean "Jeb's orbiting Laythe in a broken game and only has 3 more places to land if I can ever get his docking port fixed, so meh I'll just play Factorio" then yes. I'm still working on it
  20. It's by no means a deal breaker, but I'd like to use the contract pack as a sort of completionist's checklist. I remember being disappointed when I landed at the first Munolith and lost the marker for the other, though it wasn't so bad as I had landed at the other for the video. I have no idea how to fit both things into the same pack, so if it's too hard to work it in I totally understand. It won't affect my doing the series
  21. If the forum change was to make things better for mobile users, then I have really bad news... I loved the old forum on mobile, mostly due to the ability to use the non-mobile page on my phone. The new one is tolerable so long as all I do is read and maybe post short things with no formatting.
×
×
  • Create New...