Jump to content

Xyphos

Members
  • Posts

    1,083
  • Joined

  • Last visited

Everything posted by Xyphos

  1. I've been successful thus far in reading ConfigNodes, but now I've encountered a new problem. PART { ... title = #autoLOC_500592 //#autoLOC_500592 = Mk3 Liquid Fuel Fuselage Short ... } How do I decode localized strings?
  2. Domo arigato Herbaru-San. - that's just what I needed to learn from.
  3. link to source? I learn best hands-on, never from manuals.
  4. I wanna import data from a config file and have it instanced as a class object, but I don't know how. C# Code: public class MyClass { public int MyInt; public bool MyBool; } var myClass = iDontKnowHow<MyClass>.ReadFromConfigFile(fileName); CFG File: MYCLASS { MyBool = false MyInt = 1337 }
  5. oh, I tend to use 3.5 for KSP plugins, as I understand it, that's the recommended runtime version?
  6. line 19, there's a dollar sign in front of a string, my IDE shows it as an error, and it's the first I've seen that. usually there's an @ - per chance it's a typo?
  7. thanks. shame there's no easy way to implement this, mind if I use your code?
  8. I wanna make a mod with a GUI and a Toolbar button visible only in the editor. where do I find code or documentation for this?
  9. Have you ever used stack separators but wished they wouldn't contribute to Kessler Syndrome? Separator Destroyer solves that problem. Download via SpaceDock or CKAN (NOTE: CKAN might not have updated to v1.0.0.1 --- download from SpaceDock is recommended instead) Source Code on GitHub Change Log: v1.0.0.1 - Added Feautre: separators are now destroyed on a per-part basis via GUI menu. Disabled by default. v1.0.0.0 - Initial release, all separators were destroyed when decoupled, no exceptions.
  10. [KSPField(isPersistant=true, guiActive=true, guiActiveEditor=true, guiName="Destroyable:")] [UI_Toggle(disabledText="No", enabledText="Yes", controlEnabled=false)] public bool Enabled=false; later on in my code, I want to conditionally hide the right-click menu option for this, in both editor and flight. how would I go about doing that?
  11. I was wondering if there was a way to create a secondary window in a single KSP instance to be placed on a secondary (or primary) monitor that can serve as an MDI parent form for other mods to display their GUI's inside, rather than being stuck using Unity's GUI system within the game and cluttering the screen.
  12. I have a question about the "no clipping" rule; the image below shows a stack separator attached to the ion engine, but it's offset to conceal the engine inside it's hollow cavity, due to the fact that the ion engine doesn't have a stock shroud/fairing. would this be allowed? also, is it okay to clip the LV-N inside the hollow structural fuselage? I'm confused on this one because the engine is a functioning part, but the fuselage isn't and is an exception to the rule; I need it clipped like this because stock LV-N doesn't allow surface attachment for the fuel tanks.
  13. I have a question about the "no clipping" rule; the image below shows a stack separator attached to the ion engine, but it's offset to conceal the engine inside it's hollow core, would this be allowed?
  14. okay, good. now we have TWO options to chose from I also forgot to mention that this is my first DLL code Thingy mod; normally I just deal with CFG tweaks, but this couldn't be done from a cfg file.maybe in the future, I'll make more DLL thingies.
  15. Description: Simple modification for Command Modules and Docking Ports to allow your vessel to be controlled from a specific part through the action groups. no more wasting time trying to find the part to right-click on! Download v1.0.0.0 via: GitHub or SpaceDock Source Code: GitHub
  16. Nevermind, I figured it out; it was a problem in the CFG file, I capitalized "Name" when it should have been all-lowercase. also, I over-engineered the code so I simplified it. /* Control From Here - a module plugin for Kerbal Space Program * Author: William "Xyphos" Scott * Date: April 4, 2017 * Licence: PUBLIC DOMAIN * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace ControlFromHere { public class ControlFromHere : PartModule { [KSPAction("Control From Here")] public void ControlFromHereAction(KSPActionParam param) { vessel.SetReferenceTransform(part, true); } } }
  17. I'm trying to write a simple plugin to add "Control From Here" support for Command Modules and Docking Ports to Action Groups, so I don't have to go around looking for the part to right-click upon, I borrowed a bit of code from "Tweakable Everything" as a reference, but when I run KSP, it doesn't show up in the editor, and I can't figure out why. @PART[*]:HAS[@MODULE[ModuleCommand]] { MODULE { Name = ControlFromHere } } @PART[*]:HAS[@MODULE[ModuleDockingNode]] { MODULE { Name = ControlFromHere } } /* Control From Here - a module plugin for Kerbal Space Program * Author: William "Xyphos" Scott * Date: April 4, 2017 * Licence: PUBLIC DOMAIN * * THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ namespace ControlFromHere { public class ControlFromHere : PartModule { // ReSharper disable once InconsistentNaming private const string CFH = "MakeReferenceTransform"; private ModuleCommand _command; private ModuleDockingNode _dock; public override void OnStart(StartState state) { _command = part.Modules.GetModule<ModuleCommand>(); _dock = part.Modules.GetModule<ModuleDockingNode>(); base.OnStart(state); } [KSPAction(guiName = "Control From Here")] public void DoControl(KSPActionParam param) { if (_command != null && _command.Events.Contains(CFH) && _command.Events[CFH].active) { _command.MakeReference(); return; } if (_dock != null && _dock.Events.Contains(CFH) && _dock.Events[CFH].active) _dock.MakeReferenceTransform(); } } }
  18. Thanks. The vessel wasn't built for that, the only working engine left would've burned for sure. Aerobraking is a very risky maneuver and should be avoided if possible. I had enough in the tanks to do a normal insertion.
  19. While I've only attempted 2 Eve landings, and only returned from 1, I have no desire to return to that hellish place. However, if you want to attempt an SSTO, I'd imagine doing it with a large propeller plane to carry you up to an altitude where the atmosphere is thin enough to consider switching to rocket propulsion. With enough lift from the wings, you won't even need a TWR of 1.2, I'd recommend somewhere around 0.5 so you won't over-accelerate and cause heating problems. I haven't done this myself, but I'm interested in seeing what you come up with. Happy Landings!
  20. Citing the fact that altering a part's construction material can change the overall mass for a part, I'm requesting a mod that can alter a part's mass in-editor, through a multiplier, ranging from 0.25 to 4.0 in other words, TweakScale without the scale, just manipulates the part's mass. My primary reason for this, is because I don't want to install FAR just to get a few of my vessels to fly correctly; I'll just move some of the ship's dry mass towards the nose and balance it out, at the penalty of increased overall mass.
×
×
  • Create New...