Jump to content

Slother

Members
  • Posts

    25
  • Joined

  • Last visited

Reputation

1 Neutral

Profile Information

  • About me
    Rocketeer
  1. I added some necessary security features like a simple register/login system to prevent deleting ships which the user does not own. A download counter and some other improvements to the UI were also added. Furthermore, I now have access to a server which would be able to host the KerbelCraft-Server. With its basic functionality I would consider it almost done. I hope I find the time to complete it maybe this or next week.
  2. NathanKell is correct. In physics the "sp" would be a subscript like Isp and Hsp, see http://en.wikipedia.org/wiki/Specific_impulse#Rocketry
  3. Update: Source is now available and the server is now able to parse the .craft files. That will come in handy later to detect which mods are used but I haven't decided yet how to handle that. Currently the server will accept everything and you will get an error when trying to load a ship which has parts in it you don't have installed.
  4. The source is available here: https://github.com/JcBernack/KerbalCraft/blob/master/KerbalCraftServer/config-node-parser.js
  5. The current version of KSP (1.0.2) runs with Unity engine version 4.6.4f1, so I would suggest to get that one.
  6. Well, after a good amount of time spent, I think I have reverse engineered the format correctly. I will post the source of the parser as a nodejs module on GitHub soon. It has no dependencies so it could be used with plain javascript pretty much without any change. Porting it to another language should be fairly easy too. The above examples would map to the following JSON: { name: "" nodes: [ { name: "PART", nodes: [], values:{} }, { name: "PART", nodes: [], values:{} } ], values: {} } { name: "EVENTS" nodes: [ { name: "Foo", nodes: [], values:{} }, { name: "Bar", nodes: [], values:{} } ], values: {} }
  7. Is there an up-to-date parser available for the ConfigNode-format? Preferably in javascript (nodejs), but any language would do. Also: Can somebody tell me what drove Squad to build a proprietary format in the first place? It looks so similar to JSON and I can't think of something which their format can store but JSON can not. All the additional work for (de-)serialization for what? - - - Updated - - - If there is none available I would go on and build one, but the format seems to be inconsistent when it comes to collections, or at least I can't see the difference: Example: The collection of parts and modules in a .craft file are separate objects: PART { MODULE { } MODULE { } } PART { } The events and actions within a module on the other hand are not separate: EVENTS { Foo { } Bar { } }
  8. Yes and no. It doesn't work in this case because the runtime thinks it has already loaded the correct assembly and won't load the same assembly twice. I just tested it that for this case to be sure
  9. Ok, but the problem is that System.Core.dll is already loaded and it won't be loaded again automatically. Thats what I meant with dynamic assembly loading magic ;-)
  10. Replacing Kerbals System.Core.dll with the one I mentioned works. The pipe is successfully opened. Overwriting Kerbal assemblies is not very nice though, maybe even against the rules, I don't know. It should be possible to do the same thing with some dynamic assembly loading magic and/or reflection instead of overwriting the original assembly.
  11. I used a decompiler to have a look at the contents of the System.Core.dll that comes with KSP and I can confirm that there are no pipes to be found. The one I found under Unity\Editor\Data\Mono\lib\mono\2.0 does have them. That means KSP is using the Mono Subset? Shouldn't it be possible to force loading of the other assembly? (You would have to ship that assembly with your addon then, of course.)
  12. If anyone is interesed, these are the parameters used by KSP to build the default thumbnails. public static class ThumbnailHelper { /// <summary> /// Generates a thumbnail exactly like the one KSP generates automatically. /// Behaves exactly like ShipConstruction.CaptureThumbnail() but allows customizing the resolution. /// </summary> public static void CaptureThumbnail(ShipConstruct ship, int resolution, string saveFolder, string craftName) { if (ship.shipFacility != EditorFacility.VAB) { CraftThumbnail.TakeSnaphot(ship, resolution, saveFolder, craftName, 35, 135, 35, 135, 0.9f); } else { CraftThumbnail.TakeSnaphot(ship, resolution, saveFolder, craftName, 45, 45, 45, 45, 0.9f); } } /// <summary> /// Builds the path to the auto-generated thumbnail for the given ship. /// </summary> public static string GetCraftThumbnailPath(ShipConstruct ship) { return string.Format("thumbs/{0}_{1}_{2}.png", HighLogic.SaveFolder, ShipConstruction.GetShipsSubfolderFor(ship.shipFacility), ship.shipName); } }
  13. Ok, TakeSnapshot does work when executed while in the editor. I didn't figure out how to do it outside of the editor, but I don't need it there so I'll just accept that.
×
×
  • Create New...