Jump to content

[1.12.x] KSP_DataDump


linuxgurugamer

Recommended Posts

Having needed to get data from lots of parts for balancing purposes over the years, I finally wrote and finished this little mod which will allow you to select mods and part modules inside the mod, and export the data to one or more CSV files

Availability

Available via CKAN

The following is the first dialog to be shown.  The first button toggles between two values:

  • Selected Modules Applies to all Parts
    • A module and any properties selected will be applied to all mods, not just the mod you selected it in
  • Selected Modules Only
    • Selections apply only to the mod they were selected in

 

7pCjvsj.png

 

Part Attributes are values common to all parts.  A small selection are available to export, as shown in the following:

CddjLxH.png

 

Once a mod has been selected in the first window, the Part Module Selection window will open up and show all the part modules that are used in the mod:

sP8h7UR.png

 

Finally, after selecting a part module, you can then select various properties which are specific to that part module:

bA0BtBZ.png

 

When done, click the Export button

Edited by linuxgurugamer
Link to comment
Share on other sites

Just now, hemeac said:

@linuxgurugamer, this is really great!  I am assuming it is parsing information from the MM Config Cache and not the original part nodes?  Just really exciting to have a much easier ability to balance costs and features across mods.  Thanks for releasing this!

It's getting the data from the GameDatabase, which is what the game uses

Link to comment
Share on other sites

55 minutes ago, Shinsaka said:

Awesome !! Thanks for this mod it will really help. Except I can't make it work :( Tested on my modded and vanilla games, I got a NullReferenceException when I try to export the csv.

Nuts.  Looks like I cleaned up a little too much.  I'll get it fixed later this morning

New release, 0.0.1.1

  • Fixed nullref during export due to not exporting all the partattrs
Edited by linuxgurugamer
Link to comment
Share on other sites

@Shinsaka, I have removed the log file from your post.

Large amounts of text like logs files can cause loading problems on certain devices and/or browsers, especially mobile users.  Even if they're in a spoiler, they're still loaded, just not displayed.

Please upload log files to a file hosting site such as google drive or drop box, and just post the link here.  Thank you!

Link to comment
Share on other sites

39 minutes ago, Shinsaka said:

@Geonovast Oops sorry ! I'll use my dropbox from now.

