Jump to content

[1.12.X] RealChute Parachute Systems v1.4.8.3 | 24/01/21


stupid_chris

Recommended Posts

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 by dxdt
Clarification
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :P 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.

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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. :-)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 folder

Not installed properly.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Hey guys, small update, v1.2.4 is out :)

Changelog:

August 6th 2014
v1.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 loaded

Hopefully 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!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...