Jump to content

[1.8.x - 1.12.x] PartInfoInPAW: copy part ID or full part CFG to clipboard with one click, get useful information about part from PAW menu


Judicator81

Recommended Posts

PartInfoInPAW [0.2.3]

Mod for Kerbal Space Program intended for mod creators and advanced players.
Get useful information about part from PAW menu, copy part ID or full part CFG node to clipboard with one click.

What does this mod do?

1. It displays part name (basically, part ID) and path to part CFG file in the parts list (in VAB/Hangar):
x889rHz.png

This feature is more or less identical to PartInfo mod by linuxgurugamer.

2. PartInfoInPAW also adds some information to PAW menu (right-click menu) for alls parts (works only in VAB/SPH).
    This information include:

  • part name (basically, part ID);
  • part mod (GameData folder name);
  • dry/wet mass;
  • cost;
  • entry cost;
  • dry engine TWR ("dry" means TWR is only calculated for this specific part, not craft or stage). And of course, it is shown only for engines;
  • current and maximum part temperature and skin part temperature (shown only in flight scene, and only if showInfoInFlight param is set to true (see Parameters section).
     

      For engines, mod also display formatted string of additional data about engine (the same you can see in parts list in VAB/SPH). If part has more than one ModuleEngines (for example, multi-mode engine like RAPIER), information for first two ModuleEngines will be displayed.

      5Mj9Wdk.png

3. Finally, mod adds two buttons to PAW menu (see screenshot above), which allows you to copy part name (part ID) or whole part config (in-game part representation in human-readable text) to clipboard.
This is my favorite feature, and I hope other players and modders will find it useful (as did I).

NB: button "Copy part CFG node" copies actual in-game part representation, not text from original part CFG-file. That means, whole PART{} node with all MM-patches already applied to it.

Parameters

There are three boolean (true/false) parameters for ModulePartInfoInPAW.
You could change them in GameData/PartInfoInPAW/PartInfoInPAW.cfg patch or write yoor own patch for specific parts.

showInfoInFlight
Default: false
If set to true, part temperature and skin temperature will be shown in PAW menu in flight, as well as "Copy Part ID to Clipboard" and "Copy Part CFG to Clipboard" buttons.

showTWR
Default: true
If true, dry TWR will be shown for engines in PAW menu (VAB/SPH).

showGetInfo
Default: true
If true, part ID and full path to parg CFG file will be shown in right-click menu in part list (VAB/SPH).

Dependencies

Licensing

The MIT License (MIT)

Copyright (c) 2023 Alexander Rogov

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Bundled Module Manager is licensed under a "CC share-alike license". More information can be found here.

Changelog

Spoiler

0.2.3

  • Fixed "Copy Part CFG to Clipboard" not working for parts, having spaces in their cfg-file path (for example, Coatl Aerospace mod).
  • Minor UI improvement: buttons "Copy Part ID to Clipboard" and "Copy Part CFG to Clipboard" now generate on-screen messages then pressed.
  • Added part temperature and skin temperature (current/max) to PAW menu, but only for flight scene and if showInfoInFlight is true (see README).

0.2.2

  • Slightly changed info format in Parts selection window. Now full path to part CFG file is displayed. PAW menu still has only basic mod folder info to avoid clutter.
  • Updated README.

 

0.2.1

  • Added mod folder parameter to displayed information. For some mods (like Bluedog_DB or USI family) 2 or 3 nested mod folder levels are shown (for example, "Bluedog_DB/Parts_Atlas" instead of just "Bluedog_DB").
  • Localization implemented, added russian localization.

0.2.0

  • Part mass information now include dry and wet (if part contain any resources) mass.
  • Added buttons: "copy part name to clipboard" and "copy part CFF node to clipboard". Could be useful for debug purposes.
  • Code improvements.

0.1.1

  • Information in PAW menu is now properly updated, then part variant (B9PartSwitch) is changed.

0.1.0

  • Initial release.

 

Downloads

Source: https://github.com/judicator/PartInfoInPAW

Edited by Judicator81
0.2.3
Link to comment
Share on other sites

I totally agree on the copy part name and copy part config. That is something modders and advanced players who "like" to write ModuleManager configuration will find invaluable.

For players who are not aware, the ".cfg" is a textual representation of the configuration of a part. They are defined in ".cfg" files (the KSP wiki even has a link to them for each part).

ModuleManager is pretty much a required mod for most mods which has ".cfg" language extensions to modify those definitions when the game loads, using extensions in mod or user supplied ".cfg" files. So, with enough persistence and reading, you can totally change parts, add new variants, ... become a modder! Often non-part mods supply configuration using the same system.

So, this tool will make it a lot easier to fiddle with a part:

  • Find the part you want to fix in the game editor
  • Copy the cfg to clipboard
  • Paste it into notepad
  • Modify it to be a ModuleManager style patch for that part (go read the ModuleManager forum posts and wiki, or any mods cfg files)
  • Fix whatever you didn't like
  • Save somewhere in GameData
  • Load the game again (MM has a reload option, but it's best used to make iteration a little quicker: I recommend a separate CKAN minimal modded install for testing)

There are plenty of examples of how to do this, pretty much every mod has ".cfg" files in them.

Link to comment
Share on other sites

15 hours ago, 610yesnolovely said:

So, this tool will make it a lot easier to fiddle with a part:

  • Find the part you want to fix in the game editor
  • Copy the cfg to clipboard
  • Paste it into notepad
  • Modify it to be a ModuleManager style patch for that part (go read the ModuleManager forum posts and wiki, or any mods cfg files)
  • Fix whatever you didn't like
  • Save somewhere in GameData
  • Load the game again (MM has a reload option, but it's best used to make iteration a little quicker: I recommend a separate CKAN minimal modded install for testing)

There are plenty of examples of how to do this, pretty much every mod has ".cfg" files in them.

Not sure, but I think there is some misunderstanding here. And it's actually my fault: mod description could be more clear.
So, button "Copy part CFG node" copies actual in-game part representation, not text from original part CFG-file. That means, whole PART{} node with all MM-patches already applied.

You can think of it as of copy of respective PART{} from ModuleManager.ConfigCache file. Apart from the fact, that actual ModuleManager.ConfigCache is not required.

Thus, this feature is likely more useful for "inspecting" your own or third-party changes to specific part(s) (made with MM-patches), rather than creating new MM-patches.
But it's up to you, how you would like to use it, of course.

Link to comment
Share on other sites

10 hours ago, Judicator81 said:

Not sure, but I think there is some misunderstanding here. And it's actually my fault: mod description could be more clear.
So, button "Copy part CFG node" copies actual in-game part representation, not text from original part CFG-file. That means, whole PART{} node with all MM-patches already applied.

You can think of it as of copy of respective PART{} from ModuleManager.ConfigCache file. Apart from the fact, that actual ModuleManager.ConfigCache is not required.

Thus, this feature is likely more useful for "inspecting" your own or third-party changes to specific part(s) (made with MM-patches), rather than creating new MM-patches.
But it's up to you, how you would like to use it, of course.

Absolutely, and I should have made it clear that this is true and how I thought your mod works. Still super useful, especially for starting out, though figuring out how to write MM patches is quite an adventure. My recommendation is to look at mod and user patches, read the MM wiki and forum posts and start with something simple (clone a part and change the name/description, and perhaps some minor functionality).

Some personal patches I've seen recommended:

https://github.com/Wallum/KSP-Patches

Link to comment
Share on other sites

On 11/7/2022 at 8:38 AM, Judicator81 said:

PartInfoInPAW [0.2.2]

Mod for Kerbal Space Program intended for mod creators and advanced players.
Get useful information about part from PAW menu, copy part ID or full part CFG node to clipboard with one click.

What does this mod do?

1. It displays part name (basically, part ID) and path to part CFG file in the parts list (in VAB/Hangar):
 

This feature is more or less identical to PartInfo mod by linuxgurugamer.

Looks like a nice little mod

Link to comment
Share on other sites

  • 4 months later...

Version 0.2.3 released.

Changelog:

  • Fixed "Copy Part CFG to Clipboard" not working for parts, having spaces in their cfg-file path (for example, Coatl Aerospace mod).
  • Minor UI improvement: buttons "Copy Part ID to Clipboard" and "Copy Part CFG to Clipboard" now generate on-screen messages then pressed.
  • Added part temperature and skin temperature (current/max) to PAW menu, but only for flight scene and if showInfoInFlight is true (see README).

 

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