firda

Members
  • Content Count

    41
  • Joined

  • Last visited

Community Reputation

13 Good

1 Follower

About firda

  • Rank
    Rocketeer

Profile Information

  • Location Array

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. And how would that work? What logic blocks would you need and how to wire it up? That is what I had in mind when I wrote "concrete usage examples" - not just what, but also how, to better evaluate the idea, especially the potential complexity and therefore usefulness. P.S.: Anyway, I myself am not interested in such a mod (am working on scripting mod), was just trying to be positive and constructive.
  2. OK, to give the idea some credit, let us try to come up with concrete usage examples. 1. Automated staging designed while building the ship: - decouplers/separators need some input/trigger - engines and tanks need output when operational/empty - logic operators/circuits (and, or, not - when all / when at least one / when none) - probably some latch/transition logic (switch to logic one when engine became not operational after being operational) - probably stage-number conditional Honestly, that alone would be pretty cool and be supported on consoles (we have mods on PCs, let us not forget about consoles). Any other idea?
  3. I know exactly what are you talking about, because I have created this: The equivalent code would be like: var ride = new logicInput ride.first = motion ride.firstMode = detectChange ride.mode = Logic.Or ride.second = speedOrR ride.onHigh = def G24 = true // moving if M7; return // standby mode if not G2; return // long-life profile G25 = true // signal ride start if not M5; return // ride-signalling off M25 = true // internal signal for delayed start if not S4; return // no valid GPS position record 23 // ride start record send Packet.Report // send the record now M25 = false // we did the job Pros: - people just click on things, there is button/menu/combobox for everything (good intellisense/suggestions in editor are equally good) Cons: - they still need to learn what record is what, which send packet command to use whith what parameters in what situation - some Sxx signals are special, but that is problem of this particular implementation (S4 = haveValidGpsPosition) Now what Visual Programming Language can offer: + focused on offering and clicking ... but text language with good intelliSense (suggestions) is equally good, it is all about how you present it and offer suggestions - slow for experienced users (it does not offer any benefit in power, it even visualises all the statements in code-like structure - if [icon] then .. forever ... func_call args) Conclusion: VPL is coding with very good IntelliSense, nothing more, nothing less (and yes, creating good auto-completion and hints is not so easy, VPL is forcing you to do it right, but again, that is not a problem of progamming language but problem of IDE).
  4. Isn't kRPC PC-centric? Never used that mod but heard it allows for any language to be used but is lagging a lot (some TCP/pipe communicating with external application). Lua could be good, not perfect, I would (being devs) rather use J(ava)Script because it is proven technology and optimized a lot... or Python. ...but as @evandisoft already mentioned, we are working on Lua/ROS (Red Onion Script - my own Ruby/JS/Python-like scripting language) mod for KSP1 and will port it to KSP2. RedOnion vs. kRPC: in-game scripting, no remoting (no lag but limited number of instructions and time per physics update) RedOnion vs. kOS: unrestricted, you can bind to any public KSP/Unity API (`reflect`/`import`/`native`), part-less, run in flight, map, editor, space center... anywhere, do anything. What I would really like to see is some to-native compiled language (like C#Script) .... or maybe I will do that myself one day (ROS is based on my B#/FiLang which already has to-C# translators/generators).
  5. The non-coders (and I now think about electrical-engineers because I remember one system that you could program like drawing a circuit, although it was equivalent/translated to some assembly-like language called "STL" ... I remember Siemens Simantec S700 or something like that) ... the more I think about it the more it screems JohnDeer (but I am really not sure how it was called). The non-coders have to learn something in either case (either circuits / logic-gates or some programming language), so to be more concrete: https://github.com/evandisoft/RedOnion/blob/bf0f65b81dc1d9eb6721c8ccc12c2d7ee770bd22/GameData/RedOnion/Scripts/launch.ros#L232 def staging if !stage.ready return var nextDecoupler = ship.parts.nextDecoupler if nextDecoupler == null return if nextDecoupler.isType("LaunchClamp") print "Releasing launch clamps" stage return if !stage.engines.anyOperational print "No operational engine" stage return if stage.fuel <= 0.1 print "Stage out of fuel" stage return How would you define the above in logic gates? Well, easily, if you already have that `stage.fuel` which already contains all the important logic (and also that `nextDecoupler.isType("LaunchClamp")`). Logic Gates are great, sure, but you first need proper input, otherwise it will get very messy. (`foreach part in ship` - how the hell will you do that in logic gates?)
  6. We are currently testing our mod in KSP 1.8, expect a release soon. The release will include launch script: https://raw.githubusercontent.com/evandisoft/RedOnion/master/GameData/RedOnion/Scripts/launch.ros Parameter GUI: Auto-staging: Circularization: Eccentricity 0.00001 Apoapsis: 79 929 m Periapsis: 79 915 m
  7. Both RedOnion.Script RedOnion.ROS and RedOnion.UI are independent libraries and can be used by anybody (MIT license). The code used to create the test window in the video from Evan (with the "Click Me!" button) looks like this: var wnd = new window function shutdown wnd.dispose wnd.layout = layout.horizontal var left = wnd.add new panel left.layout = layout.vertical var top = left.add new textbox var box = left.add new textbox box.multiline = true box.flexHeight = 1 var right = wnd.add new panel right.layout = layout.vertical var btn = right.add new button btn.text = "Click Me!" var lbl = right.add new label lbl.text = "Clicked 0x" var counter = 0 function click counter++ lbl.text = "Clicked " + counter + "x" btn.click += click wnd.y -= unity.screen.height / 3 The purpose of the shutdown function is to close the window when you click the Red Onion launcher button for second time. It is looking for functions named fixedUpdate, update and onGUI, to execute them from the Launcher : MonoBehaviour, so, you can e.g. try IMGUI from inside function onGUI. The list of imported objects can be seen here (the FillRoot method). UPDATE: UI.Window now has ROS-native wrapper that will dispose the windown on engine reset or scene change. The engine is also no longer looking for any specific function, because you can now subscribe to system.update (aliased as ksp.update) or system.idle which are called from FixedUpdate. Subscriptions to update have precedence, idle may get invoked less often (especially if update used a lot of instructions and/or time). ROS is currently unable to pause and continue the execution, so, do not write infinite loops ROS2 was redesigned to allow yield/wait commands/functions and automatic fiber/coroutine switching - see launch.ros for the usage. I will edit this post later, if we get some feedback...
  8. Was it always needed to DOUBLE click to focus a vessel? I don't think so. Does it behave the same for everybody? 1. Single click just selects the vessel in the list/tree, but does not focus it. 2. Double click selects and focuses. 3. Another double click, when already focused, jumps into the ship. Win10 18xx 64bit, fresh reinstall of everything (new SSD).
  9. https://github.com/ChrisAdderley/StationPartsExpansionRedux/blob/d38160bd6382b798183780a64021e486c58db303/Source/HabUtils/ModuleDeployableHabitat.cs#L455 part.GetConnectedResourceTotals(defn.id, out res, out outRes, true); if (res < DeployResourceAmount) Really looks like rounding error, something like 1/3+1/3+1/3=0.333+0.333+0.333=0.999 < 1. It should probably use Math.Round, but you seem to have it configurable, so it would need another parameter, something like if (Math.Round(res * DeployResourceRound) < Math.Round(DeployResourceAmount * DeployResourceRound)) to mitigate the problem. (Default DeployResourceRound = 100) ...and it could create problem when you try to remove the resource, needing similar check/fix (make everything empty if the difference is < 0.01).
  10. Ahh, the drills, thanks for the info, I will deliver them separately next time. AWESOME! BTW, finished product: ...I will disassemble the SkyCrane and the probe on it, this was just delivery of the Material Kits (tank, storage and flexible docks will stay). The left-most part will ship the fuel up to Mun Station for further use.
  11. Hello, I have a little problem with GC (from USI/MKS) - everything grows extremly large (like 10x the true size), so I have to move it very very far, which gives penalty because any closer would explode the base - it can swallow the entire base which is larger than what I am constructing. Second problem is that it grows into the ground and then jumps to the air, but I have already found out that WorldStabilizer can mitigate this. I have uninstalled it, becase I have installed Kerbal Joint Reinforcement (beta because of Infernal Robotics). The description of KJR suggested it does the same job, but doesn't, so I am installing WS again. It is not that big problem when using WS, I just have to move it far far away and pay the penalty, but it can be used. ...any idea? Mods:
  12. Nope, was some rounding error, or it requires more (greater than) but not exact (same as). I sent three fresh engineers (info states "Crew to Deploy: 3" ... CREW, not engineers), didn't work. Then I disassembled some RCS on the ship I sent the engineers in and IT WORKED! 75 extra MaterialKits did the trick. And then I loaded the save, just when I docked, before deploying. Undocked, thus having the original cew with just one engineer, one technician and three pilots, but with those 75 extra MK and IT DID DEPLOY. Well, the three extra engineers were still within 150m, but not docked. I think I did deploy something earlier with just regular cew, no engineer. Looks awesome, btw, nice mod! EDIT: Loaded again, landed the engineers and then deployed (engineers not needed, the extra MaterialKits were). The Hotel is now officially open: ...damn that thing is power hungry
  13. Any idea why the Mercury won't deploy? I have the MaterialKits right there - 3*3150=9450. Three pilots, one engineer, one technician. Need anything else?
  14. Something like that? I am also using the final Terriers to help the Poodle. ...it is probably overpowered, but I am going to save some poor fellow from the Mun and take him/her together with four tourists to visit my station there, before we return.
  15. kOS is the reason I can achieve orbit with eccentricity 0.0000 (reported by DMagic's Basic Orbit) and see how Apo+Peri are jumping like mad