Jump to content

[0.90WIP] Procedural Parts - Parts the way you want 'em 0.9.21, Dec 19


swamp_ig

Would you prefer decouplers to:  

118 members have voted

  1. 1. Would you prefer decouplers to:

    • Closely as possible follow stock behaviour
      15
    • Have a sensible relation between size, decoupler force, and mass
      153


Recommended Posts

Ok, so first off, I'm a little concerned that I've got something going wrong with my install because when I searched my KSP.log for "exception", I got 998 results. Is such a high number normal? Most of the items that generated exceptions seem to work normally in game...

Anyway, I did find a whole string of exceptions relating to the term "proceduralSRBRealFuels", which are as follows:


[LOG 02:18:05.928] startPod: proceduralSRBRealFuels(Clone) (Part)
[LOG 02:18:05.928] startPod.vessel:
[LOG 02:18:05.929] pod.transform: proceduralSRBRealFuels(Clone) (UnityEngine.Transform)
[LOG 02:18:05.929] pod.transform.up: (0.0, 1.0, 0.0)
[LOG 02:18:05.950] OnStart exception: System.NullReferenceException: Object reference not set to an instance of an object
at ProceduralParts.ProceduralPart.AddAttachment (UnityEngine.Transform child, Vector3 offset, Boolean normalized) [0x00000] in <filename unknown>:0
at ProceduralParts.ProceduralPart.AddAttachment (UnityEngine.Transform child, Boolean normalized) [0x00000] in <filename unknown>:0
at ProceduralParts.ProceduralSRB.InitializeBells () [0x00000] in <filename unknown>:0
at ProceduralParts.ProceduralSRB.OnStart (StartState state) [0x00000] in <filename unknown>:0
[EXC 02:18:05.951] NullReferenceException: Object reference not set to an instance of an object
[LOG 02:18:05.956] Part: Procedural Real Fuels SRB Transforms: 19
[LOG 02:18:05.956] Procedural Real Fuels SRB: Geometry model created; Size: [1.25, 3.04628324508667, 1.25], LD [1.25, 1.25, 0], UD [1.243980884552, 1.243980884552, 0]

Surface area: 11.9339243170577

Fineness Ratio: 2.43702659606934

TaperRatio: 0.995184707641602

Cross Sectional Area: 1.22718463030851

Cross Sectional Tapered Area: 0.0117900507656171

Major-minor axis ratio: 1

Centroid: [0, -0.27559230892085, 0]
[LOG 02:18:05.958] Part: Procedural Real Fuels SRB Transforms: 19
[LOG 02:18:05.969] CLSVessel::Clear
[LOG 02:18:05.972] System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object
at ProceduralParts.ProceduralSRB.UpdateMaxThrust () [0x00000] in <filename unknown>:0
at ProceduralParts.ProceduralSRB.ChangeAttachNodeSize (.AttachNode node, Single minDia, Single area) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at KSPAPIExtensions.PartMessage.ServiceImpl.Send (KSPAPIExtensions.PartMessage.CurrentEventInfoImpl message) [0x00000] in <filename unknown>:0
at KSPAPIExtensions.PartMessage.ServiceImpl+MessageConsolidator.Dispose () [0x00000] in <filename unknown>:0
at ProceduralParts.ProceduralAbstractShape.OnUpdateEditor () [0x00000] in <filename unknown>:0
[EXC 02:18:05.977] NullReferenceException: Object reference not set to an instance of an object
[EXC 02:18:05.979] NullReferenceException: Object reference not set to an instance of an object

My coding skills are seriously rusty, but it seems like it's trying to call something that doesn't exist yet, so the exception is thrown.

Any thoughts from someone more versed in this sort of thing than I about what could be really going wrong here?

Edited by SpacedInvader
Link to comment
Share on other sites

I am loving this mod, but I have one (And only one) complaint. I find that the Procedural heat shield is too thick, and therefore aesthetically unappealing. Is it possible to make it thinner?

Link to comment
Share on other sites

From tweakable everything.

After 2 hours of testing I found out that \GameData\ProceduralParts\ModuleManager\ModularFuelTanks.cfg is causing the problem.

After removing the file I was able to scale PP tanks with the fuel correctly.

@PART[proceduralTankLiquid]:AFTER[modularFuelTanks]
{
!MODULE[TankContentSwitcher] { }
MODULE
{
name = ModuleFuelTanks
type = Default
volume = 211
tankVolumeConversion = 200
}
}

@PART[proceduralTankRCS]:AFTER[modularFuelTanks]
{
!MODULE[TankContentSwitcher] { }
MODULE
{
name = ModuleFuelTanks
type = RCS
volume = 106
tankVolumeConversion = 200
}
}

@PART[proceduralTankXenon]:AFTER[modularFuelTanks]
{
!MODULE[TankContentSwitcher] { }
MODULE
{
name = ModuleFuelTanks
type = Xenon
volume = 792
tankVolumeConversion = 10000
}
}

Link to comment
Share on other sites

After 2 hours of testing I found out that \GameData\ProceduralParts\ModuleManager\ModularFuelTanks.cfg is causing the problem.

