my-th-os / KML

Kerbal Markup Lister - A persistence file editor for Kerbal Space Program
GNU General Public License v3.0
36 stars 8 forks source link

srfn third parameter support #5

Closed BruceTheLoon closed 5 years ago

BruceTheLoon commented 5 years ago

Since 1.7.3, I've noticed a third parameter appearing in the sfrn parameter list in some modules. I believe it is some sort of collision model function.

Example: srfAttach, 80,COLLIDERADAPT

This is causing KML to not read the surface attachment node properly and causes incorrect parent node adjustments on node insert and delete. Attached is a zip file containing a modified KmlPart.cs that resolves the problem for me and a sample persistent.sfs file with a problematic ship in orbit around Kerbin.

submission.zip

The changes implemented include the following.

These changes appear to work properly for my issues with the third parameter and for .sfs files that don't have the third parameter.

my-th-os commented 5 years ago

Thanks a lot. Since my own most recent game is at 1.3.1 still, I don't get those changes. I will have a look at your data. Having support for old and new files as well sounds good, as that was always supported.

my-th-os commented 5 years ago

I could not reproduce with a new 1.7.3 save just launched some standard stuff to orbit. When does this third parameter occur? You only have it for "nfs-panel-deploying-concentrator-1x4-juno-1" parts, wtf is this? Is this DLC or a mod? Is this one of those welding many parts to one things?

BruceTheLoon commented 5 years ago

The part is from the Near Future Solar mod, but it does appear on standard mods as well. It could be one of the mods I've got installed, no welding mods though. I've got both DLCs installed. Let me strip out my third party mods and see if it appears again.

my-th-os commented 5 years ago

This is implemented in https://github.com/my-th-os/KML/commit/6a6859f6379205195cfbdfe639705dca1ac88585 and released in v0.8.2

I would still appreciate some more information if this maybe needed in other cases as well.

my-th-os commented 5 years ago

I don't think we'll get more info on this any time soon.