Jump to content

MoreUmpf

Members
  • Posts

    36
  • Joined

  • Last visited

Everything posted by MoreUmpf

  1. You can use the gravParameter: weight = mainBody.gravParamter * (vehicleMass / (mainBody.Radius^2)); // weight in N EDIT: sorry, forgot that it was radius²
  2. Is there something like a Time-Event? I need something to trigger one of my methods at a given time.
  3. To write something to the log use: Debug.Log("put your text here"); You can find the Log ingame by pressing Alt+F12 and switching to the Debug-Tab.(You may have to scroll down)
  4. Thanks, I didn't knew that. But I have one more question: If I would change your code to this: (C extending public class A { public string Name = "I'm A"; } public class B : A { public string OtherName = "I'm also B"; } public class C : B //<--- now extending B { public string SpecialName = "It's a me, C!"; } public static void Test() { var listA = new List<A>(); listA.Add(new A()); listA.Add(new B()); listA.Add(new C()); foreach (var item in listA) { Console.Write(item.Name); var theB = item as B; if (theB != null) { Console.WriteLine(theB.OtherName); } if (item is C) { Console.WriteLine(((C)item).SpecialName); } } } What would the Output be for the C-instance? Does C contains the members of A and B?
  5. But the CrewRoster List is a List of type ProtoCrewMember not MyNewKerbalMembers, so if I add an instance of MyNewKerbalMembers, this instance will be converted to ProtoCrewMembers, which means all my custom objects are gone. Same goes for retrieving the values from the CrewRoster. Since I am calling a method(like CrewRoster.Find(..)) of type ProtoCrewMember, I will receive a ProtoCrewMember-instance which I then have to convert back to MyNewKerbalMembers. As far as I know one of these conversions should lead to a loss of my custom objects. If the CrewRoster-List would be defined like: List<MyNewKerbalMembers> CrewRoster = ... then it would be no problem, because conversion from ProtoCrewMember to MyNewKerbalMembers should result in no loss of objects(rather an addition of objects). So if I am unable to edit the ProtoCrewMember class I don't see a way of getting this to work the way I wanted it to work in the beginning. :/
  6. Sorry that I didn't tell you, but I already tried that. But I'm not particularly happy with this solution because then I would have two Lists with ProtoCrewMembers: 1.the games CrewRoster List and 2. my own List of ProtoCrewMembers (MyNewKerbalMembers) So then there would be two separate lists of Kerbals and when the game changes some values of a ProtoCrewMember in the CrewRoster-List, the respective values in my ProtoCrewMember-List wont change. :/ I would have to check constantly if the values have changed and match them, but this all would be very inefficient. So I probably have to stick with creating a new list which contains my custom values for each Kerbal.
  7. You can find all stock parts in: "<Your KSP directory>\GameData\Squad\Parts\"
  8. So I have a question: Is it possible to edit an already existing class from the game? I want to add several new objects to the ProtoCrewMember class and integrate them into the existing methods. So what i basically want to do in the end is this: ProtoCrewMember kerbal kerbal.CustomMethod(...)
  9. KSP randomly freezes/crashes when I'm using the DERP pod. The KSP.log shows these errors: (KSP 0.24.2 64bit) [WRN 17:43:26.780] FAR Error: Aerodynamic force = 0 Aerodynamic moment = 0 CoD Local = 0 CoD Global = NaN D.E.R.P. Propulsion Module [WRN 17:43:26.781] FAR Error: Aerodynamic force = 0 Aerodynamic moment = 0 CoD Local = 0 CoD Global = NaN D.E.R.P. Lifeboat Module Also Im using NEAR instead of FAR, so I changed your FAR-MM-Config to this: (I just replaced the NEEDS[FAR] with NEEDS[NEAR]) @PART[USI_PodEngine]:NEEDS[NEAR] { MODULE { name = FARBasicDragModel isEnabled = True EVENTS { } ACTIONS { } } } @PART[USI_PodCapsule]:NEEDS[NEAR] { MODULE { name = FARBasicDragModel isEnabled = True EVENTS { } ACTIONS { } } }
  10. MoreUmpf

    Hi :)

    Hi , I've been playing KSP since 0.22 and have a bit of experience. Now i thought it would be a good time to register to the forums as Im thinking of creating a mod with the new career system. And also I'm from Germany so dont judge me on my English skills
×
×
  • Create New...