Jump to content

[1.1.3] Procedural Parts - Parts the way you want 'em - v1.2.5 July 3


OtherBarry

Recommended Posts

On 1/12/2017 at 8:49 PM, DoubleUU said:

At least I'm feeling a bit less like it must be just me.  I'm a Java developer but I'm familiar enough with VS and C# that I could probably get this to recompile and see if that sorts my issue.  Just seems like a lot of work.  I think I'd change that particular bit of code and make the version checker use the version file so it could at least be updated for minor version changes without requiring a recompile.  Maybe that's shortsighted though.

If that's your ONLY problem and there's not another issue you haven't reported, then ... that isn't really a problem. Just ignore the warning message. 

If you WANT a recompiled PP plugin, see below, but, fair warning: I didn't even bother changing the checker version targets so it still reports an incompatibility. Again, ignore it.

https://www.dropbox.com/s/8385vooo95i6c5m/ProceduralParts.dll?dl=1

Link to comment
Share on other sites

Any chance somebody could fork this and release a recompile for 1.2.2 with its own forum thread, as well as continue development of it there?  I'm sure OtherBarry could take it back over from the forked version when he has the time and in the meantime I'd REALLY, REALLY like to see a version that is not only recompiled, but includes some long-overdue fixes like adjustments to the cost of the procedural SRB's to be more in line with stock costs, and implementation of a new cost formula where costs appropriately decrease with increasing tank/SRB size, just like with the stock parts...

 

Regards,

Northstar

Edited by Northstar1989
Link to comment
Share on other sites

Is there a way to add cross sections other than circular to this mod?

I was kind of thinking this mod would be really neat for creating on-the-fly transition parts between TweakScaled and non-TweakScaled spaceplane fuselage parts, so you could have a regular Mk2 cockpit for example with a "fat" cargo section and a Procedural part in between. Same for various other non-cylindrical cross sections (Mk3, OPT J and K, MkIV, the B9 stuff, etc).

If this has come up before, could someone point me at the discussion of why it isn't possible, or how to do it if it is?

Cheers!

Link to comment
Share on other sites

@Winchester i think that the closest that one could do is the PP parts that @Azimech develop(ed):

If you are lucky enough then you can get it to approach the oval shape of the Mk2 parts. But circular parts with specific flat surfaces (like the Mk3 parts) or with non-symmetrical shapes are not currently possible. Maybe maybe in the future someone will refactor PP to support arbitrary shapes.

(still, i have no idea how non-circular parts can be done via the current PP, it would be ideal for Atlas-style side boosters)

Link to comment
Share on other sites

On 1/14/2017 at 2:37 AM, Winchester said:

Is there a way to add cross sections other than circular to this mod?

I was kind of thinking this mod would be really neat for creating on-the-fly transition parts between TweakScaled and non-TweakScaled spaceplane fuselage parts, so you could have a regular Mk2 cockpit for example with a "fat" cargo section and a Procedural part in between. Same for various other non-cylindrical cross sections (Mk3, OPT J and K, MkIV, the B9 stuff, etc).

If this has come up before, could someone point me at the discussion of why it isn't possible, or how to do it if it is?

Cheers!

Yes. You would need to define your own ProceduralAbstractShape inheriting from ProceduralShape and then a specific Procedural Shape based on that procedural abstract shape, since all the existing ones are based on rounded cylinders / cones, then write a bunch of code to handle all the various types of shapes. Not for the faint of heart, which is probably why it hasn't yet been done. Have a look also at the B9 Procedural wings for another example of creating procedural parts.

Link to comment
Share on other sites

For some reason, installing the latest version of Procedural Parts seems to cause my parts list to appear completely, completely empty. I'm running way too many mods so probably some sort of conflict I guess?

Did a ctrl+f in my logs for 'Procedural' and found a bunch of repeats of these:


