Jump to content

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


Recommended Posts

Has anyone hacked together a slightly wider procedural decoupler? I think I used the KW model to do that back in .23 but lost all my configs. I'd really like to get an easier-to-connect decoupler going forward.

Link to post
Share on other sites
Applogies if this has already been said, but how do you make new part shapes for this mod?

Please be a little more specific, what exactly do you want to do?

Has anyone hacked together a slightly wider procedural decoupler? I think I used the KW model to do that back in .23 but lost all my configs. I'd really like to get an easier-to-connect decoupler going forward.

You can change the length of the decoupler in its config file. Don't forget to also change the min and maxDiameter. Otherwise you will get problems in career and science mode.

Link to post
Share on other sites

I'd like to make a cube/square, with adjustable height length width. I'm aware that such parts are in the planned features, but I'd like to be able to use such a part as soon as possible.

Edited by SaturnianBlue
Link to post
Share on other sites
I'd like to make a cube/square, with adjustable height length width. I'm aware that such parts are in the planned features, but I'd like to be able to use such a part as soon as possible.

You can find the sources here

Any experience with programming/C#? I'm asking because seemingly you don't know how to compile the sourcecode. Seriously, its not a trivial task if you don't know what you are doing.

Link to post
Share on other sites
You can find the sources here

Any experience with programming/C#? I'm asking because seemingly you don't know how to compile the sourcecode. Seriously, its not a trivial task if you don't know what you are doing.

I don't have that much programming experience, and does running a Mac have some setbacks to it? (Seeing that microsoft visual C# is quite common)

Link to post
Share on other sites

How do you adjust the drag model for procedural parts? TweakScale has the problem that KSP uses the unscaled model for the aero calculations, so drag is broken.

Are there any other mods that might have solved this problem?

Link to post
Share on other sites

pellinor: tweakscale can actually just alter the part's drag cubes. No need to use PParts's method (procedural cubes).

Just iterate over the cubes in the part's dragcubelist and multiply the area, depth, and bounds by the scale factor, then force an occlusion update to redo that step.

Link to post
Share on other sites
pellinor: tweakscale can actually just alter the part's drag cubes. No need to use PParts's method (procedural cubes).

Just iterate over the cubes in the part's dragcubelist and multiply the area, depth, and bounds by the scale factor, then force an occlusion update to redo that step.

Ah, this is just what I was looking for, thanks a lot.

Link to post
Share on other sites

Found a small bug in Procedural SRB config (Parts/Tanks/4SRB.cfg). Size limit assigned to a wrong techtree node, "Start" instead of "Basic rocketry":

TECHLIMIT {
// RT-10 - 1.25 x 2.4 m = 2.95 kL
[B]name = start[/B]
diameterMin = 1.0
diameterMax = 1.75
lengthMin = 1.0
lengthMax = 3.0
volumeMin = 2.0
volumeMax = 4.0
}

Edited by Canis Dirus Leidy
Link to post
Share on other sites

I have a strange problem. I can't select any shapes for my procedural parts.

When I pick up the tank cone, I get an "[Exception]: InvalidProgramException: No shapes available"

I can only change diameter and length on regular tanks.

from .log content:

[EXC 00:27:22.944] InvalidProgramException: No shapes available

ProceduralParts.ProceduralPart.InitializeShapes ()

ProceduralParts.ProceduralPart.OnStart (StartState state)

UnityEngine.Debug:LogException(Exception)

ProceduralParts.ProceduralPart:OnStart(StartState)

Part:ModulesOnStart()

:MoveNext()

Edit: this seems to only happen in career mode. Do I need to unlock certain tech in order to pick shapes ?

Edit 2: Aaah, I see now... different shapes are unlocked by different tech nodes.

I thought there was something wrong with my install because of the exceptions

b2b0bfdb4f.jpg

Edited by tutike2000
Link to post
Share on other sites
Found a small bug in Procedural SRB config (Parts/Tanks/4SRB.cfg). Size limit assigned to a wrong techtree node, "Start" instead of "Basic rocketry":

TECHLIMIT {
// RT-10 - 1.25 x 2.4 m = 2.95 kL
[B]name = start[/B]
diameterMin = 1.0
diameterMax = 1.75
lengthMin = 1.0
lengthMax = 3.0
volumeMin = 2.0
volumeMax = 4.0
}

Thanks! I will fix that.

Ferram ran into a linux-only issue with positions (IIRC?) with FAR. Might ask him how he fixed it.

Ah, good to know. I will ask him.

edit

you probably mean this one? The strange thing is: PP does not modify the parts positions after loading. It just saves its relative position in a variable. Parts normally only get moved after a shape get changed...its...weird... :/ Also if it were a Linux/Unity bug, it should occur even without PP.

end edit

How difficult would it be to add procedural Mk2/Mk3 parts? I've been considering adding them, but I don't know how hard it would be or how you'd like to see them implemented.

You will have to inherit from ProceduralAbstractShape. And deal with stuff like:

- Create Mk2/Mk3 meshes procedurally (of course)

- that includes normals, tangents and uv mapping for (custom) textures

- adaptors (MK1->MK2, MK1/Mk2->normal PP surface of revolution)

- Part attachment repositioning after shape changes

- balancing (correct mass/cost/resource amount scaling)

- other things I just don't think about right now

Best way to see how the implementation works is to dig through the code.

If you have a good idea how to do it. Please do. You can always open an issue on github, discussing conceptual stuff / send pull requests / ask questions.

I have a strange problem. I can't select any shapes for my procedural parts.

When I pick up the tank cone, I get an "[Exception]: InvalidProgramException: No shapes available"

I can only change diameter and length on regular tanks.

from .log content:

[EXC 00:27:22.944] InvalidProgramException: No shapes available

ProceduralParts.ProceduralPart.InitializeShapes ()

ProceduralParts.ProceduralPart.OnStart (StartState state)

UnityEngine.Debug:LogException(Exception)

ProceduralParts.ProceduralPart:OnStart(StartState)

Part:ModulesOnStart()

:MoveNext()

Edit: this seems to only happen in career mode. Do I need to unlock certain tech in order to pick shapes ?

Edit 2: Aaah, I see now... different shapes are unlocked by different tech nodes.

I thought there was something wrong with my install because of the exceptions

http://puu.sh/iwzb7/b2b0bfdb4f.jpg

That should only occur if you have modified the configs. Have you modified the configs? :D

btw: Good news! Looks like PP works well with 1.0.3. There is the good old "may not be compatible" message at startup. But as far as I can see after some testing, everything seems to work fine. (without guarantee of course!) I will release a recompiled version (with some minor changes/fixes) soon.

Edited by RadarManFromTheMoon
Link to post
Share on other sites

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