Jump to content

Untoldwind

Members
  • Posts

    39
  • Joined

  • Last visited

Everything posted by Untoldwind

  1. Kind of forgot to post updates here. So 0.1.5 -> 0.1.8 ... uh ... lots of fixes: https://github.com/untoldwind/KontrolSystem2/blob/master/CHANGES.md (yeah, I'm lazy) Also added the reddit link to the OP post.
  2. No, the language is different. In the long run there might be something like a converter.
  3. On that note: 0.1.5 Minor adjustments to the language to make the range operators ".." a "..." more consistent Null-Checks for the AutopilotAdatper (which let to a null pointer exception in some cases) Added core::std package with string join and format functions The later is based on C# String.Format, so use { format } from core::str format("First: {0,7:F3}, Second: {1,7:F2}, Third: {2}", (1.1234567, 12.345678, "Hallo"))) Gives: "First: 1.123, Second: 12.35, Third: Hallo"
  4. I admit that string operations where not very high on the priority list so far ... and that few and indeed not documented (I'll take care of that on the next free minute). In short: float, vec2, vec3 have a ".to_string()" and ".to_fixed(decimals)" method. I.e. `a = 1.234567 a.to_fixed(2)` should result in the string "1.23". Also strings have a ".pad_right(number)" and ".pad_left(number)" But I agree that this is still pretty clunky to write ... probably the easiest way would be make the C# string.Format available. I'll give that a try. As for the subreddit. I have not been on that platform for years and actually do not really know what to look out for. But I'll gladly join and answer questions if you would provide me with a link. As an alternative: Feel free to create issues on github. To me a misunderstand feels like a bug in the documentation
  5. That would be "geo_coordinates" instead of "geocoordinates". There is some rudimentary documentation for this: https://kontrolsystem2.readthedocs.io/en/latest/reference/ksp/vessel.html#vessel (which lists all the fields on vessel) and https://kontrolsystem2.readthedocs.io/en/latest/reference/ksp/orbit.html#geocoordinates (the fields on the GeoCoordinate object) Obviously a lot of descriptions are missing (... and it looks like there internal links got broken when I migrated the docs to sphinx). And the bindings to the API are certainly not complete yet. If you are missing some vital information, please let me know.
  6. ... I'm lost for words here. Feels like I should print and frame this post. It's an honor. O7
  7. I guess it is no longer a pre-release now: 0.1.4 Combined the toolbar window and the modulemanager window Thanks @sym for the feedback and suggestions Added some really helpful bindings, like "expected_orbit" on maneuvering nodes or "parts_in_stage" on vessel.staging Improved the "exec_node" script It is now much more precise and also detects when staging is necessary
  8. Somewhat smaller patch: 0.1.3 Close all windows if main menu (ESC) is opened Thanks @sym for pointing that out. I played around with `GUI.depth` but that seems to have no effect at all. Look like all IMGUI elements are always on top of the Kerbal UI (which is based on Unity.UI as far as I can tell). So closing all windows is probably the best compromise for now Fix the `vessel.staging.next()` method to actually work Added a `launch_rocket` script to launch a rocket into orbit ... at least for one rocket ... probably should have taken video evidence Will most likely not work on every creation, but that is the actual fun of it I'm not sure if this is possible with in-game objects at all. The original kOS had a build-in telnet-server that you could connect to from an external console window, but this requires opening a listening port, which is most likely not covered by the guidelines for mods. Maybe the other way around is acceptable, i.e. have the mod connect to some external process?
  9. Created another patch release: 0.1.2 Added a hotkey as suggested (Alt-K). This can be toggled of in the BeInEx/SpaceWarp configuration manager if it interferes with something important Added additional bindings to the vessel (thanks Elox btw) Improved the resizing of the console window (stuff should not just vanish any more) Slightly improved the Manager window, though still very basic ... I think I'll eventually merge this with the main window as additional tabs after some refactoring @Elox The CelestrialBodyComponent has a GetAltitudeFromTerrain method, which takes an arbitrary position as argument. I'm not sure if that is what you are looking for. Speaking about "Position": Obviously they have wrapped the coordinate transformations (which as quite messing in the old API). Probably there should be a binding for this so that one can choose the preferred reference frame in the scripts
  10. Obviously I'm very new to the vscode extension business ... maybe there is a difference to the OSS version I am using. Anyway: I just packed the the extension as VSIX (https://github.com/untoldwind/KontrolSystem2/releases/download/v0.1.1/to2-syntax-0.0.1.vsix) which seems to work both on linux and windows (using the three-dots button on the Extensions-Sidebar) Currently the only use of the ModuleManager windows is to show error messages when the Reboot fails (e.g. there is a compilation error somewhere). But I agree that this is very rudimentary at the moment and could need a lot of improvement. ... I think my original idea was to have a list of all the modules (i.e. script files) there, including the "library" scripts that do not appear in the main window, and maybe even something of an in-game editor for quick-and-dirty fixes Any suggestions/ideas are very welcome here, I'm pretty useless when it comes to UI/UX Probably because I pre-fill the lines with spaces to easily support "print_at". I will look into it. On that note: Do you think the console-window should have scrollbars?
  11. Well, the TO2 language I invented is quite different from the KOS language. Some of the key selling points: It's strickly typed (i.e. there is actually a compiler before you can run it and stumple over a silly typo in mid-flight) Internally it is converted to IL-code and (almost) runs with the same speed as C# ... so you can do some numerics in there. E.g. there already is a Lambert-solver, an amoeba-optimizer (aka Nelder-Mead, but amoeba sound cooler) and an simulated anealing optimizer. Which is all put together in the "intercept" example The app-bar is somewhat surprising, I think I'm using the SpaceWarp-API correctly. But I'll take a look into it and see who other mods have dealt with it. A temporary hotkey should be easy to implement Concerning the TO2 language: You can just edit the files in the plugin-folder ( BepInEx/plugins/KontrolSystem2/to2) or add new ones using the "main_flight" entry point. After each change you can press the "Reboot" button in the game an everything gets recompiled (or there is an error in the manager) ... but yes, I'm working on the documentation. And there actually is a vscode plugin: https://github.com/untoldwind/KontrolSystem2/tree/master/Tools/vscode/to2-syntax ... ok it something I just threw together on the spot and you have to manually copy it to you extensions folder
  12. Created an initial patch (0.1.1) https://github.com/untoldwind/KontrolSystem2/releases Fixes Main window is now dragable ... and shows the correct version number Made unit tests running on visual studio on windows Added a (rough) estimation for the burntime so that maneuvering nodes match better now (though still not exact) ... and lots of internal stuff I stumbled over Added features Made time-wrap available to scripting Made SAS available to scripting Made vessel delta-V information available to scripting ... and last but not least a very simple script to execute a maneuvering node This is just using SAS and throttles to 100% for the estimated burn time and is therefore not very good ... but we actually are in kontrol now Anyway what is (roughly) possible now: target the Mun Create an "intercept" maneuver to it Execute that maneuver
  13. Whee ... that is good news The UI is kind of a quick and dirty port from the one I had in KSP 1 where the main window was supposed to be attached to the toolbar. Does not make much sense any more I guess, so I'll fix that. Added that just yesterday, it is ok-ish with some minor issues. On that note: I should probably work a bit more on the documentation of the language itself first Sure, any form of contribution and help is welcome
  14. This is supposed to be a scripting system (like kOS) to control kontrol everything. Obviously this quiet the task, so right now I'm looking for some very brave Kerbonauts to give an initial spin (i.e. see if it works anywhere else but on my machine) Links SpaceDock: https://spacedock.info/mod/3316/Kontrol System 2 Releases:https://github.com/untoldwind/KontrolSystem2/releases Documentation: https://kontrolsystem2.readthedocs.io/ Reddit: http://www.reddit.com/r/kontrolsystem2 Source: https://github.com/untoldwind/KontrolSystem2 Features At the moment the mod is just shipped with 3 demo scripts: hello_world - the obvious one circularize - creates a maneuvering node to circularize the orbit intercept - creates a maneuvering node to intercept the target (only work in the same SOI for now) exec_node - executes the next navigation node (very basic) ... but whole idea is that you create your own. Missing features Lots of documentation - again, the obvious one A lot of bindings are missing to actually write an autopilot, I was focusing on the orbital math so far Installation Requires SpaceWarp 1.3.0 (or later), which in turn also requires UitkForKsp2 Unpack where game executable is located Licence MIT
  15. I wanted to do the same (maybe for a different reason) and actually created a lot of python scripts to compile all the mods I want/need by myself: https://github.com/untoldwind/kerbal-env So far this only works for the Linux version and I have not included MechJeb, 'cause I wanted to do everything with KOS. Still it might give you some hints.
×
×
  • Create New...