panourgue Posted July 13, 2018 Share Posted July 13, 2018 @djungelorm You sir, are a genius. Just sayin'. I've nothing constructive to say, just wanted to share my total admiration for this amazing mod I took a bit of a break from ksp, and today I finally got an itch for it. Decided to try something new, and to my shame I never played with scripting mods (neither krpc not kos). And since @djungelorm offers to write in languages that are known to people I decided to fool around with krpc. First obvious (and completely not clichéd) idea that came to mind was "let's do a grasshopper". Sound easy enough. Say we burn for 200 metres, start to fall, then slam on the throttle for suicide burn. Here we go: As you can see it was a utter success. Next step is to poweslide on top of vehicle assembly building Link to comment Share on other sites More sharing options...
djungelorm Posted July 22, 2018 Author Share Posted July 22, 2018 On 6/19/2018 at 1:11 PM, Freshmeat said: Is there a way to switch between different IVA actors using kRPC? I fly a lot of IVA, and while kRPC has everything else I could dream of controlling, I cannot seem to find that in the docs. Not possible currently sorry! I've added an issue on github to get this added: https://github.com/krpc/krpc/issues/484 Link to comment Share on other sites More sharing options...
Freshmeat Posted July 22, 2018 Share Posted July 22, 2018 Thanks a lot. I am very impressed by the work you have done, and can do most of the basic stuff with kRPC already. Looking forward to go ahead with advanced stuff. Link to comment Share on other sites More sharing options...
djungelorm Posted July 27, 2018 Author Share Posted July 27, 2018 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 Link to comment Share on other sites More sharing options...
Kerbart Posted August 24, 2018 Share Posted August 24, 2018 Somehow AVC (not mini-AVC) still mentions that this version was made to run on 1.4.3. I guess it's checking against an online repository... but where? Link to comment Share on other sites More sharing options...
djungelorm Posted August 24, 2018 Author Share Posted August 24, 2018 2 minutes ago, Kerbart said: Somehow AVC (not mini-AVC) still mentions that this version was made to run on 1.4.3. I guess it's checking against an online repository... but where? 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...) Link to comment Share on other sites More sharing options...
Genhis Posted August 26, 2018 Share Posted August 26, 2018 (edited) Hi, I created a new MechJeb service since krpcmj seems to be outdated. @djungelorm Would you please add it to the kRPC website? https://genhis.github.io/KRPC.MechJeb/ Edited September 14, 2018 by Genhis change website link Link to comment Share on other sites More sharing options...
mstram Posted September 19, 2018 Share Posted September 19, 2018 Is the SpaceCenter API accessible from trom the Python or Ruby clients ? If so, how ? I'm especially interested in the launch_vessel_from_sph function. If not, what would be necessary to add that API to one of the "scripting" clients (i.e. not C# or Java), if it's possible. Link to comment Share on other sites More sharing options...
djungelorm Posted September 23, 2018 Author Share Posted September 23, 2018 On 9/19/2018 at 3:55 PM, mstram said: Is the SpaceCenter API accessible from trom the Python or Ruby clients ? If so, how ? I'm especially interested in the launch_vessel_from_sph function. If not, what would be necessary to add that API to one of the "scripting" clients (i.e. not C# or Java), if it's possible. 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(...) On 8/26/2018 at 1:27 PM, Genhis said: Hi, I created a new MechJeb service since krpcmj seems to be outdated. @djungelorm Would you please add it to the kRPC website? https://genhis.github.io/KRPC.MechJeb/ Added! Sorry for the delay! Link to comment Share on other sites More sharing options...
mstram Posted September 23, 2018 Share Posted September 23, 2018 What "state" does the game need to be in when calling launch_vessel_from_sph ? ** From experimenting, seems I need to launch a "dummy" aircraft on the runway (be in the "flight" mode, in order to execute the launch_vessel_from_sph function. Is there a way to launch a vessel from the "SpaceCenter" scene ? Link to comment Share on other sites More sharing options...
djungelorm Posted September 23, 2018 Author Share Posted September 23, 2018 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. Link to comment Share on other sites More sharing options...
malesquic Posted September 28, 2018 Share Posted September 28, 2018 Hi, I am trying to create my own controler for the game based upon KRPC. One of my goal is to get the amount of fuel in a given stage, I have found a code in this topic based on "resources_in_decouple_stage" but it only returns 0.0. here is the code : import krpc conn = krpc.connect() vessel = conn.space_center.active_vessel while True: stage = vessel.control.current_stage resources = vessel.resources_in_decouple_stage(stage, False) print (stage, "LFO =", resources.amount(" LiquidFuel")) Do you know why ? I am using pyhton 3.7 and the latest version of KSP and KRPC Link to comment Share on other sites More sharing options...
djungelorm Posted September 28, 2018 Author Share Posted September 28, 2018 8 hours ago, malesquic said: Hi, I am trying to create my own controler for the game based upon KRPC. One of my goal is to get the amount of fuel in a given stage, I have found a code in this topic based on "resources_in_decouple_stage" but it only returns 0.0. here is the code : import krpc conn = krpc.connect() vessel = conn.space_center.active_vessel while True: stage = vessel.control.current_stage resources = vessel.resources_in_decouple_stage(stage, False) print (stage, "LFO =", resources.amount(" LiquidFuel")) Do you know why ? I am using pyhton 3.7 and the latest version of KSP and KRPC Looks like there is an erroneous space in your code. Try "LiquidFuel" instead of " LiquidFuel" Link to comment Share on other sites More sharing options...
malesquic Posted September 29, 2018 Share Posted September 29, 2018 10 hours ago, djungelorm said: Looks like there is an erroneous space in your code. Try "LiquidFuel" instead of " LiquidFuel" Indeed ^^ ,but unfortunately, it didn't change anything, I still have the same problem Also do you know how I could get the "surface" or "orbit" status that is diplayed on the navball ? Link to comment Share on other sites More sharing options...
Dunbaratu Posted October 1, 2018 Share Posted October 1, 2018 I hope you don't mind if I barge in here and post this, but although I made LaserDist with kOS in mind, I know I've seen some people use LaserDist with kRPC too, so I thought I'd mention here that I just gave LaserDist an update that I think fixes that annoying phantom false positives problem it had for so long. Further details in the linked post below: Link to comment Share on other sites More sharing options...
DrDam Posted October 8, 2018 Share Posted October 8, 2018 thanks Kerbart for stagging code in https://forum.kerbalspaceprogram.com/index.php?/topic/130742-14x13x122-krpc-control-the-game-using-c-c-java-lua-python-ruby-haskell-c-arduino-v047-27th-july-2018/&do=findComment&comment=3105021 Link to comment Share on other sites More sharing options...
Fillipuster Posted October 16, 2018 Share Posted October 16, 2018 How would I go about getting the navball's current orientation/rotation for use in an external visualization of said ball? Would I have to get the vessel orientation based on the navball's current reference frame? Link to comment Share on other sites More sharing options...
djungelorm Posted October 28, 2018 Author Share Posted October 28, 2018 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 Link to comment Share on other sites More sharing options...
mstram Posted October 28, 2018 Share Posted October 28, 2018 > kRPC v0.4.8 has been released! Does it run on ksp 1.45 ? Link to comment Share on other sites More sharing options...
djungelorm Posted October 28, 2018 Author Share Posted October 28, 2018 8 minutes ago, mstram said: > kRPC v0.4.8 has been released! Does it run on ksp 1.45 ? Yep - it should work with any version of KSP from 1.2.2 and up Link to comment Share on other sites More sharing options...
chaossands Posted November 9, 2018 Share Posted November 9, 2018 Looks like the version on CKAN is only up to v0.4.7, and only says it's compatible up to 1.4.4. Will there be an update for the CKAN version soon? Link to comment Share on other sites More sharing options...
djungelorm Posted November 9, 2018 Author Share Posted November 9, 2018 9 hours ago, chaossands said: Looks like the version on CKAN is only up to v0.4.7, and only says it's compatible up to 1.4.4. Will there be an update for the CKAN version soon? 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? Link to comment Share on other sites More sharing options...
dakhr Posted November 12, 2018 Share Posted November 12, 2018 Hi Can I control 2 vessels, like landing 1st stage and let say perform circulation burn for 2nd ? Link to comment Share on other sites More sharing options...
djungelorm Posted November 12, 2018 Author Share Posted November 12, 2018 20 hours ago, dakhr said: Hi Can I control 2 vessels, like landing 1st stage and let say perform circulation burn for 2nd ? 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. Link to comment Share on other sites More sharing options...
chaossands Posted November 13, 2018 Share Posted November 13, 2018 On 11/9/2018 at 3:14 AM, djungelorm said: 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? I did but it must have failed to refresh. After trying it again yesterday, it showed the new version correctly and installed flawlessly. :-) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now