[EXC 10:13:10.150] NullReferenceException: Object reference not set to an instance of an object
	PartModuleList.Contains (Int32 classID)
	PartModuleList.Contains (System.String className)
	ProceduralParts.ProceduralPart.GetModuleCost (Single stdCost, ModifierStagingSituation sit)
	Part.GetModuleCosts (Single defaultCost, ModifierStagingSituation sit)
	KSP.UI.Screens.EditorPartList.<currentPartSorting>m__A9 (.AvailablePart r1, .AvailablePart r2)
	RUIutils+FuncComparer`1[AvailablePart].Compare (.AvailablePart x, .AvailablePart y)
	System.Array.compare[AvailablePart] (.AvailablePart value1, .AvailablePart value2, IComparer`1 comparer)
	System.Array.qsort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 low0, Int32 high0, IComparer`1 comparer)
	System.Array.Sort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 index, Int32 length, IComparer`1 comparer)
	Rethrow as InvalidOperationException: The comparer threw an exception.
	System.Array.Sort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 index, Int32 length, IComparer`1 comparer)
	System.Array.Sort[AvailablePart] (.AvailablePart[] array, Int32 index, Int32 length, IComparer`1 comparer)
	System.Collections.Generic.List`1[AvailablePart].Sort (IComparer`1 comparer)
	KSP.UI.Screens.EditorPartList.RefreshPartList ()
	KSP.UI.Screens.EditorPartList.Refresh ()
	JanitorsCloset.ModFilterWindow.DefineFilters ()
	JanitorsCloset.ModFilterWindow.Start ()

[EXC 10:13:10.876] NullReferenceException: Object reference not set to an instance of an object
	PartModuleList.Contains (Int32 classID)
	PartModuleList.Contains (System.String className)
	ProceduralParts.ProceduralPart.GetModuleCost (Single stdCost, ModifierStagingSituation sit)
	Part.GetModuleCosts (Single defaultCost, ModifierStagingSituation sit)
	KSP.UI.Screens.EditorPartList.<currentPartSorting>m__A9 (.AvailablePart r1, .AvailablePart r2)
	RUIutils+FuncComparer`1[AvailablePart].Compare (.AvailablePart x, .AvailablePart y)
	System.Array.compare[AvailablePart] (.AvailablePart value1, .AvailablePart value2, IComparer`1 comparer)
	System.Array.qsort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 low0, Int32 high0, IComparer`1 comparer)
	System.Array.Sort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 index, Int32 length, IComparer`1 comparer)
	Rethrow as InvalidOperationException: The comparer threw an exception.
	System.Array.Sort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 index, Int32 length, IComparer`1 comparer)
	System.Array.Sort[AvailablePart] (.AvailablePart[] array, Int32 index, Int32 length, IComparer`1 comparer)
	System.Collections.Generic.List`1[AvailablePart].Sort (IComparer`1 comparer)
	KSP.UI.Screens.EditorPartList.RefreshPartList ()
	KSP.UI.Screens.EditorPartList.Refresh ()
	JanitorsCloset.ModFilterWindow.FilterChildWindowHandler (Int32 id)
	UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
	UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)

They mention JanitorsCloset as well so I'll try disabling that and see if it makes a difference.

Link to comment
Share on other sites

On ‎1‎/‎24‎/‎2017 at 5:30 AM, baldamundo said:

For some reason, installing the latest version of Procedural Parts seems to cause my parts list to appear completely, completely empty. I'm running way too many mods so probably some sort of conflict I guess?

Did a ctrl+f in my logs for 'Procedural' and found a bunch of repeats of these:



[EXC 10:13:10.150] NullReferenceException: Object reference not set to an instance of an object
	PartModuleList.Contains (Int32 classID)
	PartModuleList.Contains (System.String className)
	ProceduralParts.ProceduralPart.GetModuleCost (Single stdCost, ModifierStagingSituation sit)
	Part.GetModuleCosts (Single defaultCost, ModifierStagingSituation sit)
	KSP.UI.Screens.EditorPartList.<currentPartSorting>m__A9 (.AvailablePart r1, .AvailablePart r2)
	RUIutils+FuncComparer`1[AvailablePart].Compare (.AvailablePart x, .AvailablePart y)
	System.Array.compare[AvailablePart] (.AvailablePart value1, .AvailablePart value2, IComparer`1 comparer)
	System.Array.qsort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 low0, Int32 high0, IComparer`1 comparer)
	System.Array.Sort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 index, Int32 length, IComparer`1 comparer)
	Rethrow as InvalidOperationException: The comparer threw an exception.
	System.Array.Sort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 index, Int32 length, IComparer`1 comparer)
	System.Array.Sort[AvailablePart] (.AvailablePart[] array, Int32 index, Int32 length, IComparer`1 comparer)
	System.Collections.Generic.List`1[AvailablePart].Sort (IComparer`1 comparer)
	KSP.UI.Screens.EditorPartList.RefreshPartList ()
	KSP.UI.Screens.EditorPartList.Refresh ()
	JanitorsCloset.ModFilterWindow.DefineFilters ()
	JanitorsCloset.ModFilterWindow.Start ()

