• Content Count

  • Joined

  • Last visited

Community Reputation

6 Neutral

About Gyse

  • Rank
    Bottle Rocketeer
  1. I believe I have a fix for the duplicating toolbar issue. The issue seems to be around two problems: 1. Registering for the onGUIApplicationLauncherReady event multiple times, causing OnGUIAppLauncherReady to be called multiple times creating multiple toolbars. 2. Not using the Unreadifying event (which may be what caused the event leak). I tried to reduce down the changes to something smaller, but I wasn't able to get it to work without doing all of this and I didn't have the time to run a full matrix to figure out what all was required. I didn't 100% test this either past loading up multiple ships and noticing the toolbar was no longer duplicating, so use at your own risk. 1. Add support for the onGUIApplicationLauncherUnreadifying event. I did this by overriding the "Awake" function. I also registered for the OnGUIApplicationLauncherReady event here as well. protected virtual void Awake() { if (!ToolbarManager.ToolbarAvailable) { // subscribe event listeners GameEvents.onGUIApplicationLauncherReady.Add(OnGUIAppLauncherReady); GameEvents.onGUIApplicationLauncherUnreadifying.Add(OnGUIAppLauncherUnreadifying); } } void OnGUIAppLauncherUnreadifying(GameScenes scene) { // remove button if ((ApplicationLauncher.Instance != null) && (appButton != null)) { ApplicationLauncher.Instance.RemoveModApplication(appButton); } } 2. In OnDestroyed, make sure and deregister for the events no matter what. It was previously only doing it if appButton != null. public void OnDestroy() { savesettings(); if (button != null) { button.Destroy(); button = null; } if (!ToolbarManager.ToolbarAvailable) { GameEvents.onGUIApplicationLauncherReady.Remove(OnGUIAppLauncherReady); GameEvents.onGUIApplicationLauncherUnreadifying.Remove(OnGUIAppLauncherUnreadifying); if (appButton != null) { ApplicationLauncher.Instance.RemoveModApplication(appButton); } } } 3. Remove all calls to onGUIApplicationLauncherReady.Remove and onGUIApplicationLauncherReady.Add anywhere else not in the code copied above. For code that looked like this: if (appButton == null) { if (ApplicationLauncher.Ready) { OnGUIAppLauncherReady(); } else { GameEvents.onGUIApplicationLauncherReady.Add(OnGUIAppLauncherReady); } } Simply removing the else block seemed sufficient.
  2. First off, thank you so much for creating a 1.2 compatible version of this mod. I just installed the unofficial build you posted and noticed one issue. Whenever I switch from the ship view back to the space center / tracking center, and then select a different ship, the protractor icon in the toolbar to the right duplicates itself. Meaning when I load into the second ship from the tracking station, two protractor icons are visible. If I load into a third ship from the tracking station, three protractor icons are visible. I am currently running the latest version of KSP 1.2 64bit on a Windows 8 machine. The only other mod I have installed is KER (the most recent unofficial version). Thanks
  3. So I just verified what Linear said. I added 1 advanced grabbing unit to my final station. I was at 23 fps. I then armed it, my fps went up to 31. I then disarmed it. During the animation my fps was at 23, but when it reset, it went back up to 31 again. I did not use a macro, I just right clicked on the part. Thanks Linear, while a tiny bit annoying, this at least lets me use those parts. I assume every time I load in to the station (when it is in orbit) I would need to repeat this (once per load, not once forever)?
  4. One extra bit of information. My final station also has 12 of the largest solar arrays, and runs at 33 fps. Those units have animations as well, so it doesn't seem to be every part with an animation. However since I did not observe a problem, I did not test those parts (solar arrays, landing gear, etc...) for a per frame loss. I only checked (fps loss per part starting with an object that had the base framerate of around 35fps): Advanced Grabbing Unit: 7 - 10fps Shielded Docking Port: 3 - 4 fps Clamp-O-Tron Sr.: negligible Clamp-O-Tron: negligible Clamp-O-Tron Jr.: negligible Various unmanned command units: 1fps
  5. I just submitted a bug report. Hopefully this is something they can fix (without requiring Unity 5).
  6. Firstly, I apologize if this is in the wrong forum, I am not specifically asking for support, and there may not be a bug here. I was mostly curious if others had observed something similar. I believe the advanced grabbing unit and shielded docking port have significantly worse performance per part than other comparable parts (non-shielded docking ports, such as the clamp-o-tron and clamp-o-tron sr). These tests are not scientific, but I felt it might be worthwhile to share what I observed. Firstly, the results were duplicated across two separate machines (although very similarly spec'd), both running the Windows 32bit .24.2 version of KSP. I used a career save that I started when the .24 patch was released. 1. Core i7 x980, 12gb Ram, Windows 7 64bit with an nVidia GeForce GTX 660 Ti. 2. Core i7 2500k 8gb Ram, Windows 7 64bit with an nVidia GeForce GTX 660 Ti. Both KSPs used default settings, other than running windowed mode at 1680x1050. I was attempting to build a large station, and my first attempt was a 3fps nightmare. So I decided I would do testing this time to see how big I could get while maintaining an acceptable framerate. I first built the base with fuel pods, other various structural parts, and a few command units. It was around 250 parts, and dropped my framerate to about 35fps. This was on the launch pad, with a stable base so there was no swaying or other interactions. I conducted all further testing from this point. I first added a variety of large (6), medium (shielded version, 4), and small (4) docking ports, with 4 advanced grabbing units, and observed the framerate immediately dropped to <10. I then started doing individual tests, only doing one part at a time. To my surprise, I observed adding 1 Advanced Grabbing Unit would drop my framerate from 35 to about 28 or so, a second one knocked it to about 20. When I tested a shielded docking port, I noticed something similar, although not as pronounced. A single shielded docking port seemed to knock my framerate down by about 3 or 4. The part that confused me was when I then went and added non-shielded versions, Clamp-O-Tron Srs, Jrs, and regular versions, the framerate did not drop a noticeable amount. My current version has 6 Clamp-O-Tron Srs., 14 Clamp-O-Trons, and 2 Clamp-O-Tron Jrs, and my framerate is around 33. I understand I have no knowledge as to how the part was actually implemented, but I liked using the Shielded docking ports because a) I liked the look better and I figured when the shield was "closed" the docking port would be "off" and the reverse of what I observed would be true, they would be cheaper to have on your ship. I assumed the same would be true of the advanced grabbing unit and used them for the same reason (along with allowing ships with no docking port to dock to the station). I did not test if the framerate changed for either item, with them open / armed vs closed. When I found the framerate dropped to an unacceptable level with any of those parts at all used, I simply removed them. I also observed command units, the unmanned versions, had a noticeable fps drop and using only ONE on my base helped framerate as well, although this was only 1 or so fps per unit and that drop seemed to make sense. My station was to go up in parts, so I had multiple command units to dock the parts more easily. I adjusted my design so those units were undocked with the launch vehicle after the station was joined.