After removing the file I was able to scale PP tanks with the fuel correctly.

On a hunch, I tried this as well, and oddly enough, it removed my texture issues, though not the odd SRB behavior. Then I tried changing the file to simply hide rather than delete the parts and it did not work. Apparently, something in the way the Real Fuels tanks are getting their textures is not working, at least with LOD, resulting in a situation where the textures are fine, as long as there is a non-RF version of that texture somewhere in the category to use, but the textures are blurry when they are referenced alone.

Link to comment
Share on other sites

If you're using MFT you really need to either delete that file, or install the real fuels DLLs over the existing MFT dlls.

Is that what you're doing?

I should probably just make an MFT support package, however a release of both RF and MFT incorporating my changes isn't too far away.

Link to comment
Share on other sites

If you're using MFT you really need to either delete that file, or install the real fuels DLLs over the existing MFT dlls.

Is that what you're doing?

I should probably just make an MFT support package, however a release of both RF and MFT incorporating my changes isn't too far away.

For me, this is a no, I don't even have MFT installed since RF takes care of all of the same functionality.

Link to comment
Share on other sites

Last night I had an interesting issue with a different mod (specifically LOD) as a result a mistake I made in a module manage file in PP while trying to solve my problems with textures and wild booster flames. By making a mistake in that MM file, it disabled LOD with a very similar error message to the one I'm seeing with the SRBs. Anyway, I have something like 90 mods installed, so I'm wondering if there is a way to see what all of the module manager changes that are being done to a specific part are so that I can try to trace back the line to see where the issue is being introduced.

Link to comment
Share on other sites

There's a couple of ways to figure out what MM does to configs:

1. Look though your KSP.log - in the first section where the MM changes come up

2. If you go to the debug menu, in the database section you can see what the final config is.

Link to comment
Share on other sites

Hi swamp_ig, I'd like to report a problem with RSS I've been having. My game appears to get stuck on the FASA Apollo CM on the loading screen -- this is with Realism Overhaul and Real Solar System, along with a bunch of other mods I'll list below. output_log is also below. I've also screencapped a segment of the log that I think might help. This is using your Real Fuels config with the mod. Thanks in advance for any help I receive! :)

Log: https://www.dropbox.com/s/l726k98roeupyty/output_log.txt

Log Screencap:

Jf0OD1Y.png

Mod List:


blizzy78 Toolbar
Active Texture Management
Environmental Visual Enhancements
Aerojet Kerbodyne
AIES Aerospace
Advanced Jet Engine
blackheart612 textures
Bobcat Soviet Engines
BT Engines
Deadly Reentry
Distant Object Enhancement
Editor Extensions
Kerbal Engineer Redux
Engine Ignitor
Engine Thrust Controller
Exsurgent Engineering DLL file
FASA
Ferram Aerospace Research
Firespitter DLL file
RasterPropMonitor
Kerbal Attachment System DLL file
Kerbal Joint Reinforcement
KerbX
LazTek
Space Shuttle Engines
kOS
Kosmos
KW Rocketry
MechJeb
Near Future Solar Panels
Final Frontier
NovaPunch 2
Procedural Parts
Procedural Fairings
Taurus HCV
RealChute
Real Fuels
Realism Overhaul
Real Solar System
Sum Dum Heavy Industries Serve Module System
RealEngines
SmokeScreen
TreeLoader
MedievalNerd's Tech Tree
Kerbal Alarm Clock

Edited by Woopert
Link to comment
Share on other sites

Sorry, my instructions probably weren't the clearest. I'll get to it in a few hours.

I know you must be busy, but I am still having some issues and would love to see what you (or anybody) has for proc. batteries.

Link to comment
Share on other sites

I know you must be busy, but I am still having some issues and would love to see what you (or anybody) has for proc. batteries.


MODULE
{
name = TankContentSwitcher
useVolume = true

// Dry density and fuel units per kL are all over the shop for RCS
TANK_TYPE_OPTION
{
name = Charge
// Based it on FL-R25
dryDensity = 0.20
// As per StretchySRB
// dryDensity = 0.1089
RESOURCE
{
name = ElectricCharge
// Based on FL-R10 and Stratus-V Cyl.
unitsPerT = 20000
// As per StretchySRB
// unitsPerKL = 203.718
}
}
}

Rough testing I did just now. 3000 electric charge weighs the same as 3 stacks of stock batteries and so do the others. Should be balanced. Remember to change the name of the part you're duplicating.

Link to comment
Share on other sites

Hi swamp_ig, I'd like to report a problem with RSS I've been having. My game appears to get stuck on the FASA Apollo CM on the loading screen -- this is with Realism Overhaul and Real Solar System, along with a bunch of other mods I'll list below. output_log is also below. I've also screencapped a segment of the log that I think might help. This is using your Real Fuels config with the mod. Thanks in advance for any help I receive! :)

Thanks for your detailed bug report. I think this is already fixed, new release with this and a few other fixes is not far away. Anyhow, will have a look at the appropriate area.

Link to comment
Share on other sites

Rough testing I did just now. 3000 electric charge weighs the same as 3 stacks of stock batteries and so do the others. Should be balanced. Remember to change the name of the part you're duplicating.

