Jump to content

genericeventhandler

Members
  • Posts

    280
  • Joined

  • Last visited

Everything posted by genericeventhandler

  1. Hi all, After watching Scott Manley land Jeb on his head, I was wondering if there is a way to increase the thrust of the Kerbal Jetpacks to have 1.1g thrust (on kerbin) ? GE
  2. Is your notepad++ up to date? It should default to call as the importance format
  3. I don't model so I wouldn't know how big to make them try looking at the squad ones or spanner monkies SM Chutes
  4. And the cubes exist in your model? I believe they have to have the same exact name.
  5. Currently flying a 32 seat tourist bus back from a Mun / Minmus sightseeing trip. It was supposed to be a shake-down flight for this vessel, but the tourists sneaked aboard at the last moment. As Jeb hasn't actually landed this aircraft before it could be tricky, but first he has to do some pretty wild aero-braking because of lack of fuel.
  6. Do you have the drag cubes and modules in the cfg file, here's the stock part 1 chute. MODULE { name = ModuleDragModifier dragCubeName = SEMIDEPLOYED dragModifier = 1.25 } MODULE { name = ModuleDragModifier dragCubeName = DEPLOYED dragModifier = 12 } GE
  7. I've been working on this for a while, so I thought that I would share, This is a notepad++ configuration file to add a new ksp language into the program Steps to use: download the file locally go to language in notepad++ click user defined import and point to the file load a config file and select ksp as language. --- EDIT: Dropbox stopped sharing, here's another link New Link : https://1drv.ms/u/s!Au_FusKqvwUWguRcaLxW9iAFa5veaA It formats cfg files so you can find errors easier. Let me know if you find it useful Ge.
  8. Slightly cheating but. @PART[InflatableHeatShield] { @MODULE[ModuleAnimateGeneric] { @disableAfterPlaying = false } } Add this as a .cfg anywhere in the gamedata folder, and deflate the shield before dumping it, GE
  9. I've been trying to get this to work as a partmodule but I've had no luck, I will wait until 1.2 is released and then see if the game could still benefit from this. GE
  10. You can do everything from the command line, Assuming you are using windows, here's a class that does nothing. namespace DemoCompile { using System; using System.Linq; public class MyPartModule : PartModule { [KSPField] public static string myValue; public override void OnFixedUpdate(){ // do stuff } } } @echo off set kerbal=E:\games\kerbal\KSP_x64_Data\Managed set outDll=myplugin.dll %windir%\Microsoft.net\framework\v3.5\csc.exe /t:library /out:%outDll% *.cs %1 /NOLOGO /r:%kerbal%\Assembly-CSharp.dll /r:%kerbal%\Assembly-CSharp-firstPass.dll /r:%kerbal%\UnityEngine.dll /r:%kerbal%\unityEngine.dll /r:%kerbal%\KSPUtil.dll Create a file called make.cmd and paste the command lines above into it. Changing the path to your managed folder and the name of the dll you want to change. I do this with a bunch of mods that are dependent on other mods so that I can recompile with the setup I have. GE.
  11. I've used smartparts to leave 10% fuel in a stage, cut the engine and then stage the stage (one too many stages in that sentence). The "section" of the rocket then comes back under a parachute and at the last moment the motor is fired to land it. However this increases the delta-v of the entire operation, I usually just put more parachutes on it , and slap a couple of landertrons on the bottom now. Either way, you do it, you need to add a command core and an antenna to the stage, as well as a way of powering the decent which all adds more dv
  12. Is there a url to download this? I love little craft.
  13. I've had to remove this, due to my save game getting too big, I have about 30 flights in progress and the save file is enormous, causing the game to pause for 5 - 10 seconds on every autosave. Can you save the information out to a different file at all? I can provide some code if you require it.
  14. I'll look into it when I get time, at the moment I am really busy though.
  15. No but I can add that if you want. How exactly would it work? Each antenna can be set to auto scan? The drone core has the scanning mode?
  16. Hi, I've compiled a version and have been testing it all weekend, https://github.com/genericeventhandler/AutomaticLights/archive/master.zip find the gamedata folder in there and extract it as usual. - compiled against 1.1.2 - but should be compatible with 1.1.3. Add one of the copied lights to your crat, right click it and turn it on with the new button, if the EC is above 25% they will turn on when obscured from the sun, thanks ShotgunNinja, Tested on the ground, underwater, behind kerbin and some extensive off roading on The Mun. GE
  17. by the time you get scientists to level 4, most of the science will already have been done. In all my career games I don't think one of them got more than level 3.
  18. I use this when you have a scientist on board, your science experiments goo / materials are reset. So most of the time I fly with a pilot, scientist and an engineer (with kis/kas and spare parachutes) Clicking and moving the scientist on eva around all the experiments was fun for the first couple of hundred hours play, but on my 4th career game it's become kind of tedious.
  19. Cheers for that, I have a semi working implementation now unfortunately I can't test until tomorrow night, the source is available at https://github.com/genericeventhandler/AutomaticLights if anyone feels brave enough to compile it and try it out. GE.
  20. It uses events though doesn't it? anything that could delete your statics / reset them to a new object needs to be protected.
  21. When dealing with statics, you need to lock the resource while you use it, I've seen a lot of bad singleton implementations in many addons. There is only ONE way to implement a singleton that is safe < .Net 4.0, above .net 4.0 there is another way but It hides why it is thread safe so I don't advise using it. public class SingletonClass { // this gets instanced once per singleton class created! private static readonly object LockObject = new object(); // this gets set once per singleton class created! private static readonly SingletonClass instance; // hide the public creation of the class private SingletonClass() { } /// <summary> /// Gets an instance of the singleton class /// </summary> public SingletonClass Instance { get { // lock on the lock object, so only one LockObject is created, only one thread can pass through here lock (LockObject) { // is the instance null? if (instance == null) { // create a new singleton class instance = new SingletonClass(); } // return the new instance. return instance; } } } } If someone tries to tell you that you should use an outer if around the lock, they are wrong. The optimiser will optimise away the internal if in that case. If you use the pattern above you won't get null reference exceptions because multiple threads have created multiple versions of your singleton here's why you get NRE's with your code. Your code. public class Master { public static Master ourMaster public string ourText } //If ourMaster is not initialized yet... public void Update() { if(ourMaster != null) //returns true { if(ourMaster.ourText != null) //this throws a NullRef error instead of returning false, need a try/catch block to handle it } } Imagine 2 threads, T1 is a few ms infront of T2. T1 : set ourMaster = new MasterT1 T1 : call update T1: if(ourMaster != null) -> true T2: set ourMaster = new MasterT2 // previous MasterT1 falls out of scope T1: if( ourMaster.ourText != null) ----->> ourMaster = MasterT1 = null -----> Null reference exception With the locked instance, T2 cannot replace the Master object created by T1. if you really don't want the locks you can create a new static Property like this, public static SingletonClass InstanceNotSafe { get { if(instance == null) { return Instance; } return instance; } } All threads will block on the instance, the first time around, but after it's been created it's semi safe to use.
  22. I use Visual studio for my day job, at home I've got Community Edition on my gaming machine, even though right next to it is a machine a full copy of ultimate on it, and my work laptop also has ultimate on it. Community works well, is free, doesn't expire, and there are very few things you can't do with it. GE.
  23. I quite like the idea of individual occluded lights turning on though, sometimes it's tricky doing eva with the sun behind the craft.
×
×
  • Create New...