Jump to content

Zyrac

Members
  • Posts

    75
  • Joined

  • Last visited

Reputation

8 Neutral

Profile Information

  • About me
    R-Universe Industries

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. So, I believe I've found a fix. I experimented with extruding the window faces a little and it seems to have made the problem go away. I've still no idea what caused the problem in the first place or why extruding the faces fixed it, but I suppose all that matters is that it did. EDIT: Well, it certainly mitigated the problem slightly, but it's not fixed, and in some cases it didn't really make any difference at all. What's weird is that the problem seems to be created between Unity and KSP, since there don't seem to be any signs of it in Blender or in Unity scene view.
  2. Well, I'm really at a loss. I tried the Unity fix, but the issue persists. What I don't understand is where exactly the problem is occurring. This is the original mesh in Blender (as you can see, there are no edges running across the faces where the issues appear):
  3. So, I'm making a habitat module thing, and I noticed a weird thing that happens when the part's in the dark. Some weird shadowy shape things appear on it that aren't visible in the VAB or when it gets light. Any idea what's going on? You can see them on the roof and window in the first image, and that they're gone in the second.
  4. Uh, sadly the answer to both those questions is currently no. It could very easily contain fuel with a change to the config file, however. I did play with the idea but ended up deciding against it. I guess I kinda thought it was doing a little too much with it, but I suppose it is sizable enough. To be honest, I was mainly using this as a trial part before attempting something more ambitious. I'm now working on a habitat module which means straying into internals territory for the first time. Little preview of the work in progress below:
  5. Tired of desperately trying to cram everything onto your probe? We've got you covered. The R-Universe Industries Probe Core features special landing leg placement areas, special slots suited perfectly to fit small radial solar panels (although I suppose you could put any old thing there), and special... uh... just space in general for putting stuff on! Hey, so I wanted to have another go at some modding, since I haven't done any in years. If you were on the KSP scene around 2012 - 2013, you might remember a rudimentary mod called R-Universe Industries Life-Tech. Since then, I've started university and am now coming close to graduation, and grown a beard! How time flies! So, anyway, this probe core is just a little something I made as a bit of fun to apply my new and improved Blender skills, and my not so new and improved texturing skills. Let me know if you have any suggestions! DOWNLOAD HERE: https://kerbal.curseforge.com/projects/r-universe-industries-probe-core
  6. Yeah, my bad, got my sentence mixed up haha! I'll try your advice and play around with multiple colliders. Thanks!
  7. Ah, I thought it might be that. I read on a tutorial site that mesh colliders have to be concave for them to work in KSP, but would it work fine if it were convex?
  8. So, I'm back on the KSP modding scene after years of inactivity, and I'm putting my newly acquired Blender knowledge to use in making what's essentially going to be a handy probe core. One issue I'm facing, however, is that I want the player to be able to attach things to the surface, but the surface of the part is irregular. KSP doesn't seem to like this. I'm attaching a screenshot with a radial solar panel just to show you what I mean. As you can see, the solar panel is just kind of awkwardly floating despite being "attached". My question is: is there a way to make the radial attachment fit more closely to the surface of the part? https://i.imgur.com/J5vW2eD.png
  9. Well, I found a solution. I modified the code to make this: foreach(Vessel targetvessel in FlightGlobals.Vessels) { foreach(Part targetpart in targetvessel.parts) { if(targetpart.name == "ruitelecheck") { if(VesselsWithUnit.Contains(targetvessel) == false) { VesselsWithUnit.Add(targetvessel); } VesselNames.Add(targetvessel.GetName()); } } if(VesselsWithUnit.Contains(targetvessel) == false) { if((targetvessel.transform.position - this.vessel.transform.position).magnitude > 2750f) { targetvessel.vesselRanges.landed.load = 2500f; targetvessel.vesselRanges.landed.unload = 2250f; targetvessel.vesselRanges.flying.load = 2500f; targetvessel.vesselRanges.flying.unload = 2250f; targetvessel.vesselRanges.orbit.load = 2500f; targetvessel.vesselRanges.orbit.unload = 2250f; targetvessel.vesselRanges.prelaunch.load = 2500f; targetvessel.vesselRanges.prelaunch.unload = 2250f; targetvessel.vesselRanges.splashed.load = 2500f; targetvessel.vesselRanges.splashed.unload = 2250f; targetvessel.vesselRanges.subOrbital.load = 2500f; targetvessel.vesselRanges.subOrbital.unload = 2250f; targetvessel.vesselRanges.escaping.load = 2500f; targetvessel.vesselRanges.escaping.unload = 2250f; } } } This waits for targetvessel to go comfortably outside of loading distance before it unloads it. The set up isn't ideal, but at least it's not producing anymore big red text in the debug console
  10. Well, it's coming up with this: [Exception]: NullReferenceException UnityEngine.Component.get_gameObject () Vessel.recurseCoMs (.Part part) Vessel.recurseCoMs (.Part part) Vessel.findLocalCenterOfMass () ProtoVessel..ctor (.Vessel VesselRef) Vessel.Unload () Vessel.Update () So I guess it is to do with the plugin trying to access information from a vessel that has been unloaded. I'm not sure how I'd prevent the code from trying to access the information it can't get to, while keeping it working as I want it to, short of eliminating vessel unloading completely, which really doesn't seem like a great idea.
  11. Thanks, Diazo, your help is really appreciated. Is there anything you don't know about KSP plugins? Haha
  12. Just wondering if there's any way to find out what part of my plugin is causing a null reference exception. I keep seeing it come up in in the debug menu under the same circumstances, but that message isn't particularly helpful when trying to find what's causing it. Otherwise would anyone be prepared to look at my code and see if they can tell what's going on? Thanks. Also, I know this isn't the right page to ask about it, but my plugin involves increasing the vessel load and unload distance (to cover the entire solar system, then it is returned to default for vessels that are not needed to prevent unnecessary vessel loading) and I've noticed an issue with overheating for no obvious reason occurring on vessels that are loaded but not the active vessel when I've been testing the plugin. Any ideas if there is some reason for this? Here's the code: http://pastebin.com/raw.php?i=8zMHDjiN The null reference exception always occurs after a vessel without the part the plugin is assigned to goes out of range and is unloaded, but only if the Activate() KSP Event is performed, even once, whilst the vessel is within the loading distance. If it is performed outside the loading distance, the issue does not occur.
  13. I see what you mean now. I tried making the changes you suggested, but the numbers for Electric Charge still just keep increasing. This is despite the fact that I wrote a print(ElectricChargeTotals.count.ToString()) into the code, and it consistently printed 0. I really don't get what's going on.
  14. To my knowledge, the problem isn't that the values for each vessel are being added together, if that's what you're suggesting. When I scroll through the pages for each vessel, the strings show different doubles for the Electric Charge totals of each vessel, as the Dictionary separates them out. As far as I can tell, the issue is that the += operator here... if(ElectricChargeTotals.ContainsKey(v.GetName())) { ElectricChargeTotals[v.GetName()] += battery.Resources["ElectricCharge"].amount; } ... is continuously adding on the amount of each part because it doesn't know when to stop. I've looked for ways around this but I really can't seem to find anything.
  15. Thank you for your help, but I think we had a misunderstanding on what exactly it was I wanted to do. I want to be able to display the resource totals of each vessel (eg. Vessel 1 Electric Charge: 50, Vessel 2 Electric Charge: 275, etc). A Dictionary did look like it might be what I needed, however, if I write a code like the one below, the numbers will just increase infinitely. I've been looking for a way around it but nothing seems to work. //vessels is a List<Vessel> //ElectricChargeTotals is Dictionary<string, double> foreach(Vessel v in vessels) { foreach(Part battery in v.parts) { if(battery.Resources.Contains("ElectricCharge")) { if(ElectricChargeTotals.ContainsKey(v.GetName())) { ElectricChargeTotals[v.GetName()] += battery.Resources["ElectricCharge"].amount; } else { ElectricChargeTotals.Add(vesselwithunit.GetName(), battery.Resources["ElectricCharge"].amount); } } } } //information is a string that is to be displayed in a GUI.Window //vesselnames is a List<string> containing the names of all the relevant vessels //index is an int to enable scrolling through pages of information for each vessel information = ElectricChargeTotals[vesselnames[index]].ToString("f0");
×
×
  • Create New...