@linuxgurugamer Tested the fix but still got the same error :(

Here is the log : https://www.dropbox.com/s/7r0rpuhgmgwcnlg/KSP.log?dl=0
Here is an example of csv i obtain : https://www.dropbox.com/s/qwy2necd5wu0i00/Squad.csv?dl=0

Can you tell me what you are selecting for export?  It's a new error, happening in a different spot

Edited by linuxgurugamer
Link to comment
Share on other sites

31 minutes ago, Shinsaka said:

For this csv, all the parts attributes, then Squad and SquadExpansion.
Note that I have the bug with any combination of choices.

For curiosity's sake, can you try a different mod?  Also try without the parts attributes, would like to see what happens

 

Edit:  No need for that, it's the kerbalEVA parts causing the problem

Edited by linuxgurugamer
Link to comment
Share on other sites

With nothing selected : works
No mods, some part attributes works
Just Squad, no part attributes : NullReferenceException
Squad, some part attributes : NullReferenceException
Squad, one random module, one random attribute : NullReferenceException
SquadExpansion, same tests NullReferenceException
Restock+, no attributes : works !!
Restock+, all attributes : works !
Restock+, ModuleCommand, all attributes: works ! (but many "unknownData" as values)

So, seems that Squad and SquadExpansion are sources of issues.
Also, I noted that you can't get Resources data., it would be very usefull.

Link to comment
Share on other sites

New release, 0.0.1.2

  • Fixed error caused by kerbalEVA parts
  • Added code to prevent filenames of ".csv"
41 minutes ago, Shinsaka said:

So, seems that Squad and SquadExpansion are sources of issues.

It was the kerbalEVA parts which were causing the problems

41 minutes ago, Shinsaka said:

Also, I noted that you can't get Resources data., it would be very usefull.

I'll add it to a feature request.  But I want to wait a bit to be sure the current code is stable before adding that

Edited by linuxgurugamer
Link to comment
Share on other sites

Does this do the same thing that DebugStuff gives, on the loaded modules? or moar?
Also, does this display ALL parts that use a module, (I assume so), or is it also, only part-by-part?

 

EDIT: nvm... my reading comprehension just kicked in :doh:
"Selected Modules Applies to all Parts"

Edited by Stone Blue
Link to comment
Share on other sites

@linuxgurugamer, the current version seems to be stable and have been able to try it across several mods with no issues.  Again, thanks for this, think this will come in very handy.  A couple of feature requests:

Part Costs, Entry Costs and TechRequired would be helpful for balancing parts across mods and confirming that parts were placed in the correct nodes

Propellant and atmosphereCurve within ModuleEngines/ModuleEnginesFX could also be useful

Lastly, the ability to grab multiple modules of the same name, (ie. R.A.P.I.E.R. has two ModuleEnginesFX for example).

I am not sure what is stored within the GameDatabase, but guessing that is plausible?  Your release reminded me of this config parser which I had randomly stumbled upon some while back: https://github.com/WuphonsReach/KSP-ConfigParser which use the MM config cache as an alternative.  I mucked around with it a bit last night and was able to pull out the tech required and costs easily, but the propellant and atmosphere curve data required a rather bad hack on my part to pull out what I wanted using some MM patches to get them to the top level of the Part node first.  But this was the first time running code in a compiled language in 15 years, so that's a personal win...

 

 

Link to comment
Share on other sites

On 11/12/2020 at 2:29 AM, hemeac said:

Part Costs, Entry Costs and TechRequired would be helpful for balancing parts across mods and confirming that parts were placed in the correct nodes

Being added

On 11/12/2020 at 2:29 AM, hemeac said:

Propellant and atmosphereCurve within ModuleEngines/ModuleEnginesFX could also be useful

Not at the present time

On 11/12/2020 at 2:29 AM, hemeac said:

Lastly, the ability to grab multiple modules of the same name, (ie. R.A.P.I.E.R. has two ModuleEnginesFX for example).

Not sure how to do this right now, will need to think about it

Link to comment
Share on other sites

Status on the next release:

Part Costs, Entry Costs and TechRequired would be helpful for balancing parts across mods and confirming that parts were placed in the correct nodes: Done

the ability to grab multiple modules of the same name, (ie. R.A.P.I.E.R. has two ModuleEnginesFX for example): Done

Resource stored in part: Not done

Propellant and atmosphereCurve within ModuleEngines/ModuleEnginesFX could also be useful: Outside current scope of work, possible in future

 

I hope to be able to get the resources done in a day or so.

Regarding the Propellent inside the ModuleEngines(FX), that may be possible to get.  However, the curves (velCurve & atmCurve) are problematic since they  have multiple lines, which would be somewhat difficult to add to a spreadsheet

Link to comment
Share on other sites

  • 2 weeks later...
  • 7 months later...

Hello here ! With the release of 1.12 I was trying DataDump again, and I noted that some columns in the csv are blank : TechRequired, entryCost, cost, Category, BreakingTorque. Also, the BreakingForce for many parts is blank.
The log is full of "DataDump: data not found" or "DataDump: GetPartData, not found".
Tested on 1.12 and 1.11.2 with Squad parts, same issues.


Also, thanks for the XYZ dimensions and the resources, very useful. I was wondering if it's possible to get the volume of a part. Not just the bound box volume like with KSP_PartVolume, but the real volume of the object. If not possible it's ok, I use basic formulas to get approximate volumes from XYZ.

Link to comment
Share on other sites

  • 1 month later...
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...