Jump to content

Katten

Members
  • Posts

    246
  • Joined

  • Last visited

Posts posted by Katten

  1. 1 hour ago, The Minmus Derp said:

    I’ve tested it on 1.4.3 tho. And it wurked!

    Sweeet! However, I really only test it with the last version. And, if I write 1.4.x it is not really clear if I have confirmed compatiblity with the latest version yet... so I'll just keep it like this. I'd like to commit to keeping mods updated at all times to the latest release  =)

  2. 3 hours ago, Gordon Dry said:

    @Katten It's even worse, I assembled my station now and sent up the first crew - an engineer went on EVA to attach some KIS/KAS experiments on a surface ... huge fps drop.

    I checked the log:
    spammed with

    
    NullReferenceException: Object reference not set to an instance of an object
      at AnimatedAttachment+AttachedPartInfo.GetReferenceTransform () [0x00000] in <filename unknown>:0 
      at AnimatedAttachment+AttachedPartInfo.UpdateAttachments (State flightState, Boolean debug, Boolean debugPeriodic) [0x00000] in <filename unknown>:0 
      at AnimatedAttachment.UpdateAttachments (System.Collections.Generic.List`1 attachedPartInfos, Boolean debugPeriodic) [0x00000] in <filename unknown>:0 
      at AnimatedAttachment.FixedUpdate () [0x00000] in <filename unknown>:0 
     
    (Filename:  Line: -1)
    

    All this because I "forgot" to disable AnimatedAttachment on all parts in VAB for all vessels / station extensions I sent up.

     

    Edit:

    ... and it's even a lot more worse:

    Kerbal touched the surface of the vessel, now is stuck like with rubber bands ...

    The activation value is not persistent atm, so it wouldn't have helped. I have not yet had time to test compatibility with KAS, tho it is definitely on the agenda. Hopefully i can test and resolve this soon!

  3. 3 minutes ago, Gordon Dry said:

    @Katten I guess the people who want to use it remember to enable it.

    In most cases the features are even not used, you know?

    When I build a launcher for a station part extension I don't use it, for example.
    Or better said, the normal rocket building process is not prone to use it.

    It's reserved for special purposes.

    Hmm, that's true. I'll put the energy into finding an automatic way of dealing with it tho.

  4. Listen up! Jenna Kerman in Finance has unfortunately noticed the complete lack of incoming funds and the obvious overspending on huaraches.
    She says we need to go out there and get some nice photos of other planets to justify more investments. Our scientists will also be happy to analyze those photos!

    v1.8.0 - Strike a pose
    * Added two cameras for science
    * The hinge now has an optional platform
    * All moving parts now have deploy limits where 100 is fully open
    * Changed action name of all moving parts from Deploy to Toggle to better reflect their function
    * The landing balloon now defaults to the Gear action group

    This is very much a beta!

    Please give feedback on what you think of these parts - the functionality, balancing, models etc.

    Anomalies

    The photos taken with these cameras will most likely show some anomalies due to technical issues or maybe fairies. Hopefully, we can solve all that in the future. 

    Science definitions

    If anyone wants to help with writing texts for the scientific experiment popup menu, that'd be greatly appreciated! It is a simple process of editing a text file (RocketEmporium/ScienceDefs.cfg)

    SOAP-1 Probe Camera
    Early game single photo camera available under Basic Science.
    RoverCamera.png?raw=true

    ProbeCamera.png?raw=true


    SOAP-2 Panorama Camera
    A smaller camera optimized for weight available under Advanced Exploration. Take multiple photos to create a 360 degree panorama!

     

  5. 9 hours ago, Nozza said:

    Updated to 1.4.4 the other day, so I've had a chance to test some new parts. So far, I've noticed 2 bugs and thought of a few suggestions that should be relatively simple to implement. Regarding the bugs, I'm about to leave my PC, so I'll post logs and my mod list in about 6 hours or so when I get back.

    Suggestion #1: Add options to toggle and retract animated parts in action groups such as the extender and hinge, instead of just opening/extending.

    Suggestion #2: Flip the deploy limit on parts like the spherical probe containers, so that it is more in line with stock parts (the mk3 cargo ramp comes to mind). 90 should be almost open, rather than almost shut, in my opinion.

    Suggestion #3: Right now, the hexagonal probe container has 2 options in the editor, whether or not it has a lid. I think there should be an option to remove the lid in flight, like the Apollo-style service bays added in Making History. This would make it more versatile, as there is a larger space to extend things (Rather than relying on 1 hole in the middle), while still protecting the parts inside during ascent. It also means you don't have to go to the trouble of, say, adding an animated open/close feature.

    Bug #1: I decided to test the new extender part by plonking a generic, small reaction wheel on the end of a small extender. In the editor, it correctly moves with the extender; however, in flight, the extender would simply go through the reaction wheel, which remained floating in place at its original position.

    Bug #2: I was putting some of your new, tiny landing legs (the vertical ones, not the triangular ones) on the smallest spherical probe container (Also from the mod). Parts placed inside the container can be rotated and offset freely; however, when I tried landing legs on the outside of the container (I also tried the smallest stock landing legs), they could not. If I placed landing legs on the exterior and attempted to offset or rotate them, they would revert to their original position whenever I changed back to the place tool or selected another part. I also attempted to place a Commutotron HG-55 on a large extender and offset it slightly so it would be perfectly in line, but the bug occurred again.

    Great ideas! 
    #1: should be easy enough, will do. Right now there is only toggle. 
    #2: yeah, that bugs me too. I will check if I need to invert the whole animation or if there is an easier way. I think some stock parts used to suffer from the same issue? Maybe that's why they removed the deploy limit option from the small service bays?
    #3: cool idea, I will check how they do that

    bug #1: hmm, interesting.
    1 Do you know the version of AnimatedAttachment?
    2 Are there wheels on the craft?
    3 Is KJR installed?
    4 Any error messages in the console?
    There is an option "Debug" in the right click menu, if you enable Advanced Tweakables, that will produce a bit more debug output in the console.

    I was not able to reproduce this in my dev KSP installation which is close to stock.
    ExtenderTest.png?raw=true

    Bug #2: Please disable AimatedAttachments for the animated part while fine-tuning the position and rotation. Then turn it on again afterwards! This step is annoying, I will see if I can find a way to detect if the user has selected the fine-tuning tools and handle it automatically.

    8 hours ago, The Minmus Derp said:

    Wooo cameras! How about an orbital camera that requires u to take pics of plernerts

    Cool idea! I'll see if I can add it in a later version. 

  6. I was trying to create this camera, which acts as a science experiment. It requires you to take a 360-degree panorama, which can then be sent for scienz pointz. What do you think?? 

    The part module I created for this can also be configured for a single photo, or other sizes. It also supports showing the current view on a display...

     

     

  7. Disregarding the fact that we already have over-powered jetpacks, I don't think it would be that difficult to implement a tether... could be nice for other related things like Mars landers... (and as mentioned, KAS already have them, tho it is a straight line visually)

  8. 2 hours ago, canisin said:

    Hello you might want to mention this in the OP for non-CKAN users. :) For all others wondering here is the Animated Attachment mod by the same user

    People DON'T use CKAN? But for what reason exactly?? ...just kidding, will add it!

    2 hours ago, The Minmus Derp said:

    Just wondering, is this still compatible with 1.4.3?

    Should be! There was no changes for 1.4.4 compatibility that I am aware of

  9. Nice!

    Here's another work-around - disables all auto-struts on the ship while something is moving, then sets them back to their default value. 

    Spoiler


    /* 
     * Stock auto-strut from wheels cause issues by not implementing the IJointLockState properly.
     * Work-around this by temporarily disabling all auto-struts when something is moving (here 
     * defined as any animation is running).
     */
    [KSPAddon(KSPAddon.Startup.Flight, false)]
    public class AutoStrutUpdater: MonoBehaviour
    {
        bool wasMoving;

        // Collect info about all the parts in the vessel and their earlier auto strut mode
        class PartInfo
        {
            public Part part;
            public Part.AutoStrutMode autoStrutMode;
        }

        PartInfo[] partInfos;

        private static void printf(string format, params object[] a)
        {
            int i = 0;
            string s = (format is string) ? System.Text.RegularExpressions.Regex.Replace((string)format, "%[sdi%]",
              match => match.Value == "%%" ? "%" : i < a.Length ? (a[i++] != null ? a[i - 1].ToString() : "null") : match.Value) : format.ToString();
            Debug.Log(s);
        }

        // Retrieve the active vessel and its parts
        public static List<Part> GetParts()
        {
            List<Part> parts = null;

            if (FlightGlobals.ActiveVessel)
                parts = FlightGlobals.ActiveVessel.parts;
            else
                parts = EditorLogic.fetch.ship.parts;

            return parts;
        }

        void FixedUpdate()
        {
            bool isMoving = AnyAnimationMoving();

            if (isMoving == wasMoving)
                return;
            wasMoving = isMoving;

            printf(isMoving ? "Started moving" : "Stopped moving");

            List<Part> parts = AnimatedAttachmentUpdater.GetParts();

            if (isMoving)
            {
                partInfos = new PartInfo[parts.Count];

                // If any part is moving, we need to de-strut any wheels
                foreach (Part part in parts)
                {
                    // Ignore parts that don't have struting
                    if (part.autoStrutMode == Part.AutoStrutMode.Off)
                        continue;

                    // Create a record to keep track of the part and the current mode
                    PartInfo partInfo = new PartInfo();
                    partInfos[parts.IndexOf(part)] = partInfo;

                    partInfo.part = part;
                    partInfo.autoStrutMode = part.autoStrutMode;

                    printf("Changing auto strut of %s from %s to %s",
                        part.name,
                        part.autoStrutMode,
                        Part.AutoStrutMode.Off);

                    // Remove the struting
                    part.autoStrutMode = Part.AutoStrutMode.Off;
                    part.ReleaseAutoStruts();
                }
            }
            else
            {
                // Go through our list of de-strutted parts and put their original strutting back again
                foreach (PartInfo partInfo in partInfos)
                {
                    if (partInfo == null)
                        continue;

                    printf("Changing auto strut of %s from %s to %s",
                        partInfo.part.name,
                        partInfo.part.autoStrutMode,
                        partInfo.autoStrutMode);

                    // Bring struty back
                    partInfo.part.autoStrutMode = partInfo.autoStrutMode;
                }
            }
        }

        // Check if any animation is moving
        public static bool AnyAnimationMoving()
        {
            List<Part> parts = GetParts();
            foreach (Part part in parts)
                foreach (PartModule partModule in part.Modules)
                    if (partModule.moduleName == "ModuleAnimateGeneric")
                        if (((ModuleAnimateGeneric)partModule).aniState == ModuleAnimateGeneric.animationStates.MOVING)
                            return true;
            return false;
        }
    }

     

  10. Edit: no longer needed =)

    I've tested AA with KJR.

    The CKAN version seems to be incompatible with KSPv1.4.4, and is not active when installed, so it doesn't cause any issues with AA.

    There is a fork of KJR, that works for KSPv1.4.4, available here: 
    https://github.com/meirumeiru/Kerbal-Joint-Reinforcement/releases

    With this version installed, AA will not work. There is however a mechanism in KJR to enable compatibility with robotics mods, made just for this kind of situations. I will ask them to add the fix.

    Meanwhile, you can add the fix yourself by editing the config.xml file in the Gamedata/KerbalJointReinforcment folder.
    Add the following line in the xml file:

    <string name="exemptModuleType6">AnimatedAttachment</string>

    Thanks to TheKurgan who figured out this solution.

×
×
  • Create New...