Jump to content

Svm420

Members
  • Posts

    2,027
  • Joined

  • Last visited

Everything posted by Svm420

  1. I don't think he can make IVAs for parts for which he doesn't have the assets. Maybe ask the creator(s) to make one themselves
  2. I am trying to bring a unmaintained mod into 1.0.4 and add some new features to it, but I can't seem to get the menus to show up in game in the R click menu. Here is the code in question. It is a fork of the AVTOL mod. Thanks! using System; using System.Collections.Generic; using System.Linq; using System.Text; using UnityEngine; using KSP; using RealFuels; using AJE; namespace AVTOL { public class AVTOL:PartModule { [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Pitch Neutral%"), UI_FloatRange(minValue = 0f, maxValue = 100f, stepIncrement = 1f)] public float pitchNeutral = 100f; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Pitch Range%"), UI_FloatRange(minValue = -100f, maxValue = 100f, stepIncrement = 1f)] public float pitchRange = 0f; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Pitch Neutral%"), UI_FloatRange(minValue = 0f, maxValue = 100f, stepIncrement = 1f)] public float rollNeutral = 100f; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Pitch Range%"), UI_FloatRange(minValue = -100f, maxValue = 100f, stepIncrement = 1f)] public float rollRange = 0f; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Phase Angle"), UI_FloatRange(minValue = 0f, maxValue = 180f, stepIncrement = 5f)] public float phaseAngle = 90f; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Max Angle"), UI_FloatRange(minValue = 0f, maxValue = 180f, stepIncrement = 5f)] public float maxAngle = 90f; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Step Angle"), UI_FloatRange(minValue = -90f, maxValue = 90f, stepIncrement = 0.5f)] public float stepAngle = 22.5f; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "Vertical Cutoff"), UI_FloatRange(minValue = 1f, maxValue = 100f, stepIncrement = 1f)] public float verticalspeed = 100f; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "VTOL setting:"), UI_Toggle(disabledText = "Off", enabledText = "On")] public bool showMenu = true; [KSPField(isPersistant = true, guiActive = true, guiActiveEditor = true, guiName = "VTOL system:"), UI_Toggle(disabledText = "Off", enabledText = "Engaged")] public bool isEngaged = false; [KSPAction("Toggle VTOL system")] public void toggleSystem(KSPActionParam param) { isEngaged = !isEngaged; print("VTOL Control System is " + (isEngaged ? "Engaged" : "Off")); if(!isEngaged) { SetThrustPercentage(100f); } } [KSPAction("Increase Phase Angle")] public void increasePhaseAngle(KSPActionParam param) { phaseAngle += stepAngle; if (phaseAngle > maxAngle) phaseAngle = maxAngle; } [KSPAction("Decrease Phase Angle")] public void DecreasePhaseAngle(KSPActionParam param) { phaseAngle -= stepAngle; if (phaseAngle < 0f) phaseAngle = 0f; } private ModuleEngines engine; private ModuleEnginesFX engineFX; private ModuleEnginesRF engineRF; private ModuleEnginesAJEJet engineAJE; public override void OnStart(StartState state) { if (state == StartState.Editor) return; showMenu = false; if (part.Modules.Contains("ModuleEngines")) engine = (ModuleEngines)part.Modules["ModuleEngines"]; if (part.Modules.Contains("ModuleEnginesFX")) engineFX = (ModuleEnginesFX)part.Modules["ModuleEnginesFX"]; if (part.Modules.Contains("ModuleEnginesRF")) engineRF = (ModuleEnginesRF)part.Modules["ModuleEnginesRF"]; if (part.Modules.Contains("ModuleEnginesAJEJet")) engineAJE = (ModuleEnginesAJEJet)part.Modules["ModuleEnginesAJEJet"]; } public void FixedUpdate() { this.Fields["pitchNeutral"].guiActive = showMenu; this.Fields["pitchNeutral"].guiActiveEditor = showMenu; this.Fields["pitchRange"].guiActive = showMenu; this.Fields["pitchRange"].guiActiveEditor = showMenu; this.Fields["rollNeutral"].guiActive = showMenu; this.Fields["rollNeutral"].guiActiveEditor = showMenu; this.Fields["rollRange"].guiActive = showMenu; this.Fields["rollRange"].guiActiveEditor = showMenu; this.Fields["phaseAngle"].guiActiveEditor = showMenu; this.Fields["phaseAngle"].guiActive = showMenu; this.Fields["maxAngle"].guiActive = showMenu; this.Fields["maxAngle"].guiActiveEditor = showMenu; this.Fields["stepAngle"].guiActive = showMenu; this.Fields["stepAngle"].guiActiveEditor = showMenu; this.Fields["verticalspeed"].guiActive = showMenu; this.Fields["verticalspeed"].guiActiveEditor = showMenu; if (HighLogic.LoadedSceneIsEditor) { return; } if(HighLogic.LoadedSceneIsFlight && isEngaged) { float T = pitchNeutral; T *= (1f - (float)vessel.verticalSpeed / verticalspeed); T *= Mathf.Sin(phaseAngle / 57.259f); T = Mathf.Clamp(T, 0f, 100f); T += pitchRange * vessel.ctrlState.pitch; float R = rollNeutral; R *= (1f - (float)vessel.verticalSpeed / verticalspeed); R *= Mathf.Sin(phaseAngle / 57.259f); R = Mathf.Clamp(T, 0f, 100f); R += pitchRange * vessel.ctrlState.roll; float avgMoment = (T + R) / 2; SetThrustPercentage(avgMoment); } } void SetThrustPercentage(float avgMoment) { avgMoment = Mathf.Clamp(avgMoment, 0f, 100f); if(engine!=null) { engine.thrustPercentage = avgMoment; return; } if (engineFX != null) { engineFX.thrustPercentage = avgMoment; return; } if (engineRF != null) { engineRF.thrustPercentage = avgMoment; return; } if (engineAJE != null) { engineRF.thrustPercentage = avgMoment; return; } } } }
  3. Nope you got the jitter fixed that time. WIsh I had tested sooner to get back to you, but the latest FAR updated had me redesigning all my planes again.
  4. Well now I am wondering how aeroFXScalar ties in now. I play at 4x scale so orbital velocity are roughly half RSS or about 4500m/s and I am trying to turn down the flames for mach 3-5 in the thinner atmosphere 40-70km. I assume the SR-71 was able to fly at mach 3.5 without being engulfed in a ball of plasma entirely right?
  5. I get this spammed in my log several times a second when entering Mun SOI on a free return trajectory only while in map view. The spam stops if I click the trajectories button to disable it. and return when re enabled. Using latest trajectories and FAR. Let me know if you need more info. Thanks! Trajectories: WARNING: FAR/NEAR totalForce is NAN (altitude=3000, airVelocity=3000, angleOfAttack=0
  6. Awesome got to say pleasantly surprised by this. Didnt think you'd have that little detail.
  7. So that's why I never saw any G issues . Thanks for finding that.
  8. I think your requests have been noted. Sometimes things take more than 1 week
  9. Does this have the 2 extra seats in the bottom like the stock IVA should for 6 total crew? Either way awesome adding this to my must have ASET IVA pack
  10. Very nice can't wait to see the textures.
  11. Since when do you have to go to the main menu? I can just be in the VAB/SPH and add a craft file to the folder and click load and it's there to be loaded.
  12. Awesome. Looking forward to seeing your mod progress
  13. Any chance you would release optional realistic curves for those who don't play at toy scale? I very much like you radial one piece design. Nice work.
  14. This is the attitude I wish more users would have. Instead of make it for me and how I want it.
  15. Well maybe not always , but it is amazing the work people go through "to save time". Some spend more time not using the mod waiting for it to be on ckan or fixing the automation own glitches they never would have via manual install. LOL
  16. RFstockalike has its own realplume configs are you using those?
  17. Are you playing RO engines or RFstockalike?
  18. I wasnt able to get this to work. It just didn't fill tanks. I am using realfuels if that matters. LEt me know if you need more info, Thanks!
  19. With the new engines coming in 1.1 I don't think we need you to make the engines IMO. Though if you have the desire to I don't think anyone would really be opposed
  20. Thats a bad moddev-er-ator? Lol no worries I will give it a try just with normal gameplay and let you know. Thanks for the quick heads up though.
  21. Thanks for the update. Does the throttle system work as before setting up engines wise. I.e. setting throttle to 1 for all engines will set them to follow the RealSettings.cfg settings?
  22. Meh seems like a lot work/increased parts count for little gain configuring the parts to have their properties behave like the TPS is simpler and gives the exact same results. DR does this, but it can be set up this way in stock to. It just doesn't seem that interesting besides maybe adding say just textures with tiles that can be switched to. I use a resized system and this is how i do it minus a texture switch. Just IMO no offence meant
×
×
  • Create New...