Xavier513

Members
  • Content Count

    37
  • Joined

  • Last visited

Community Reputation

22 Excellent

1 Follower

About Xavier513

  • Rank
    Rocketeer

Recent Profile Visitors

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

  1. I'm sorry, SQUAD, but I do not like this one, I have to be honest.
  2. @Mecripp Thanks! I find that mod, too. I decide to calculate total consumption rate by monitoring the amount change rate.
  3. I'm trying to list infos about electricity charge and consumption in my mod. What I know so far is: Charge: solar panels: ModuleDeployableSolarPanel fuel cell: ModuleResourceConverter RTG: ModuleGenerator engines: ModuleAlternator launch clamp: ModuleGenerator Consumption: Light: ModuleLight.resourceAmount Antenna: ModuleDataTransmitter.CommPower others? How to get the total charge rate and consumption rate? Is there any other more convenient method?
  4. Thanks, I'll take a look at KerbalEdu. Besides, am I allowed to build KSP control panels and sell them? Some of the customers are interested in both my courses and my teaching tools(KSP + my homemade control panel). Each copy of KSP is bought and licensed of course.
  5. @AHHans Good point, thanks. It should not be a problem if we see it that way -- having my students/friends watching me playing KSP or playing KSP on my laptop. Besides, I'm using standard KSP because I developed my own control panel for students to play with, based on latest KSP. I think they will love it! Hmmm... Just in case, I think it's also not a problem, if any school want to buy the control panel, and use it on their own licensed KSP software, right?
  6. Hi, I'm a teacher from an education company, and I'm also a KSP player with 500+ hours. I believe KSP has a great value in education and stimulating students' interest in science. I want to design a series of courses for kids in elementary schools, about planes, rockets and those heroic stories of astronauts. KSP will be used as a tool for students to interact with. Students can understand knowledge better, if they can actually operate a space craft. The KSP software is bought and installed in my personal laptop. The courses I designed will be sold to schools, is it OK for me to use KSP in classrooms in daily teaching?
  7. Hi, how to activate the "reverse thrust" mode of an engine? Thanks!
  8. Congrats! Long live KSP! So, what would you like to see in KSP 3?
  9. Awsome! Now the Duna polar area are not covered by icing sugar anymore
  10. What is Kift? Kift is an add-on based on Thrift(v0.12.0) . Kift is a bridge between your code and the game, it lets you control the game with your program running outside of the game. Kift is inpired by kRPC -- a great Mod from @djungelorm -- but implemented in a different way. Dev Thread: https://forum.kerbalspaceprogram.com/index.php?/topic/187084-wip173-kift-thrift-plugin-for-ksp-v010-alpha2-2019-08-10/ GitHub: https://github.com/vaporz/Kift Releases: https://github.com/vaporz/Kift/releases Doc portal: https://vaporz.github.io/Kift/index.html Licensed by LGPL-3.0 . Architecture Kift starts a Thrift server inside of KSP process. The server receives requests, then send them to a Message Queue. A KSP addon will dequeue requests from the queue, and run the corresponding Executor. The server will wait until the response to a request is returned. Supported languages Theoritically, any programming language supported by Thrift v0.12.0 is supported by Kift. Languages supported by Thrift v0.12.0: C, C++, Go, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi, etc. Getting Started 1, Install Kift Download Kift.zip, copy the "Kift" folder in zip file into "Kerbal Space Programe/GameData" directory. Now the server side is ready. When your game is loaded and the main menu shows up, the Thift server is started and listening for requests. 2, Connect to Thrift server, and call Kift APIs To interact with the Thrift server within KSP process, you have to write your own client side codes. Following lines of code show how to call a Kift API to get current vessel's info, in C#: // The game is started, and MUST be in Flight scene. // Import "Kift.ThriftGen.dll"(built from "Kift/thrift-gen/gen-csharp"), // or generate stub codes by yourself, then build and import your DLL file. using Kift; // Import "Thrift.dll": https://cwiki.apache.org/confluence/display/thrift/ThriftUsageCSharp using Thrift.Protocol; using Thrift.Transport; ... // The port is configable in "Kerbal Space Program/GameData/Kift/server.cfg" TTransport transport = new TFramedTransport(new TSocket("localhost", 9090)); TProtocol protocol = new TCompactProtocol(transport); KiftService.Client client = new KiftService.Client(protocol); transport.Open(); // Connect to server Vessel v = client.currentVessel(); // Call API "currentVessel" Console.WriteLine(v.Name); ... transport.Close(); // finally close the connection Kift APIs Kift provides two sets of APIs: "InfoSync APIs" and "Command APIs". "InfoSync APIs" pull infos from the game. "Command APIs" send commands to control vessels/parts/game. Command APIs are devided into three categories according to the target. InfoSync APIs Real time snapshot Read data at real time(approximately), useful when you want to monitor any data, such as height, speed, etc. GetInfo APIs Get data from current game, such as current vessel, the part list of a vessel, etc. Command APIs Vessel Control APIs APIs to control a vessel, such as pitch/yaw/roll, enable/disable RCS, deploy/restract landing legs, etc. Part Control APIs APIs to control a part, such as deploy/restract a solar panel, open/close a cargo bay, etc. Game Control APIs APIs to control the game, such as time warp, change camera mode, set/remove maneuver nodes etc. See more about Kift APIs at the doc portal: https://vaporz.github.io/Kift/api/index.html Kift needs your help 1. Please pay more attention to APIs about position/direction/rotation and reference frames, I spent a lot of time investigaing and learning about them, but I still can not be sure about the correctness. 2. Please report an issue if you find a bug: https://github.com/vaporz/Kift/issues 3. Kift's codes are relatively simple, you're very appreciated to submit a PR and contribute to Kift. 4. English is not my native language, please help me to improve the wording of documentation, or add new articles to "Kift/server/articles". Docs are generated from the "md" files under "Kift/server" using Docfx. 5. I'm quite new to C# programming, in fact, this is my first C# program, so please create an issue if you have any suggestion against the code, for example, coding style, best practices, etc. 6. Star "Kift" on GitHub if you like it
  11. What is Kift? Kift is an add-on based on Thrift(v0.12.0) . Kift is a bridge between your code and the game, it lets you control the game with your program running outside of the game. Kift is inpired by kRPC -- a great Mod from @djungelorm -- but implemented in a different way. Release Thread: https://forum.kerbalspaceprogram.com/index.php?/topic/187109-173-kift-thrift-plugin-for-ksp-v010-alpha2/ GitHub: https://github.com/vaporz/Kift Releases: https://github.com/vaporz/Kift/releases Doc portal: https://vaporz.github.io/Kift/index.html Licensed by LGPL-3.0 . Architecture Kift starts a Thrift server inside of KSP process. The server receives requests, then send them to a Message Queue. A KSP addon will dequeue requests from the queue, and run the corresponding Executor. The server will wait until the response to a request is returned. Supported languages Theoritically, any programming language supported by Thrift v0.12.0 is supported by Kift. Languages supported by Thrift v0.12.0: C, C++, Go, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi, etc. Getting Started 1, Install Kift Download Kift.zip, copy the "Kift" folder in zip file into "Kerbal Space Programe/GameData" directory. Now the server side is ready. When your game is loaded and the main menu shows up, the Thift server is started and listening for requests. 2, Connect to Thrift server, and call Kift APIs To interact with the Thrift server within KSP process, you have to write your own client side codes. Following lines of code show how to call a Kift API to get current vessel's info, in C#: // The game is started, and MUST be in Flight scene. // Import "Kift.ThriftGen.dll"(built from "Kift/thrift-gen/gen-csharp"), // or generate stub codes by yourself, then build and import your DLL file. using Kift; // Import "Thrift.dll": https://cwiki.apache.org/confluence/display/thrift/ThriftUsageCSharp using Thrift.Protocol; using Thrift.Transport; ... // The port is configable in "Kerbal Space Program/GameData/Kift/server.cfg" TTransport transport = new TFramedTransport(new TSocket("localhost", 9090)); TProtocol protocol = new TCompactProtocol(transport); KiftService.Client client = new KiftService.Client(protocol); transport.Open(); // Connect to server Vessel v = client.currentVessel(); // Call API "currentVessel" Console.WriteLine(v.Name); ... transport.Close(); // finally close the connection Kift APIs Kift provides two sets of APIs: "InfoSync APIs" and "Command APIs". "InfoSync APIs" pull infos from the game. "Command APIs" send commands to control vessels/parts/game. Command APIs are devided into three categories according to the target. InfoSync APIs Real time snapshot Read data at real time(approximately), useful when you want to monitor any data, such as height, speed, etc. GetInfo APIs Get data from current game, such as current vessel, the part list of a vessel, etc. Command APIs Vessel Control APIs APIs to control a vessel, such as pitch/yaw/roll, enable/disable RCS, deploy/restract landing legs, etc. Part Control APIs APIs to control a part, such as deploy/restract a solar panel, open/close a cargo bay, etc. Game Control APIs APIs to control the game, such as time warp, change camera mode, set/remove maneuver nodes etc. See more about Kift APIs at the doc portal: https://vaporz.github.io/Kift/api/index.html Kift needs your help 1. Please pay more attention to APIs about position/direction/rotation and reference frames, I spent a lot of time investigaing and learning about them, but I still can not be sure about the correctness. 2. Please report an issue if you find a bug: https://github.com/vaporz/Kift/issues 3. Kift's codes are relatively simple, you're very appreciated to submit a PR and contribute to Kift. 4. English is not my native language, please help me to improve the wording of documentation, or add new articles to "Kift/server/articles". Docs are generated from the "md" files under "Kift/server" using Docfx. 5. I'm quite new to C# programming, in fact, this is my first C# program, so please create an issue if you have any suggestion against the code, for example, coding style, best practices, etc. 6. Star "Kift" on GitHub if you like it
  12. Hi, I'm working on a plugin, what's the difference between Orbit.orbitalSpeed and Orbit.vel? My guess is, they have different reference frames: Orbit.orbitalSpeed is relative to the celestial body's center of mass, and Orbit.vel is the velocity in world reference frame. Am I correct?
  13. @Shadowmage I think this is what "Exclude()" does: for example, Exclude(a, b) = b - Project(b, a)