Jump to content

[1.8.x, 1.9.x, 1.10.x] PartInfo


linuxgurugamer

Recommended Posts

This is a very simple mod to display the internal part information in the editor.

When you right-click on a part in the parts list, the Part Info information will be show in the right column.

This information can be useful if you are looking for a specific part file on disk.

Currently it shows the internal part name and path to the part.

 

Dependencies

This image shows what's available:

lBh9YrM.png

 

Availability

Please note the following limitations:

  • New parts that are created through MM patches with +PART have the URL of their source part and not the URL of the patch that created them. Missing History does this for a lot of it's parts that are rescaled from squad parts. I don't think there's any fix for that.
  • The original name and the name as changed during loading are shown

Donations gratefully accepted

 Patreon.png

  https://www.patreon.com/linuxgurugamer

Edited by linuxgurugamer
Link to comment
Share on other sites

Just now, Tonka Crash said:

@linuxgurugamer The part name is incorrect in your example. The name should be mk1pod_v2. Somewhere during the loading process all underscores in the names are replaced by periods. You can see the difference if you find the same part in the persistence.sfs file vs the ModuleManager.ConfigCache

There's nothing I can do about that.  It's impossible to know what type of changes were done during loading. 

How can you tell if a part name which has dots, if the dots are the result of a replacement or if the dots are part of the original name?

 

Link to comment
Share on other sites

28 minutes ago, linuxgurugamer said:

How can you tell if a part name which has dots, if the dots are the result of a replacement or if the dots are part of the original name?

The 1st thought I had is to create a new "TrueName" part attribute for your mod to key off of with a MM patch and see if that is mutated by the time it's loaded. @PART[*]:FOR[PartInfo] { TrueName = #$name$ } or something like that.

Edited by Tonka Crash
Link to comment
Share on other sites

1 minute ago, Tonka Crash said:

The 1st thought I had is to create a new "TrueName" part attribute for your mod to key off of with a MM patch and see if that is mutated by the time it's loaded. @part[*]:FOR[PartInfo] { TrueName = #$name$ } or something like that.

This is meant to be a very simple mod  It's an interesting idea, I'll think about it, but was not planning on spending a lot of time with this

Link to comment
Share on other sites

2 minutes ago, linuxgurugamer said:

This is meant to be a very simple mod  It's an interesting idea, I'll think about it, but was not planning on spending a lot of time with this

Without the true name of the part this can be misleading as to what it's really telling you. I had asked for a mod like this to make writing patches easier. If you show incorrect info it will just lead to someone chasing their tail trying to figure out why a patch doesn't work.

Link to comment
Share on other sites

7 minutes ago, Tonka Crash said:

Without the true name of the part this can be misleading as to what it's really telling you. I had asked for a mod like this to make writing patches easier. If you show incorrect info it will just lead to someone chasing their tail trying to figure out why a patch doesn't work.

It tells you the filepath for the part's config file. If you want to write a MM patch targeting that part then you should use the actual config file to verify the part name.

Link to comment
Share on other sites

8 minutes ago, Tonka Crash said:

Without the true name of the part this can be misleading as to what it's really telling you. I had asked for a mod like this to make writing patches easier. If you show incorrect info it will just lead to someone chasing their tail trying to figure out why a patch doesn't work.

Reasonable, I'll see what I can do

Link to comment
Share on other sites

2 minutes ago, DMagic said:

It tells you the filepath for the part's config file. If you want to write a MM patch targeting that part then you should use the actual config file to verify the part name.

You shouldn't have to verify a part name by cross checking a config file when the mod should just tell you the correct name.

Also, the config file path has a gotcha I brought up yesterday in that it does not apply to parts created by mods using +PART to define new parts. The URL is to the source part not any new ones created through MM patches. Missing History does this for it's parts rescaled to 1.875m. I do it, too to give me half size of smallest and double size of largest of each tank. There's no way around that one, AFIK.

Link to comment
Share on other sites

 I wrote this exact mod as part of my personal dev tools for making my own mods. I should have released it as a separate thing long ago. Glad you did! (For those still playing. I might come back to play again this year as well.)

Link to comment
Share on other sites

  • 1 month later...
4 hours ago, evileye.x said:

Hello @linuxgurugamer, thank you very much for this great tool for all of as, parts maniacs (kinda impossible for me to play without JC and FE, and now obviously this!)

I have a small question though - is there's any way (mod or config) to make part window larger? 

No

Link to comment
Share on other sites

  • 4 months later...
  • 2 months later...
  • 3 months later...
51 minutes ago, zer0Kerbal said:

what causes this? I've tried deleting the cache et al.

those are all the modules still listed in parts that are in craft that is in your save file. You'll need to clean all the modules out of your save file if you want them to go away. The game handles missing module references gracefully and only alerts you in case the reference isn't actually supposed to be missing. it can't tell

Link to comment
Share on other sites

  • 1 month later...

Hello. @linuxgurugamer

I am not sure if this "part info" module on the picture, have anything to do with this mod thread, probably not.

mrRgSj8.png

 

Probably this module "part info" just share the same name as this mod "part info", nevertheless I am trying to expand that module to all existent parts, once this is a very important/critical information about the part and specially, if it was scaled using the tweak-scale mod from @Lisias

 

K:\SteamLibrary\steamapps\common\Kerbal Space Program\GameData>findstr /S /I "partinfo" *.cfg | find /V "Localization"
B9PartSwitch\PartInfo.cfg:              name = ModuleB9PartInfo
GroundConstruction\IgnoreModules.cfg:    ignore = ModuleB9PartInfo
PartInfo\PartInfo.cfg:          name = ModulePartInfo
ZeroMiniAVC\Config.cfg:         name = PartInfo
ZeroMiniAVC\Config.cfg:         pruned = K:\SteamLibrary\steamapps\common\Kerbal Space Program\GameData\PartInfo\MiniAVC.dll.pruned

Maybe this is from B9PartSwitch\PartInfo.cfg ? ( from @blowfish )

 

Do you have any hint for this? Thanks in advance.

Edited by pmborg
Link to comment
Share on other sites

I think that I found it here:

B9PartSwitch\B9PartSwitch\PartSwitch\ModuleB9PartInfo.cs:        [UI_Toggle(enabledText = "Enabled", disabledText = "Hidden")]

So this is not related with this thread... Thanks anyway! :)

 

Edited by pmborg
Link to comment
Share on other sites

2 hours ago, linuxgurugamer said:

Just an FYI, my mod is only used to display partinfo in the editor.  It's information only, has no use beyond that

Yes I was guessing that, and I have this addon because sometimes is very useful to know which add-on own a specific part.

What I didn't understood is why with a config like this:

@PART[*]:HAS[!MODULE[ModuleB9PartInfo]]:Final
{
    MODULE
    {
        name = ModuleB9PartInfo
    }
}

This option is not shown anyway... its a mystery for me. why only some parts have this module/feature.

 

 

Link to comment
Share on other sites

4 minutes ago, pmborg said:

Yes I was guessing that, and I have this addon because sometimes is very useful to know which add-on own a specific part.

What I didn't understood is why with a config like this:

@PART[*]:HAS[!MODULE[ModuleB9PartInfo]]:Final
{
    MODULE
    {
        name = ModuleB9PartInfo
    }
}

This option is not shown anyway... its a mystery for me. why only some parts have this module/feature.

It all depends on what the code does.  Take a look at the parts which do and don't have that button in the PAW.  I think you might see a pattern.

According to the last commit for it:

Quote

 Hide part info when it's not being used

It's part of the B9PartSwitch, so I'm going to guess that if there aren't any partswitch settings in a part, you won't see it

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