Jump to content

linuxgurugamer

Bug Hunter
  • Posts

    24,911
  • Joined

  • Last visited

Everything posted by linuxgurugamer

  1. Hi, I'm trying to use the ToolbarWrapper.cs in my mod that I'm writing. I'm having a problem in that if I merely include the file in my project (and yes, I did change the namespace to match my mod), I am getting the following error: [LOG 11:37:05.142] AssemblyLoader: Loading assembly at D:\KerbalInstalls\1.0 We Have Liftoff\test\KSP_1.0.4_mod_development\GameData\MinAmbience\MinAmbience.dll [LOG 11:37:05.144] Load(Assembly): SpaceTux/AS/Plugins/AutomatedScreenshots [LOG 11:37:05.144] AssemblyLoader: Loading assembly at D:\KerbalInstalls\1.0 We Have Liftoff\test\KSP_1.0.4_mod_development\GameData\SpaceTux\AS\Plugins\AutomatedScreenshots.dll [LOG 11:37:05.147] AssemblyLoader: Loading assemblies [ERR 11:37:05.165] AssemblyLoader: Exception loading 'AutomatedScreenshots': System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded. at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool) at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0 at AssemblyLoader.LoadAssemblies () [0x00000] in <filename unknown>:0 Additional information about this exception: System.TypeLoadException: Could not load type 'AutomatedScreenshots.ToolbarTypes' from assembly 'AutomatedScreenshots, Version=1.0.5678.19092, Culture=neutral, PublicKeyToken=null'. System.TypeLoadException: Could not load type '<>c__DisplayClass3' from assembly 'AutomatedScreenshots, Version=1.0.5678.19092, Culture=neutral, PublicKeyToken=null'. There are no calls to it, if I remove it from the project, it works fine. What am I missing? I'm using Xamian Studio. Thanks in advance. LGG
  2. Thank you! Unfortunately, it doesn't work, it still does the screenshot too soon.
  3. For now, I've added code which waits 1 second before doing the snapshot. I feel this is a kludge, and would like to do it better. Any ideas?
  4. That's what I thought. Thanks. - - - Updated - - - If you could point me to an example, that would be a big help. I'm just getting started in this kind of programming, and, while I know threading very well, i don't know how to do it in Unity yet. Thanks.
  5. Is this done asynchronously? I'm asking because I first call it, and then the next line I try to convert it to a jpg, and I'm getting an error that the file doesn't exist. Thanks
  6. I'm trying to do a screenshot on a scene change. What I want to happen is to allow the scene to change, and then when the new scene is displayed, to do a snapshot of that. I can detect scene changes using the following code: private void RegisterEvents () { Log.Info ("registering events"); GameEvents.onGameSceneLoadRequested.Add (this.CallbackGameSceneLoadRequested); GameEvents.onLevelWasLoaded.Add (this.CallbackLevelWasLoaded); } // Set flags when scene change requested private void CallbackGameSceneLoadRequested (GameScenes scene) { Log.Info ("CallbackGameSceneLoadRequested"); this.gui.SetVisible (scene == GameScenes.MAINMENU); if (AS.configuration.screenshotOnSceneChange) { this.newScene = true; this.sceneReady = false; } } // Set the sceneReady flag so a snapshot can be taken private void CallbackLevelWasLoaded(GameScenes scene) { this.sceneReady = true; } public void Update() { // All excess code stripped for clarity if (this.newScene && this.sceneReady) { newScene = false; do { cnt++; pngName = FileOperations.ScreenshotFolder () + configuration.filename + cnt.ToString () + ".png"; } while (FileOperations.ScreenshotFolder ().Contains (pngName)); Log.Info ("AutomatedScreenshots.Update: Screenshotfolder:" + pngName); Application.CaptureScreenshot (pngName); } Unfortunately, this isn't doing what I want. It appears that the scene has changed, but it hasn't yet been displayed. I suspect it will have something to do with refresh, but would appreciate a pointer here. Thanks LGG Edit: I added the update function for clarity I also tried using the LateUpdate function, but no change
  7. While I am disappointed (I was hoping to watch it while recovering from surgery), I fully understand. I'd rather you do a better job than to rush, and if this means I wait until August, well, then I wait. Enjoy your vacation. LinuxGuruGamer
  8. Put an oversized heatshield on the bottom of the Science Jr. Works well, just be sure it sticks out beyond the sides of the Jr.
  9. The check for a flight computer, does that include mechjeb? Also, how about, if kOS is installed, a check that an unmanned ship have the kOS computer installed? I would list this as either an info or a warning since it can still fly and be controlled. LinuxGurugamer
  10. THANK YOU! I didn't think the injecting was the right way to go, but had to ask.
  11. Hi, While I would appreciate some help with the actual answer for the following questions, I would also appreciate pointers on where to find the answers myself: I'm using Xamarin Studio on Windows 7, if that is relevant. I am trying to write a mod which will take screenshots at specific events during a game. I am trying to find out the following: 1. I have looked in the references for UnityEngine, and while I found a Screen class, I don't see anything which would be something like screenshot, screencapture, etc. 2. Alternatively, I am also looking if there is a way to inject a keystroke into the stream. I'd prefer #1, since there are a number of things which I'd like to do and that is a better way. Thanks in advance
  12. Would it be possible to add an automatic mode, so that it would automatically do a screenshot every x seconds. Ideally, this would be toggled by a keystroke. Personally, I'm not too worried over disk space, I have a terabyte of empty disk to play with.
  13. Sure, I'd be happy to do that. Two things: 1. Can someone come up with a patch for the heat values? If you just give me the values, I can write the ModuleManager patch. 2. I'd like opinions on whether to keep the following in: // Fix solid booster having thrust when limiter is zero // Following from nicogusuarez // http://forum.kerbalspaceprogram.com/threads/51037-1-02-KW-Rocketry-v2-7-Available-1-02-Compatibility%21-16-05-2015?p=2039003&viewfull=1#post2039003 // Fix solids. @PART[KWsrbGlobeI] { @MODULE[ModuleEnginesFX] { @minThrust = 0 } } @PART[KWsrbGlobeV] { @MODULE[ModuleEnginesFX] { @minThrust = 0 } } @PART[KWsrbGlobeVI] { @MODULE[ModuleEnginesFX] { @minThrust = 0 } } LinuxGuruGamer
  14. Too many times, I use MechJeb with autostaging. Launch the ship, and watch in frustration as ALL the fairings stage because they were right above the engine.
  15. In CKAN, what are the KSP command-line arguments? You can find it under Settings menu - - - Updated - - - To the CKAN authors, the web site: http://ksp-ckan.org/ seems to be down.
  16. I have the cloning functionality finished and working. The following is a link to a Zip file which contains the modified DLL and a Readme file: S.A.V.E-Modified Please note, that this has only been used by myself. I suggest that you create a backup before trying to use it I would appreciate any comments on it, and if/when Neriad accepts my changes, will delete it at that time LGG
  17. If anyone is interested, I'm trying to make a fork of this until Neriad does another update. This is for myself, I'd be happy to share with anybody. I'm trying to put in a cloning functionality, which would easily clone a save into a new save. I'm also looking for some input. Assuming you are interested, would you prefer to clone a save into a new save file, or clone a current save into a new save file? LGG
  18. I've updated my patch, I found a few more small patches. Just copy the following code and paste it into a .cfg file anywhere in the Gamedata directory. Personally, I use a local custom directory (Gamedata/Local) to keep my local cfg files: //Entry level tanks redistributed @PART[KW1mtankL1]:AFTER[KWRocketry] { @TechRequired = generalRocketry } @PART[KW1mtankL2]:AFTER[KWRocketry] { @TechRequired = advRocketry } @PART[KW1mtankL4]:AFTER[KWRocketry] { @TechRequired = fuelSystems } //2.5m tanks. Smaller ones to fuelSystems, big ones into advFuelSystems @PART[KW2mtankL*]:AFTER[KWRocketry] { @TechRequired = fuelSystems } @PART[KW2mtankL4*]:AFTER[KWRocketry] { @TechRequired = advFuelSystems } @PART[KW2Sidetank]:AFTER[KWRocketry] { @TechRequired = advFuelSystems } //3m tanks. Smaller ones to largeVolumeContainment, big ones to highPerformanceFuelSystems @PART[KW3mtank*]:AFTER[KWRocketry] { @TechRequired = largeVolumeContainment } @PART[KW3Sidetank]:AFTER[KWRocketry] { @TechRequired = highPerformanceFuelSystems } @PART[KW3mtankL4*]:AFTER[KWRocketry] { @TechRequired = highPerformanceFuelSystems } //5m tanks to highPerformanceFuelSystems @PART[KW5mtank*]:AFTER[KWRocketry] { @TechRequired = highPerformanceFuelSystems } //Move RCS engines to flight control from fuel systems @PART[KWrcsQuad]:AFTER[KWRocketry] { @TechRequired = advFlightControl } @PART[KWrcsQuad*]:AFTER[KWRocketry] { @TechRequired = advFlightControl } //Take the entry level decoupler from rocketry and add it to engineering101 @PART[KW1mDecoupler]:AFTER[KWRocketry] { @TechRequired = engineering101 } //Fix bug, older node is nonexistent @PART[KWSASmodule3mHalf]:AFTER[KWRocketry] { @TechRequired = specializedControl } @PART[KWRadBattSmall*]:AFTER[KWRocketry] { @TechRequired = electrics } //New tech node to house the BIG engines @TechTree { RDNode:NEEDS[!CommunityTechTree] { id = experimentalRocketry title = Experimental Rocketry description = The closer the top of your rocket is to the stars on the launchpad, the easier it is to reach them. Well, that's the theory. cost = 1000 hideEmpty = False nodeName = node8_experimentalRocketry anyToUnlock = False icon = RDicon_rocketry-veryHeavy pos = -952,1635,-1 scale = 0.6 Parent { parentID = veryHeavyRocketry lineFrom = RIGHT lineTo = LEFT } Parent { parentID = highPerformanceFuelSystems lineFrom = RIGHT lineTo = LEFT } } } //Changes to engines. Heat management and price balancing - based on the config // of somnambulist from the KSP forums //Remove heat conductivity (setting it to default) @PART[KW*engine*]:AFTER[KWRocketry] { !heatConductivity = 0 } @PART[KW1mengineMaverick1D]:AFTER[KWRocketry] { @entryCost = 6500 @cost = 2250 @emissiveConstant = 0.85 @MODULE[ModuleEnginesFX] { @heatProduction = 220 } } @PART[KW1mengineWildCatV]:AFTER[KWRocketry] { @entryCost = 3600 @cost = 1200 @MODULE[ModuleEnginesFX] { @heatProduction = 195 } } @PART[KW1mengineVestaVR1]:AFTER[KWRocketry] { @entryCost = 1800 @cost = 590 @MODULE[ModuleEnginesFX] { @heatProduction = 90 } } @PART[KW2mengineGriffonG8D]:AFTER[KWRocketry] { @entryCost = 40000 @cost = 16500 @emissiveConstant = 0.85 @MODULE[ModuleEnginesFX] { @heatProduction = 255 } } @PART[KW2mengineMaverickV]:AFTER[KWRocketry] { @entryCost = 36000 @cost = 12500 @MODULE[ModuleEnginesFX] { @heatProduction = 196 } } @PART[KW2mengineSPS]:AFTER[KWRocketry] { @entryCost = 3500 @cost = 1750 @MODULE[ModuleEnginesFX] { @heatProduction = 30 } } @PART[KW2mengineVestaVR9D]:AFTER[KWRocketry] { @entryCost = 9400 @cost = 3150 @MODULE[ModuleEnginesFX] { @heatProduction = 90 } } @PART[KW3mengineGriffonXX]:AFTER[KWRocketry] { @entryCost = 140000 @cost = 48750 @emissiveConstant = 0.85 @MODULE[ModuleEnginesFX] { @heatProduction = 310 } } @PART[KW3mengineTitanT1]:AFTER[KWRocketry] { @entryCost = 105000 @cost = 35100 @MODULE[ModuleEnginesFX] { @heatProduction = 250 } } @PART[KW3mengineWildcatXR]:AFTER[KWRocketry] { @entryCost = 41000 @cost = 13650 @MODULE[ModuleEnginesFX] { @heatProduction = 140 } } @PART[KW5mengineGriffonC]:AFTER[KWRocketry] { @entryCost = 268000 @cost = 105000 @TechRequired = experimentalRocketry @MODULE[ModuleEnginesFX] { @heatProduction = 375 } } @PART[KW5mengineTitanV]:AFTER[KWRocketry] { @entryCost = 170000 @cost = 56500 @TechRequired = experimentalRocketry @MODULE[ModuleEnginesFX] { @heatProduction = 225 } } @PART[KWsrbGlobeX]:AFTER[KWRocketry] { @TechRequired = advRocketry } @PART[KWsrbGlobeX2]:AFTER[KWRocketry] { @TechRequired = heavyRocketry } @PART[KWsrbGlobeX10*]:AFTER[KWRocketry] { @MODULE[ModuleEnginesFX] { @heatProduction = 750 } @TechRequired = experimentalRocketry } //Adjust costs of the tanks @PART[KW*tank*]:AFTER[KWRocketry] { @cost *= 0.5 @cost += 100 } // Following from: Taniel0401 // http://forum.kerbalspaceprogram.com/threads/51037-1-02-KW-Rocketry-v2-7-Available-1-02-Compatibility%21-16-05-2015?p=2059091&viewfull=1#post2059091 // @PART[KW3mPetalAdapter]:AFTER[KWRocketry] { @MODULE[ModuleDecouple,0] { @explosiveNodeID = topFDown } } @PART[KW3mengineWildcarXR]:AFTER[KWRocketry] { @node_stack_top2 = 0.0, 2.508, 0.0, 0.0, -1.0, 0.0, 3 } // Fix solid booster having thrust when limiter is zero // Following from nicogusuarez // http://forum.kerbalspaceprogram.com/threads/51037-1-02-KW-Rocketry-v2-7-Available-1-02-Compatibility%21-16-05-2015?p=2039003&viewfull=1#post2039003 // Fix solids. @PART[KWsrbGlobeI] { @MODULE[ModuleEnginesFX] { @minThrust = 0 } } @PART[KWsrbGlobeV] { @MODULE[ModuleEnginesFX] { @minThrust = 0 } } @PART[KWsrbGlobeVI] { @MODULE[ModuleEnginesFX] { @minThrust = 0 } } // // Fixes for StageRecovery of KCT // http://forum.kerbalspaceprogram.com/threads/51037-1-02-KW-Rocketry-v2-7-Available-1-02-Compatibility%21-16-05-2015?p=1973363&viewfull=1#post1973363 // Modifid by obsessedWithKSP: // http://forum.kerbalspaceprogram.com/threads/51037-1-02-KW-Rocketry-v2-7-Available-1-02-Compatibility%21-16-05-2015?p=1975152&viewfull=1#post1975152 @PART[KW*engine*]:AFTER[KWRocketry]:NEEDS[KerbalConstructionTime|StageRecovery] { @category = Engine } @PART[KW*tank*]:AFTER[KWRocketry]:NEEDS[KerbalConstructionTime|StageRecovery] { @category = FuelTank }
  19. Use the patch in the next post below this, I added some additional changes It consists of all the small patches that I've been able to gather from various posts in this thread. Follow the instructions in the posting. LGG
  20. You do love your wife, don't you? If not, then send her to Duna
  21. Hi Neriad, Love this, has saved my game many times. Couple of suggestions: 1. Backup the settings.cfg as listed above 2. Add a new function to clone a complete save into a new one. For example, let's say I have a game saved as "Career 1". I'd like to be able to clone it to "Career 1-1". I can do this easily by opening Windows Explorer, but it would be nice to do this inside the game. Thanks LinuxGuruGamer
×
×
  • Create New...