DennyTX Posted May 23, 2017 Share Posted May 23, 2017 messrs, how can i catch only "revert to launch" event? (user has pressed stock "revert to launch" button) Quote Link to comment Share on other sites More sharing options...
Benjamin Kerman Posted May 23, 2017 Share Posted May 23, 2017 2 hours ago, DennyTX said: messrs, how can i catch only "revert to launch" event? (user has pressed stock "revert to launch" button) Maybe something in here? Quote Link to comment Share on other sites More sharing options...
cakepie Posted May 23, 2017 Share Posted May 23, 2017 2 hours ago, DennyTX said: messrs, how can i catch only "revert to launch" event? (user has pressed stock "revert to launch" button) Try checking to see if "revert to launch" will fire OnVesselRollout. You'd have to listen for onGameSceneSwitchRequested before that so that you can distinguish between a new launch from VAB/SPH (from EDITOR to FLIGHT) vs actually revert to launch (from FLIGHT to FLIGHT) Quote Link to comment Share on other sites More sharing options...
DennyTX Posted May 23, 2017 Share Posted May 23, 2017 (edited) @cake>pie Tnx! That what i want. Edited May 23, 2017 by DennyTX Quote Link to comment Share on other sites More sharing options...
0111narwhalz Posted May 25, 2017 Share Posted May 25, 2017 I would like to disable facility repairs. I've tried destroying them under "indestructable facilities," but that doesn't prevent repairs. I've tried locking them, but this also does not prevent repair. Quote Link to comment Share on other sites More sharing options...
Li0n Posted May 26, 2017 Share Posted May 26, 2017 On 20/05/2017 at 2:18 PM, Kobymaru said: ps.: Is there some sort of "reference frame guide" for KSP? I keep getting confused by World/Body-Relative/Krakensbane/Surface-Relative and all kinds of coordinate systems. I'd love to see a guide/tuto about this. I recently try to calculate the distance between two ship orbiting different bodies but couldn't figure it out Quote Link to comment Share on other sites More sharing options...
tomf Posted May 29, 2017 Share Posted May 29, 2017 (edited) Two related questions My current contracts have english strings in the source code to which I append the names of bodies for the which the contract applies e.g. "Crash a probe into " +body.GetDisplayName(); As of 1.3 that code is appending the gender to the end of the string as ^N I want the simplest way to replicate the functionality of the previous theName property so it at least makes gramatical sense in English Second question Is there a guide anywhere on how to localize mods properly? Generating contracts, science experiment definitions etc. Edited May 29, 2017 by tomf Quote Link to comment Share on other sites More sharing options...
nightingale Posted May 29, 2017 Share Posted May 29, 2017 8 minutes ago, tomf said: Two related questions My current contracts have english strings in the source code to which I append the names of bodies for the which the contract applies e.g. "Crash a probe into " +body.GetDisplayName(); As of 1.3 that code is appending the gender to the end of the string as ^N I want the simplest way to replicate the functionality of the previous theName property so it at least makes gramatical sense in English You need to pass the display name through Lingoona to get the gender code stripped/used. The hacky way to do that would be: KSP.Localization.Localizer.Format("Crash a probe into <<1>>", body.GetDisplayName()); The better way is to put the string "Crash a probe into <<1>>" into a localisation string in the proper file/format (some details in the thread below). 8 minutes ago, tomf said: Second question Is there a guide anywhere on how to localize mods properly? Generating contracts, science experiment definitions etc. Check out @DMagic's thread here: Quote Link to comment Share on other sites More sharing options...
ev0 Posted May 31, 2017 Share Posted May 31, 2017 Has anyone noticed that the toggle options in the game settings are vertically aligned centered? Not vertically aligned top? Is there a fix for that? It looks pretty silly when I only have one or two options. See pictures below for Basic settings on the left, especially the floating toggle option in the middle column, and my mod's setting in the picture on the right. Also, what does "autoPersistance" in GameParameters.CustomParameterNode do? Quote Link to comment Share on other sites More sharing options...
JPLRepo Posted May 31, 2017 Share Posted May 31, 2017 44 minutes ago, ev0 said: Has anyone noticed that the toggle options in the game settings are vertically aligned centered? Not vertically aligned top? Is there a fix for that? It looks pretty silly when I only have one or two options. See pictures below for Basic settings on the left, especially the floating toggle option in the middle column, and my mod's setting in the picture on the right. Also, what does "autoPersistance" in GameParameters.CustomParameterNode do? It's a reported bug for 1.3. autoPersistence if true will persist the variable into the sfs save file and reload it for you automatically. Quote Link to comment Share on other sites More sharing options...
Ruedii Posted June 3, 2017 Share Posted June 3, 2017 I was wanting to drop some pull requests to help updated the various open source modes mods to 1.3.0 What are the changes in "part only" mods if there are any? Quote Link to comment Share on other sites More sharing options...
Benjamin Kerman Posted June 5, 2017 Share Posted June 5, 2017 On 6/3/2017 at 1:04 PM, Ruedii said: I was wanting to drop some pull requests to help updated the various open source modes mods to 1.3.0 What are the changes in "part only" mods if there are any? I have not seen any changes, but there may (or may not) have been some new functions added. All purly parts mods from 1.2.2 will work in KSP 1.3. Quote Link to comment Share on other sites More sharing options...
Deus Zed Machina Posted June 5, 2017 Share Posted June 5, 2017 So I'm trying to add an action to a part's right-click menu, but when I click the in-game button, nothing happens--the debug messages I programmed in don't even show up anywhere. As far as I can tell, this is the relevant bit in KSP.log: [ERR 14:14:51.877] ADDON BINDER: Cannot resolve assembly: System.Collections, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a [EXC 14:14:51.879] FileNotFoundException: Could not load file or assembly 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. BaseEvent.Invoke () UIPartActionButton.OnClick () UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEvent.Invoke () UnityEngine.UI.Button.Press () UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) UnityEngine.EventSystems.EventSystem:Update() And here's my code. Is there something I screwed up? Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted June 5, 2017 Share Posted June 5, 2017 1 minute ago, Deus Zed Machina said: So I'm trying to add an action to a part's right-click menu, but when I click the in-game button, nothing happens--the debug messages I programmed in don't even show up anywhere. As far as I can tell, this is the relevant bit in KSP.log: [ERR 14:14:51.877] ADDON BINDER: Cannot resolve assembly: System.Collections, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a [EXC 14:14:51.879] FileNotFoundException: Could not load file or assembly 'System.Collections, Version=4.0.10.0 And here's my code. Is there something I screwed up? It looks like you compiled against .NET 4.0. Try 3.5, that's the version mods are supposed to use. Quote Link to comment Share on other sites More sharing options...
Bonus Eventus Posted June 5, 2017 Share Posted June 5, 2017 1 minute ago, Deus Zed Machina said: So I'm trying to add an action to a part's right-click menu, but when I click the in-game button, nothing happens--the debug messages I programmed in don't even show up anywhere. As far as I can tell, this is the relevant bit in KSP.log: [ERR 14:14:51.877] ADDON BINDER: Cannot resolve assembly: System.Collections, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a [EXC 14:14:51.879] FileNotFoundException: Could not load file or assembly 'System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. BaseEvent.Invoke () UIPartActionButton.OnClick () UnityEngine.Events.InvokableCall.Invoke (System.Object[] args) UnityEngine.Events.InvokableCallList.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEventBase.Invoke (System.Object[] parameters) UnityEngine.Events.UnityEvent.Invoke () UnityEngine.UI.Button.Press () UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute (IPointerClickHandler handler, UnityEngine.EventSystems.BaseEventData eventData) UnityEngine.EventSystems.ExecuteEvents.Execute[IPointerClickHandler] (UnityEngine.GameObject target, UnityEngine.EventSystems.BaseEventData eventData, UnityEngine.EventSystems.EventFunction`1 functor) UnityEngine.EventSystems.EventSystem:Update() And here's my code. Is there something I screwed up? seems like a compiler issue. Check your file paths in your programing environment (visual studio or whatever you're using) Quote Link to comment Share on other sites More sharing options...
Deus Zed Machina Posted June 5, 2017 Share Posted June 5, 2017 29 minutes ago, Bonus Eventus said: seems like a compiler issue. Check your file paths in your programing environment (visual studio or whatever you're using) 29 minutes ago, HebaruSan said: It looks like you compiled against .NET 4.0. Try 3.5, that's the version mods are supposed to use. As far as I can tell, I'm using NET 3.5, though the project properties don't show an Application tab for some reason so I'm not 100% sure. How would I go about checking the file paths? I'm using Visual Studio 2017. Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted June 5, 2017 Share Posted June 5, 2017 Just now, Deus Zed Machina said: As far as I can tell, I'm using NET 3.5, though the project properties don't show an Application tab for some reason so I'm not 100% sure. How would I go about checking the file paths? I'm using Visual Studio 2017. Your csproj file should have this: <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> Quote Link to comment Share on other sites More sharing options...
Deus Zed Machina Posted June 5, 2017 Share Posted June 5, 2017 9 minutes ago, HebaruSan said: Your csproj file should have this: <TargetFrameworkVersion>v3.5</TargetFrameworkVersion> My csproj file doesn't have any .NET framework version specified, apparently. It lacks the <TargetFrameworkVersion> tag altogether. Should I just paste that line in or..? Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted June 5, 2017 Share Posted June 5, 2017 1 minute ago, Deus Zed Machina said: My csproj file doesn't have any .NET framework version specified, apparently. It lacks the <TargetFrameworkVersion> tag altogether. Should I just paste that line in or..? Make a backup and try it, I guess? I don't know much about Visual Studio, but I would guess that without that line, it would use the latest version you have installed. Here's a full example if you want to see it in context: https://github.com/HebaruSan/Astrogator/blob/master/src/Astrogator.csproj#L12 Quote Link to comment Share on other sites More sharing options...
Deus Zed Machina Posted June 5, 2017 Share Posted June 5, 2017 (edited) 20 minutes ago, HebaruSan said: Make a backup and try it, I guess? I don't know much about Visual Studio, but I would guess that without that line, it would use the latest version you have installed. Here's a full example if you want to see it in context: https://github.com/HebaruSan/Astrogator/blob/master/src/Astrogator.csproj#L12 Well, that didn't work. It says I need to update visual studio to open the .cs file, then it takes me to MSN. I think the issue has something to do with my version of visual studio... EDIT: If I make a new project and select .NET 3.5 in the file creation menu, the resulting .csproj still lacks the <TargetFrameworkVersion> tag. Edited June 5, 2017 by Deus Zed Machina Quote Link to comment Share on other sites More sharing options...
HebaruSan Posted June 5, 2017 Share Posted June 5, 2017 1 hour ago, Deus Zed Machina said: Well, that didn't work. It says I need to update visual studio to open the .cs file, then it takes me to MSN. I think the issue has something to do with my version of visual studio... EDIT: If I make a new project and select .NET 3.5 in the file creation menu, the resulting .csproj still lacks the <TargetFrameworkVersion> tag. Well, I'd say that's the problem, then. I can't help you with wrangling your software, but I can wish you good luck. Have you tried compiling the source for another mod that already works? Quote Link to comment Share on other sites More sharing options...
sarbian Posted June 6, 2017 Share Posted June 6, 2017 11 hours ago, Deus Zed Machina said: I think the issue has something to do with my version of visual studio... Which version are you using ? Quote Link to comment Share on other sites More sharing options...
Deus Zed Machina Posted June 6, 2017 Share Posted June 6, 2017 9 hours ago, sarbian said: Which version are you using ? Visual Studio Community 2017 ver. 15.2 (26430.12) Release Quote Link to comment Share on other sites More sharing options...
sarbian Posted June 6, 2017 Share Posted June 6, 2017 3 minutes ago, Deus Zed Machina said: Visual Studio Community 2017 ver. 15.2 (26430.12) Release Let's check if you have the proper component then. In your start menu you should have a "Visual Studio Installer". Launch it and press the Modify button in the "Visual Studio Community 2017" section. In the new windows make sure ".NET desktop development" is checked, and then do in the "Individual components" tab and make sure you have ".NET Framework 3.5 development tools" checked (2 line for me). Then press close. It should add what was missing. Launch VS, open your solution and check your project config (Project menu, last item : "xxxxx properties"). Go in the application tab and set it up like that : Quote Link to comment Share on other sites More sharing options...
Deus Zed Machina Posted June 6, 2017 Share Posted June 6, 2017 (edited) 2 hours ago, sarbian said: Let's check if you have the proper component then. In your start menu you should have a "Visual Studio Installer". Launch it and press the Modify button in the "Visual Studio Community 2017" section. In the new windows make sure ".NET desktop development" is checked, and then do in the "Individual components" tab and make sure you have ".NET Framework 3.5 development tools" checked (2 line for me). Then press close. It should add what was missing. [etc.] I installed the .NET 3.5 tools, but when I open my project's properties, I don't have an "application" tab. Is there some other component I might be missing? EDIT: I figured it out. I'm using the wrong kind of class library. Whoops Now it works just fine! Edited June 6, 2017 by Deus Zed Machina Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.