Jump to content

Fengist

Members
  • Posts

    1,777
  • Joined

  • Last visited

Everything posted by Fengist

  1. Yep, I got it saving and loading values using ConfigNode with the OnSave/OnLoad events. But, that ended up bringing yet another problem to light, which I'm starting yet another thread for... thanks.
  2. Yea, that's what I'm doing now. Just thot maybe there was a lazier way to do that.
  3. I can't help you with curved text but I can give you a solution for straight text. Have you considered putting a textmesh pro over top of it, much like what I do with my idiot lights? They're completely transparent and you can select different sizes/fonts and change the text at runtime. The only other solution that I can think of, if this is a UI element, just put the text in the UI and change that at runtime. You could move the transform around a bit in the UI at runtime if placement is an issue. Otherwise, you're going to get into manipulating bitmaps, canvases, brushes and fonts.
  4. Does anyone have an example of how to make a <LIST> persistent? I've tried this but it's not working. I'm not real sure how the collectionIndex (or any of the other settings: i.e. name =, pass = ) works and haven't found a good example. This is a PartModule if that makes any difference. [Persistent(collectionIndex = "MyList")] public List<MyList> MyStuffList = new List<MyList>(); public override void OnStart(StartState state) { if (MyStuffList.Count == 0) //assuming this is a newly created vessel without a list { ... populate the list. } } Thanks.
  5. That I did, and here's why. I have 4 mods now that use it. If I put it in the folder for each mod then there's 4 copies of it lying around with 3 serving no purpose other than consuming space and cpu cycles. The .version files are in the folders with the plugin. Now unless that prevents MAVC from running properly, it sure makes sense to me.
  6. KerBalloons v0.4.3 available for download. Let me know if there are any issues. For a faster response... @ me Enjoy.
  7. I hadn't planned on it. Right now the issue is an easy fix. Joe had a category icon that got busted in a Unity code change and because most of his parts were listed as category=none they weren't being displayed. The method he used worked in the past but now produces one of those 'fuzzy' icons. So, I'm just copying code over from one of my other mods that I know works.
  8. Already working on a patch to fix/upgrade the icon not showing up and should have something up on Curse a bit later today. And go relax LGG, I got this (well, I may still have dumb questions for you in the C# forum :D).
  9. It's on Curse listed as archived. You can find it here: https://kerbal.curseforge.com/projects/the-maritime-pack/files/2425856
  10. Delete any previous installs of KerBalloons before installing this version! Download from CurseForge Designed to gather scientific data without the expense of a sounding rocket, Kerballoons are small, light and can easily be sent with your probes to any planet with an atmosphere gather that all important scientific data. ____________________________________________________________________________________________ This project was originally created by @JoePatrick1 and the original thread can be found here. Thanks Joe for trusting me with your work. Released under the MIT license. Source code can be found here. ____________________________________________________________________________________________ This mod includes version checking using MiniAVC. If you opt-in, it will use the internet to check whether there is a new version available. Data is only read from the internet and no personal information is sent. ____________________________________________________________________________________________ Thanks to @Beale and his modding tutorial He's responsible for this. ____________________________________________________________________________________________ v 0.4.4 release notes are here Release notes for previous versions Current Status For those of you who have used KerBalloons in the past, this is a continuation of JoePatrick1's work. Initially I'll be simply maintaining the status quo. Once I have another project I'm working on more solidified I'll be turning my attention to KerBalloons. For now, let's just say that KerBalloons will make a perfect companion to the other project in my IDE and have no plans to let it sit idle. Joe's concept was to create scientific research balloons that were cheaper than rockets but gathered the same science. I plan to continue that concept and hopefully, expand on it. I feel that not only should KerBalloons be a fun and immersive mod, it should also offer educational opportunities by reflecting the use of real-world balloons. Future Plans Rework the lifting mechanism to reflect real-world physics with actual lifting gasses. Joe's physics works great but adding in lifting gasses will add more immersion. It'll require you to think about how you're going to bring them back down, refuel them and move them to new locations. (Move them? Why?...) REAL science, not mystery goo. Adding in a data recorder that will track and record flight data and save it. Create your own scientific charts and graphs from various locations/planets and compare them. Pressure release valves - Your balloons will be able to maintain an ideal altitude for long duration science monitoring. "Croce" pumps - Create your own project Loon using balloonets that will let your KerBalloon descend without deflating. (This may require adding in airparking which I'm not a huge fan of due to being unrealistic. Unfortunately, I know of no other way to safely leave a vessel in flight and have it not vanish, explode or get eaten by a Kraken.) Maybe's A gondola? Hot air? Movement simulating air currents? Bloostar? - Adding in specific parts that will allow extreme high altitude launches of satellites. (This will take some SERIOUS ballooning.) Enjoy and please feel free to ask any questions or discuss any of the ideas I have. And to get you in the mood for ballooning, some "Champagne Soul"...
  11. Just checked. It was running in OnStart and not Start. Stumbled on another way to do this. Fields[nameof(openUI)].uiControlEditor.onFieldChanged = delegate (BaseField a, System.Object b) { FASLog.Writelog("OPEN UI"); }; And again, it works in the editor, but not in flight. And then... I saw the blatantly obvious answer field = Fields[nameof(containsBalloonet)]; field.uiControlFlight.onFieldChanged = onGUIChange; It was staring me right in the face but I, and another old modder InfiniteDice simply did not see it.
  12. Thanks, I'll give that a try tomorrow and let you know. Had enough facedesking for one day.
  13. That's in the partmodule Start and it's before I check to see if it's editor or flight. I moved those lines around so they're only called in the editor or called in fight with no difference. Supposedly, it's a callback to a function I named onGUIChange. When the UI_Toggle is clicked it's supposed to call that function. I'm trying to use the partmodule UI to open a main UI. In the editor, it performs the callback just fine. I click on the UI_Toggle and it calls the function. In flight... it does nothing. I've tried debug logging and it never even gets to the function. I was trying to track down why or come up with a workaround when I went stupid with the booleans.
  14. ya know what.... It's time for me to go to the house.... I should have known that. I'm getting too old to write code. I'm forgetting more than I"m learning. Thanks. Well maybe you can tell me this which is got me off on that stupid wild goose chase. BaseField field = Fields[nameof(myUIToggle)]; field.uiControlEditor.onFieldChanged = onGUIChange; That works as intended in the Editor. It calls on GUIChange when the toggle is clicked. But it doesn't work in flight.
  15. Can someone else confirm that I haven't lost my mind... In the partmodule declarations... [KSPField(guiName = "myToggleButton", guiActiveEditor = true, guiActive = true, isPersistant = true), UI_Toggle(controlEnabled = true, disabledText = "Off", enabledText = "On", invertButton = false, scene = UI_Scene.All)] public bool myToggle = false; In the FixedUpdate FASLog.Writelog("OnUpdate " + myToggle); The logged output reads all False until I click the toggle and then... I get this 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate True 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate True 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate True 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate True 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate True 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate True 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate False 8/14/2018 4:13:58 PM: OnUpdate True I have searched all of my code and those are the only two places where that variable appears. I have ripped out the declaration, changed the variable name and smashed a few chairs trying to figure out WHY it's doing this. Thanks
  16. Anyone have an easy way to add a stock particle effect to a transform? Turn it off and on? Thanks. *edit* Here's what I have that's not working: float effectStrength = Mathf.Min((float)P, 1) * EffectThreshold; effects = GetEffect(); var te = effects.Trail.emission; effects.Trail.transform.position = this.part.FindModelTransform("exhaustTransform").position; if (effectStrength > 0) { te.enabled = true; } else { te.enabled = false; } FASLog.Writelog("E " + effects.Trail.isEmitting); with GetEffect() being public ValveEffect GetEffect() { GameObject effect = (GameObject)GameObject.Instantiate(Resources.Load("Effects/fx_gasBurst_white")); ValveEffect vFx = new ValveEffect(effect); var tspeed = vFx.Trail.main.simulationSpeed; tspeed = 5; return vFx; } No errors are produced anywhere, however, when examine the log I write to, isEmitting is false. *edit* solved Thot I had autoplay set to true. Guess not. I did this and it worked: if (effectStrength > 0) { te.enabled = true; effects.Trail.Play(true); } else { te.enabled = false; effects.Trail.Play(false); }
  17. I refer to a quote a gentleman once told me: "Given enough thrust, anything can be made to fly." He was an ejection-seat rep for Northrup-Grumman. And while his statement is completely true, so I what I noted. That pilot is at least half Kerbal. While there may have been plenty of thrust to perform the maneuver, or any of the others shown above, it still takes a touch of insanity to actually do it.
  18. Essentially, the plane is a C130 Hercules. But whatever it is, I hereby nominate the pilot, Wayne Roberts, a Lockeed Martin test pilot, to be named an honorary Kerbal. Normal humans in giant cargo planes just don't do this. It takes someone with the heart (and possibly brains) of a Kerbal. Full news story here: https://www.cnn.com/travel/article/lockheed-martin-lm-100j-stunts/index.html
  19. @DoctorDavinci Well damn. I had all the pieces to the puzzle right there in front of me but for the life of me, I couldn't get them spun around to fit together. Thanks Doc!
  20. A long while back I started a thread on this and I've yet to get it to work. Rather than revive that one, I'm trying again. [KSPField(guiName = "Test Resource", isPersistant = true, guiActive = false, guiActiveEditor = false), UI_FloatRange(minValue = 0f, maxValue = 0f, stepIncrement = 0.001f), UI_Toggle(scene = UI_Scene.Flight)] I was under the impression that guiActive = false would not display it in the editor. Well, it still is visible. Even the UI_Toggle seems to have no effect no mater what I set it to. Why and how can I hide it? *edit* Changed it to this just as an experiment: [KSPField(guiName = "Test Resource", isPersistant = true, guiActive = false, guiActiveEditor = false), UI_FloatRange(minValue = 0f, maxValue = 0f, stepIncrement = 0.001f), UI_Toggle(controlEnabled = false, disabledText = "Disabled", enabledText = "Enabled", scene = UI_Scene.None)] and got this: [WRN 08:51:36.579] UIList: RemoveItem didn't find any item to remove. [WRN 08:51:36.579] UIList: RemoveItem didn't find any item to remove. [WRN 08:51:36.579] UIList: RemoveItem didn't find any item to remove. So, I tried this: [KSPField(guiName = "Test Resource", guiActiveEditor = false, guiActive = true, isPersistant = true)] [UI_FloatRange(minValue = 0f, maxValue = 0f, stepIncrement = 0.001f)] [UI_Toggle(disabledText = "Disabled", enabledText = "Enabled", scene = UI_Scene.Flight)] led to this: [ERR 09:13:48.777] BaseField testResource in MPUtils has too many UICtrls marked for Flight. Max == 1. UICtrl scene set to 255
  21. No problem @Snark, I realized it might be interpreted as you did, that THIS .dll meant that exact one and not THE dll in a broader sense. You did what you had to. Just thot I'd give it a shot, hope for the best legal interpretation and try to keep the mod alive.
  22. Yes, I noticed that while looking over his mod and code. For now, I have it working borrowing the Firespitter code which is also under a very permissible license. Which means, I don't have to edit a bunch of .cfg files. But thanks.
  23. It would appear that @JoePatrick1 has been consumed with university life. Fully understandable. I downloaded the latest install to play around with and found that it didn't work. While KerBaloons is licensed under all rights reserved, and I fully respect that, the CurseForge listing for the .dll says that it can be redistributed. So, I fixed the minor issue with it not loading (it didn't create the icon in the toolbar and load the parts) and I'm making JUST the .dll available for download. [Download link removed by moderator] Joe, if you see this, I hope you don't mind. I'd hate to see a fun mod like this vanish. Send me a PM when you see this and I'll GLADLY remove the download link.
  24. Cross your fingers. For years I have been asked to create larger ships. And for years I've resisted this because of the sheer number of parts this would involve. At one point, I added TweakScale support. But, as many of you know, I HATE dependencies and I never fully committed to it. As a matter of fact, in the next release, I've gone through all of the .cfg files and removed TweakScale (I got sick of looking at the errors in the log when I didn't have it installed.) Now I'm aware that I could probably accomplish this with a ModuleManager .cfg but there again, another dependency. SO... while looking for a solution to another mod that's been in my head for years, I stumbled upon the AnsiotropicPartResizer. This is some code adapted from TweakScale and others and is written by @allista. At present, that code is integrated into a larger package he has to support his mods. But, I was able to 'extract' a chunk of that code that allows part resizing and compile it into a separate plugin. His code is under the MIT license which is VERY permissible. However, as a 'professional courtesy' I have sent him a PM requesting the use of this resizing code. So, what does that mean for you if he gives this permission? Below is a sample of various sizes of the clipper hull. For comparison, the clipper bridge is sitting on an un-scaled hull. And then, there's that CVE that I created that most people complained was too small. Well... that may change. (again with an un-scaled bridge to give a size comparison). Again, this is all tentative on him agreeing to the use of his code. With any luck, you may need a bigger hangar. Oh, and if you're a very astute observer, you may have notice the extra icons in the toolbar in the VAB. Next release, one click access to all Maritime Pack parts.
  25. Yep That was essentially the problem. Using references from what I guess was an older version. Yep Spanner recompiled the KAX.dll and it then worked on my install. My guess was that he compiled the distribution with the same .dll's I was compiling with and that's why it was showing that loadicon wasn't a method. Just coincidence that both his .dll and mine were producing the same error. That one link I posted was one where people were getting the same error I was. I assume it was a bug in the Unity.dll which got fixed.
×
×
  • Create New...