Jump to content

dewin

Members
  • Posts

    166
  • Joined

  • Last visited

Everything posted by dewin

  1. Didn't see it mentioned here, but I have one of these for Elite: https://www.amazon.com/Thrustmaster-T-Flight-Hotas-Flight-Stick-Pc/dp/B001CXYMFS Seems like a good introductory HOTAS. It could stand to have another hat switch and/or a couple more buttons, but for something not much more than a Xbox controller in price it's totally worth trying out if you're not sold on the idea entirely. Plus, it's not made by MadCatz, who have some pretty severe QC issues. (See: Saitek before and after MadCatz bought them.)
  2. I'm actually toying with an extension to streams that allows them to trigger callbacks. This would eliminate needing to examine their values in a loop and instead have a function called whenever their value changes, so it would improve performance clientside as well. More about this is in this issue here and the PR that references it. (Python-only for now). I'd almost say take the dynamic one by default since the main reason for wanting generated Python code (and probably Lua/etc as well) is for documentation/inspection/code completion purposes. In fact, it may be sufficient to generate _just_ the documentation -- i.e. a series of dummy classes and methods with docstrings but no actual code.
  3. Is it possible to generate client libraries for the dynamic languages (e.g. Python)? That would aid in things like inspecting in certain IDEs (PyCharm comes to mind) for code completion and whatnot.
  4. Take a look at the docs regarding Reference Frames. Namely, the default reference frame for Flight is the vessel's surface reference frame. The origin of this reference frame is located at the origin of the vessel. In otherwords: from the vessel's perspective, the vessel will always have 0 velocity. From Kerbin's perspective, that might be different. And from Kerbol's perspective, that will be very, very different.
  5. Version 0.2.0 beta is now available; links in the OP. Added client libraries for C#, C++ and Java. Added preliminary support for CKAN and KSP-AVC. This release does not include MiniAVC and does not use the internet to check for version updates, but other providers of MiniAVC/KSP-AVC might Barring any major issues, this is the same version that I'll have in the Release thread -- I'm just delaying that until kOS's final release.
  6. This is precisely why I didn't post the recompile. Well, that and I'd have to actually grab 0.20.1 to do it. The reason I compiled kOS from source in the first place is for my own addon.
  7. I had no trouble building kOS in VS2015, you'll just need to update the assembly references to point at the relevant files in KSP\KSP_x64_Data\Managed. And yes, the simple recompile should fix timewarp while you wait for 1.0.0. I opted to not post my build here to avoid complicating things for the developers in the middle of the 1.0.0 release, but I did consider it. (Timewarp broke because Squad added a new "optional" parameter to the function, but optional parameters in MSIL aren't actually optional at runtime -- they merely instruct the compiler what value it should put there instead.)
  8. If not already present, it might be good to add the boundary altitudes for flying low/flying high/space low/space high as well. I have an open PR to KER that does this here, feel free to steal from it.
  9. There's an IntelliJ kOS syntax plugin out there somewhere, among others -- see https://github.com/KSP-KOS/EditorTools
  10. You're using . (dot) instead of : (colon). Common mistake, I do the same thing all the time. You can also just do IF NOT mod:HASDATA {
  11. And still no-go, same "an attempt was made to load an assembly from a network location error as before: (venv) D:\git\KIPC\dlls>krpc-clientgen cpp KIPC --output-defs defs.json --ksp D:\git\KIPC\KSP KRPC.SpaceCenter.dll kOS.dll kOS.Safe.dll JsonFx.dll ICSharpCode.SharpZipLib.dll KIPCPlugin.dll Error: b"Failed to load assembly 'D:\\git\\KIPC\\dlls\\kOS.dll'.\r\nCould not load file or assembly 'kOS, Version=0.20.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)\r\nAn attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.\r\n" ... oh. But it seems to be giving correct output if I completely ignore all of the dependent assemblies, using. So problem solved! (still no idea why it can't load kOS though) krpc-clientgen cpp KIPC --output-defs defs.json --ksp D:\git\KIPC\KSP KIPCPlugin.dll
  12. Do you mean krpc-clientgen? I tried that originally and went to calling servicedefs directly to to eliminate possible causes, but I've had no luck either way. Discovered that there's also a krpc-servicedefs (hmm), and same result: (venv) D:\git\KIPC>krpc-servicedefs KSP\ KSP\GameData\kOS\Plugins\kOS.dll KSP\gamedata\kos\Plugins\kOS.Safe.dll KSP\gamedata\kos\Plugins\ICSharpCode.SharpZipLib.dll KSP\GameData\KIPC\Plugins\KIPCPlugin.dll Error: b"Failed to load assembly 'KSP\\gamedata\\kos\\Plugins\\kOS.Safe.dll'.\r\nCould not load file or assembly 'kOS.Safe, Version=0.20.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)\r\nAn attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information.\r\n"
  13. I have. Either it doesn't find the service (if I fail to reference KOS), or it complains about the KOS DLL: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See http://go.microsoft.com/fwlink/?LinkId=155569 for more information. My passing KRPC.dll along was in efforts to try to get things to work. (But I also use KRPC.SpaceCenter); at one point I passed it every single DLL I had in gamedata.
  14. You might also consider Scott Manley's KSP videos, including his tutorial series starting here (updated link) They're a bit dated but the idea should be the same
  15. Powershell supports all the fineries of .NET (including inline compiling of C# code), so you'd be using the C# client library package and probably something like Add-Type -Path "path\to\KRPC.Client.dll" $connection = New-Object KRPC.Client.Connection -ArgumentList "Powershell Client" # etc.
  16. Except I could have swore that I had built my own mod a couple times using the .NET 4.5 profile and it registered with kOS just fine. I ultimately dropped it down because I kept trying to use functionality that doesn't exist, but had no problems otherwise. Is kOS built using the .NET 3.5 profile or the unity one? I wonder if that's the difference. (I also wonder if it's because you are checking parent classes for attributes).
  17. Your Python code is looking for the value of a variable named 'test' rather than using "test" as a string. Similar for VAB. I'm guessing that you're new to Python. You may want to familiarize yourself with the language itself before using kRPC -- there's a tutorial in the Python docs, or you might try one of these: (Disclaimer: I can't vouch for any of these, but I've heard the first one come up fairly often) http://learnpythonthehardway.org https://hourofpython.com https://www.codecademy.com/learn/python Or asking for good resources on the Python IRC channel: https://www.python.org/community/irc/
  18. To clarify, having looked over what kOS does, it's not technically loading anything. It's looking over a list of all DLLs that have been loaded and scanning them for classes that have a given attribute using something called Reflection. This is a fairly common practice in the C# world, and KSP itself uses it extensively to do things like load addons/scenarios/part modules. Other addons use it too: kRPC uses it for pretty much the same reason kOS does, and my own mod also does it for its own startup. It's pretty much the best way to track a list of implementations of something without having to hard-code that list. What I don't understand is why kOS encounters the errors in the first place when none of the other implementations do, again this is with me having looked at the code involved. But this is moot anyways, since as @hvacengi said it will be restricted to only scanning DLLs that declare KOS as a dependency or match the naming scheme.
  19. Long since fixed, and I'm back to the problem of either it can't load kOS's assemblies or it can't find the service. The latter occurs if I don't include the kOS DLLs in the command or I try my workaround of using a tool that strips all of the code from an assembly and just leaves behind the declarations. I have my plugin working otherwise (pushed 0.1.1 last night) but the usage is currently limited to clients that don't need the service definitions.
  20. Version 0.1.1-dev2 is now available; links in the first post. 0.1.1-dev2 (2016-07-12) Added KIPC.GetMessages and KIPC.CountMessages for better control and information about the message queue. Added KIPC.ResolveBodies and KIPC.ResolveVessels to handle multiple bodies/vessels at once. Added KIPC.GetProcessor to retrieve the kOSProcessor of a single part (compare to KIPC.GetProcessors which receives all processors on a given vesse) Added KIPC.GetPartsTagged to find parts with a given kOSNameTag.
  21. I don't think F2P is going anywhere anytime soon. Even though a given F2P game may be at best a mediocre success that fizzles out after several months, it still likely turned a profit for the developer... profits that are possibly funding the next F2P title they release that builds on tech the current product already paid for. As a bonus, their fans have to buy all the perks for the new game again. In the era of subscription based MMOs, everyone tended to debate over whether a particular title would be the WoW-killer, or laugh at titles that managed only a few hundred thousand subscribers vs WoW's millions -- forgetting that a mere hundred thousand subscribers are $15/month is quite a respectable amount of revenue. Those MMOs were not always the wild success that WoW was, but still successes.
  22. I did, yes. But again, long time ago so the landscape may have changed since then.
  23. It may have changed in the last couple years, but I remember people having very little luck getting KSP, Linux and ATI cards to play nicely. When I dual booted Mint during 0.90/1.0 so I could run 64-bit KSP, I was glad to have the nvidia card
×
×
  • Create New...