dxdt Posted August 4, 2014 Share Posted August 4, 2014 (edited) Not quite sure if the showcase thread is the right place for this, but I couldn't find a development thread for this mod so I'll give it a go here.I'm currently debugging the KerbQuake mod whose realchute compatibility broke with the realchute 1.2 update. I've traced down the problem in the KerbQuake code and managed to correct it, though only by referencing the realchute dll, and thus depending on it, which might not be so good since the KerbQuake mod doesn't have anything to do with chutes per se.So does any one know a good way get the deployment states of all the realchutes of a vessel without actually depending on the realchute dll? Basically what I want is to change a coefficient when any chute goes to PREDEPLOYED, and change back this coefficient when the chute goes to DEPLOYED.In the original KerbQuake code, which did not depend on the realchute dll, this was done by the following piece of code:foreach (Part part in vessel.Parts){ foreach (PartModule module in part.Modules) { if (module.moduleName.Contains("RealChuteModule")) { PartModule p = part.Modules["RealChuteModule"]; Type pType = p.GetType(); string depState = (string)pType.GetField("depState").GetValue(p); string secDepState = (string)pType.GetField("secDepState").GetValue(p); if (depState == "PREDEPLOYED" || secDepState == "PREDEPLOYED") spdDensity *= 1.25f; if (depState == "DEPLOYED" || secDepState == "DEPLOYED") spdDensity *= 0.75f; } }}Obviously this has been broken since 1.2, and I've managed to implement this feature by referencing the realchute DLL and using the following piece of code:foreach (Part part in vessel.Parts){ foreach (PartModule module in part.Modules) { if (module.moduleName.Contains("RealChuteModule")) { RealChuteModule p = module as RealChuteModule; foreach (Parachute c in p.parachutes) { if (c.depState == "PREDEPLOYED") spdDensity *= 1.25f; if (c.depState == "DEPLOYED") spdDensity *= 0.75f; } } }}However, I'm looking for a way to do the same, but without depending on the realchute dll.I just picked up C# and kerbalmodding yesterday, so I'm sorry if the answer is obvious. Edited August 4, 2014 by dxdt Clarification Quote Link to comment Share on other sites More sharing options...
mecki Posted August 4, 2014 Share Posted August 4, 2014 Just got a PopUp Saying there was a 1.2.3.1 version available. Just to let you know if it's unintended… Quote Link to comment Share on other sites More sharing options...
BananaDealer Posted August 4, 2014 Share Posted August 4, 2014 Just got a PopUp Saying there was a 1.2.3.1 version available. Just to let you know if it's unintended…Huh... Is that the Version Checker in-game or somewhere else? Cause I'm not getting an in-game prompt if that's what you mean... Quote Link to comment Share on other sites More sharing options...
Starwaster Posted August 4, 2014 Share Posted August 4, 2014 Not quite sure if the showcase thread is the right place for this, but I couldn't find a development thread for this mod so I'll give it a go here.I'm currently debugging the KerbQuake mod whose realchute compatibility broke with the realchute 1.2 update. I've traced down the problem in the KerbQuake code and managed to correct it, though only by referencing the realchute dll, and thus depending on it, which might not be so good since the KerbQuake mod doesn't have anything to do with chutes per se.So does any one know a good way get the deployment states of all the realchutes of a vessel without actually depending on the realchute dll? Basically what I want is to change a coefficient when any chute goes to PREDEPLOYED, and change back this coefficient when the chute goes to DEPLOYED.In the original KerbQuake code, which did not depend on the realchute dll, this was done by the following piece of code:foreach (Part part in vessel.Parts){ foreach (PartModule module in part.Modules) { if (module.moduleName.Contains("RealChuteModule")) { PartModule p = part.Modules["RealChuteModule"]; Type pType = p.GetType(); string depState = (string)pType.GetField("depState").GetValue(p); string secDepState = (string)pType.GetField("secDepState").GetValue(p); if (depState == "PREDEPLOYED" || secDepState == "PREDEPLOYED") spdDensity *= 1.25f; if (depState == "DEPLOYED" || secDepState == "DEPLOYED") spdDensity *= 0.75f; } }}Obviously this has been broken since 1.2, and I've managed to implement this feature by referencing the realchute DLL and using the following piece of code:foreach (Part part in vessel.Parts){ foreach (PartModule module in part.Modules) { if (module.moduleName.Contains("RealChuteModule")) { RealChuteModule p = module as RealChuteModule; foreach (Parachute c in p.parachutes) { if (c.depState == "PREDEPLOYED") spdDensity *= 1.25f; if (c.depState == "DEPLOYED") spdDensity *= 0.75f; } } }}However, I'm looking for a way to do the same, but without depending on the realchute dll.I just picked up C# and kerbalmodding yesterday, so I'm sorry if the answer is obvious. I think the field name changed. Either spelling or case. Go look at the DeadlyReentry source on GitHub. Link in thread for DEADLYReentry thread. There's a place in the code that checks chute state. Quote Link to comment Share on other sites More sharing options...
mecki Posted August 4, 2014 Share Posted August 4, 2014 Huh... Is that the Version Checker in-game or somewhere else? Cause I'm not getting an in-game prompt if that's what you mean...Yes, it's the Add-On Version Checker on startup Quote Link to comment Share on other sites More sharing options...
BananaDealer Posted August 4, 2014 Share Posted August 4, 2014 Yes, it's the Add-On Version Checker on startupDoes is say there's a new, 1.2.3.1 version of RealChute exactly, or does it just give you "some mods might not be compatible with KSP 0.24.2". Quote Link to comment Share on other sites More sharing options...
mecki Posted August 4, 2014 Share Posted August 4, 2014 It says that there is a new version but the download link stays blank. Quote Link to comment Share on other sites More sharing options...
troyfawkes Posted August 4, 2014 Share Posted August 4, 2014 I think this is what Mecki is looking at: http://prntscr.com/49itnf Quote Link to comment Share on other sites More sharing options...
stupid_chris Posted August 4, 2014 Author Share Posted August 4, 2014 Not quite sure if the showcase thread is the right place for this, but I couldn't find a development thread for this mod so I'll give it a go here.I'm currently debugging the KerbQuake mod whose realchute compatibility broke with the realchute 1.2 update. I've traced down the problem in the KerbQuake code and managed to correct it, though only by referencing the realchute dll, and thus depending on it, which might not be so good since the KerbQuake mod doesn't have anything to do with chutes per se.So does any one know a good way get the deployment states of all the realchutes of a vessel without actually depending on the realchute dll? Basically what I want is to change a coefficient when any chute goes to PREDEPLOYED, and change back this coefficient when the chute goes to DEPLOYED.In the original KerbQuake code, which did not depend on the realchute dll, this was done by the following piece of code:foreach (Part part in vessel.Parts){ foreach (PartModule module in part.Modules) { if (module.moduleName.Contains("RealChuteModule")) { PartModule p = part.Modules["RealChuteModule"]; Type pType = p.GetType(); string depState = (string)pType.GetField("depState").GetValue(p); string secDepState = (string)pType.GetField("secDepState").GetValue(p); if (depState == "PREDEPLOYED" || secDepState == "PREDEPLOYED") spdDensity *= 1.25f; if (depState == "DEPLOYED" || secDepState == "DEPLOYED") spdDensity *= 0.75f; } }}Obviously this has been broken since 1.2, and I've managed to implement this feature by referencing the realchute DLL and using the following piece of code:foreach (Part part in vessel.Parts){ foreach (PartModule module in part.Modules) { if (module.moduleName.Contains("RealChuteModule")) { RealChuteModule p = module as RealChuteModule; foreach (Parachute c in p.parachutes) { if (c.depState == "PREDEPLOYED") spdDensity *= 1.25f; if (c.depState == "DEPLOYED") spdDensity *= 0.75f; } } }}However, I'm looking for a way to do the same, but without depending on the realchute dll.I just picked up C# and kerbalmodding yesterday, so I'm sorry if the answer is obvious. You know, usually the best method is to simply contact the modder PM me and I'll guide you around.Just got a PopUp Saying there was a 1.2.3.1 version available. Just to let you know if it's unintended…Available? No. Intended? Not really. Erronous? Not.It says that there is a new version but the download link stays blank.Because KSP-AVC is dumb. I pushed half an update to GitHub last night to prepare and it's interpreting the changes and preparations I made as an update. There's none yet. Quote Link to comment Share on other sites More sharing options...
BananaDealer Posted August 4, 2014 Share Posted August 4, 2014 I'm guessing it just means there's a new version getting uploaded soon... That or it's just a derp on the Version Checker's side...Whichever the case, a mods' thread is always the best place for update information... Quote Link to comment Share on other sites More sharing options...
mecki Posted August 4, 2014 Share Posted August 4, 2014 I think this is what Mecki is looking at: http://prntscr.com/49itnfexactly, thank you troyfawkes!I just wanted to let stupid_chris know in case he was not aware of this (since there was no announcement or anything on the OP. Quote Link to comment Share on other sites More sharing options...
dxdt Posted August 4, 2014 Share Posted August 4, 2014 I think the field name changed. Either spelling or case. Go look at the DeadlyReentry source on GitHub. Link in thread for DEADLYReentry thread. There's a place in the code that checks chute state.Yeah, I've already checked the DR source, they only check if any chute is deployed at all (using public bool anyDeployed from RealChuteModule), but here we need a bit more information. But I've PMd Chris so I think we'll sort this out. Thanks for the help anyways. Quote Link to comment Share on other sites More sharing options...
Kethevin Posted August 4, 2014 Share Posted August 4, 2014 I seem to remember this mod also affecting the stock parachutes, but it no longer is in my game. I recently did a reinstall of everything, so it might be a separate mod that allows this to take over the function of stock chutes.Could someone please set me straight. :-) Quote Link to comment Share on other sites More sharing options...
Master Tao Posted August 5, 2014 Share Posted August 5, 2014 You need to install the Module Manager files included in the download to get the RealChute functions for stock parachutes. Quote Link to comment Share on other sites More sharing options...
BananaDealer Posted August 5, 2014 Share Posted August 5, 2014 I seem to remember this mod also affecting the stock parachutes, but it no longer is in my game. I recently did a reinstall of everything, so it might be a separate mod that allows this to take over the function of stock chutes.Could someone please set me straight. :-)There should be a folder named "Module Manager files" in the archive you downloaded. In it, you'll see another RealChutes folder with a "Module Manager" sub-folder. Place that into your existing RealChute folder that's already in your KSP\GameData. The ending result should be KSP\GameData\RealChute\ModuleManager.You shouldn't get asked to replace or merge anything. If you do- you're not following the instructions.DO NOT PLACE ANY OF THE SEPARATE MODULE MANAGER CONFIGS INTO ANY OTHER MODS' FOLDER since they can get updated with future versions of RealChute and multiple files telling Module Manager to make the same changes the same modules can have an adverse effect. Quote Link to comment Share on other sites More sharing options...
stupid_chris Posted August 5, 2014 Author Share Posted August 5, 2014 Scroll up a little, I posted one yesterday, (unless I did something wrong?). Link is here. I tried to fix it and now I'm fighting some really strange and vicious bugs with realism overhaul at the moment, even starting from a fresh and steam verified install of KSP, so the problem may be on my end.[RealChute]: Could not find the StockReplacement texture config in the GameData folderNot installed properly. Quote Link to comment Share on other sites More sharing options...
Romby Posted August 5, 2014 Share Posted August 5, 2014 The thread for the other mod in question seems to be a little dead so I thought I should ask here instead.Is anybody else having a compatibility issue between this and the kerbquake mod? Whenever I have a parachute on a craft with realchute, it seems to override kerbquake and prevent the cabin from shaking. Has anybody else experienced this?I have the same problem. I havent been able to find a fix for it. Quote Link to comment Share on other sites More sharing options...
stupid_chris Posted August 5, 2014 Author Share Posted August 5, 2014 I have the same problem. I havent been able to find a fix for it.Because it'S not updated yet for RealChute v1.2.x Quote Link to comment Share on other sites More sharing options...
stupid_chris Posted August 6, 2014 Author Share Posted August 6, 2014 Hey guys, small update, v1.2.4 is out Changelog:August 6th 2014v1.2.4-Updated correctly all ModuleManager files-Added ModuleManager support to Tantares and the KP0110 pod-Now uses ModuleManager 2.2.1-Optimized FAR code to not fetch the method each frame-Optimized the rescaling code once more, radially attached parts should behave better-All .png files crushed in size without quality loss thanks to dak180-SpaceCenter icon will no longer be shown over the Astronaut Complex, RnD Building, or Mission Control views-CompatibilityChecker now checks for KSP 0.24.1 or higher for procedural part cost-All ModuleManager files are now package with the rest of the mod, only the needed nodes are loadedHopefully it will be stable for a while as I start doing stuff on other mods That said, the ModuleManager files are now packaged with everything else, so just merge the included gamedata and you're set!Cheers! Quote Link to comment Share on other sites More sharing options...
Mr Shifty Posted August 6, 2014 Share Posted August 6, 2014 Hey guys, small update, v1.2.4 is out Changelog:-Now uses ModuleManager 2.2.1Thanks Chris! Quick question: Is MM 2.2.1 required? I had problems with the database reload and dumping in that version. Quote Link to comment Share on other sites More sharing options...
stupid_chris Posted August 6, 2014 Author Share Posted August 6, 2014 Thanks Chris! Quick question: Is MM 2.2.1 required? I had problems with the database reload and dumping in that version.No but it's packaged, and the last version runs by default. If you have problems with that feature, don't use it? It's new to that version AFAIK. Quote Link to comment Share on other sites More sharing options...
Mr Shifty Posted August 6, 2014 Share Posted August 6, 2014 No but it's packaged, and the last version runs by default. If you have problems with that feature, don't use it? It's new to that version AFAIK.Thanks! 10 char Quote Link to comment Share on other sites More sharing options...
NathanKell Posted August 6, 2014 Share Posted August 6, 2014 No, the issue is that the feature runs *without prompting*, reapplying patches. Or that is how I understood things, which is why I am still packaging 2.2.0. Quote Link to comment Share on other sites More sharing options...
BananaDealer Posted August 6, 2014 Share Posted August 6, 2014 Aw yiiiiiiiiiiis! Mtrfrin updateeees! Quote Link to comment Share on other sites More sharing options...
stupid_chris Posted August 6, 2014 Author Share Posted August 6, 2014 No, the issue is that the feature runs *without prompting*, reapplying patches. Or that is how I understood things, which is why I am still packaging 2.2.0.Well I just learned something then. 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.