djungelorm

Members
  • Content Count

    365
  • Joined

  • Last visited

Everything posted by djungelorm

  1. No worries. Can you be more specific as to what doesn't work? Maybe post the code you are trying to use and what (if any) error messages you are seeing? We also have a reasonably active discord group, might be better asking questions on there as you might get a more timely response https://discord.gg/bXuaTrj
  2. The kRPC documentation is not intended to be a beginners guide to C#. I suggest you check this out first: https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/intro-to-csharp/ Not currently. Added a github issue to get this added here: https://github.com/krpc/krpc/issues/541
  3. Not currently possible I'm afraid. I've added an issue to the github to get this added: https://github.com/krpc/krpc/issues/541
  4. You can control as many vessels as you like, as long as the other vessels are within "physics range" of the active vessel (this is a restriction imposed by KSP, not kRPC). Off the top of my head I think this distance is about 25km. If a vessel moves outside that range, the game will unload it and it won't be controllable. Annoyingly, doing a spacex style launch is kind of hard due to this restriction, as your vessels will be more than 25km away from each other. There are mods to increase the physics range but increasing it too much might cause issues for the game.
  5. Hmmm something must be broken. It should be there. Will investigate. @chaossands kRPC v0.4.8 is showing up for me in the latest version of ckan, and looks like it was successfully added to the meta data repository 10 days ago. Are you sure you have updated your ckan repository?
  6. kRPC v0.4.8 has been released! The main new addition is that a lot of functionality is now accessible not just from the flight scene, but from other game scenes too! The documentation website also includes a note by every function indicating which scene(s) it is available in. Support for KSP 1.5.1 and Infernal Robotics NEXT is also included in this release. The "NameTag" mod that allowed name tags to be shared between kRPC and kOS has also now been merged into kRPC, so the separate mod is no longer required. A full change log is available here
  7. kRPC v0.4.8 has been released! The main new addition is that a lot of functionality is now accessible not just from the flight scene, but from other game scenes too! The documentation website also includes a note by every function indicating which scene(s) it is available in. Support for KSP 1.5.1 and Infernal Robotics NEXT is also included in this release. The "NameTag" mod that allowed name tags to be shared between kRPC and kOS has also now been merged into kRPC, so the separate mod is no longer required. A full change log is available here
  8. Yeah currently you have to be in the flight scene, it can't be from the space center scene. I am however working to address this short coming in the next release.
  9. Yes, this is pretty basic functionality. Documentation on how to do this in the python client is here: https://krpc.github.io/krpc/python/client.html#calling-remote-procedures Here's a python example calling launch_vessel_from_sph: import krpc conn = krpc.connect() vessel = conn.space_center.launch_vessel_from_sph(...) Added! Sorry for the delay!
  10. Thanks for spotting this, should be fixed now. (It's set on the KSP-AVC website by the mod developer, so I have to remember to bump the version manually when I do a new release...)
  11. v0.4.7 has been released - just a few bug fixes again this time, as the spare time I can spend on this has been rather limited of late... The full changelog is available here: https://github.com/krpc/krpc/releases/tag/v0.4.7
  12. v0.4.7 has been released - just a few bug fixes again this time, as the spare time I can spend on this has been rather limited of late... The full changelog is available here: https://github.com/krpc/krpc/releases/tag/v0.4.7
  13. Are you sure its not just that sph_h() is always returning zero? It depends on ref_frame. If the reference frame moves with the vessel, then the horizontal speed will always be zero, and so will delta_spd. If this is the case, try with ref_frame = vessel.orbit.body.reference_frame sph_h() is returning floating point values, which will be passed by value in python, so I don't think that's the issue here? Python only passes objects by reference, not simple types like float and int. I think this is a build issue with the current release of kRPC. This has affected a few other things too (including issue 481 and issue 483). Hopefully this will magically fix itself in the next release (which I plan to do sometime this week). In the meantime you could also try this pre-release to see if it fixes the build issue: https://krpc.s3.amazonaws.com/deploy/master/1196.1/krpc-0.4.7-22-g09e0c1c.zip
  14. I had a look at the code for computing terminal velocity, and compared it to how Kerbal Engineer Redux works and they are very different. It's possible that the terminal velocity calculation in kRPC is just totally wrong - and there are no comments in the code explaining what it's doing. I might just recode it to use the same math as KER. Must be a bug in krpcmj. It was coded for a much older version of KSP, so maybe something changed in the KSP API that breaks it.
  15. Not possible currently sorry! I've added an issue on github to get this added: https://github.com/krpc/krpc/issues/484
  16. Try upgrading protobuf >=3.2.0 should work.
  17. @ByteArts sounds cool! Feel free to ask if you have any trouble figuring out the communication protocol
  18. PSA: We now have a Discord server for all things kRPC! Head over to https://discord.gg/c8c36UM to check it out.
  19. I submitted a pull request on the krpcmj project a while ago (https://github.com/artwhaley/krpcmj/pull/4). It got merged, but the DLL in the repository was never updated. In the meantime, you can download a copy of the DLL built with the patch from here: https://www.dropbox.com/s/6vbrugddsf5vknn/krpcmj.dll?dl=0 Also that log file you posted doesn't actually help. Confusingly there are two log files with KSP. The player.log probably has the illuminating error messages in it... See above for where to find it.
  20. They're all available on the github releases page: https://github.com/krpc/krpc/releases Enabling that makes the logging more verbose in KSPs player.log file. These logs aren't viewable in game, but can been in that text log file. It can be found in the following location (which depends on your operating system): Windows: KSP_win\KSP_Data\output_log.txt (32bit) or KSP_win64\KSP_x64_Data\output_log.txt (64bit) or %USERPROFILE%\AppData\LocalLow\Squad\Kerbal Space Program\output_log.txt Mac OS X: Open Console, on the left side of the window there is a menu that says 'files'. Scroll down the list and find the Unity drop down, under Unity there will be Player.log ( Files>~/Library/Logs>Unity>Player.log ) Linux: ~/.config/unity3d/Squad/Kerbal\ Space\ Program/Player.log More details here: https://docs.unity3d.com/Manual/LogFiles.html The debug logging is only really useful if you are designing your own client library.
  21. I just released version 0.4.6. Mainly bug fixes: Removed that annoying incompatible warning with KSP 1.4.3 (as it works fine...) Added game mode, Science, reputation and funds properties LaunchVessel now correctly recovers any vessels on the pad and does all the other pre-flight checks Fixed science transmission Added API for removing stream/event callbacks in all client libraries Full changelog is available here: https://github.com/krpc/krpc/releases/tag/v0.4.6 The orientation used is the one specified when creating the flight object that you are calling simulate_aerodynamic_force_at. And if you don't specify a reference frame when you call vessel.flight() it defaults to the vessel's surface reference frame. To simulate aero forces using using a custom reference frame your code would need to look something like: ref_frame = ... flight = vessel.flight(ref_frame) return flight.simulate_aerodynamic_forces_at(...)
  22. Probably because your installed protobuf version is too old? Try running the following script to see what version of protobuf you have: import google.protobuf print(google.protobuf.__version__) You need version 3.2.0 or higher. You can update it by running pip from a command line: pip install protobuf --upgrade
  23. That error suggests that the server plugin is version 0.4.x but the client is to old to communicate with it. You need to update your python client library to version 0.4.x. If you installed it using pip you can run "pip install --upgrade krpc" to do this