[EXC 10:13:10.876] NullReferenceException: Object reference not set to an instance of an object
	PartModuleList.Contains (Int32 classID)
	PartModuleList.Contains (System.String className)
	ProceduralParts.ProceduralPart.GetModuleCost (Single stdCost, ModifierStagingSituation sit)
	Part.GetModuleCosts (Single defaultCost, ModifierStagingSituation sit)
	KSP.UI.Screens.EditorPartList.<currentPartSorting>m__A9 (.AvailablePart r1, .AvailablePart r2)
	RUIutils+FuncComparer`1[AvailablePart].Compare (.AvailablePart x, .AvailablePart y)
	System.Array.compare[AvailablePart] (.AvailablePart value1, .AvailablePart value2, IComparer`1 comparer)
	System.Array.qsort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 low0, Int32 high0, IComparer`1 comparer)
	System.Array.Sort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 index, Int32 length, IComparer`1 comparer)
	Rethrow as InvalidOperationException: The comparer threw an exception.
	System.Array.Sort[AvailablePart,AvailablePart] (.AvailablePart[] keys, .AvailablePart[] items, Int32 index, Int32 length, IComparer`1 comparer)
	System.Array.Sort[AvailablePart] (.AvailablePart[] array, Int32 index, Int32 length, IComparer`1 comparer)
	System.Collections.Generic.List`1[AvailablePart].Sort (IComparer`1 comparer)
	KSP.UI.Screens.EditorPartList.RefreshPartList ()
	KSP.UI.Screens.EditorPartList.Refresh ()
	JanitorsCloset.ModFilterWindow.FilterChildWindowHandler (Int32 id)
	UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID)
	UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style)

They mention JanitorsCloset as well so I'll try disabling that and see if it makes a difference.

I'm also having Parts disappear Fairings fall off. Parts not being adjustable afteri load a Vehicle which has Procedural parts. Seems to start acting wonky after I pass a certain size on the parts. So you're not the only one.

Link to comment
Share on other sites

6 hours ago, Dermeister said:

I'm also having Parts disappear Fairings fall off. Parts not being adjustable afteri load a Vehicle which has Procedural parts. Seems to start acting wonky after I pass a certain size on the parts. So you're not the only one.

Yeah I was having problems with a tank after it got bigger then 5m diameter.

Link to comment
Share on other sites

Hi everyone 

I'm looking for someone to help me with the techtree module manager patch that we could create if we want to access different size and shapes from the beginning of the career..

I don't know how to write one, I'm on mac and in the OP, the author says that we need to copy and paste the following patch and name it mycheats.cfg..

But if I use text edit, the file is named mycheats.cfg.rtz or something like that .. could anyone help a lost kerbonaut to get this to work please ? :) thanks for reading 

@PART[proceduralTank*]
{
@MODULE[ProceduralPart]
{
@TECHLIMIT,*
{
// Increase the max length for all tech levels by 3*
@lengthMax *= 3
// Corresponding volume increase
@volumeMax *= 3

// Increase the max diameter by double
@diameterMax *= 2
// Since volume goes up on diameter^2, need to use increase^2
@volumeMax *= 4
}
}
}
Link to comment
Share on other sites

2 hours ago, Alex38 said:

Hi everyone 

I'm looking for someone to help me with the techtree module manager patch that we could create if we want to access different size and shapes from the beginning of the career..

I don't know how to write one, I'm on mac and in the OP, the author says that we need to copy and paste the following patch and name it mycheats.cfg..