I've been holding out on creating a battery part until extrudes were done, since previously it wasn't possible to add new shapes to an existing part, and most batteries are cuboid in shape.

With the latest MM changes, it's possible to add extra shapes in the future, so I guess there's no real reason why not to include one. Granted the current shapes are the surfaces of revolution, so you end up with only flat-disc / cone / pill batteries, but that's not too big a deal really

Note that the electric charge resource has no mass, but can use the units per T as above.

Edited by swamp_ig
Link to comment
Share on other sites

Hi, I mentioned this in the RealFuels thread and was directed here, as it apparently ties into changes made to the RF code to support ProceduralParts.

This was my original post;

Im using the latest version of RealFuels (from the repository, as I'm using it with Procedural Parts), and the following is happening;

When I place a 'Size2LFB' (The NASA combined Tank+Engine), the game will set dry mass as if it was a tank, without accounting for engine mass. When I toggle the techlevel for the engine, it will update the mass correctly in the ActionGroup window and for VOID, MJ, etc., but not on the right-click window for the part itself. As soon as I change the fuel, the mass of the engine 'vanishes' again (even from VOID, etc. calculations) until I change the techlevels again.

Interestingly, this does not happen with RF 5.3, but I'm wary of using that with PP since I do not know if its compatible with PP. I've been trying to look at the source for both to figure out whats going on (its probably in ModularFuelTanks.cs), but the file has been rewritten so much that with my limited experience with C# I can't seem to find the issue.

For now I'm just not using them, but just thought I'd point this out incase anyone else hasn't noticed it yet.

Note: I actually just remembered that the same was happening with the pods when I tried to add a ModularTank to them for RCS use - the rest of the pods mass would 'vanish'. I was using the ModuleManager files from RO as an example of how to add them.

I should note that this also happens with the RealFuels.dll you provide in this thread, which I believe is the same as the current repository state?

NathanKell suggested it might be due to the changes not respecting the 'basemass' variable and overriding it, as even when I have basemass = -1 set on parts where I want them to retain their original mass it seems to get override by tank dry mass.

Link to comment
Share on other sites

Hi, I mentioned this in the RealFuels thread and was directed here, as it apparently ties into changes made to the RF code to support ProceduralParts.

Yep, aware of that. Am looking into it.

Link to comment
Share on other sites

-snip

Rough testing I did just now. 3000 electric charge weighs the same as 3 stacks of stock batteries and so do the others. Should be balanced. Remember to change the name of the part you're duplicating.

Thank you so much! The main problem was I didn't know the module name to change "monopropellant" to "charge". I had something else.

@swamp_ig

It might at least be good to throw these inline batteries onto the upload since they work pretty well and are extremely useful.

Link to comment
Share on other sites

Download here

This is a very minor release.

There's a few tweaks for textures, a new 'tiled' texture, and that's about it.

I more put it up so that the issue with the ModuleManager DLL being named wrong is fixed.

Will be putting up a new version with the batteries included in due course.

On the Real Fuels / Modular Fuel Tanks end, there's a few tweaks and fixes to the support package. I've split off the MFT support package so that it gets its own properly named DLL which hopefully will fix some install issues.

Go see the threads for Real Fuels, and for Modular Fuel Tanks.

Edited by swamp_ig
Link to comment
Share on other sites

Well, I'm fresh out of ideas here... I've gone through the KSP.log almost line by line trying to find everything that affects the PP SRBs, I've even gone through and removed all of my mods to try adding them back a few at a time to see where things are going wrong, but even with a bare-bones install, I'm getting the crazy firing problem. Is there some dependency that isn't listed in the OP that I could be missing?

Link to comment
Share on other sites

Well, I'm fresh out of ideas here... I've gone through the KSP.log almost line by line trying to find everything that affects the PP SRBs, I've even gone through and removed all of my mods to try adding them back a few at a time to see where things are going wrong, but even with a bare-bones install, I'm getting the crazy firing problem. Is there some dependency that isn't listed in the OP that I could be missing?

Can't say I've got any other ideas unfortunately. It works for meTM, so yeh, hard to replicate the error and therefore hard to fix it.

Still getting the same error in the same place? A null pointer in AddAttachment?

Try updating to the new release of the RF code, I think that might be your best bet.

Link to comment
Share on other sites

Can't say I've got any other ideas unfortunately. It works for meTM, so yeh, hard to replicate the error and therefore hard to fix it.

Still getting the same error in the same place? A null pointer in AddAttachment?

Try updating to the new release of the RF code, I think that might be your best bet.

I'm already on the newest release... I guess I'll just have to keep poking at it until I find where things are going wrong.

Link to comment
Share on other sites

Question regarding KSPAPIExtensions.dll. I now have several mods that utilize this library. Is it OK to have the DLL present in multiple .\gamedata folders? Can I just create a .\GameData\KSPAPIExtension folder make sure to keep the latest version of the dll in there?

Link to comment
Share on other sites

Yes, that's how it's supposed to be used

Don't consolidate libraries, it will break things (it's so each module can have its own version, otherwise all users would have to update their releases symultaniously)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...