But if I use text edit, the file is named mycheats.cfg.rtz or something like that .. could anyone help a lost kerbonaut to get this to work please ? :) thanks for reading 


@PART[proceduralTank*]
{
@MODULE[ProceduralPart]
{
@TECHLIMIT,*
{
// Increase the max length for all tech levels by 3*
@lengthMax *= 3
// Corresponding volume increase
@volumeMax *= 3

// Increase the max diameter by double
@diameterMax *= 2
// Since volume goes up on diameter^2, need to use increase^2
@volumeMax *= 4
}
}
}

When creating a .cfg file. All you need is a text editor and to have file extensions viewable. Simply rename the file "any name you want" and change .txt or .rtz to .cfg. Acknowledge the warning and poof you now have a cfg file.

 

I highly recommend "Notepad++" for cfg editing. It's free and it really makes short work of everything.

Edited by V8jester
Link to comment
Share on other sites

10 minutes ago, V8jester said:

When creating a .cfg file. All you need is a text editor and to have file extensions viewable. Simply rename the file "any name you want" and change .txt or .rtz to .cfg. Acknowledge the warning and poof you now have a cfg file.

 

I highly recommend "Notepad++" for cfg editing. It's free and it really makes short work of everything.

Thank you so much ! :) I'm going to download notepad++ thanks again !

Link to comment
Share on other sites

3 hours ago, V8jester said:

When creating a .cfg file. All you need is a text editor and to have file extensions viewable. Simply rename the file "any name you want" and change .txt or .rtz to .cfg. Acknowledge the warning and poof you now have a cfg file.

 

I highly recommend "Notepad++" for cfg editing. It's free and it really makes short work of everything.

 

3 hours ago, Alex38 said:

Thank you so much ! :) I'm going to download notepad++ thanks again !

As a heads-up: Notepad++ is Windows-only, though it does make a decent text editor. I've started to use Sublime a bit, in addition to my usual Vim* shenanigans.

*Vim is a command-line based text editor, used mostly by those who are comfortable with the command line. I'm going to take a wild guess that you are not super-familiar with the command line, and as such, I wouldn't recommend Vim

Link to comment
Share on other sites

6 hours ago, Starman4308 said:

 

As a heads-up: Notepad++ is Windows-only, though it does make a decent text editor. I've started to use Sublime a bit, in addition to my usual Vim* shenanigans.

*Vim is a command-line based text editor, used mostly by those who are comfortable with the command line. I'm going to take a wild guess that you are not super-familiar with the command line, and as such, I wouldn't recommend Vim

Yea you're right, I know some little things but I never write a patch myself for exemple.. thanks anyway :) I downloaded Tinca, on mac, it seems to do the job for my issue with the .cfg file so for now I will keep it, and maybe learn more about writing patches or configs when I got the time :) 

Link to comment
Share on other sites

I've been having trouble with aerodynamic stability involving heatshields. Comparison of configs reveals that PParts shields lack an offset parameter for the centre of lift, which stock shields have. These are the stock values:

0.625m
CoLOffset = 0.0, -0.075, 0.0

1.25m
CoLOffset = 0.0, -0.15, 0.0

2.5m
CoLOffset = 0.0, -0.36, 0.0

3.75m
CoLOffset = 0.0, -0.5, 0.0

These values appear not to scale with the varying size of a procedural heatshield, so I'd recommend picking one that corresponds with the largest kind of craft you tend to use.

Edited by Guest
There is actually a scaling CoP offset.
Link to comment
Share on other sites

I'm experiencing an issue I've had in the past that I was never able to resolve where parts attached to procedural parts drift when a craft is loaded. In this specific case, I have a Real Chutes stack chute attached to a procedural Real Fuels tank and I've had to scrap the mission because the chute moved inside the tank after several loads and will no longer deploy because it sees itself as being inside a fairing. Considering this degree of movement has happened with only two loads of the craft (editor>pad and then one while in orbit around the Mun) on a very short term mission, I have significant concerns about using any PP on long-term missions where I'll be loading the game and probably the craft multiple times. Has anyone experienced this other than me, and if so, is there any way to prevent it?

 

EDIT: I'm fairly certain that its the attach nodes that are moving thanks to some error in part loading.

Edited by SpacedInvader
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...